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