First MDI command entered by hand needed so that works a halui.mdi-command

More
7 years 7 months ago #129844 by spicer
I have configure a button for "Z probe".
But for the first run it's necessary to enter a MDI command by hand (eg M99).
Otherwise noting happens.
After this MDI command it works.
Why?
Thx for support.

Please Log in to join the conversation.

More
7 years 7 months ago #129881 by cmorley
My first thought is that HALUi doesn't change the mode to MDI before the command is sent.
I looked in the source code and it does set the mode to MDI...

But I would confirm this by running the linuxcnc status program and looking to see if the mode actually turns to MDI with the halui command.

Running an MDI command in AXIS will definitely set the mode to MDI - maybe HALUI doesn't wait long enough for the mode change.

Chris M

Please Log in to join the conversation.

More
7 years 7 months ago #129905 by spicer
Yes.
The status remains in the manual mode when I press the button.
Info:
When i change the tab from manual to MDI the status stay in manual mode until I enter a M command.

Do you have a idea for solve this problem?

Edit:
I solved the problem with a modified custom_postgui.hal
Now it works in manual mode.
Code:
# Include your customized HAL commands here # The commands in this file are run after the AXIS GUI (including PyVCP panel) # starts # This file will not be overwritten when you run stepconf again # set up the z-axis touchoff button # net remote-z-axis-touchoff classicladder.0.in-00 <= pyvcp.z-axis-touchoff net mode halui.mode.is-mdi => classicladder.0.in-01 # wait for motion to finish net in_pos motion.in-position => classicladder.0.in-02 # mdi command 1 # net z-touchoff classicladder.0.out-00 => halui.mdi-command-00 net z-touchoff halui.mdi-command-00 <= pyvcp.z-axis-touchoff # mdi command 2 net zero-x-y halui.mdi-command-01 <= pyvcp.x-y_zero

Please Log in to join the conversation.

More
7 years 7 months ago #129952 by cmorley
I looked at HALUi again and i can't tell if there is any wait-for-complete- command like there is in the python library.

i believe that is the problem.

I looks like it is suppose to return the mode back to the original mode too - not sure if it actually does.

Chris M

Please Log in to join the conversation.

More
7 years 7 months ago #129977 by pl7i92
you can run into multiple problems with all the comments in the ini fuile on 2.8-pre
interpreter is debug mode

and ofcause the Z-routines you like to go for your coustomer going way to far
get it as simple as posible

Zbouton -> probe-zngc and off we go

no need to probe at all places on the table
USE THC

Please Log in to join the conversation.

Time to create page: 0.153 seconds
Powered by Kunena Forum