Reference Manual

16-Axis MACRO CPU Software Reference Manual
60 16-Axis MACRO Station MacPLCCs
Special MACRO Program Commands
CHAN = Exp. (limited to 1 –8) (Sets channel # f or MI910 - 939 & 950 – 969 or MI1910 - 1939 & 1950
- 1969). If Exp. is < 1 CHAN is not updated and if Exp. is >8 it is limited to 8.
Valid Math, Assignment and Conditional Operators
+, -, *, /, %, &, ^, and |
=, >, <, !=, !>, !<
Valid Expressions and Arrays
OpenPlcc Ln integer variable array expression.
Example: L1 = L2[L3] + L3 +L4[L7+L5*L3] or L1[L1+L3]= L4 + L8
Note the [index] of the array must be an integer and it is limited to the range of the defined Ln array.
It will be run through preprocessor so labels are allowed ( #define Mtr1Gain MP1)
Ln Arrays Definition Examples
L5->X:$600[64]
L6->Y:$600[64]
MM[MM1 + MP2*MP3] &= MP[MP2 + MP4*MM5]
MP[MM1 + MP2*MP3] = MM[MP2 + MP4*MM5]
The following is allowed for the Ln[array index]:
L5[L1 + L2*L3] &= L6[L4(L2) – L4*L5]
L5[L1 + L2*L3] &= L6[L4[L2] – L4*L5]
Note MI[Int. Exp.], MM[Int. Exp.], MP[Int. Exp.] and Lnn[Int. Exp.] must use integer variable indexes.
Example Program
MM1->X:$00700,24
MM2->Y:$00700,24
MM3->X:$00701,24
OPEN MACPLCC
MM3 = MM1*MM2
CLS
MACRO PLCC Code Memory
Memory
Location
Data Information
$4000 End of PLCC Program + 1 ($$$*** is set to $4005)
$4001 JMP to location in $4002
$4002 Location of start of PLCC ($$$*** is set to $4003)
$4003 RTS Instruction
$4004 Start of PLCC Program ($$$*** set = RTS instruction)