Data Backup to PC
Technical Note 5073
Applicable Model(s)
HMI5000 Series
Title
Data Backup to PC
Date
01/03/2023
Rev
04
P/N
0907-5073
Summary
This document illustrates how to configure a HMI5000 series to backup data automatically to a PC. Note that this process does not apply to cMT Series products. Please see documentation on using the FTP Client and Server features to perform this function with the cMT Series products.
Solution
The Backup Object can save historical data sample files and event log data files to a remote printer server and automatically convert the data files to the CSV file format. Easy Printer must be running on the PC and configured correctly. Easy Printer installs with EBPro.
To open Easy Printer from the Windows Desktop, select Start >> All Programs >> Maple Systems >> EBPro >> Easy Printer/Easy Printer_Backup Server.
The default file location is: C:\MapleSystems\EBPro
Easy Printer Settings
Configure the Remote Printer Server Settings in Easy Printer. To access the Remote Printer Server Settings in Easy Printer, select [Options] >> [Settings].
Select General and configure the Server settings to match the System Parameter settings in your project. To access the System Parameter settings in EBPro, select [Home] à [SystemParameters] à [Printer/Backup Server tab].
1.
In [Server], assign [Port number of the server socket] to “8005”, to “admin” and [Password] to “111111”. (NOTE: The values listed above are the default settings)
2.
In [Naming Convention for HMI Folder], select [Use IP address] “IP_” as the [Prefix].
3.
In [Properties], select [Minimize to system tray].
4.
Click [Backup] tab at the left side in the dialogue box as follows:
5.
In [Output], click the button to browse and select a path for storage of the incoming history files. Choose to either overwrite previous files with the [Overwrite it. (The content will be destroyed)] option, or to save it as a backup and append .BAK with the [Append .BAK to the file name.].
6.
Click [OK] to apply the settings.
EasyPrinter provides a mechanism for converting the uploaded Data-Sampling and Event-Log history files stored in binary mode to CSV files automatically. Users requesting this function have to prepare a Convert Batch File to provide EasyPrinter with the information of how to convert the history files.
The conversion is actually carried out by EasyConverter. EasyPrinter simply follows the criteria in Convert Batch File and activates EasyConverter with proper arguments to achieve the conversion. The default Convert Batch File is convert2csv.def, located in the root of the Maple Systems software installation directory.
To enable the automatic CSV file conversion:
1.
In [Convert Batch File], click the button to browse and select a path for the convert2csv.def file. C:\MapleSystems\EBPro\convert2csv.def
For further information about how to use EasyConverter, please refer to the Programming Manual.
After configuring the Remote Printer Server settings, you must Enable Output. To Enable Output, select [File] >> [Enable Output]. This will allow EasyPrinter to process and store any incoming backup request in the location specified.
EBPro Settings
In EBPro, configuration of EasyPrinter connection is in the System Parameters.
1.
To access the System Parameters window, navigate to the Home tab, then select System Parameters from the ribbon menu.
2.
Select Use Remote Printer/Backup Server.
3.
Set the Port to “8005”, User Name to “admin”, and Password to “111111”. These settings must match the EasyPrinter Server settings.
Add Backup Object
1.
Add a backup object to your project. To add a backup object to your project, select Data/History >> Backup Per Page in EBPro.
NOTE: Each Data Sample will require a separate Backup Object.
2.
Select a Source. Choose RW, RW_A, Historical event log, or Historical data log.
3.
There may be several data sampling objects registered in the project. If you select Data Log, use Data Sampling object index: to select the right one as shown above.
4.
Navigate to the Output tab. Select Remote printer/backup server from the [Backup Position] section.
5.
Save, compile and download the project to test. When the Backup is triggered, the data will be saved to the specified directory on the PC. If multiple backup objects are triggered, each backing up different data samples, the backup objects will create separate directories using the [Folder name] specified in the Data Sample object properties.
Each Data Sample must be written to a unique folder. If the same folder name is specified for multiple data samples, the data will be overwritten.
Back-up Data to Server and Update in Excel
1.
Once EasyPrinter is configured to convert the HMI data to a CSV file, an Excel file (.xlsx) can be auto-generated to allow users to view the current data from the HMI.
2.
When the file is back-upped to the server, a .csv file is generated.
3.
Create a new Excel file.
4.
Open the created Excel file, import the content in the .csv file by clicking Data >> From Text/CSV.
5.
During import, select Comma as the delimiter. Press Load to complete the process.
6.
When finished, the content in the .csv file can be viewed in Excel. Click Data and then Properties in Excel.
7.
In the External Data Properties window, click the Query Properties button to the right of the Name field. Set the time interval to refresh, and enable Refresh data when opening the file.
8.
In this way, when backing up the file to the server, the generated .csv file is automatically imported to Excel, therefore users can always view the updated data when opening the Excel file.