Cnv_QueLen Function
Returns the number of items in the specified conveyor's queue.
Syntax
Cnv_QueLen (conveyorNumber [, paramNumber ] )
Parameters
- conveyorNumber
- Specify the conveyor number as an integer (1-16).
- paramNumber
- Optional. Integer expression that specifies which data to return the length for.
Symbolic constant Value Meaning CNV_QUELEN_ALL 0 Returns total number of items in queue. CNV_QUELEN_UPSTREAM 1 Returns number of items upstream. CNV_QUELEN_PICKUPAREA 2 Returns number of items in pickup area. CNV_QUELEN_DOWNSTREAM 3 Return number of items downstream.
Return Values
Integer number of items.
Description
Cnv_QueLen is used to find out how many items are available in the queue. Typically, who will want to know how many items are in the pickup area.
You can also use Cnv_QueLen as an argument to the Wait statement.
Note
This command will only work if the Conveyor Tracking option is active.
See Also
Cnv_QueGet
Cnv_QueLen Function Example
Do
Do While Cnv_QueLen(1, CNV_QUELEN_DOWNSTREAM) > 0
Cnv_QueRemove 1, 0
Loop
If Cnv_QueLen(1, CNV_QUELEN_PICKUPAREA) > 0 Then
Jump Cnv_QueGet(1, 0) C0
On gripper
Wait .1
Cnv_QueRemove 1, 0
Jump place
Off gripper
Jump idlePos
EndIf
Loop