Mitsubishi CR750-Q Series Instruction Manual page 104

Tracking system and vision tracking system using mitsubishi robot
Hide thumbs Also See for CR750-Q Series:
Table of Contents

Advertisement

19 Maintenance of robot program
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>] ] ] ]
[Term]
<Position data> (cannot be omitted):
Specify the workpiece position measured by a sensor.
<Encoder data> (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> (can be omitted):
Specify the model number of workpieces.
Setting range: 1 to 65535
<Buffer number> (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> (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
[Example]
(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]
 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.
 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.
 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.
19-94 MELFA-BASIC V Instructions
' 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.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents