Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

MsgWrite

  • Last UpdatedJul 18, 2023
  • 1 minute read

Writes a message to a message session. The message is sent to the remote computer's callback function and can be read by calling MsgRead(). If the remote computer has not opened the session, this message is disregarded.

This function returns immediately after passing the message to Plant SCADA. Plant SCADA sends the message over the LAN in the background.

You need to first open the message session using the MsgOpen() function, to obtain the message handle.

Syntax

MsgWrite(hMsg, Type, Str)

hMsg:

The message handle, returned from the MsgOpen() function. The message handle identifies the table where all data on the associated message is stored.

nType:

The integer message data, that is the message number.

Str:

The message text.

Return Value

0 (zero) if successful, otherwise an error is returned.

MsgRead, MsgOpen

Example

MsgWrite(hMsg,10,"MyMsg");

See Also

Task Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in