6 Contents USER MANUAL
Program Format.....................................................................................................................108
Using Labels in Programs....................................................................................... 109
Special Labels..........................................................................................................109
Commenting Programs............................................................................................110
Executing Programs - Multitasking....................................................................................... 110
Debugging Programs............................................................................................................. 111
Program Flow Commands.....................................................................................................113
Event Triggers & Trippoints....................................................................................113
Event Trigger Examples:.........................................................................................115
Conditional Jumps...................................................................................................117
Using If, Else, and Endif Commands......................................................................119
Subroutines..............................................................................................................121
Stack Manipulation..................................................................................................121
Auto-Start Routine.................................................................................................. 121
Automatic Subroutines for Monitoring Conditions.................................................122
Mathematical and Functional Expressions............................................................................ 125
Mathematical Operators.......................................................................................... 125
Bit-Wise Operators..................................................................................................125
Functions................................................................................................................. 126
Variables................................................................................................................................127
Programmable Variables......................................................................................... 127
Operands................................................................................................................................129
Special Operands (Keywords).................................................................................129
Arrays.................................................................................................................................... 130
Defining Arrays.......................................................................................................130
Assignment of Array Entries...................................................................................130
Automatic Data Capture into Arrays.......................................................................131
Deallocating Array Space........................................................................................133
Input of Data (Numeric and String).......................................................................................133
Input of Data............................................................................................................133
Output of Data (Numeric and String).................................................................................... 134
Sending Messages................................................................................................... 134
Displaying Variables and Arrays.............................................................................135
Interrogation Commands.........................................................................................136
Formatting Variables and Array Elements..............................................................137
Converting to User Units.........................................................................................138
Hardware I/O......................................................................................................................... 138
Digital Outputs........................................................................................................ 138
Digital Inputs...........................................................................................................139
Input Interrupt Function.......................................................................................... 140
Analog Inputs.......................................................................................................... 141
Example Applications............................................................................................................142
Wire Cutter..............................................................................................................142
X-Y Table Controller.............................................................................................. 143
Speed Control by Joystick.......................................................................................145
Position Control by Joystick....................................................................................146
Backlash Compensation by Sampled Dual-Loop....................................................146
Chapter 8 Hardware & Software Protection 149
Introduction........................................................................................................................... 149
Hardware Protection..............................................................................................................149
Output Protection Lines...........................................................................................149
Input Protection Lines............................................................................................. 150
Software Protection............................................................................................................... 150
Programmable Position Limits................................................................................150