WriteEx

<< Click to Display Table of Contents >>

 

WriteEx

WriteEx(N1, N2, N3, N4, Value, [Timestamp], [Quality], [WriteStatus], [WriteSyncMode])

Writes data to a device. This method returns a Boolean indicating whether this operation was successful or not. The N1 to N4 parameters correspond to Driver's N parameters. The Value parameter defines a value to write to the Driver. For more information on these parameters, please check Driver's documentation. The Timestamp, Quality, and WriteStatus parameters are optional. When omitted, this method's behavior is similar to the Write method. The Timestamp parameter specifies a date and time to write to the Tag, if supported by the device. If omitted, assumes the date and time from the moment of the writing operation. The Quality parameter indicates a quality, from 0 (zero) to 255. If omitted, assumes a Good (192) quality. The WriteStatus parameter receives a value returned by the Driver, indicating its writing status, if supported by the Driver, according to its own documentation. The WriteSyncMode parameter allows users to use a writing mode that may be different from the one used by the Driver. The available options for this parameter are the following:

0: Writing mode configured in the Driver

1: Synchronous writing mode

2: Asynchronous writing mode (no confirmation)

 

If the WriteSyncMode parameter is omitted, the writing mode configured in the Driver is also used. Example:

Dim status
If tag001.WriteEx(0, 0, 0, 0, 100, , , status) Then
  MsgBox "Successful writing, status = " & status
Else
  MsgBox "Writing failed, status = " & status
End If

Was this page useful?