- 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)
- epineh
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 22
11 Jul 2025 02:21 #331685
by epineh
Replied by epineh on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I've been playing with the WLED plugin, got a string of 5 led's working for various things, that is really cool.
I thought I'd try add a blink function to one of them. I see that only the WLED_Expansion allows me to assign an LED from another plugin, but when I try I get the compile error
Procedural assignment to a non register "LED_BLUE" is not permitted.
Any idea what I'm doing wrong
I thought I'd try add a blink function to one of them. I see that only the WLED_Expansion allows me to assign an LED from another plugin, but when I try I get the compile error
Procedural assignment to a non register "LED_BLUE" is not permitted.
Any idea what I'm doing wrong
Please Log in or Create an account to join the conversation.
- Tim Bee
- Offline
- New Member
-
Less
More
- Posts: 15
- Thank you received: 5
13 Jul 2025 06:58 #331758
by Tim Bee
Replied by Tim Bee on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Dear meister:
When I tested the encoder plugin I found that the indicated position seemed to be the number of revolutions. When the encoder rotated one revolution, the position increased by one number. I was sure that my scale configuration was correct because the rpm displayed the correct value. I let the motor run at 100rpm and the encoder plugin displayed about 100rpm. My encoder came from the simulated encoder of the servo motor driver.
When I tested the encoder plugin I found that the indicated position seemed to be the number of revolutions. When the encoder rotated one revolution, the position increased by one number. I was sure that my scale configuration was correct because the rpm displayed the correct value. I let the motor run at 100rpm and the encoder plugin displayed about 100rpm. My encoder came from the simulated encoder of the servo motor driver.
Attachments:
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 627
- Thank you received: 379
13 Jul 2025 08:25 #331759
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
@epineh please add you config
@Tim Bee
you need to use rio.enc0.position, this is the floating point value.
there is no raw value without scale calculation, but if you really need one, i will check to add it
@Tim Bee
you need to use rio.enc0.position, this is the floating point value.
there is no raw value without scale calculation, but if you really need one, i will check to add it
The following user(s) said Thank You: Tim Bee
Please Log in or Create an account to join the conversation.
- Tim Bee
- Offline
- New Member
-
Less
More
- Posts: 15
- Thank you received: 5
13 Jul 2025 10:11 #331761
by Tim Bee
Replied by Tim Bee on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
@meister
I'm sorry, i miss the rio.enc0.position pin ^_^
Tim
I'm sorry, i miss the rio.enc0.position pin ^_^
Tim
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- epineh
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 22
14 Jul 2025 10:09 - 14 Jul 2025 10:11 #331810
by epineh
Replied by epineh on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I've attached the config, this is a basic test setup, axis setups work. With the WLED expansion plugin loaded it will compile/flash/run LinuxCNC no issues, but when I add a Blink plugin, and tie it to the WLED0 blue LED it won't compile.
Cheers.
Russell.
Cheers.
Russell.
Attachments:
Last edit: 14 Jul 2025 10:11 by epineh.
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 627
- Thank you received: 379
14 Jul 2025 10:50 #331811
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
ok, found the bug, sorry, is fixed in main and dev
The following user(s) said Thank You: epineh
Please Log in or Create an account to join the conversation.
- epineh
- Offline
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 22
14 Jul 2025 23:00 #331837
by epineh
Replied by epineh on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Awesome thank you, I'll update and check that out tonight.
I don't want to push my luck but would it be possible to have a dual timer plugin? It would be for lube pumps mainly, so generally they turn on when the machine starts, run for 10 seconds then off, and turn on for 10 seconds every 20 minutes after that.
I guess the blink could be modified for longer frequency but both the on and off time needs to be adjustable.
Cheers.
Russell.
I don't want to push my luck but would it be possible to have a dual timer plugin? It would be for lube pumps mainly, so generally they turn on when the machine starts, run for 10 seconds then off, and turn on for 10 seconds every 20 minutes after that.
I guess the blink could be modified for longer frequency but both the on and off time needs to be adjustable.
Cheers.
Russell.
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 627
- Thank you received: 379
15 Jul 2025 07:59 #331849
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
i will add a new plugin named 'interval' or so.
then you can configure the on-time and the interval-time via gui/hal
then you can configure the on-time and the interval-time via gui/hal
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 627
- Thank you received: 379
15 Jul 2025 10:59 #331850
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
in dev branch and untested (only via testbench):
github.com/multigcs/riocore/blob/dev/rio...s/interval/README.md
little config example 10 seconds on / interval 20 minutes default
looks like this:
and the onTime can be adjust between 5 and 20 seconds / interval between 600 and 1800 seconds (10 - 30 minutes)
github.com/multigcs/riocore/blob/dev/rio...s/interval/README.md
little config example 10 seconds on / interval 20 minutes default
{
"type": "interval",
"pins": {
"out": {
"pin": "PIN:69"
}
},
"uid": "interval0",
"signals": {
"enable": {
"display": {
"title": "Pump-Active",
"section": "status"
},
"net": "halui.machine.is-on"
},
"ontime": {
"display": {
"title": "Pump-OnTime (s)",
"initval": 10.0,
"min": 5.0,
"max": 20.0,
"section": "status"
}
},
"interval": {
"display": {
"title": "Pump-Interval (s)",
"initval": 1200.0,
"min": 600.0,
"max": 1800.0,
"section": "status"
}
}
}
}
looks like this:
and the onTime can be adjust between 5 and 20 seconds / interval between 600 and 1800 seconds (10 - 30 minutes)
Attachments:
The following user(s) said Thank You: epineh
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 627
- Thank you received: 379
15 Jul 2025 11:06 #331851
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
a little tip on what you can do with the wled's to display the status:
{
"type": "wled",
"pins": {
"data": {
"pin": "WLED:DATA"
}
},
"signals": {
"0_green": {
"net": "(!halui.mode.is-auto and !axisui.error) or halui.program.is-paused"
},
"0_red": {
"net": "axisui.error"
},
"0_blue": {
"net": "halui.mode.is-auto"
}
},
"uid": "wled0"
},
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.732 seconds