CAPL Script

TestWaitForValue

Syntax

long TestWaitForValue(COValue value, ValueType awaitedValue, dword timeoutMs)

Function

Waits for a communication object value to reach a certain value. This function can only be used for communication object values with a complex data type (array or struct). It cannot be used for system variables or bus system signals.

Parameters

awaitedValue Value which is awaited.

timeoutMS

Timeout in milliseconds.

Return Values

-2: Resume due to constraint violation

-1: General error, for example, functionality is not available

0: Resume due to timeout

1: resume due to event occurred (value has been reached)

struct Mirrors::Position pos;long ret;pos.x = 100;pos.y = 50;ret = testWaitForValue(MirrorAdjustment.consumerSide[0,0].CurrentPosition, pos, 200);

TestWaitForValueUInt | TestWaitForValueSInt | TestWaitForValueFloat | TestWaitForValueString