i4scada Signal writing
In order to learn more about the i4scada Signals writing check out this article that has been easily structured for a better understanding.
This article describes the three modes, that can be set for the i4scada Signal writing functionality, as follows:
The Synchronous mode is the most basic signal writing mode. To enable the Synchronous mode, the „OPCSyncWrite“ Registry Key setting needs to be set to value "1". The OPCSyncWrite Registry Key setting can be found on the following path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WEBFACTORY\WFSERVER\2.00\Settings.
Warning
When writing signal values while using the Synchronous mode, the write operation can be slow, since the server is blocked, until the value is written.
The Asynchronous mode is also known as the "fire and forget" mode. This is the default writing mode, enabled by setting the „OPCSyncWrite“ Registry Key to value "0".
By default, the Asynchronous mode does not return any feedback, concerning the write operation status. The server always returns a result code "0", regardless if the write operation was successful or if it failed, if the ServerSvc setting "WritingWithImmediatelyWCSAcknowledge" is set to value "true".
Note
Unlike the Synchronous mode, the Asynchronous writing mode does not block the server, during the write operation.
The second Asynchronous writing mode is similar to the previously described one. However, if the user desires to receive feedback and a result code, for the writing operation, the ServerSvc setting „WritingWithImmediatelyWCSAcknowledge“ needs to be set to the value "false".
The settings required for the asynchronous writing mode, with feedback, can be found under this path: "C:\Program Files (x86)\i4scada\Server\ServerSvc.exe.config".
Note
These settings are not relevant, when using the Synchronous mode.
Warning
When using the Asynchronous mode, with feedback, the following server result codes, can be delivered for Signal writing operations:
Server message
Server Result Code
Observation
Succeeded
0
The write operation was successful.
WriteFailed
-1073479674
The write operation failed due to an error.
WriteExpired
-300
The write operation expired.
Tip
Even if the Asynchronous (with result code) mode does not block the server, during the write operation, the server waits until the write is finished.
On slow devices, the write operation might encounter timeouts, hence, it is recommended that the „WritingStateTimeout“ setting is properly configured. By default, the timeout value is set to 500 milliseconds, but it can be increased or decreased, as desired.
WriteFaulted
-301
The write operation encountered an exception and failed.