Cancel
Showing results for 
Search instead for 
Did you mean: 

CSE: How can I know if M91 is called.

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

I have a machine with more than 5 axis, now I need to move the W axis. I need to know if W address is called with a M91 in the same line or not.

One solution could be to Preprocess the line and put a flag when M91 is in the line, but I want to know if there is a more clean approach.

 

Regards

Frank.

8 REPLIES

Re: CSE: How can I know if M91 is called.

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
For M91 add as first Command:
Assert
FALSE
"MINOR"
"M91 called"

If M91 called you will see a message.

Re: CSE: How can I know if M91 is called.

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Thanks Chigishev, but the point is I have no access to the M91 code, and I want to know if M91 was called when I am into W code address in order to do different if I am moving W with M91 or not.

 

Regards

Frank.

Re: CSE: How can I know if M91 is called.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Frank,

 

you talk about the M91 implemention in HeidenhainTNC.ccf?

 

Thomas

Re: CSE: How can I know if M91 is called.

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

@thomasfeind wrote:

Hi Frank,

 

you talk about the M91 implemention in HeidenhainTNC.ccf?

 

Thomas


Yes, but I really think I don't need the code itself, but I need to know if I am processing a line with M91 or not when my W address is called.

 

Frank.

Re: CSE: How can I know if M91 is called.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Frank,

 

two possible options as I do not know what you plan to do with that information.

 

1. You can use MCParam inside the W meta code.
Using isDefined you should be able to check if M91 comes together with W.
In that case you need to make sure doing the same action for M91 in the W Metacode as done usually, as meta code M91 itself will not called when you "catch" it already with MCParam.

 

2. Work with precedence to define the order of the meta codes. In your case first call M91 then call W.

In that case you can set a marker variable or similar in M91 to check in W (and reset in W).

Precedence you can mange and see when you select the root note "Commands" in MC Commands tab.

 

Hope that give some ideas

Thomas

 

Thomas Schulz
Siemens PLM
Manufacturing Engineering Software

Re: CSE: How can I know if M91 is called.

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Hi Thomas, thank you, I will check your ideas.

 

What I'm planning is that I need to do a -preset- of W axis like with CYCL DEF 7 in X, Y and Z, so when W is called I need to know if M91 comes with it or not.

Maybe I'm complicating my life, but I can not think of anything else to deal with the problem of moving W.

 

Regards

Frank.

Re: CSE: How can I know if M91 is called.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Frank,

I hope I got it now.
FYI: the M91 calls the method GMe_ActivateAllTransformations with parameter bActive: FALSE and bModal: FALSE only

Easily create your own M91 with the information before and set a global variable e.g. "GV_bM91isActive" to TRUE/FALSE and evaulate this variable in the W metacode. But consider the precedence settings as SpaceTom already mentioned. Or you do it with the MCParam apporach

Thomas

Re: CSE: How can I know if M91 is called.

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Thank You, I have taken control in W address with the 2nd approach of SpaceTom, and putting the precedence in order to call first M91 and then W.

With the first possibility I haven't been able to do it. When I put the MCParam into the W code, the isDefinined(M91) is always false. (See the picture for the code I have used).

 

 

Waddress.png

 

 

 

 

Regards

Frank.

Learn online





Solution Information