XHC-WHB04B-6 Macro 10 zum Achse Nullen

More
6 years 11 months ago #149826 by pl7i92
eigentlich ist das -> MDI_COMMAND=(debug,macro10 X Null)
nur der platzhalter für

MDI_COMMAND=G10 L20 P1 X0

tolle zusammenstellung die du dir da gebastelt hast
Pass bitte auf die leerstellen und kommentare auf die hal sollte kompakt bleiben

Please Log in to join the conversation.

More
2 years 3 months ago #305075 by Anton
Hello,
I am a beginner and still have some problems with the signal linking in the HAL.
As shown above, I have managed to zero the axes using button 10 and the rotary knob for axis selection. How can I now set all axes to 0 after selecting axis C with the rotary knob and pressing button 10?


#### Axes Zero with selected axis and button10 ###
loadrt and2 names=and2_X,and2_Y,and2_Z,and2_C
addf and2_X servo-thread
addf and2_Y servo-thread
addf and2_Z servo-thread
addf and2_C servo-thread

net button10 <= whb.button.macro-10 

#### X-Axis ####
net pdnt.axis.X.select => and2_X.in0
net button10 => and2_X.in1
net x_zero <= halui.mdi-command-21 <= and2_X.out 

#### Y-Axis ####
net pdnt.axis.Y.select => and2_Y.in0
net button10 => and2_Y.in1
net y_zero <= halui.mdi-command-22 <= and2_Y.out

#### Z-Axis ####
net pdnt.axis.Z.select => and2_Z.in0
net button10 => and2_Z.in1
net z_zero <= halui.mdi-command-23 <= and2_Z.out

### Zero all axes if axis C is selected ###
net pdnt.axis.C.select => and2_C.in0
net button10 => and2_C.in1
net zero_all ????

Please Log in to join the conversation.

More
2 years 3 months ago #305082 by Aciera
Create a new HAL_COMMAND entry in the ini file:
MDI_COMMAND=G10 L20 P0 X0 Y0 Z0

and call that from your hal:
net zero_all => halui.mdi-command-your_number_here <= and2_C.out

Please Log in to join the conversation.

More
2 years 3 months ago #305097 by Anton
Thank you very much for the quick reply!

I had tried to call the MDI commands 
halui.mdi-command-21, 
halui.mdi-command-22, 
halui.mdi-command-23, i.e. to use them again, which did not work.

With a new MDI command, it becomes quite simple.
 

Please Log in to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum