SaveSample Method
- Last UpdatedNov 06, 2025
- 1 minute read
The SaveSample() method adds a data log record to the Data_Log table, using the current values stored in the Data_Log_Value table as the sample values. This facilitates using the PLC to collect values from external servers and save them independently, and then trigger a new sample to be logged to the relevant Data_Log table.
Note: This method supersedes the AddSample() method. It provides two overloads for adding data log records, one using ID numbers to identify the data log group and entity and the other using the group description and entity and site names.
| Overload | Description |
|---|---|
| SaveSample(Int32,Int32,Int32,DBInt,DBInt,DBString,DBString) | The SaveSample() method adds a data log record to the Data_Log table, using the current values stored in the Data_Log_Value table as the sample values. This facilitates using the PLC to collect values from external servers and save them independently, and then trigger a new sample to be logged to the relevant Data_Log table. In this overload of the method, the data log group is identified by its group ID and the entity is identified by its entity ID. |
| SaveSample(Int32,String,String,String,DBInt,DBInt,DBString,DBString) | The SaveSample() method adds a data log record to the Data_Log table, using the current values stored in the Data_Log_Value table as the sample values. This facilitates using the PLC to collect values from external servers and save them independently, and then trigger a new sample to be logged to the relevant Data_Log table. In this overload of the method, the data log group is identified by its description and the entity is identified by its entity name and site name. |