28.08.2013 Views

CNC 8035 - Programming manual - Fagor Automation

CNC 8035 - Programming manual - Fagor Automation

CNC 8035 - Programming manual - Fagor Automation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Programming</strong> <strong>manual</strong><br />

11.<br />

HIGH-LEVEL LANGUAGE PROGRAMMING<br />

Expressions<br />

<strong>CNC</strong> <strong>8035</strong><br />

·T· MODEL<br />

(SOFT V16.3X)<br />

·250·<br />

11.5.1 Arithmetic expressions<br />

These are formed by combining functions and arithmetic, binary and trigonometric operators with<br />

the constants and variables of the language.<br />

The priorities of the operators and the way they can be associated determine how these expressions<br />

are calculated:<br />

Priority from highest to lowest To be associated<br />

NOT, functions, - (negative) from right to left.<br />

EXP, MOD from left to right.<br />

* , / from left to right.<br />

+,- (add, subtract) from left to right.<br />

Relational operators from left to right.<br />

AND, XOR from left to right.<br />

OR from left to right.<br />

Brackets should be used in order to clarify the order in which the expression is to be evaluated.<br />

(P3 = P4/P5 - P6 * P7 - P8/P9 )<br />

(P3 = (P4/P5)-(P6 * P7)-(P8/P9))<br />

Using redundant or additional brackets will neither cause errors nor slow down the execution.<br />

In functions, brackets must be used except when these are applied to a numerical constant, in which<br />

case they are optional.<br />

(SIN 45) (SIN (45)) they're both valid and equivalent.<br />

(SIN 10+5) the same as ((SIN 10)+5).<br />

Expressions can be used also to reference parameters and tables:<br />

(P100 = P9)<br />

(P100 = P(P7))<br />

(P100 = P(P8 + SIN(P8 * 20)))<br />

(P100 = ORGX 55)<br />

(P100 = ORGX (12+P9))<br />

(PLCM5008 = PLCM5008 OR 1)<br />

; Selects single block execution mode (M5008=1)<br />

(PLCM5010 = PLCM5010 AND $FFFFFFFE)<br />

; Frees feedrate override (M5010=0)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!