
Special Labels..........................................................................................................118
Commenting Programs............................................................................................ 119
Executing Programs - Multitasking ....................................................................................... 120
Debugging Programs .............................................................................................................121
Program Flow Commands ..................................................................................................... 123
Event Triggers & Trippoints....................................................................................123
Event Trigger Examples:......................................................................................... 125
Conditional Jumps................................................................................................... 127
Using If, Else, and Endif Commands ......................................................................129
Subroutines..............................................................................................................131
Stack Manipulation.................................................................................................. 132
Auto-Start Routine .................................................................................................. 132
Automatic Subroutines for Monitoring Conditions ................................................. 132
Mathematical and Functional Expressions ............................................................................ 135
Mathematical Operators ..........................................................................................135
Bit-Wise Operators.................................................................................................. 136
Functions ................................................................................................................. 137
Variables................................................................................................................................138
Programmable Variables ......................................................................................... 138
Operands................................................................................................................................139
Special Operands (Keywords)................................................................................. 140
Arrays ....................................................................................................................................140
Defining Arrays....................................................................................................... 140
Assignment of Array Entries ...................................................................................141
Automatic Data Capture into Arrays....................................................................... 142
Deallocating Array Space........................................................................................ 143
Input of Data (Numeric and String)....................................................................................... 143
Input of Data............................................................................................................143
Output of Data (Numeric and String) ....................................................................................144
Sending Messages ................................................................................................... 144
Displaying Variables and Arrays............................................................................. 146
Interrogation Commands......................................................................................... 146
Formatting Variables and Array Elements ..............................................................148
Converting to User Units......................................................................................... 148
Programmable Hardware I/O................................................................................................. 149
Digital Outputs ........................................................................................................ 149
Digital Inputs........................................................................................................... 150
Input Interrupt Function .......................................................................................... 150
Analog Inputs ..........................................................................................................151
Example Applications............................................................................................................152
Wire Cutter.............................................................................................................. 152
X-Y Table Controller ..............................................................................................153
Speed Control by Joystick .......................................................................................155
Position Control by Joystick....................................................................................156
Backlash Compensation by Sampled Dual-Loop .................................................... 156
Chapter 8 Hardware & Software Protection 158
Introduction ........................................................................................................................... 158
Hardware Protection ..............................................................................................................158
Output Protection Lines........................................................................................... 158
Input Protection Lines .............................................................................................159
Software Protection ...............................................................................................................159
Programmable Position Limits ................................................................................ 159
Off-On-Error ...........................................................................................................160
Automatic Error Routine ......................................................................................... 160
iv •Contents DMC-1600