Revilo wrote:i build an pyvcp radiobutton with 2 choices. i can choose I, for incremetal movements, or A for absolutely movements. also i have three spinboxes namend x y and z. so if on the radiobutton i is chosen and in my x spinbox i write the value 5, i want my x axis to move 5 mm in x direction.
It can be done. But it will take a bit of fiddling.
MDI_COMMAND statements in the INI file create HAL pins and define a G-code line to run when the HAL pin goes high.
Because what you want to do takes more than one line of G-code, the MDI_COMMAND needs to call a subroutine.
See JT's example for how to do that part.
You then need the G-code that is called to read the PyVCP control values. The means that the values need to be connected to G-code analogue and digital inputs in HAL, and then the G-code inside the called subroutine needs to read them in to variables.
There is an example of how to do all this here:
www.bodgesoc.org/lathe/lathe.html