Optima DMC-1xxx and DMC-18x2 Command Reference
IN
i
105
IN
FUNCTION: Input Variable
DESCRIPTION:
The IN command allows a variable to be input from a keyboard. When the IN command is
executed in a program, the prompt message is displayed. The operator then enters the
variable value followed by a carriage return. The entered value is assigned to the
specified variable name.
The IN command holds up execution of following commands in a program until a carriage
return or semicolon is detected. If no value is given prior to a semicolon or carriage
return, the previous variable value is kept. Input Interrupts, Error Interrupts and Limit
Switch Interrupts will still be active.
The IN command may only be used in thread 0.
ARGUMENTS: IN "m",n
where
m is prompt message
n is the variable name
The total number of characters for n and m must be less than 80 characters.
Note: Do not include a space between the comma at the end of the input message and the
variable name.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
-----
In a Program
Yes
Default Format
Position Format
Command Line
No
Controller Usage
ALL CONTROLLERS
EXAMPLES: Operator specifies length of material to be cut in inches and speed in inches/sec (2
pitch lead screw, 2000 counts/rev encoder).
#A Program
A
IN "Enter Speed(in/sec)",V1
Prompt operator for speed
IN "Enter Length(in)",V2
Prompt for length
V3=V1*4000
Convert units to counts/sec
V4=V2*4000
Convert units to counts
SP V3
Speed command
PR V4
Position command
BGA Begin
motion
AMA
Wait for motion complete
MG "MOVE DONE"
Print Message
EN End
Program