- Posts: 5
- Thank you received: 0
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
- Happppppppy
- Offline
- New Member
-
Less
More
10 months 3 weeks ago #339818
by Happppppppy
Replied by Happppppppy on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I have been tuning some steppers using the stepdir plugin and the quadencoder plugins as feedback. The tuning hasn't been working too well and I'm curious if it is possible to set the Stepgen into velocity mode? Thankyou!
Please Log in to join the conversation.
10 months 3 weeks ago #339850
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hi,
can you please add your .json config.
Have you set the scale for the quad encoder correctly?
can you please add your .json config.
Have you set the scale for the quad encoder correctly?
Please Log in to join the conversation.
10 months 1 day ago #340695
by Dave3891
Replied by Dave3891 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I've started wiring and testing my custom RIO board and everything is looking good so far.
Is there any option to have a watchdog on the outputs? So if the computer crashes or loses connection the outputs will turn off?
Also are there any examples anywhere of controlling a spindle VFD over modbus with RIO?
Is there any option to have a watchdog on the outputs? So if the computer crashes or loses connection the outputs will turn off?
Also are there any examples anywhere of controlling a spindle VFD over modbus with RIO?
Please Log in to join the conversation.
10 months 1 day ago #340702
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
there are an buildin watchdog, it will disable the pwm/stepdir output if the connection is lost.
you can also set a chain of 'modifiers' to each pin (plugin -> Pins -> Modifiers) like delay, debounce, ... and 'onerror'.
The 'onerror' modifier hold the pin to low or high if connection is lost.
You can also use the 'chargepump' hal-component ( www.linuxcnc.org/docs/html/man/man9/charge_pump.9.html ) to control a master power relay.
you can also set a chain of 'modifiers' to each pin (plugin -> Pins -> Modifiers) like delay, debounce, ... and 'onerror'.
The 'onerror' modifier hold the pin to low or high if connection is lost.
You can also use the 'chargepump' hal-component ( www.linuxcnc.org/docs/html/man/man9/charge_pump.9.html ) to control a master power relay.
Please Log in to join the conversation.
10 months 1 day ago #340705
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
about the VFD, it depends on the type,
i have only a hy_vfd and no real examples, what kind of VFD you have ?
is it realy modbus conform or like the hy_vfd a modbus like protocol ?
i have only a hy_vfd and no real examples, what kind of VFD you have ?
is it realy modbus conform or like the hy_vfd a modbus like protocol ?
Please Log in to join the conversation.
10 months 17 hours ago #340722
by Dave3891
Replied by Dave3891 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
The drive is a WK600 series VFD, looking at the modbus manual, I think it is true modbus?
I have attached the modbus details
I have attached the modbus details
Please Log in to join the conversation.
10 months 15 hours ago #340726
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
It could be a bit difficult. To be honest, I've never really thought about how to integrate a VFD using normal Modbus commands.
The main problem is that Rio sends the values in a loop, and individual commands cannot be triggered by a button, for example (to start/stop).
I think I'll have to expand it a bit for that,
but you can try reading out a few values to test the communication.
in json it looks like that to read BusVoltage and RunningFrequency:
The main problem is that Rio sends the values in a loop, and individual commands cannot be triggered by a button, for example (to start/stop).
I think I'll have to expand it a bit for that,
but you can try reading out a few values to test the communication.
in json it looks like that to read BusVoltage and RunningFrequency:
Code:
{
"type": "modbus",
"pins": {
...
},
"config": {
"BusVoltage": {
"address": 1,
"type": 3,
"register": 4098,
"values": 1,
"datatype": "int",
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"priority": 0,
"direction": "input"
},
"RunningFrequency": {
"address": 1,
"type": 3,
"register": 4097,
"values": 1,
"datatype": "int",
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"priority": 0,
"direction": "input"
}
}
},
Please Log in to join the conversation.
10 months 15 hours ago #340727
by Dave3891
Replied by Dave3891 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Could the speed command be sent in the modbus loop and then I could use regular gpio for the start stop?
Please Log in to join the conversation.
10 months 14 hours ago #340730
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
not with my VFD, if it set to RS485 mode, all other inputs are disabled.
But I'm already trying something.
I'm currently writing a simple Modbus simulator in Python.
I already have an idea of how I can implement it.
But I'm already trying something.
I'm currently writing a simple Modbus simulator in Python.
I already have an idea of how I can implement it.
Please Log in to join the conversation.
10 months 13 hours ago #340731
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
perhaps also useful for others
Attachment not found
Please Log in to join the conversation.
Time to create page: 0.278 seconds
