- Posts: 447
- Thank you received: 229
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
1 year 11 months ago - 1 year 11 months ago #314643
by Mecanix
Replied by Mecanix on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
StackExchange and EEVBlog are both fantastic venues for brainstorming and validating electrical/circuit ideas and designs, you'd find accurate answers to your questions in a finger snap and be done already. I highly doubt a Lcnc forum will be of any help. Great place for software, configs, dev, and industrial motion control hardware though, mostly.
Last edit: 1 year 11 months ago by Mecanix.
The following user(s) said Thank You: mBender
Please Log in or Create an account to join the conversation.
1 year 11 months ago - 1 year 11 months ago #314644
by Mecanix
Replied by Mecanix on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
[deleted] potentially misleading, no hands on exp. sorry ab that.
Last edit: 1 year 11 months ago by Mecanix.
Please Log in or Create an account to join the conversation.
1 year 11 months ago #314721
by meister
you can config modifier's to each pin, there are functions like invert, debounce, ...
to add an delay between step and dir, you can add a debounce modifier to the step pin, than you have a delayed step signal
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
That reminds me, is there a way to configure minimum delay time between a DIR change and a movement command? some steppers are more picky about that. I also need to flip the action of the EN pin, my steppers are enable-low and it's currently outputting high when enabled.
you can config modifier's to each pin, there are functions like invert, debounce, ...
to add an delay between step and dir, you can add a debounce modifier to the step pin, than you have a delayed step signal
The following user(s) said Thank You: digiex_chris
Please Log in or Create an account to join the conversation.
1 year 11 months ago #314822
by mBender
Replied by mBender on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I need someone pointing me in the right direction to get my spindle running.
I can either try to get classic ladder to work. For whatever reason, it will not work with Rio.
This is the code rio creates in the rio.hal file.
If I start LinuxCNC, it is not in Modbus Master mode. So I changed the configuration. This is what works on the same machine.
When I start LinuxCNC I get the following error:
I tried to remove the numS32out=100, but no success. I can load the program manually with the ladder editor, but it is still not in modmaster mode and won't work.
I could also continue to work on the Modbus integration. I know which registers to read and write from my VFD, but need some starting help to translate this:
Into this:
I can either try to get classic ladder to work. For whatever reason, it will not work with Rio.
This is the code rio creates in the rio.hal file.
Code:
loadrt classicladder_rt
addf classicladder.0.refresh servo-thread
If I start LinuxCNC, it is not in Modbus Master mode. So I changed the configuration. This is what works on the same machine.
Code:
loadrt classicladder_rt numS32out=100
addf classicladder.0.refresh servo-thread
loadusr classicladder --modmaster vfd.clp
When I start LinuxCNC I get the following error:
Code:
Shared memory conflict or RT component not loaded!
ERROR CLASSICLADDER- Ladder memory allocation error
I tried to remove the numS32out=100, but no success. I can load the program manually with the ladder editor, but it is still not in modmaster mode and won't work.
I could also continue to work on the Modbus integration. I know which registers to read and write from my VFD, but need some starting help to translate this:
Into this:
Please Log in or Create an account to join the conversation.
- digiex_chris
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 11
1 year 11 months ago - 1 year 11 months ago #314852
by digiex_chris
Replied by digiex_chris on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I suspect you will likely get more helpful help in the classicladder section, I don't see this as an issue specifically with riocore, particularly with the error indicating memory issues in the classicladder components, rather than the riocore driver. At the very least, there likely is more classicladder experts watching that section than here.
www.forum.linuxcnc.org/25-classicladder
The only thing I can think of is the order the gui loads in vs the classicladder user mode stuff matters. I've seen some people use -w and -W to make the loading wait until things are complete as well. I needed to do that for one of my custom (non-classicladder) programs, needed to have it wait for the hal stuff to be complete before continuing to load the hal file.
linuxcnc.org/docs/stable/html/ladder/cla..._non_realtime_module
The example configs in the linux cnc repo have been quite helpful for me personally, there might be some hints in there for your use case as well
github.com/LinuxCNC/linuxcnc/blob/master...dder/demo_sim_cl.hal
www.forum.linuxcnc.org/25-classicladder
The only thing I can think of is the order the gui loads in vs the classicladder user mode stuff matters. I've seen some people use -w and -W to make the loading wait until things are complete as well. I needed to do that for one of my custom (non-classicladder) programs, needed to have it wait for the hal stuff to be complete before continuing to load the hal file.
linuxcnc.org/docs/stable/html/ladder/cla..._non_realtime_module
The example configs in the linux cnc repo have been quite helpful for me personally, there might be some hints in there for your use case as well
github.com/LinuxCNC/linuxcnc/blob/master...dder/demo_sim_cl.hal
Last edit: 1 year 11 months ago by digiex_chris.
Please Log in or Create an account to join the conversation.
1 year 11 months ago #315065
by mBender
Replied by mBender on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I made a post in the Classicladder Subforum. I believe I am a step ahead. The problem seems to be the activated Twopass option in the Ini. Not really sure how to work around that, but it feels like the solution is close.
forum.linuxcnc.org/25-classicladder/5451...ng-with-linuxcnc-rio
forum.linuxcnc.org/25-classicladder/5451...ng-with-linuxcnc-rio
Please Log in or Create an account to join the conversation.
Time to create page: 0.401 seconds