Data logger

Introduction

The Data logger samples values of one or more variables at regular time intervals or on command, and stores them in a database.

Automatic sampling can be disabled for sampling by invoking a dedicated method exposed by the object.

Configuration of the database for the Data logger

Q Studio automates the configuration of databases for Data loggers (to create a database, see Working with databases).

When the database in which to store the data is selected in a Data logger, Q Studio automatically creates and configures a table in the database with the following columns for each variable to sample:

Column

Description

Present

[VariableToLogName]

Value of the specific variable

Always

[VariableToLogName]_OpCode

Code of the specific variable on the PLC reading operation

If Log operation code of every variable = True

[VariableToLogName]_Timestamp

Date and time of reading of the specific variable on the PLC in UTC

If Log timestamp of every variable = True

Also add the following columns:

Column

Description

Present

Timestamp

Date and time of the sample reading on the PLC.

Note

this timestamp is slightly different from the timestamp of the single variables as it refers to the time at which UNIQO ends the reading of all the sample variables.

Always

LocalTimestamp

Date and time of reading of the specific variable on the PLC in the machine local time zone

Local time log = True

Automatic sampling mode

There are two automatic sampling modes of variable values:

  • sampling of all the variables monitored, independently of their value

  • sampling of only the variables whose value has changed significantly compared to the previous sampling: in this case, the logger only samples variables whose value has undergone a variation beyond a dead-band interval, expressed as an absolute or percentage value. For example, if the absolute value of this interval is 5, the logger samples only the variables whose values have undergone an absolute or percentage variation of at least ± 5 compared to the previous sampling.

Code of the reading operation on the PLC

For each operation of reading of one or more tags, the PLC generates an operation code that describes its result.

Code

Description

Good

Read succeeded

BadNoCommunication

Read failed for timeout, e.g. connection timeout.

Note

the timeout value is that set in the Timeout property of the Communication stations.

BadCommunicationError

Read failed as the PLC returned an error

BadConfigurationError

Read failed for tag configuration error (e.g. invalid address)

See also

Related procedures

Use Data loggers

References

Data logger