2 Machine Synchronization
2.10.1.18. WaitSensor - Wait for connection on sensor
Machine Synchronization
3HAC18154-1 Revision: F102
© Copyright 2004-2008 ABB. All rights reserved.
[\TimeFlag]
Timeout Flag
Data type:
bool
The output parameter that contains the value TRUE if the maximum permitted waiting time
runs out before the sensor connection or reldist reached. If this parameter is included in the
instruction, it is not considered to be an error if the max. time runs out.
This argument is ignored if the
MaxTime argument is not included in the instruction.
Program execution
If there is no object in the start window then program execution stops. If an object is present,
then the object is connected to the sensor and execution continues.
If a second
WaitSensor instruction is issued while connected then an error is returned unless
the
\RelDist optional argument is used.
More examples
More examples of the instruction are illustrated below.
Example 1
WaitSensor SSYNC1\RelDist:=500.0;
If not connected, then wait for the object to enter the start window and then wait for the object
to pass the 500 mm point on the sensor.
If already connected to the object, then wait for the object to pass 500 mm.
Example 2
WaitSensor SSYNC1\RelDist:=0.0;
If not connected, then wait for an object in the start window.
If already connected, then continue execution as the object has already gone past 0.0 mm.
Example 3
WaitSensor Ssync1;
WaitSensor Ssync1\RelDist:=0.0;
The first WaitSensor connects to the object in the start window. The second WaitSensor
will return immediately if the object is still connected, but will wait for the next object if the
previous object had moved past the Maximum Distance or was dropped.
Example 4
WaitSensor Ssync1\RelDist:=0.5\PredTime:=0.1;
The WaitSensor will return immediately if the object has passed 0.5 meter but otherwise
will wait for an object will reach =Reldist - C1speed * Predtime. The goal here is to anticipate
delays before starting a new move instruction.
Example 5
WaitSensor Ssync1\RelDist:=0.5\MaxTime:=0.1\Timeflag:=flag1;
The WaitSensor will return immediately if the object has passed 0.5 meter but otherwise
will wait 0.1 sec for an object. If no object passes 0.5 meter during this 0.1 sec the instruction
will return with flag1 =TRUE.
Continued
Continues on next page