<< Click to Display Table of Contents >> Manual > Server Creation Guide > Actions > Action Reference > Logger Actions (logging only) > Settings when a communication error occurs |
Operation settings when a communication error occurs
The "When a communication error occurs" setting in the logger action properties allows you to define the behavior when communication fails.
The logger action will recognize that a communication error has occurred if even one of the tag fields defined in the action cannot communicate. If you select "No logging" in this setting, no log will be output if a communication error occurs. Therefore, only data that was successfully communicated will be logged in the database.
If you select "Log" here, the behavior of the logging process will depend on the settings for each tag field. The settings for each tag field are defined in "Settings for tag field error behavior" below.
Tag field error behavior settings
This is set for each tag field in the "Tag field" settings of the tag field properties.
This setting can be made for each tag field, and the behavior in the event of an error can be set individually for each tag.
The behavior of each setting is as follows:
item |
Operation |
Write the previous value (if there is no previous value, write "NULL") |
If a communication error occurs, the last successfully obtained value will be used for logging. If there is no previous value, NULL will be written. *Here, a state where no previous value exists refers to a state where communication has never been successful since going online. |
Write the previous value (if there is no previous value, write the specified value) |
If a communication error occurs, the last successfully obtained value will be used for logging. If the last value does not exist, the specified value will be written. *Here, a state where no previous value exists refers to a state where communication has never been successful since going online. |
Write "NULL" |
If a communication error occurs, NULL is written.
|
Write the specified value |
If a communication error occurs, the specified value is written.
|
For CSV, "NULL" means an empty string. For ODBC, if the database supports NULL values, a NULL value will be written. For databases that do not support NULL values, FALSE will be written for Boolean types, 0 (zero) for numeric types, and an empty string for text types. |
Processing when PLC value is out of range
To treat PLC values as missing values when they are out of range, you can set the "Out of range processing" for the tag field.
For example, if communication with PLC is normal but the actual device is not online, and you want to avoid logging data that should not be included in the record (such as "0"), you can use the "out of range processing" of the tag field to replace the missing value and save the data. For example, when logging to a CSV file, if you select "Write specified value" with the setting below the minimum value for out of range processing, set the minimum value to "0" and the specified value to "blank", when the value of PLC is 0, no value will be written to the CSV file.
The out of range processing settings are as follows:
item |
Operation |
No special processing is performed
|
No special processing is performed. |
Write "NULL"
|
If the value is outside the maximum or minimum value, NULL is written. |
Write the specified value
|
If the value is outside the maximum or minimum value, the specified value will be written. |