IAI America SSEL User Manual
Page 271
249
Part 2 Programs
z ECMD20 (Get 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] Store the value of the specified parameter in variable 99, using the data stored in the three
consecutive variables starting from the one corresponding to the variable number specified in
operand 2.
If variable No. n is set in operand 2, the data in variable No. n will indicate the parameter type,
data in variable No. n+1 will indicate the device number (or axis number), and data in variable
No. n+2 will indicate the parameter number, respectively. The ranges of parameter type,
device number (or axis number) and parameter number are specified below. If an out-of-
range value is specified, “C44, SEL data error” will generate.
I/O
Common
to all axes
Axis-
specific
Driver Encoder
I/O
device Other
Parameter
type
0
1
2
3
4
5
7
Device number/axis number
0
0
1 ~ 2
1 ~ 2
1 ~ 2
0 ~ 7
0
Parameter number
1 ~ 300
1 ~ 120
1 ~ 200
1 ~ 97
1 ~ 30
1 ~ 82
1 ~ 100
Specify an integer variable in operand 2 (integer variables 98, 99, 298, 299, 1098, 1099, 1298 and
1299 cannot be specified, because three consecutive integer variables cannot be allocated if any
of these integer variables is specified). If a variable of non-integer type is specified, “C3C, Variable
number error” will generate.
(Note)
If an invalid axis number is specified in operand 2, “C44, SEL data error” will generate.
[Example 1]
LET
10
2
Variable No. 10 = Parameter type (Axis-specific)
LET
11
2
Variable No. 11 = Axis number (Axis 2)
LET
12
42
Variable No. 12 = Parameter number (No. 42)
ECMD
20
10
Extended command 20 (Use variable Nos. 10 through 12)
Store the value of axis-specific parameter No. 42 (axis 2),
“Encoder resolution,” in variable 99.
[Example 2]
LET
1250
0
Variable No. 1250 = Parameter type (I/O)
LET
1251
0
Variable No. 1251 = Device number (0, in the case of I/O
parameter)
LET
1252
30
Variable No. 1252 = Parameter number (No. 30)
ECMD
20
1250
Extended command 20 (Use variable Nos. 1250 through
1252)
Store the value of I/O parameter No. 30, “Input function
selection 000,” in variable 99.