Conditional moves: example 1, Conditional movesexample 2 – ProSoft Technology PS-QS-1x10-0781 User Manual
Page 32

FieldServer Configuration Manual
Page 32 of 90
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll Free: (888) 509-1970 email: [email protected]
5.2.10.1 Conditional Moves: Example 1
In this example, the user needs to move the data from one of two source locations based on the status of bit 1 or 2 of the conditional Data Array. If bit 1 is
high, then the data from Source_1 will be moved. If bit 2 is high, the Data from Source_2 will be moved. The kernel checks the condition of the bits every
second for a change in status.
Moves
Source_Data_Array , Source_Offset , Target_Data_Array , Target_Offset , Length , Conditional_Data_Array , Conditional_Offset , Task_Name , Scan_Interval
Source_1
, 0
, Target
, 00
, 1
, Status
, 1
, a
, 1
Source_2
, 0
, Target
, 01
, 1
, Status
, 1
, b
, 1
5.2.10.2 Conditional MovesExample 2
In this example, the data from DA_GV_01 will be moved to Gas_Snapshot only when DA_GP_PW_01 or DA_GL_PA_01 is updated on offset 192. In this
example all of the Data Arrays are bits, but analog data types will work as well.
Moves
Source_Data_Array , Source_Offset , Target_Data_Array , Target_Offset , Length , Conditional_Data_Array
, Conditional_Offset , Task_Name , Scan_Interval
DA_GV_01
, 192
, Gas_Snapshot
, 00
, 1
, DA_GL_PW_01
, 192
, a
, 1
DA_GV_01
, 192
, Gas_Snapshot
, 01
, 1
, DA_GL_PA_01
, 192
, b
, 1
The Conditional Move that executed last becomes the Responsible Move by which data validity is determined, and through which write operations are routed.
If none of the Conditional Moves targeting a specific location have executed, the Conditional Move defined last acts as the Responsible Move.