cancel
Showing results for 
Search instead for 
Did you mean: 

Post builder how do I add a conditional M code like coolant or spindle

Valued Contributor
Valued Contributor

I am making a mill turn post that turns live tooling on with M43 and off with M40. usually M40 is used right before the gohome move, but if the user doesn't have a gohome move then it has to outputted once somewhere else and only if M43 is active.

 

I would like know if I can create an m code for M40 to output if M43 was called in the operation. Much like with coolant or with the spindle . I can do it with custom commands, but I am hoping there is a simpler way to do this.

Using NX 8.0.3.4
2 REPLIES

Re: Post builder how do I add a conditional M code like coolant or spindle

I think you can just copy the M_spindle word and change it from M3/M5 to M43/M45.

Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: Post builder how do I add a conditional M code like coolant or spindle

Siemens Legend Siemens Legend
Siemens Legend

NX Post keeps track of modality for each word that is used in the postprocessor.

As already mentioned you can copy an existing word (M_spindle) or create a new one and use that.

When it is set to modal it will only be outputted when the value of the address is changed.

If you want to give the word an intial state you can can put it in its own block and use the following command to set the word to a modal value but not outputting it.

MOM_do_template blockname create

 the keyword create allows you to capture the output as a return value but not outputting it to file.

Regards,

 

Gerrit Koelewijn

Regards,

Gerrit Koelewijn

Learn online





Solution Information