Mitsubishi Electric CR800 Series Instruction Manual page 151

For industrial robot
Hide thumbs Also See for CR800 Series:
Table of Contents

Advertisement

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)
MENC2#=M_Enc(M1%)
TrWrt P1, M_Enc(1), MK
M_Enc(1)=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 encoder 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 number> is outside a
set range.
*When inputting the numerical value including the decimal point, its value is rounded up.
'Stocks the logic encoder number encoder of 1 value in MENC1#
variable.
'Stocks the encoder value of the logic encoder number designated by
M1% variable in MENC2# variable.
' 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).
'Changes the encoder value of the logic encoder No.1 to "0".
MELFA-BASIC V or MELFA-BASIC VI instruction 15-139
15 Maintenance of robot program

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr800-rCr800-qCr800-d

Table of Contents