![Mitsubishi Electric CR800 Series Instruction Manual Download Page 151](http://html.mh-extra.com/html/mitsubishi-electric/cr800-series/cr800-series_instruction-manual_238852151.webp)
15 Maintenance of robot program
MELFA-BASIC V or MELFA-BASIC VI instruction 15-139
M_Enc
(Encoder value)
[Function]
Read the encoder value of the designated logic encoder number. It can be changed to the optional value.
[Format]
[Write]
M_Enc(<logic encoder number>)
=
<Fixed value>
[Read]
<Numeric value>
=
M_Enc(<logic encoder
number>)
[Terminology]
< logic encoder number
[integer]
>
:
(can be omitted.)
Specify the logic encoder number which acquires the encoder value.
Setting range: 1 to 8
If the argument is omitted, 1 is set as the default value.
<
Fixed value
[double-precision real number]
>
Specify the numerical value.
< Numeric value
[double-precision real number]
>
Specify the numeric variable in which the value.
[Reference program]
MENC1#=M_Enc(1)
'
Stocks the logic encoder number encoder of 1 value in MENC1#
variable.
MENC2#=M_Enc(M1%)
'Stocks the encoder value of the logic encoder number designated by
M1% variable in MENC2# variable.
TrWrt P1, M_Enc(1), MK
'
This variable writes in buffer 1 that the location of the workpiece which
was kind number MK is P1 at the present encoder value M_Enc (1).
M_Enc(1)=0
'
Changes the encoder value of the logic encoder No.1 to "0".
[Explanation]
(1)
Acquire the encoder value of the designated <logic encoder number>.
The acquired encoder value is written in a tracking buffer using a TrWrt command to tracking movement.
(2)
The encoder value is the double-precision real number value, so please specify a variable of
double-precision real number type as<Numeric value>.
(3)
It's possible to change the encoder value of the number specified as<logic encod
er number> to the value
specified as<Fixed value>.
(4) You can omit the step to specify <logic encoder number>.When it is omitted, logic encoder number will be
treated as "1."
(5)
Error L.3110 (value of the argument outside of the range) occurs when <Condition num
ber> is outside a
set range.
*When inputting the numerical value including the decimal point, its value is rounded up.
Summary of Contents for CR800 Series
Page 2: ......
Page 12: ......
Page 202: ...18 Appendix 18 190 Calibration sheet ...
Page 203: ......