Questo sito utilizza i cookie per migliorare servizi ed esperienza degli utenti. Se decidi di continuare la navigazione consideriamo che accetti il loro uso.

Panoramica Cerca Sopra
Dettagli del download
Script-controlled data logging to a data table (group of reco Script-controlled data logging to a data table (group of records)
(0 voti)

AppendRecordsToDb is a project designed to demonstrate how to use the RDb.AppendRecord method to add a group of records into a data table. One record (row) in the Data1 data table contains the values of the following tags (columns): RecordTimeStamp, LongInt, String, and Word.

The data that will be logged to the data table is stored in array-type tags named LongArray5, StringArray5, and WordArray5. The RecordTimeStamp value is assembled from the tags MinuteArray5, HourArray5, DayArray5, and the constants c_Month and c_Year before the record is logged to the data table. The BlockSamplingData tag is connected to the Blocking tag property of the data table and to the corresponding button in the visualization window.

The sampling method of the data table is set to Script-controlled (by RDb.AppendRecord procedure) – this means the data can be logged only from a script by calling the RDb.AppendRecord method. The time stamp source is linked to the RecordTimeStamp tag – records don't have to be logged in a chronological sequence.

The InitArrays script is defined via the Script Manager and initializes the array-type tags. This script is executed at project startup via the AfterStartProject script. The SaveArray script is started by pressing the Save array of records button in the visualization window and performs the logging of records to the data table. The values of the RecordTimeStamp, Word, LongInt, and String tags are set and the RDb.AppendRecord method is called inside the "for" statement (this sequence is performed five times). You can view the data logged in the data table via the trend or report viewer.

Informazioni

Versione:
Dimensione27.2 KB
Downloads0
Lingua
Licenza
Autore
Sito Web
Prezzo
Creato24-08-2015
Creato da
Modificato il24-08-2015
Modificato daroby

Solo gli utenti registrati e loggati possono scaricare questo file.

.

.