Galil DMC-2X00 Projector User Manual


 
106 Chapter 7 Application Programming DMC-2X00
The load is coupled with a 2 pitch lead screw. A 2000 count/rev encoder is on the motor, resulting in a
resolution of 4000 counts/inch. The program below uses the variable len, to length. The IN command
is used to prompt the operator to enter the length, and the entered value is assigned to the variable
LEN.
Instruction Interpretation
#BEGIN LABEL
AC 800000 Acceleration
DC 800000 Deceleration
SP 5000 Speed
len=3.4 Initial length in inches
#CUT Cut routine
AI1 Wait for start signal
IN "enter Length(IN)", len Prompt operator for length in inches
PR LEN *4000 Specify position in counts
BGA Begin motion to move material
AMA Wait for motion done
SB1 Set output to cut
WT100;CB1 Wait 100 msec, then turn off cutter
JP #CUT Repeat process
EN End program
Operator Data Entry Mode
The Operator Data Entry Mode provides for un-buffered data entry through the auxiliary RS-232 port.
In this mode, the DMC-2x00 provides a buffer for receiving characters. This mode may only be used
when executing an applications program.
The Operator Data Entry Mode may be specified for Port 2 only. This mode may be exited with the \
or <escape> key.
NOTE: Operator Data Entry Mode cannot be used for high rate data transfer.
Set the third field of the CC command to zero to set the Operator Data Entry Mode.
To capture and decode characters in the Operator Data Mode, the DMC-2x00 provides special the
following keywords:
Keyword Function
P2CH Contains the last character received
P2ST Contains the received string
P2NM Contains the received number
P2CD Contains the status code:
-1 mode disabled
0 nothing received
1 received character, but not <enter>
2 received string, not a number
3 received number
NOTE: The value of P2CD returns to zero after the corresponding string or number is read.