Mitsubishi Electric CR800 Series Instruction Manual page 152

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

Advertisement

15 Maintenance of robot program
M_EncL (Latched Encoder value)
[Function]
At the instant of receipt of a TREN signal for Q173DPX module, a stored encoder data is read.
Also, 0 is written to clear the stored encoder data to zero.
[Format]
[Write]
M_EncL(<logic encoder number>) = <Fixed value>
[Read]
<Numeric value> = M_EncL(<logic encoder number>)
[Terminology]
<Logic encoder number [Integer]> :(can be omitted)
Specify the value of logic encoder number
< Fixed value [double-precision real number]>
Specify the stored encoder data to initial value(zero or other).
<Numeric variable [double-precision real number]>
Specify the numerical variable to substitute.
[Reference program]
1 MENC1#=M_EncL(1)
2 MENC2#=M_EncL(M1%)
3 TrWrt P1, M_EncL(1), MK
4 M_EncL(1)=0
[Explanation]
(1) Stored encoder value corresponding to the encoder number specified for <logical encoder number> is
acquired.
Encoder value is stored in memory at a low-to-high or high-to-low transition of TREN signal which has
been specified with a DIP switch on Q173DPX module.
Encoder value thus acquired is written onto the buffer for tracking by using a TrWrk command so as to
perform tracking operations.
(2) As encoder value is in double-precision real number, specify <Numerical variable> with a variable which is
of double-precision real-number type.
(3) You can omit the step to specify <Logic encoder number>. When it is omitted, logic encoder number will
be treated as "1."
(4) Number which you can enter to specify <Logic encoder number> is an integer in the range of "1" to "8."
Entering anything else causes L3110 (Argument value range over) error to occur.
* If a number having a decimal part is entered, the fraction of 0.5 or over will be counted as one and the
rest will be cut away.
(5) As latched encoder data represents a value present at a low-to-high or high-to-low transition of TREN
signal, you should check input corresponding to input number in 810 to 817 range which has been
assigned to TREN signal when reading it out.
(6) You can clear the encoder to zero by typing "0" after having used latched encoder data. This step may be
performed as a precaution against using previously latched data.
15-140 MELFA-BASIC V or MELFA-BASIC VI instruction
At logic encoder number 1, assign encoder data stored at the time of receipt
of a TREN signal to the variable MENC1#.
At a logic encoder number specified in the variable M1%, assign encoder data
stored at the time of receipt of a TREN signal to the variable MENC2#.
Write workpiece position data P1, encoder value M_EncL(1) present at the time
of receipt of a TREN signal and work category number MK onto the buffer 1 for
tracking.
Use latched data to clear the encoder to zero as it is not required until next
latched data is used.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr800-rCr800-qCr800-d

Table of Contents