
Multi-Axis Coordinated Move .................................................. 108
Contour Mode ............................................................................................................... 110
Specifying Contour Segments ................................................... 110
Additional Commands .............................................................. 111
Command Summary - Contour Mode ...................................... 111
Stepper Motor Operation .............................................................................................. 115
Specifying Stepper Motor Operation ....................................... 115
Using an Encoder ith Stepper Motors .................................... 116
Command Summary - Stepper Motor Operation ..................... 116
Operand Summary - Stepper Motor Operation ......................... 116
Stepper Position Maintenance Mode (SPM) ................................................................. 117
Internal Controller Commands (user can query): ..................... 117
User Configurable Commands (user can query & change): ..... 117
Error Limit ................................................................................ 117
Correction ................................................................................. 117
Dual Loop (Auxiliary Encoder) .................................................................................... 120
Backlash Compensation ............................................................ 121
Motion Smoothing ....................................................................................................... 122
Using the IT Command: ............................................................ 122
Using the KS Command (Step Motor Smoothing): .................. 124
Homing ......................................................................................................................... 124
Stage 1: ...................................................................................... 124
Stage 2: ...................................................................................... 124
Stage 3: ...................................................................................... 124
Command Summary - Homing Operation ............................... 127
Operand Summary - Homing Operation ................................... 127
High Speed Position Capture (The Latch Function) .................................................... 127
Fast Update Rate Mode ................................................................................................ 129
Chapter 7 Application Programming 1 0
Overvie ....................................................................................................................... 130
Using the DMC-40x0 Editor to Enter Programs ........................................................... 130
Edit Mode Commands .............................................................. 131
Program Format ............................................................................................................ 131
Using Labels in Programs ......................................................... 131
Special Labels ........................................................................... 132
Commenting Programs ............................................................. 132
Executing Programs - Multitasking .............................................................................. 133
Debugging Programs .................................................................................................... 134
Program Flo Commands ............................................................................................ 135
Event Triggers & Trippoints ..................................................... 135
Event Trigger Examples: .......................................................... 137
Conditional Jumps .................................................................... 139
Using If, Else, and Endif Commands ........................................ 141
Subroutines ............................................................................... 142
Stack Manipulation ................................................................... 142
Auto-Start Routine .................................................................... 143
Automatic Subroutines for Monitoring Conditions .................. 143
JS Subroutine Stack Variables (^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h) ... 147
Mathematical and Functional Expressions ................................................................... 149
Mathematical Operators ............................................................ 149
Bit-Wise Operators ................................................................... 150
Functions .................................................................................. 151
Variables ....................................................................................................................... 151
Programmable Variables ........................................................... 152
Operands ....................................................................................................................... 153
Special Operands (Key ords) .................................................. 153
Arrays ............................................................................................................................ 154
Defining Arrays ........................................................................ 154
Assignment of Array Entries .................................................... 154
Automatic Data Capture into Arrays ........................................ 155
De-allocating Array Space ........................................................ 157
Input of Data (Numeric and String) .............................................................................. 157
Input of Data ............................................................................. 157
Operator Data Entry Mode ....................................................... 158
Using Communication Interrupt .............................................. 158
Output of Data (Numeric and String) ........................................................................... 160
Sending Messages ..................................................................... 160
Displaying Variables and Arrays ............................................. 161
DMC-40x0 Contents • v