NA File Transfer Protocol

Updated March 31, 2025


The purpose of this article is to explain the required set up for an NA Series HMI so that the Data Logging files are accessible through FTP so as to avoid the need to remove the SD memory card.


Set Up & Explanation:
In setting up the Data logging for the HMI you will need to proceed to the “Data Logging” section in the Multiview Explorer, right click and select “Add”. You may call this data set anything you like (This name will be required later on in the set up).


After the data set has been created you will need to make sure that the “Target Device” is set to “SD Memory Card” and the “Target Folder” should look the same as in Figure 2. The “Update Type” can be selected as either “On Condition” or “Regular Interval” depending on your requirements. The “Start New Data Base” option should be selected as “Daily”.


The next step will be to go to the “Global Events” section in the Multiview Explorer (Figure 3) and double click to open. Once opened you will need to click on the drop down box labeled “< Select Event to Add >” and add the event that can be seen in Figure 4 below. The interval in this example is set to 10 seconds, meaning that every ten seconds the FTP file will be updated with the latest data file, this can be changed if needed. Once the event has been added simply click “< Select Action to Add >” to add the actions seen in Figure 4. Into the “Subroutine Name” field type “MoveFile.relocate_file”.


 

 


When setting up the Global Events make sure that “StopDataLogging” and “StartDataLogging” are both set as actions and are using your defined data set or this process will not work.


The next step is to go to the “Global Subroutines” and open the “MoveFile” subroutine. This subroutine is the set of “instructions” that will take the data logging files from the SD Card and copy them to the FTP folder on the internal storage of the HMI. In the recording of the data logging files the folders are created based on the current system date in the format of “YYYYMMDD”. In order to make sure the correct folder is selected this subroutine will grab the system date and rearrange to suit this format as seen in Figure 5.

 

 


In this next section of code (Figure 6.) you may need to alter the highlighted section depending on the name you selected for your data set.

 

The code will then proceed to determine whether the desired “sourcePath” exists in the system and output an error if it does not. The subroutine will then copy this file and place the copy into the FTP folder on the HMI, allowing it to be viewed through FTP. (This file will have a name looking like this “0000_000.csv” but is not necessarily all zeros.)

 


 

Start a Conversation
This conversation is closed
Uploading...