- 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)
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
27 Jan 2025 07:54 #319933
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
don't think it's directly due to the spi rate,
faster spi can certainly lower the value somewhat, but it's more to do with the set-up, as I send and receive in one step.
when i have more time i'll try to optimise the process, unfortunately i can't compare it with mesa because i don't have a mesa.
faster spi can certainly lower the value somewhat, but it's more to do with the set-up, as I send and receive in one step.
when i have more time i'll try to optimise the process, unfortunately i can't compare it with mesa because i don't have a mesa.
The following user(s) said Thank You: Tim Bee
Please Log in or Create an account to join the conversation.
- babinda01
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 2
01 Feb 2025 12:14 #320320
by babinda01
Replied by babinda01 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hi Guys,
I am hoping someone can point me in the right direction. I have a TangBOB board that I am trying to get a N4D3E16 MODBUS board (16 Digital In - 16 Digital Out) to work with.
This board will only allow Function codes 3 (Read Status) and 6 (Control Command).
I have all 16 inputs working well through to LinuxCNC, but I can't get the outputs to work. When I configure RIOCore to use function 6, it seems to assign it as a float, and so in the testgui it shows up as a slider.
Attached are a couple of pics of my configs and a page from the modbus boards manual.
I am hoping someone here might be able to point me in the right direction here.
Thanks
Andrew
I am hoping someone can point me in the right direction. I have a TangBOB board that I am trying to get a N4D3E16 MODBUS board (16 Digital In - 16 Digital Out) to work with.
This board will only allow Function codes 3 (Read Status) and 6 (Control Command).
I have all 16 inputs working well through to LinuxCNC, but I can't get the outputs to work. When I configure RIOCore to use function 6, it seems to assign it as a float, and so in the testgui it shows up as a slider.
Attached are a couple of pics of my configs and a page from the modbus boards manual.
I am hoping someone here might be able to point me in the right direction here.
Thanks
Andrew
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
02 Feb 2025 11:45 #320404
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
i'll have a look at it and try to treat the values as single bits
unfortunately i don't have any test-hardware for it at the moment, but maybe i'll get something made.
btw: where did you have your tangbob boards made ? ready assembled or soldered yourself ? if assembled, what does it cost ready made?
greetings,
Olli
unfortunately i don't have any test-hardware for it at the moment, but maybe i'll get something made.
btw: where did you have your tangbob boards made ? ready assembled or soldered yourself ? if assembled, what does it cost ready made?
greetings,
Olli
Please Log in or Create an account to join the conversation.
- babinda01
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 2
03 Feb 2025 00:30 #320466
by babinda01
Replied by babinda01 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hi Olli
Thanks very much, for both the efforts you have put into this project, as well as looking at my Modbus issue. If you can PM me your postal address, I would be more than happy to send you one of the Modbus boards to use as a test.
I got the tangbob boards made and assembled by JLPCB for approx $100 for 10 boards plus freight - I live in North Queensland, Australia. They did quite a good job. I had to supply and place the tang board and the wiznet board myself.
Regards
Andrew
Thanks very much, for both the efforts you have put into this project, as well as looking at my Modbus issue. If you can PM me your postal address, I would be more than happy to send you one of the Modbus boards to use as a test.
I got the tangbob boards made and assembled by JLPCB for approx $100 for 10 boards plus freight - I live in North Queensland, Australia. They did quite a good job. I had to supply and place the tang board and the wiznet board myself.
Regards
Andrew
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
03 Feb 2025 07:55 #320474
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hi Andrew,
thanks for the info and thanks for the offer, but it won't be worth sending to germany.
i'll find something to test it with.
The price is really great, especially when you consider what it would have cost 5-10 years ago.
@All You are welcome to market the boards commercially,
I am happy if there are sources where everyone can get a board individually.
The only condition is, if you become a millionaire, invite me for dinner ;P
thanks for the info and thanks for the offer, but it won't be worth sending to germany.
i'll find something to test it with.
The price is really great, especially when you consider what it would have cost 5-10 years ago.
@All You are welcome to market the boards commercially,
I am happy if there are sources where everyone can get a board individually.
The only condition is, if you become a millionaire, invite me for dinner ;P
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
03 Feb 2025 10:13 - 03 Feb 2025 13:45 #320483
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
ahhhhh
Last edit: 03 Feb 2025 13:45 by meister.
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
03 Feb 2025 10:14 - 03 Feb 2025 15:47 #320484
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
hate modbus protocol 
sorry, need some time to fix that problem
EDIT2:
I have now ordered a 32 relay card,
I will not receive the 16-channel card in time.
The protocol is a bit different, but it looks like I'll have to write a sub-plugin for each type, as no one really follows the standard

sorry, need some time to fix that problem
EDIT2:
I have now ordered a 32 relay card,
I will not receive the 16-channel card in time.
The protocol is a bit different, but it looks like I'll have to write a sub-plugin for each type, as no one really follows the standard

Last edit: 03 Feb 2025 15:47 by meister.
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
04 Feb 2025 08:27 #320583
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
ok, until I have a better solution,
I have added a new 'type' (201 : Custom Boolean)
sample config (gui setup will not work / need to added by hand in the json config):
"on": the bytes of the frame to switch the output on (without address and checksum)
"off": the bytes of the frame to switch the output off (without address and checksum)
I have added a new 'type' (201 : Custom Boolean)
sample config (gui setup will not work / need to added by hand in the json config):
{
"type": "modbus",
"pins": {
"tx": {
"pin": "MODBUS:TX"
},
"rx": {
"pin": "MODBUS:RX"
},
"tx_enable": {
"pin": "MODBUS:TX_ENABLE"
}
},
"uid": "modbus0",
"config": {
"relais1": {
"type": 201,
"address": 11,
"on": [6 ,0, 1, 1, 0],
"off": [6 ,0, 1, 0, 0],
"timeout": 100,
"delay": 60,
"direction": "output"
}
}
}
"on": the bytes of the frame to switch the output on (without address and checksum)
"off": the bytes of the frame to switch the output off (without address and checksum)
Please Log in or Create an account to join the conversation.
- babinda01
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 2
05 Feb 2025 00:18 #320671
by babinda01
Replied by babinda01 on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hi Olli
Thank you very much for your efforts, I will download the latest dev of riocore tonight and will let you know how it goes.
Andrew
Thank you very much for your efforts, I will download the latest dev of riocore tonight and will let you know how it goes.
Andrew
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 321
05 Feb 2025 15:53 #320759
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
i got my 32 relay card today and changed something in the setup, i will test everything again later.
you can now use func:6 and set the datatype (new option) to bool, as register the 112 (0x70) and Values = 16
you can now use func:6 and set the datatype (new option) to bool, as register the 112 (0x70) and Values = 16
"config": {
"relais": {
"address": 11,
"type": 6,
"register": 112,
"values": 16,
"datatype": "bool",
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "",
"timeout": 100,
"delay": 60,
"direction": "output"
}
}
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: 0.174 seconds