- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
- Happppppppy
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 1
07 Dec 2025 11:47 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
08 Dec 2025 05:57 #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 or Create an account to join the conversation.
- Dave3891
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 7
30 Dec 2025 04:08 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
30 Dec 2025 06:10 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
30 Dec 2025 08:30 #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 or Create an account to join the conversation.
- Dave3891
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 7
30 Dec 2025 16:10 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
30 Dec 2025 18:04 #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:
{
"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 or Create an account to join the conversation.
- Dave3891
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 7
30 Dec 2025 18:20 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
30 Dec 2025 19:36 #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 or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 702
- Thank you received: 430
30 Dec 2025 19:38 #340731
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Attachments:
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Time to create page: 1.562 seconds