Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 1.20, 2.00, 2.01

Summary:
Under some conditions, Citect will not create history files for a device. History files are only created for devices that are being used for logging - for example the alarm log, keyboard log, or the output device in a report. If you only open the device using DevOpen(), Citect will assume that you are controlling the device and will not create history files. Citect does this because it assumes that if you want to open the device directly, then you want to do more complex operations on this device, so it will not try to create history files. Note that if a device is being logged to by the alarm, keyboard or report, and you also open the device, history files will still be created. With a report, only the Output Device, and only if you use {} format or Print, will the device create history files. If you use DevOpen in a report, those devices will not create history files.

Citect will also only create history files if you are logging data to a device and you have written something to that device during the history period. For example if you want to create a history file of 1 day for the alarm log and no alarms occur during the day a history file will not be created. 


Solution:
If you want to create history files you can call the DevHistory() function to do the job. Also to support this type of operation, a new mode has been added to DevOpen("<name>", 8). This mode will put the device into logging mode and so create history files. This mode is supported in version 1.20 and 2.01 and later.

Also Citect will not create history files for dbase type devices if the file extension is not added in the "File Name" field of the Devices form. For example the field containing just [data]:replog will not create any history files. To get history files to work you must type in the .dbf file extension, as per [data]:replog.dbf. 


Keywords:
 

Attachments