Operator Interface Tech Note 27 - TNOI27
Abstract:
The purpose of this document is to describe Crimson's FTP feature and the configuration steps necessary to use it with an approved Red Lion Controls (RLC) product. This document does NOT provide a detailed description of FTP communication, but only an introduction sufficient to define the terms that are used throughout the remainder of this document.
Products:
CR3000 Human Machine Interface (HMI), Data Station Plus (DSP) (excludes LE model), G3 HMI, Graphite Controller, Graphite HMI, Modular Controller (excludes LE and V2 models) and ProducTVity Station™
Use Case: Transferring Files via FTP
This document describes using Crimson to configure a device that will initiate FTP file transfers between its memory card and an FTP server. It also describes setting up FileZilla FTP server software for test and demonstration purposes.
Required Software:
Crimson 3.1, Crimson 3.0, or Crimson 2.0
Required Firmware:
Crimson 2.0: build 230+ / Crimson 3.0 / 3.1: all builds
Required Operating System:
Microsoft Windows 2000, or above
Introduction
FTP stands for File Transfer Protocol. It’s used on TCP/IP networks to exchange files between devices. An exchange is always made in a client/server fashion; a client connects to a server to access information by uploading (transfer to the server) or downloading (transfer from the server) data.
The Crimson Sync Manager is an FTP client and therefore has to connect to a server for the functionality to work.
There are numerous FTP servers available on the market, some are free, and others are more professional but licensed. The example used in this document is FileZilla Server.
NOTE: Crimson FTP Sync Manager requires Crimson 2.0 (build 230+) or above and is only available to Windows 2000 or above users. Please update your version of Crimson to the latest; available online at www.redlion.net
Crimson Configuration
1. Start Crimson and go to the Navigation Pane and click on Communications, as shown in Figure 1.
2. Click on Network.
3. Click on the appropriate Ethernet tab; Ethernet 1 in this case.
4. Configure the port settings as required by the application.
Figure 1.
5. Referring to Figure 2, go to the Navigation Pane and under Services, click on Sync Manager.
6. Set the Enable Sync Manager option to Yes.
7. Set the Enable Log File Sync option as appropriate for the application; Yes in this example.
8. Configure the FTP Client settings as required by the application.
Figure 2.
9. The LIST Mode has two options:
a. Per Directory: issues a single LIST command for each folder, reducing the number of commands sent, but risking the transmission of large amounts of data.
b. Per File: issues a LIST command for every file on the memory card, but only transmits new and updated files.
10. The Record Log File option should only be set to Yes for troubleshooting purposes, otherwise set it to No, as in this example.
11. If the Log File Sync option was previously enabled, configure the Log Synchronization section:
a. Base Directory: directory structure BEYOND the user’s home directory.
NOTE: RLC’s home directory is C:\FTP\rlc; using “/TNOI27/” as the base directory will store files in C:\FTP\rlc\TNOI27 on the server.
b. Sync Hours: how often, in hours, to sync.
c. Sync Minutes: how often, in minutes, to sync.
d. Sync Offset: used to offset sync if multiple devices are configured with the same sync frequency.
NOTE: Use only Sync Hours or Sync Minutes to quantify sync settings.
Functions for Manual FTP Exchange
Sending a File Manually to the Server
This function is used to transfer the defined file from the RLC device’s memory card to the FTP server.
FtpPutFile(connection, local, remote, delete)
Argument |
Type |
Description |
connection |
int |
FTP connection number, always 0 |
local |
cstring |
Local file name on memory card |
remote |
cstring |
Remote file name on server |
delete |
int |
If True, the source file is deleted after transfer |
This function returns true if the transfer is successful, false otherwise.
In the following example, the file Report.txt will be transferred to the FTP server and deleted from the memory card upon successfully completing the transfer:
Example: Success = FtpPutFile(0, “/LOGS/Report.txt”, “/Reports/Report.txt”, 1);
File remote path is relative to server FTP root folder path.
Transferring a File Manually to the Server
This function will transfer the defined file from the FTP Server to the RLC device’s memory card.
FtpGetFile(connection, local, remote, delete)
Argument |
Type |
Description |
connection |
int |
FTP connection number, always 0 |
local |
cstring |
Local file name on memory card |
remote |
cstring |
Remote file name on server |
delete |
int |
If True, the source file is deleted after transfer |
This function returns true if the transfer is successful, false otherwise.
In the following example, the file Recipes.csv will be transferred from the FTP server to the CompactFlash Card but the original file will not be deleted from the PC:
Example: Success = FtpGetFile(0, “/Recipes.csv”, “/Recipes/Rec001.csv”, 0);
File remote path is relative to server FTP root folder path.
Install and Configure FileZilla Server
1. Download the FileZilla server setup file from https://filezilla-project.org
2. Run the setup file.
3. Referring to Figure 3, select the following options (at minimum):
a. FileZilla Server (Service)
b. Administration interface
Figure 3.
4. Click Next; the Startup Settings popup appears, as shown in Figure 4.
5. Referring to Figure 4, choose the appropriate Startup settings.
Figure 4.
6. Click Next.
7. Referring to Figure 5, select how it should be started.
Figure 5.
8. Click Install.
9. Wait for the installation to complete. When the installation has been successfully completed, the Installation Complete popup appears, as shown in Figure 6.
Figure 6.
10.Click Close.
11.Start the FileZilla Server Interface (if it did not automatically open after completing the install).
12.Referring to Figure 7, choose the appropriate Host and Port, as previously defined in Step 5.
Figure 7.
13.Click Connect.
Create and Configure a New User in FileZilla
1. Referring to Figure 8, click Edit-Users from the Menu bar.
2. Select General under the Page heading.
3. Click the Add button under the Users heading.
4. Define the new user’s name and group (as applicable).
Figure 8.
5. Click OK.
6. Referring to Figure 9, enable the Password option under Account settings, by selecting the box.
7. Specify a password for the new user and click OK.
Figure 9.
8. Referring to Figure 10, click Shared folders under the Page: heading.
9. Click the new user’s name under the Users heading; rlc in this case.
Figure 10.
10.Click the Add button under Shared folders; the Browse for Folder popup appears, as shown in Figure 11.
11.Referring to Figure 11, browse to the location to use as this user’s Home Directory.
Figure 11.
12.Click OK.
13.Referring to Figure 12, select all of the boxes under the Files heading.
14.Select all of the boxes under the Directories heading.
Figure 12.
15.Click the Set as home dir button.
16.Click OK.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement