OSAI 10 Series Pre-Processor Syntax

This document list the specific OSAI 10 Series syntax supported by the pre-processor.


  1. Pre-processor Setup

  2. Register default value

  3. Operators

  4. Arithmetic operators

  5. Unconditional branching

  6. Conditional branching

  7. Repetition

  8. Variables

  9. Sub-program

  10. Other matching patterns


1. Pre-processor setup

The OSAI 10 Series pre-processor can be setup in order to be a little bit more flexible. This is done via the macro function $FCEPP( ). This function’s purpose is really to communicate information that are specific to some pre-processor without being standard on every one of them. These are the configuration parameter supported by the OSAI 10 Series pre-processor.

  • $FCEPP('PROCESS', 'COMMENTS', <value>)
    
Value: $TRUE to let the pre-processor process the comments (this is the default).
$FALSE to have the pre-processor leave the comments as-is on the blocks.

2. Register default value

The OSAI controller accept to specify codes and registers without a numeric value when 0 is to be used. The pre-propcessor will expand them back with the 0 value in order for the CE questionnaire to match the registers properly.

Exemple of NC blocks before and after being pre-processed:

GX34
G0 X34
G92 XY
G92 X0 Y0

3. Operators

=

Is equal

<>

Not equal

>=

Greater or equal then

>

Greater than

<=

Less or equal than

<

Less than

AND

Logical AND

OR

Logical OR

NOT

Logical NOT

4. Arithmetic operators

Syntax

Description

-

Subtraction

+

Addition

*

Multiplication

/

Division

=

Assignation

( )

Priority

SIN(x)

Sinus

ARS(x)

ArcSinus

COS(x)

Cosinus

ARC(x)

ArcCosinus

TAN(x)

Tangent

ART(x)

ArcTangeant

SQR(x)

Square root

ABS(x)

Absolute value

INT(x)

Integer part

NEG(x)

Negative

MOD(x,y)

Modulo (get tde remainder part)

5. Unconditional branching

Syntax

Description

(GTO,<label>)

Jump to a specific label in the MCD. (GTO,label) (GTO,?SC12.5) Label are defined between double quotes (i.e. "LABEL")

6. Conditional branching

Syntax

Description

(IF,<condition>)
(ELSE)
(ENDIF)
Evaluate boolean condition and process if condition is TRUE. Otherwise skip to (ENDIF) or (ELSE) block.
(IF,E3 <> 2)
...
(ELSE)
...
(ENDIF)

7. Repetition

Syntax

Description

(EPP,<label1>,<label2>)

Execute the blocks in the range <label1> to <label2>

(RPT,<count>)
(ERP)

Execute the blocks between the RPT and ERP function <count> amount of times

8. Variables

Syntax

Description

E<n>

E numeric parameters

L<n>

L numeric parameters

!name_var[<index>].[number of characters]CH

User text variables

!name_var[<index>]

User numeric variables

SN<n>

System numeric variables

SC<index>.<length>

System text variables

H<n>

Paramacros numeric variables

HF<n>

Paramacros logical variables indicating if the associated H variable is used

HC

Paramacros text variable

10. Other matching patterns

Syntax

Description

(DIS,<message>)

Operator messages

;

End of block marker and start of comments

N<n>

Sequence number

/

When appearing at the start of a block or after the sequence number, treated as block skip.