LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
11 Jul 2025 02:21 #331685 by epineh
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

Please Log in or Create an account to join the conversation.

More
13 Jul 2025 06:58 #331758 by Tim Bee
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.
 
 
Attachments:

Please Log in or Create an account to join the conversation.

More
13 Jul 2025 08:25 #331759 by meister
@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
The following user(s) said Thank You: Tim Bee

Please Log in or Create an account to join the conversation.

More
13 Jul 2025 10:11 #331761 by Tim Bee
@meister

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.

More
14 Jul 2025 10:09 - 14 Jul 2025 10:11 #331810 by epineh
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.

 

File Attachment:

File Name: Karen.zip
File Size:1 KB
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.

More
14 Jul 2025 10:50 #331811 by meister
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.

More
14 Jul 2025 23:00 #331837 by epineh
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.
The following user(s) said Thank You: meister

Please Log in or Create an account to join the conversation.

More
15 Jul 2025 07:59 #331849 by meister
i will add a new plugin named 'interval' or so.
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.

More
15 Jul 2025 10:59 #331850 by meister
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
        {
            "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.

More
15 Jul 2025 11:06 #331851 by meister
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.

Time to create page: 0.732 seconds
Powered by Kunena Forum