TrackSetVision
Function
Store workpiece-related data detected by a vision sensor into conveyor tracking buffer.
Syntax
TrackSetVision Conveyor number, Number of workpieces to detect, Sensor detection coordinate [, UserData [, Attribute data]]
Guaranteed Entry
- Conveyor number
-
Specify the conveyor number (1 or 2) to be used by integer type data.
- Number of workpieces to detect
-
Specify the number of workpieces to be stored in the tracking buffer area at a time by integer type data.
If negative value is set, the internal trigger mode, which does not require trigger input from I/O, will be set.Value Description Positive values Specify the number of workpieces detected by the vision sensor by positive value.
The conveyor encoder value must be stored beforehand by receiving I/O input from the vision sensor.0 Error Negative values Specify the number of workpieces you want to set based on the internal trigger by negative value.
This does not require I/O input from the vision sensor, and the conveyor encoder value when this command is executed is stored. - Sensor detection coordinate
-
Specify the vision sensor detection coordinates as much as the number of workpieces to detect, by variant type one dimensional array.
- UserData
-
Specify by variant type, single array. This is an optional value. This should be "-1" if this is omitted. If minus value is set, it is treated same as when it is omitted. To specify each values, use integer type data.
If the number of array elements specified is less than the number of detected workpieces, "-1" will be set to the remaining array elements.
If you set Userdata for workpieces, the workpieces with specified Userdata value can be exclusively taken out from the tracking buffer at the TrackTargetPos execution. - Attribute data
-
Attribute value that can be assigned by user to respective workpieces detected.
Specify by variant type, single array. This is an optional value. This should be "-1" if this is omitted. If minus value is set, it is treated same as when it is omitted. To specify each values, use integer type data.
If the number of array data specified is less than the number of detected workpieces, "-1" will be set to the remaining array elements.
Description
Store workpiece-related data detected by a vision sensor into tracking buffer.
The following data is stored when a workpiece is registered.
| Stored values | Direct input | |
|---|---|---|
| (1) | Index value in the tracking buffer (integer type data) | Not available |
| (2) | Conveyor encoder value at workpiece detection (integer type data) | Not available |
| (3) | Vision sensor detection coordinates (variant type data array) | Available |
| (4) | User data (integer type data) | Available |
| (5) | Attribute data (integer type data, or integer type data array) | Available |
Related Terms
TrackBufferDelete, TrackBufferIndexes, TrackBufferRead, TrackSetSensor, TrackTargetPos, TrackTargetRelease, Commands for Conveyor Tracking
Attention
- This command is available only for the vision tracking.
Example
Dim visPos1 As Variant
visPos1 = Array(100, 10, 30)
Vision sensor detects Work 1 whose image coordinates are x=100[pixel], y=10[pixel] and the workpiece's attitude angle is θ=30[deg].
Dim visPos2 As Variant
visPos2 = Array(100, 200, 0)
Vision sensor detects Work 2 whose image coordinates are x=100[pixel], y=200[pixel] and the workpiece's attitude angle is θ=0[deg].
Dim visPos3 As Variant
visPos3 = Array(10, 200, 45)
Vision sensor detects Work 3 whose image coordinates are x=10[pixel], y=200[pixel] and the workpiece's attitude angle is θ=45[deg].
TrackSetVision 1,3, Array(visPos1, visPos2, visPos3), Array(1, 2, 3), Array(1, 1, 1)
Store three of work data that have been detected by the vision sensor in the conveyor tracking buffer with specifying user data and attributes.

