Mitsubishi Electric CR750 Series Instruction Manual page 81

Circular arc tracking function
Hide thumbs Also See for CR750 Series:
Table of Contents

Advertisement

TrWrt (writing tracking data)
[Function]
Write position data for tracking operation, encoder data and so on in the data buffer.
[Format]
TrWrt  <Position data> [ , <Encoder data>] [ , [<Model number>] [ , [<Buffer number>] [ , <Encoder number>] ] ] ]
[Terminology]
<Position data [Position]> (cannot be omitted):
Specify the workpiece position measured by a sensor.
<Encoder data [double-precision real number]> (can be omitted):
Specify the value of an encoder mounted on a conveyer at the time a workpiece is measured.
The encoder value acquired in the M_Enc() state variable and the TrOut instruction is
specified usually.
<Model number [integer]> (can be omitted):
Specify the model number of workpieces.
Setting range: 1 to 65535
<Buffer number [integer]> (can be omitted):
Specify a data buffer number.
1 is set if the argument is omitted.
Setting range: 1 to 4(The first argument of parameter [TRBUF])
<Encoder number [integer]> (can be omitted):
Specify an external encoder number.
The same number as the buffer number is set if the argument is omitted.
Setting range: 1 to 8
<Pixel data [position]> (cannot be omitted):
Specify the workpiece pixel position measured by a sensor.
[Reference program]
(1) Tracking operation program
1 TrBase P0
2 TrRd P1,M1,MKIND
3 Trk On,P1,M1
4 Mvs P2
5 HClose 1
6 Trk Off
(2) Sensor data reception program
1 *LOOP
2 If M_In(8)=0 Then GoTo *LOOP
3 M1#=M_Enc(1)
4 TrWrt P1, M1#,MK
[Explanation]
(1) This function stores the workpiece position (robot coordinates) at the time when a sensor recognizes a
workpiece, encoder value, model number and encoder number in the specified buffer.
(2) Arguments other than the workpiece position (robot coordinates) can be omitted. If any of the arguments are
omitted, the robot operates while following changes of position data.
(3) Workpieces within the same workpiece judgment distance set in the "TRCWDST" parameter are regarded
as the same workpiece. Even if the data is written twice in the buffer with the TrWrt instruction, only one data
set is stored in the buffer. For this reason, data for one workpiece only is read with the TrRd instruction even
if images of the same workpiece are acquired twice with a vision sensor.
' Specify the workpiece coordinate origin at the teaching position.
' Read the workpiece position data from the data buffer.
' Start tracking of a workpiece whose measured position is P1 and encoder value
at the time of measurement is M1.
' Setting the current position of P1 as P1c, make the robot operate while following
workpieces with the target position of P1c*P_Zero/P0*PW2.
' Close hand 1.
' End the tracking operation.
' Jump to +LOOP if input signal No. 8, to which a photoelectronic
sensor is connected, is OFF.
' Acquire data of encoder number 1 at the time when input signal
No. 8 is turned on and store it in M1#.
' Write workpiece position data P1, encoder value M1# at the time
an image is acquired and model number MK in the buffer.
10 Maintenance of robot program
MELFA-BASIC V Instructions 10-71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr751 series

Table of Contents