+ All Categories
Home > Documents > Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without...

Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without...

Date post: 31-Oct-2020
Category:
Upload: others
View: 23 times
Download: 0 times
Share this document with a friend
23
100099 Application Note Boot Application loading without CoDeSys V3.5 A brief explanation on how to load a new project to a Festo PLC over Ethernet without the use of the CoDeSys 3.5 software CECC CPX-CEC (V3)
Transcript
Page 1: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

100099

Application Note

Boot Application loading without CoDeSys V3.5

A brief explanation on how to load a new project to a Festo PLC over Ethernet without the use of the CoDeSys 3.5 software

CECC

CPX-CEC (V3)

Page 2: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

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: [email protected]

Page 3: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

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

Page 4: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Requirements

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

1 Requirements The examples will use a CECC-LK controller, but the principle is exactly the same for other CECC’s 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 that’s 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.

Page 5: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Preparation of Boot Application files

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

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 there’s 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!

Page 6: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Preparation of Boot Application files

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

2.2 Step by Step approach:

Open or create a project:

Create the Boot Application files

Page 7: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Preparation of Boot Application files

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

Answer the question with ‘Yes’:

Save the files:

Answer the question with ‘Yes’:

Page 8: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Preparation of Boot Application files

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

The two files are created:

Page 9: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT:

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

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.

Page 10: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT:

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

Right-click on the device and select ‘Bootapplication’

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

Page 11: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT:

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

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:

Page 12: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT:

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

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:

Page 13: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT and the command prompt

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

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

Page 14: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT and the command prompt

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

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.

Page 15: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT and the command prompt

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

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

Page 16: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with FFT and the command prompt

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

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!

Page 17: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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 asterisk’s occur)

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

Page 18: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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.

Page 19: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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

Page 20: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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

Page 21: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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

Page 22: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Loading the Boot Application with an FTP client

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

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)

Page 23: Boot Application loading without CoDeSys V3...Application Note – Boot Application loading without CoDeSys V3.5 – 1.10 Seite 13 von 23 4 Loading the Boot Application with FFT and

Links

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

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/


Recommended