Cancel
Showing results for 
Search instead for 
Did you mean: 

How to set range of numbers in Common AnyController Commands

Pioneer
Pioneer

Hi  everybody

 

I want to set    3 < nToolID < 35    in ToolChange.prg with AnyController Commands .

 

I set to like this is wrong. 

 

##LANGUAGE  AC

INT nToolID;

IF ( nToolID < 35 AND nToolID > 3 );                 this  CSE do not read.

 

 

How to set? 

 

Appreciate everyone's help.

4 REPLIES 4

Re: How to set range of numbers in Common AnyController Commands

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello yous707,

 

what is teh message you go when you say:

    "this CSE do not read."

 

What I can say already is that nToolID is defined, but has no value!

Thomas Schulz
Siemens PLM
Manufacturing Engineering Software

Re: How to set range of numbers in Common AnyController Commands

Pioneer
Pioneer

Hello Tom

 

thank you for your reply.

 

CSE do not have message.

 

I mean   define  nTool=4 ,  CSE read   IF ( nToolID < 35 AND nToolID > 3 );    CSE skip this line.

 

how the defined the range of number?   for  example :   3 < nToolID < 35 

Re: How to set range of numbers in Common AnyController Commands

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

please try this:

 

IF ( (nToolID < 35) AND (nToolID > 3) );

 

 

Thomas Schulz
Siemens PLM
Manufacturing Engineering Software

Re: How to set range of numbers in Common AnyController Commands

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Hello @yous707,

 

I had the same issue some time ago.

 

As mentioned by @SpaceTom, I had to add parentheses for each condition and it worked.

 

I hope this helps.

 

Thanks.

Jean Marcel
Application Engineer
Ally PLM Solutions | PROLIM PLM

Learn online





Solution Information