304
Part 4 CommandsChapter 2 Explanation of Commands
Part 4 Commands
ECMD20 (Get a parameter value)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1 Operand 2
Output
(Output, flag)
Optional Optional ECMD 20
Variable
number
CC
[Function] Use the data stored in three consecutive variables starting from the one whose variable
number is specified in operand 2, to store the value of the specified parameter in variable 99.
The setting items and ranges of variable data are shown below. If an out-of-range value is
specified, “C44: SEL data error” will occur.
Operand2=n
Set value/setting range of each variable
Variable
number
Setting item
I/O All-axis
Axis-
specific
Driver Encoder
I/O
device
Other
n
Parameter
type
0123457
n+1
Device
number/axis
number
0 0 1to6 1to6 1to6 0to9 0
n+2
Parameter
number
1 to 999 1 to 400 1 to 250 1 to 97 1 to 30 1 to 82 1 to 200
Specify an integer variable in operand 2 (integer variables 98, 99, 298, 299, 1098, 1099, 1298 and 1299
cannot be specified because if any of these variables is specified, there won’t be three consecutive integer
variables).
If a variable not of the integer type is specified, “C3C: Variable number error” will occur.
(Note) Pulse I/O board parameters can be acquired when the parameter type is set to 10.
For details, refer to the Operation Manual for “XSEL-P/Q/PCT/QCT Controller: Electronic Cam
Function.”
[Example] LET
LET
LET
ECMD
1250
1251
1252
20
0
0
30
1250
Variable No. 1250 = Parameter type (I/O)
Variable No. 1251 = Device number (0 for I/O parameters)
Variable No. 1252 = Parameter number (No. 30)
Extended command 20 (Use variable Nos. 1250 to 1252)
Store the value of input function selection 000 in I/O parameter No.
30, in variable 99.