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

More
2 years 2 months ago #307350 by meister
you can simply use shiftregisters,
it's faster than going via a microcontroller and spi, and cheaper too. i always say that you shouldn't run encoders via the expansions, but it's still faster than using an MCU. and as long as the encoders aren't connected to an hf-spindle, it works too

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

More
2 years 2 months ago #307357 by Mecanix
Oliver, bit of a heads up; I'm keeping all of Sunday free to play RIO and motion controls (way too fun man). On that great Sunday agenda is this MPG implementation!!

When you have time to think about it, I'd love to hear about creative way(s) to implement this MPG into Rio in the most simplistic possible way (aka for noob!). At least some hints as to where to begin with this, and I'll figure out the rest (coughs lol).

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

More
2 years 2 months ago #307364 by Cant do this anymore bye all
I made a custom component for my mill that basically takes all the inputs works out the step size per click and what not.
Instead of having a mess of Hal logic it’s all self contained.
I’ll drag it out over the weekend.
The following user(s) said Thank You: Mecanix

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

More
2 years 2 months ago #307368 by Mecanix

I’ll drag it out over the weekend.
Give us the heads up and hint us rather, i.e where to start to get a module written (template/example?). If we are to be using RIO for the next decade then it's imperative we know how to implement one of those cool plugin/module (not even sure of the difference between both, goes to show). So much to learn and fun ahead I'm sure. 

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

More
2 years 2 months ago #307371 by meister
ok, jogging, grrrrrrrrrrrrrr

in general, everything can be configured as with mesa at the end via hal, the only problem is that this is overwritten when regenerating :(

To make simple assignments, there are the 'signal' -> 'net' options.
A strength of RIO is that even double assignments are recognised and if possible an AND/OR is built in between.

When it gets more complicated, for example when jogging (switching axes / speed / ..) the 'net' option no longer helps :(

but then there is the 'signal' -> 'function' option :)

there are a few predefined options

Examples 1:

2 Encoder
1. for Axis X / joint0
2. for Axis Y / joint1
Code:
{ "type": "quadencoder", "pins": { "a": { "pin": "SHIFT_INPUT[0]" }, "b": { "pin": "SHIFT_INPUT[1]" } }, "signals": { "position": { "function": "jog.wheel_x" } } }, { "type": "quadencoder", "pins": { "a": { "pin": "SHIFT_INPUT[2]" }, "b": { "pin": "SHIFT_INPUT[3]" } }, "signals": { "position": { "function": "jog.wheel_y" } } },

Examples 2:

1 Encoder for all axis
joint/axis selection can be done in the AXIS gui
Code:
{ "type": "quadencoder", "pins": { "a": { "pin": "SHIFT_INPUT[0]" }, "b": { "pin": "SHIFT_INPUT[1]" } }, "signals": { "position": { "function": "jog.wheel" } } },

Mixing Example 1 and 2 is not possible :(

this is a list of some rio functions:
Code:
RIO_FUNCTIONS = { "inout": {}, "output": { "jog.selected-x": {"help": "X is the selected axis", "type": bool}, "jog.selected-y": {"help": "Y is the selected axis", "type": bool}, "jog.selected-z": {"help": "Z is the selected axis", "type": bool}, "jog.position": {"help": "Position of selected axis", "type": float}, }, "input": { "jog.wheel": {"help": "Jog-Wheel", "type": float}, "jog.wheel_x": {"help": "Jog-Wheel X-Axis", "type": float}, "jog.wheel_y": {"help": "Jog-Wheel Y-Axis", "type": float}, "jog.wheel_z": {"help": "Jog-Wheel Z-Axis", "type": float}, "jog.select-x": {"help": "Jog-Select X-Axis", "type": bool}, "jog.select-y": {"help": "Jog-Select Y-Axis", "type": bool}, "jog.select-z": {"help": "Jog-Select Z-Axis", "type": bool}, "jog.plus": {"help": "Jog selected axis plus", "type": bool}, "jog.minus": {"help": "Jog selected axis minus", "type": bool}, "jog.fast": {"help": "Jog set fast", "type": bool}, }, }

i think we need a documentation for this, there are other function but i have also need to check what i have done there :)

last but not least, there are also a few add-ons that can be configured via the setup-gui:
Code:
riocore# ls riocore/generator/addons/ camera classicladder hy_vfd joypad mxmpg README.md


it doesn't seem like much now, but we can still expand it and with the automatic links it is already very powerful and can create hal's that nobody would have to create by hand :P



The following user(s) said Thank You: Mecanix

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

More
2 years 2 months ago - 2 years 2 months ago #307372 by Mecanix
Oh and errr... now that I have the rio stepgens buzzing I hooked up a signal wire to my mill X step drive and, and ... Ready for it??

The Nasty Resonance Is Gone!!! Man those RIO stepgens are good. Used to sound like a freight train at several velocities before, so much so I bet my great great great neighbor half a mile away was hearing my sheet metal panels rattling. That mess will soon be resolved!!

Edit: as I was typing this, the awesome support from meister manifested itself once again. Not surprised though. That is so cool, great and spot on info - I look forward learning this 
Last edit: 2 years 2 months ago by Mecanix.
The following user(s) said Thank You: meister

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

Time to create page: 0.795 seconds
Powered by Kunena Forum