WriteValue Subroutine

Sets the value of the current value of the specified database block.

Syntax

WriteValueValue , [DataPoint], [intErrorMode] [BsendMsg]

Properties

The WriteValue subroutine syntax has these parts:

Part

Description

Value

String. The value that you want to write to the specified database block.

DataPoint

String. (Optional). The database block to which you want to write the specified value. If no block is specified, the data source associated with the selected object is write.

intErrorMode

Integer. (Optional). The error mode.
0 (default) – Allows the subroutines to provide the error messages. Errors are displayed in the form of a message box. If no entry is made for the intErrorMode parameter, the default is used.

1 – Allows the user to handle the error messages. Errors in the subroutines are passed back to the calling routine for handling.

2 – Writes errors to all destinations. No error messages display. Instead, the errors are written to all iFIX destinations, including the Alarm History window destinations using SendOperatorMessage.

BsendMsg

Boolean. (Optional). If TRUE, the message "value changed byxxx" will be sent to the alarm destinations. If FALSE, the message will be suppressed.

 

Example