Add an event command to export a data log
Create an event command to export a data log to view the tag values collected on the HMI device. When triggered on the HMI device, the event exports all of the data logs in the
View Designer
project. Data logs export to a USB storage device or SD card for a PanelView
project as a .zip file. The .zip file contains a .csv file for each data log. For a
PanelView
project, create an additional event to allow the safe removal of the removable media from the HMI device so that files on the media do not become corrupt.Prerequisites
- Create an event to trigger the command:
- Touch press.Occurs when touching the item on the screen that is configured with the event.
- Touch release.Occurs when releasing the item on the screen that is configured with the event.
- Key press.Occurs when
- Key release.Occurs when releasing the specified key.
- Expand the
- Select the graphic element configured with the touch or key event.
- In thePropertiespane on theEventstab, selectAdd Command.
Data Logcategory and configure the command:- Export Data Log. Creates and exports each data log in .csv format to a .zip file:
- In theDestinationbox of the command card, selectUSBorSD Cardfor a PanelView project.
- In theFileNamebox, type the name of the export .zip file for the data log.
- Cancel Data Log Export.Cancels the export of the data log to the HMI device. Partial data logs do not export. No .zip file appears in the destination.TIP:Tips:
- Bind theFileNamebox of the Export Data Log event command to a graphic element property or a tag in a controller. Binding the file name specifies the data log to export on the HMI device. For example, bind theFileNamebox of the Export Data Log event command to the text property of Text Input graphic element. This displays the name of the data log on the Text Input graphic element that exports the data log from the HMI device.
- Exporting the same data log file to the same removable media creates a new export file each time. The file name increments by one. This may cause the USB storage device, SD card, or destination to reach capacity. For example, DataLog_002 indicates a second instance of an exported data log named DataLog.
- When the data log is exporting, theData ExporticonSystem Banner. If there is an error exporting a data log, theData Export ErroriconSystem Banner.
- Data log exports do not complete or create a .zip file on removable media if a ControlFLASH, reboot, or power cycle to the HMI device occurs during the export.
- The data log file contains tag values from all controllers.
Provide Feedback