Managing Data Logging Devices

Topic: CM250

A sample project showing an option for using Logging and File Management tags is installed with your software: Using external memory devices. The default folder is Documents\AutomationDirect\C-more\Projects.

System Tags for Managing Data Logging Devices
System Tag Description Data Type R/W Write Only Retentive Note
The following System Tags are available for SD1, and USB 1, 2 and 3:
SYS %Device% Write Status  Use this tag to indicate to user when someone else accesses the device. For example, an Indicator Light to indicate "Do not remove. Device in use". Discrete R No No Status ON: the panel is accessing the device in %device%Status OFF: the panel is not accessing the device in %device%Write data: Alarm Log, Message Log, Screen Capture, and Line Trend logs
SYS %Device% Eject  Use with a Pushbutton: Toggle On to complete writing to device. Remove and reinsert the device to reactivate the writing device. Use before you remove a device. Discrete R/W Yes No Turn ON to Eject %device%. Turns OFF automatically when Eject is complete
SYS %device% TotalMemory Use with Numeric Indicator do display the total memory on the %device% in Kbyte US32 R No No
SYS %device% FreeMemory Use to monitor the amount of free memory on the device.Use with Event Manager to alert user that the device is full.Use with Numeric Indicator to display the total memory on the %device% in Kbyte US32 R No No
SYS %device% UsedMemory Use with Numeric Indicator do display the total memory on the %device% in Kbyte US32 R No
SYS %device% ReadyToUse Use with indicator light to indicate the %device% is "Ready To Use" after insertion. Discrete R No No %device% Device ready for use. Status ON is Ready, OFF is not Ready.
SYS %device% WriteStatus Use this tag to indicate to user when someone else accesses the device. For example, an Indicator Light to indicate "Do not remove device in use". Discrete R No No Status ON: writing Data to %device% device Status OFF: not currently writing to %device% Device Write Data is Alarm, Message, Capture, and Trend
SYS %device% Eject Use with a Pushbutton to complete writing to %device%. Remove and reinsert the device to reactivate the writing device. Use before you remove a device. Discrete R/W Yes No ON to write Data in the log buffer and prepare to physically remove %device% "SYS %device% ReadyToUse" is OFF when you can safely eject the device.SYS %device% Eject is automatically OFF when Data write is complete and ready to eject.
The following General Error Tags are available for use:
SYS ERR LogError Status ON: when log buffer memory overflow occurs Status OFF: no Error Discrete R No No
SYS ERR ScreenCapture Error Discrete R No
SYS SD1 Write Protected Status ON: Write Protected Discrete R No No
The following File Management Tags are available for use with SD1, and USB 1, 2 and 3:
SYS Copy LogTo%device% Use with Pushbutton Copies complete logs from all the devices to the %Device% associated with the Tag Discrete R/W No No ON to Save all Logfiles to %device%
SYS DELETE All Log Use with a Pushbutton Turn On to delete all log files on all devices Discrete R/W No No Transition to ON will delete log files on any installed external memory devices
SYS DELETE %device%Log Use with a Pushbutton Turn On to delete all log files on the SD card in the %device% Slot Discrete R/W No No Transition to ON will delete log files from an installed device card in %device%

Data Logging — Memory Device Full

The following explains Data logging from an object such as Line Trending, when the memory device is full. The memory device is a USB pen drive plugged into USB port 1, 2 or 3, or an SD memory card plugged into location SD1.

  1. When the Data logging memory device is full, the panel stops writing to the log and a RTE-001 Runtime Error displays on the screen. The error Message is "Log Failed. Not enough Memory Space in %Device%";%Device% can be SD1, or USB 1,2, or 3.
  2. The Data logging object continues to execute.
  3. You can monitor the System Tag "SYS %DEVICE% FreeMemory" with Event Manager, and display a Message to the operator to warn when the memory device is close to full.
  4. You can also use a Pushbutton object with the tag "SYS Copy Log to %Device%" to copy ALL logs on ALL other devices to %Device% and save the current data.

For example, if the application is logging to SD1, the user can monitor "SYS SD1 FreeMemory"  in the Event Manager. When space gets below a set value in Event Manager, then Event Manger can issue an alarm, send an email, etc. The operator can then insert a USB pen drive into the panel USB1 port, and press a pushbutton that is configured with System Tag "SYS Copy Log to USB1". This action copies all of the logged Data to the USB pen drive from SD1, and USB2, and USB3. The operator can then use the System Setup Screen's Memory or Pushbuttons with System Tags to clear SD1, USB 2 and 3. This example works with different combinations of the memory devices, but the preferred method is using a USB pen drive because it is the easiest device to insert and remove.