DMX ETH Manual
page 72
rev 1.16
Standalone Example Program 4 – Single Thread
Task: Move the motor back and forth between position 1000 and 0 only if the digital
input 1 is turned on.
HSPD=20000
;* Set the high speed to 20000 pulses/sec
LSPD=1000
;* Set the low speed to 1000 pulses/sec
ACC=300
;* Set the acceleration to 300 msec
EO=1
;* Enable the motor power
WHILE 1=1
;* Forever loop
IF DI1=1
;* If digital input 1 is on, execute the statements
X1000
;* Move to zero
WAITX
;*Wait for X-axis move to complete
X0
;* Move to 1000
ENDIF
ENDWHILE
;* Go back to WHILE statement
END
Standalone Example Program 5 – Single Thread
Task: Using a subroutine, increment the motor by 1000 whenever the DI1 rising edge is
detected.
HSPD=20000
;* Set the high speed to 20000 pulses/sec
LSPD=1000
;* Set the low speed to 1000 pulses/sec
ACC=300
;* Set the acceleration to 300 msec
EO=1
;* Enable the motor power
V1=0
;* Set variable 1 to zero
WHILE 1=1
;* Forever loop
IF DI1=1
;* If digital input 1 is on, execute the statements
GOSUB 1
;* Move to zero
ENDIF
ENDWHILE
;* Go back to WHILE statement
END
SUB 1
XV1
;* Move to V1 target position
V1=V1+1000
;* Increment V1 by 1000
WHILE DI1=1
;* Wait until the DI1 is turned off so that
ENDWHILE
;* 1000 increment is not continuously done
ENDSUB
Summary of Contents for DMX-ETH
Page 13: ...DMX ETH Manual page 13 rev 1 16 Figure 4 1 Torque Curve NEMA 23 Figure 4 2...
Page 14: ...DMX ETH Manual page 14 rev 1 16 Figure 4 3...
Page 17: ...DMX ETH Manual page 17 rev 1 16 DMX ETH Interface Circuit Figure 5 2...
Page 21: ...DMX ETH Manual page 21 rev 1 16 Main Control Screen Figure 6 3 A B C D E F L K J H M G I...