×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to lock and unlock axis

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

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

(OP)
Actual I need to print this message after the tool change,

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

Do the following build a little procedure in your ug postprocessor
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

(OP)
Hi
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

I am not sure if you will need to read ahead because the kind of operation automtically tells you that it will be a simultanious five axis move or not. I agree there is a slim chance that some programmers will use a sequential mill for a three axis program then you will get it wrong with the operation type.

joycejo already gave some good suggestions to look ahead there is not a lot to add.

Jelmer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources