Sunteți pe pagina 1din 23

Application Note

Boot Application loading without


CoDeSys V3.5

A brief explanation on how to load a new project to a Festo PLC CECC


over Ethernet without the use of the CoDeSys 3.5 software CPX-CEC (V3)

100099
Title ............................................................................................ Boot Application loading without CoDeSys (V3.5)
Version ............................................................................................................................................................. 1.10
Document no. .............................................................................................................................................. 100099
Original .................................................................................................................................................................en
Author ............................................................................................................................................................. Festo

Last saved .................................................................................................................................... 05.07.20162016

Copyright Notice
This documentation is the intellectual property of Festo AG & Co. KG, which also has the exclusive copyright. Any
modification of the content, duplication or reprinting of this documentation as well as distribution to third par-
ties can only be made with the express consent of Festo AG & Co. KG.
Festo AG & Co KG reserves the right to make modifications to this document in whole or in part. All brand and
product names are trademarks or registered trademarks of their respective owners.

Legal Notice
Hardware, software, operating systems and drivers may only be used for the applications described and only in
conjunction with components recommended by Festo AG & Co. KG.
Festo AG & Co. KG does not accept any liability for damages arising from the use of any incorrect or incomplete
information contained in this documentation or any information missing therefrom.
Defects resulting from the improper handling of devices and modules are excluded from the warranty.
The data and information specified in this document should not be used for the implementation of safety func-
tions relating to the protection of personnel and machinery.
No liability is accepted for claims for damages arising from a failure or functional defect. In other respects, the
regulations with regard to liability from the terms and conditions of delivery, payment and use of software of
Festo AG & Co. KG, which can be found at www.festo.com and can be supplied on request, shall apply.
All data contained in this document do not represent guaranteed specifications, particularly with regard to func-
tionality, condition or quality, in the legal sense.
The information in this document serves only as basic information for the implementation of a specific, hypo-
thetical application and is in no way intended as a substitute for the operating instructions of the respective
manufacturers and the design and testing of the respective application by the user.
The operating instructions for Festo products can be found at www.festo.com.
Users of this document (application note) must verify that all functions described here also work correctly in the
application. By reading this document and adhering to the specifications contained therein, users are also solely
responsible for their own application.

(Festo AG & CO. KG, D-73726 Esslingen, 2016)


Internet: http://www.festo.com
E-Mail: service_international@festo.com
Table of contents
1 Requirements ............................................................................................................................................. 4
1.1 Overview ..................................................................................................................................................... 4
1.1.1 Using the Festo Field Device Tool ................................................................................................... 4
1.1.2 Using the Festo Field Device Tool with commands in the CMD.exe ................................................ 4
1.1.3 Using an FTP client ......................................................................................................................... 4

2 Preparation of Boot Application files ......................................................................................................... 5


2.1 Short explanation: ....................................................................................................................................... 5
2.2 Step by Step approach: ............................................................................................................................... 6

3 Loading the Boot Application with FFT: ...................................................................................................... 9


3.1 Step by Step approach: ............................................................................................................................... 9

4 Loading the Boot Application with FFT and the command prompt .......................................................... 13
4.1 Step by Step approach: ............................................................................................................................. 13
4.2 Automated batch file ................................................................................................................................. 16

5 Loading the Boot Application with an FTP client ...................................................................................... 17


5.1 Activating FTP server ................................................................................................................................. 17
5.2 Automatically activating FTP server: .......................................................................................................... 18
5.3 Loading the Boot Application with FileZilla: .............................................................................................. 22

6 Links.......................................................................................................................................................... 23
Requirements

1 Requirements
The examples will use a CECC-LK controller, but the principle is exactly the same for other CECCs and all CPX-
CEC based controllers which use CoDeSys 3.5.

1.1 Overview
This document will explain, step by step, how you can implement the loading of a Boot Application to a Codesys
V3.5 PLC, without the need of CoDeSys software. This can be useful for automated updating of the Boot Applica-
tion or when somebody without CoDeSys 3.5 on his computer wants to change/update the project thats loaded
in the PLC.
There are three ways to use this feature:

1.1.1 Using the Festo Field Device Tool


Advantages:
Easily done and no need for programming skills. Mostly used by Service Engineers without an installed version
of CoDeSys 3.5.
Disadvantage:
Is completely manual, PLC always reboots directly.

1.1.2 Using the Festo Field Device Tool with commands in the CMD.exe
Advantages:
Can be automated into an executable batch file. PLC keeps running, reboot can be done later.
Disadvantages:
Is a little complex to setup with the cmd.exe

1.1.3 Using an FTP client


Advantages:
Easy interface, can also be automated with 3rd party FTP clients. PLC keeps running, reboot can be done later.
Disadvantages:
FTP server needs to be activated on the PLC, this is not by default and requires a setup progress.

Seite 4 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Preparation of Boot Application files

2 Preparation of Boot Application files

For updating the Boot Application two files are always required:
Application.app
Application.crc

2.1 Short explanation:


Open or create a new project like your used to in CoDeSys 3.5.

Create the boot files via the drop down menu: Online --> Create Boot Application.

Normally, when CoDeSys 3.5 is online connected with a PLC, this creates the boot application files and puts
them automatically inside the PLC. After a power cycle the PLC will boot with those files.
Because CoDeSys 3.5 is not connected to a PLC it opens the file directory on your PC and you can save the Boot
Application files. The following question may be asked by CoDeSys:

Application changed since last download: Do you want to generate new code for the boot project?
Answer with Yes

After saving the file theres a second question asked:


Do you want to save the Reference context for the boot project?
Answer with Yes

If no errors occur with building the code, there are two files created :
Application.app
Application.crc

Attention: Do NOT change the names of these files!

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 5 von 23
Preparation of Boot Application files

2.2 Step by Step approach:

Open or create a project:

Create the Boot Application files

Seite 6 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Preparation of Boot Application files

Answer the question with Yes:

Save the files:

Answer the question with Yes:

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 7 von 23
Preparation of Boot Application files

The two files are created:

Seite 8 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with FFT:

3 Loading the Boot Application with FFT:

This chapter will explain how to easily load the two Application files to the CoDeSys controller with the Festo
Field Device Tool. This can be useful for service engineers who are on location at a machine and want to load the
new files they received from a programmer, without the use of CoDeSys software.

3.1 Step by Step approach:

Open the Festo Field Device Tool and scan for the PLC, it should appear in the List View.

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 9 von 23
Loading the Boot Application with FFT:

Right-click on the device and select Bootapplication

On the pop-up window, open the file directory:

Seite 10 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with FFT:

Select the Application.app file and choose Open:

The location and filename should now show in the pop-up window.
By default the user/password are filled in:
User: root
Password: Festo

Choose download:

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 11 von 23
Loading the Boot Application with FFT:

The following question is asked:

Attention: If the PLC is not put in stop manually, the Field Device Tool will force the PLC to a stop and therefore
stopping the machine.

Please choose Yes if you want to want to download the Boot Application.
If no error occurs, the following message will confirm the download:

The Boot Application loader can now be closed:

Seite 12 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with FFT and the command prompt

4 Loading the Boot Application with FFT and the command prompt

In some cases, you want to automate the process shown above. This is possible via the Command Prompt
(cmd.exe). The following chapter will show this method.

Additional information about the use of this feature can be found in the Help directory of the Festo Field Device
Tool:

4.1 Step by Step approach:


To command the FFT via the Command prompt we need to prepare a .txt file which points to the following loca-
tions:
- Location of the Application.app file on the PC
o Location where the file should be placed inside the PLC
- Location of the Application.crc file on the PC
o Location where the file should be placed inside the PLC

In this example the following text will be:

D:\BootApplicationFiles\Application.app //ffx/codesys/prj/Application.app
D:\BootApplicationFiles\Application.crc //ffx/codesys/prj/Application.crc

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 13 von 23
Loading the Boot Application with FFT and the command prompt

You can put the FileLocationPointer.txt anywhere on your pc, but the most logical place is inside the same di-
rectory as the Boot Application-files.
Attention: all used folders/subfolders and files may NOT contain any spaces! Make sure all file names and fold-
ers are single words!

Now you can open the cmd.exe, please execute it as Administrator by Right-clicking the executable and se-
lecting Run as administrator.
This makes sure you can access the Program Files directory on the C:\ disk.

Seite 14 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with FFT and the command prompt

First, we need to point to the Festo Field Device Tool directory. On x64 machines the default location is:
C:\Program Files (x86)\Festo\FFT

Point to this location with the following command:


cd C:\Program Files (x86)\Festo\FFT
and select Enter

The cmd.exe should now look like this:

Now, we need to prepare the command line to download the Boot Application Files. This command line needs
the following information:

festofielddevicetool.exe <-- This selects the FFT


/filedownload <-- This selects the file downloading procedure
<IP adres PLC> <-- The IP address of the PLC should be located here
<Location of xxx.txt pointer> <-- This should contain the location of the .txt file created earlier
<Username> <-- By default this is root
<Password> <-- By default this is Festo

(reboot) <-- This commands the PLC to do a reboot after file downloading (not mandatory)

For this example, the command line looks like this:

festofielddevicetool.exe /filedownload 192.168.178.24 D:\BootApplicationFiles\FileLocationPointer.txt root Festo reboot

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 15 von 23
Loading the Boot Application with FFT and the command prompt

Executing this command line will result in the following screen, the text Downloading files to the device 192.168.178.24 was
successful. confirms the correct download.

After reboot the PLC will boot the new Application.

4.2 Automated batch file


If you want to automate this, you can create an executable batch file. This batch file needs to be saved inside the Festo Field
Device Tool directory.

Simply create a .txt file with the command line and change the extension to .bat.
For example:

Double clicking the AutoFiledownload.bat will open the command prompt and automatically executing the line. After com-
pletion it exits.
Attention: the cmd.exe will not check if the download was successful, it always closes!

Seite 16 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with an FTP client

5 Loading the Boot Application with an FTP client

Multiple different FTP clients can be used to download the Boot Applications to the PLC, this explanation will use
FileZilla.

5.1 Activating FTP server

To save processor speed the FTP server is not activated in the PLC by default. This can be activated in multiple
ways but I will explain the easiest one.

The first time we need to manually start the FTP server, this can be done with the cmd.exe.

Type in telnet 192.168.178.24 and press enter:

The following screen should show:

As username, type in root and press enter:

As password, type in Festo and press enter: (note that when typing, no letters or asterisks occur)

To activate the FTP server, type in startftp and press enter:

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 17 von 23
Loading the Boot Application with an FTP client

To check if the FTP server is running, type in ps and press enter, the line /sbin/vsftpd should be shown at the
bottom:

The command prompt may now be closed.

Note: If you reboot the device, you have to start the FTP server AGAIN. If you want to start the server every time
your device powers up, please follow the next steps.

5.2 Automatically activating FTP server:

Create a text file with the following name:


Startup.txt

Inside the this file enter the following text:


startftp
Attention: do not use capital letters!

It should look like this:

By placing this file inside the project directory on the PLC, it will automatically boot the FTP server.

Seite 18 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with an FTP client

Open an FTP client program. In these examples the program FileZilla is used:

Type in the IP-adress, username and Password of the PLC and select on Quickconnect.
By default:
Username: root
Password: Festo

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 19 von 23
Loading the Boot Application with an FTP client

If the connection is established, the file directory on the PLC should be shown on the right:

Search for the created file startup.txt on the left (local site) and search for the project directory on the right (Re-
mote site). The location for the project directory on the PLC is:

/ffx/codesys/prj

Seite 20 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Loading the Boot Application with an FTP client

Copy the file to the PLC by dragging it to the right:

The program should confirm the transfer by a pop-up balloon and the file is now also shown on the right:

With this done, the FTP server should start with every reboot

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 21 von 23
Loading the Boot Application with an FTP client

5.3 Loading the Boot Application with FileZilla:

The loading of a Boot Application works just the same as transferring the startup.txt. Just drag the two files (Ap-
plication.app and Application.crc) to the project directory on the PLC:

When prompted, choose overwrite and OK to overwrite the existing files. (2x)

Seite 22 von 23 Application Note Boot Application loading without CoDeSys V3.5 1.10
Links

6 Links
Festo Field Device Tool can be downloaded via the Support Portal:
https://www.festo.com/net/en-gb_gb/SupportPortal/default.aspx?q=Festo+Field+Device+Tool&tab=4&s=t#result

The FTP client used in the examples can be downloaded via the following link:
https://filezilla-project.org/

Application Note Boot Application loading without CoDeSys V3.5 1.10 Seite 23 von 23

S-ar putea să vă placă și