How to lock and unlock axis
How to lock and unlock axis
(OP)
Hi,
How to read the ahead block and output messagae as bellow,
Any other method other than using UDE
If the program is five axis it should give the message as !! its five axis !! or it should output as !! 3 axis.!!
example
N50G90G54
N60T250M6
N90B0.0C0.0
!!3 axis program!!
N120G0G90X0.0Y0.0S30M3
N130G43H250Z356.85
N140G85G99G17X0.0Y0.0Z248.5R334.85F250.
N150G80
How to read the ahead block and output messagae as bellow,
Any other method other than using UDE
If the program is five axis it should give the message as !! its five axis !! or it should output as !! 3 axis.!!
example
N50G90G54
N60T250M6
N90B0.0C0.0
!!3 axis program!!
N120G0G90X0.0Y0.0S30M3
N130G43H250Z356.85
N140G85G99G17X0.0Y0.0Z248.5R334.85F250.
N150G80





RE: How to lock and unlock axis
You could check the value of the 4th and 5th axis angle on your initial move. If it is not 0.0 then output the message. In post builder you could also use the custom command before_motion to test the value of mom_out_angle or other variables. It depends on where you want the output. The only problem I see is if you want it at the start of the path and the 5 axis motion is near the end you cannot look ahead that far you can only check the next motion. like mom_nxt_pos.
joycejo
RE: How to lock and unlock axis
As you said it should check the value of the 4th and 5th axis angle on your initial move, and if it it is not equal to "0" then it should print the messange...
But if its 3+2 machinig it will postion the B and C and it should lock the axis and Print message
Is there any option to look ahead, and out put message.
RE: How to lock and unlock axis
check the operation type and do the 5 axis call if it is sequential or variational. There are a couple of code samples in the standard postprocessors from ug I believe that use the first four characters sequ and vari. Below bit of code should give you a start.
global mom_operation_type
switch [string range $mom_operation_type 0 4] {
Seque - Varia {
MOM_output_literal "!! five axis program!!"
}
default {MOM_output_literal "!! three axis program !!"}
}
Good luck
RE: How to lock and unlock axis
Thanks for the information,
But if i want to read ahead nc blokcs and output message,how is it possible.
RE: How to lock and unlock axis
joycejo already gave some good suggestions to look ahead there is not a lot to add.
Jelmer