| Dettagli del download |
|
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. |
|
|||||||||||||||||||||||||||||||||

Gli esempi presenti su questo sito sono stati liberamente inviati dagli utenti di automationforum.it, è stato espressamente specificato loro di inviare solo esempi FREE. Automationforum.it non si ritiene responsabile dell'eventuale presenza di esempi rilasciati sotto licenza commerciale, Automationforum.it invita tutti coloro che individuano esempi rilasciati sotto licenza commerciale presenti in questa raccolta a segnalarlo dall'apposito