Writes a bit value directly to an address in a data source. Uses the DirectWriteBit Tag Command.
The TagDirectWriteBit Function is intended for use in an Operator Action. Operator Actions run in response to user input gestures in the Operator Interface. In an Operator Action, code execution is suspended until the function completes.
If you want to write a value from a Program Tag, running on the SCADA Server, use the TagDirectWriteBitFB Function Block.
Informal Syntax:
TagDirectWriteBit( TagName, DataAddress, Value )
Formal Syntax:
TagDirectWriteBit( TagName:=Expression, DataAddress:=Expression, Value:=Expression )
Parameter | Type | Description |
---|---|---|
TagName | ANY_STRING | The full name of the tag that represents the data source. |
DataAddress | ANY_STRING | The "Address" of the data within the data source. See Data Address Format to understand how to set the "Address". |
Value | BOOL | The value to write to the data source. |
The TagDirectWriteBit Function sends the DirectWriteBit Tag Command to the database tag.
None.
Sends the DirectWriteBit Tag Command to the tag "PumpController.PLC" to write the value TRUE to address "M103".
TagDirectWriteBit( "PumpController.PLC", "M103", TRUE );
To learn about the DirectWriteBit Tag Command.
TagDirectWriteBitFB Function Block
To learn how to write a bit directly to a data source from a Program Tag.
To learn where you can use this function.
To learn about calling a function from IEC 61131-3 structured text.
To learn about the different types of expression to use as function parameters.
For the meaning of terms used in Fernhill SCADA.