IN |
Syntax: | Implicit Only |
| Operands: | none | |
| Burn: | not burnable | |
Input Variable | Hardware: | DMC40x0 DMC21x3 RIO DMC18x6 DMC18x2 |
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.
The IN command can only be used with a serial connection to the controller.
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.
N/A
| Usage | Value |
|---|---|
| While Moving | Yes |
| In a Program | Yes |
| Command Line | No |
| Controller Usage | All |
| Default Value | N/A |
| Default Format | Position Format |
N/A
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