User manual

IEC61131 User and Reference Manual
April 22, 2008
354
setregb
Set value of boolean register
Description
The setregb function writes the state of the input value to the specified Modbus register. If
the register is found, the variable assigned to that register is set to 1 if value is TRUE; or to 0
if value is FALSE. If the register is not found, nothing is done. The validity of the specified
Modbus register is not checked. It is assumed that address is one coil or status register.
Note that if address specifies an input or holding register assigned to a integer variable, only
the high word is written.
This function provides a method for accessing database registers defined in a C Application
database handler, such as the RealFLO database handler. This function may also be used
to access the Permanent Non-Volatile Registers. See the section Modbus Addressing for
more details.
address
value
setregb
Q
Arguments
Inputs
Type
Description
address
Integer
Address of any valid Modbus register. Address may be a
Network Address assigned to a variable in the Dictionary, or
address may be assigned to a C Application variable using a
database handler, or address may be a register from the
Permanent Registers.
value
Boolean
Value to write to Modbus register.
Outputs
Type
Description
Q
Boolean
TRUE if 0 < address < 65535.
FALSE for all other cases.
See Also
getregb