19 Maintenance of robot program
M_EncL
(Latched Encoder data)
[Function]
At the instant of receipt of a TREN signal for Q17EDPX module, a stored encoder data is read.
Also, 0 is written to clear the stored encoder data to zero.
[Format]
Example)<Numeric Variable>=M_EncL[(<logic encoder number>)] --------referencing
M_EncL[(<logic encoder number>)]=<Constants>
[Terminology]
<Numeric Variable> Specify the numerical variable to substitute.
Available argument type
Position Joint
Character
string
number
Double-precision
real number
Variable
○:Available -:Not available(syntax error at input time)
<logic encoder number> (can be omitted) Specify the value of an logic encoder number
Available argument type
Position Joint
Character
string
number
Double-precision
real number
Variable
○:Available -:Not available(syntax error at input time)
<Constants> Specify the stored encoder data to initial value(zero or other).
Available argument type
Position Joint
Character
string
number
Double-precision
real number
Constants
Variable
○:Available -:Not available(syntax error at input time)
[Reference Program]
1 MENC1#=M_EncL(1) At logic encoder number 1, assign encoder data stored at the time of receipt
of a TREN signal to the variable MENC1#.
2 MENC2#=M_EncL(M1%) 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#.
3 TrWrt P1, MEncL(1), MK Write work 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.
4 M_EncL(1)=0 Use latched data to clear the encoder to zero as it is not required until next
latched data is used.
[Explanation]
• Stored encoder value corresponding to the encoder number being specified in <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 Q17EDPX module.
Encoder value thus acquired is written onto the buffer for tracking by using a TrWr command so as to
perform tracking operations.
MELFA-BASIC V Instructions 19-95