If you can't read please download the document
Upload
ngodiep
View
222
Download
2
Embed Size (px)
Citation preview
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 1 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Touch-it CE CODESYS
Target / Web / VisBee VISU
Codesys Control V3.5.x
ModBus / EtherCAT / CANopen
NVRAM
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 2 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Document No. E461132
Revision Dec. 2015, Revision 04
Address Christ-Elektronik GmbH
Alpenstrae 34
DE-87700 Memmingen
Telephone +49 (0)8331 8371 0
Fax +49 (0)8331 8371 99
E-Mail [email protected]
Internet http://www.christ-elektronik.de
Copyright No part of this documentation may in any form be reproduced, copied
or distributed by means of electronic systems without previous written
permission by Christ-Elektronik GmbH. The translation into another
language also requires a written permission. This documentation may
be exclusively entrusted to the owner of the installation or to the
employees of Christ-Elektronik GmbH.
Technical changes Christ-Elektronik GmbH reserves the right to change specifications,
executions and technical data held within this document without prior
notice.
Trademarks Brand and product names are trademarks or registered trademarks of
their respective owners.
mailto:[email protected]://www.christ-elektronik.de/
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 3 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Table of Contents
Inhalt
1 Introduction ............................................................................................................................................. 4
2 CODESYS Development System................................................................................................................ 5
2.1 Included Fieldbuses ................................................................................................................................ 5
3 Licenses ................................................................................................................................................... 6
4 Install the Device Description File ............................................................................................................ 7
5 Create a Project ....................................................................................................................................... 8
5.1 New Project ........................................................................................................................................... 8
5.2 Add a device to the project .................................................................................................................... 9
5.3 Update a device in an existing project ................................................................................................. 10
5.4 Add a Program and the Task Configuration ........................................................................................ 10
5.5 Add a Library to the Project ................................................................................................................. 11
6 Connect The Device ............................................................................................................................... 12
6.1 Network Connection ............................................................................................................................ 12
6.2 Verify the Ethernet connection ............................................................................................................ 12
6.3 Set the network path ........................................................................................................................... 13
7 Visualization .......................................................................................................................................... 14
7.1 Target Visualization ............................................................................................................................. 15
7.2 Web Visualization ................................................................................................................................ 16
7.3 VisBee Visualization ............................................................................................................................. 17
8 Persistent Variables ............................................................................................................................... 18
8.1 Retain Variables ................................................................................................................................... 18
8.2 Persistence Manager ........................................................................................................................... 18
9 Fieldbus ................................................................................................................................................. 21
9.1 EtherCAT Implementation ................................................................................................................... 21
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 4 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
1 Introduction
This document shows the necessary steps to develop an application for Touch-it CE devices
from Christ-Elektronik. First you learn how to implement a Touch-it CE device to Codesys
V3.5. Then a simple start project and the connection to your device are explained.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 5 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
2 CODESYS Development System
The actual Codesys versions are V3.5 SP1 Patch3, V3.5 SP5 Patch0 and
V3.5 SP7 Patch0. The version of the Codesys application must suit the development system.
Other versions may operate, but not guaranteed. On request Christ-Elektronik provides the
Codesys development system (IDE)
2.1 Included Fieldbuses
Following Fieldbuses are included in the Runtime System:
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 6 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
3 Licenses
Following licenses are available for Touch-it CE Codesys devices
Target-ID Target-Name
10D8 - 0001 Touch-it Codesys Control
10D8 - 0002 Touch-it Codesys Control + TargetVisu
10D8 - 0003 Touch-it Codesys Control + WebVisu
10D8 - 0004 Touch-it Codesys Control + Target/WebVisu
Showing which license and Codesys
Version is installed on your target device,
see the menu entry
Info->About
in the Codesys Runtime.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 7 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
4 Install the Device Description File
First you have to install the device specific XML-Device-Description-File (.devdesc.xml). You
can get the current file from Christ-Elektronik or the device tree \FlashDisk\Codesys\.
For further Modules please ask your supplier for the specific Device Description File.
Install the Device-Description-File in the Codesys IDE.
Click Menu->Tools->Device Repository.
Here you can add the Device-Description-File to the list by clicking Install.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 8 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
5 Create a Project
5.1 New Project
Open a new application with File->NewProject.
Select in Category->Project and in Templates-> Standard project with
ApplicationComposer. Now select the suitable device.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 9 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
5.2 Add a device to the project
An empty or established project can be
added with a Touch-it device at every time.
Click right at the project-node / add device.
Then select the suitable device.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 10 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
5.3 Update a device in an existing project
An existing device inside a project can be
updated.
Click right at the device and select Update
Device.
Then select the suitable device from the list.
5.4 Add a Program and the Task Configuration
To add a program and the Task Configuration to the project click right at the Application
and select add Object->POU or add Object-> Task Configuration.
Now click Add Call in the Task Configuration Task and select your new Program.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 11 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
5.5 Add a Library to the Project
Libraries are non-volatile resources you can use in your program.
Go to the Library Manager in your Application and click Add library.
Select the requested library and confirm with OK.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 12 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
6 Connect The Device
6.1 Network Connection
The Touch-it CE devices have two independent Ethernet interfaces. At delivery the DHCP
service is configured. With a double click at the network symbol in the taskbar, the
information dialog of the network adapter opens.
Ethernet 1 AX88772B1
Ethernet 2 AX887961
6.2 Verify the Ethernet connection
To verify the correct connection
between the PC and the Touch-
it CE device use the console
command ping with the suitable
IP address.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 13 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
6.3 Set the network path
Setting the network path in the Codesys IDE to the target device, open the window
Communication Settings with a double click on the device node.
First add a Gateway. Then click on Scan Network. The Codesys IDE is looking for connected
devices. Devices with wrong Target-ID are shown grayed out. If everything was correct, the
information of the device is shown in the Communication Settings. Now this device is used
for all Login actions.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 14 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
7 Visualization
In Codesys you have three different visualization opportunities and the Christ-Elektronik own
VisBee Visualization:
Target Visualization
Web Visualization
Target+Web Visualization
VisBee Visualization
For Target, Web or Target+Web Visualization add the Visualization Manager to the project.
Right click on Application -> Add Object -> VisualizationManager
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 15 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
7.1 Target Visualization
Add Visualization to the project.
Right click on Application->Add Object->Visualization.
Next open the Target Visualization at the Visualization Manager point.
Set the Start Visualization to the new added Visualization and set the Updaterate to a
preferred value.
Now the Target Visualization is ready to work. At the next Login to the device the
Visualization is shown.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 16 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
7.2 Web Visualization
Add Visualization to the project.
Right click on Application->Add Object->Visualization.
Then open the Web Visualization under Visualization Manager.
Set the Start Visualization to the new added Visualization and set the Updaterate to a
preferred value. The Name of .htm file is the name you`ll have to write into the browser to
open the WebVisu.
Now the Web Visualization is ready to work. At the next Login on the device, the Visualization
is ready.
Start the application on the device.
Open a browser on another PC and enter
http://[IPAddress]:8080/[Name of .htm file].htm.
For example:
http://192.168.25.71:8080/webvisu.htm
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 17 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
7.3 VisBee Visualization
Download the VisBee Visualization from www.visbee.net/Download/
Follow the Driver Installation Instruction:
Support->Driver Instructions -> Manual VisBee-Driver Codesys v2+v3.pdf
For the configuration of the Codesys driver you have to add a Symbol configuration to your
Codesys Application and select the necessary variables. Build and download the application
to your Codesys Runtime.
To configure the VisBee Codesys driver (explained in the Manual VisBee-Driver.pdf) you
have to select Arti3 and the Device Name.
For detailed information about VisBee go to www.visBee.net Support->Documentation or ask
Christ-Elektronik GmbH.
http://www.visbee.net/Download/http://www.visbee.net/
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 18 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
8 Persistent Variables
The Retain Persistent Variables are used to retain their values throughout the common
program runtime. For example: sudden power shutdown or warm/cold reset.
These variables are stored cyclically in two 128Kbyte sized NVRAMs.
If the sudden power shutdown occurs while writing one NVRAM the variables will be read at
the next startup from the other NVRAM.
8.1 Retain Variables
Adding Retain Variables to your project, click right on your Application and select Add
Object-> Persistent Variables
All stored values in PersistentVars will be saved in the NVRAM of the Touch-it CE Panel.
8.2 Persistence Manager
With a program update it is possible to retain variables by using the Persistence Manager.
First add the library AC_Persistence to the POU Pool.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 19 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Click right in the View Modules and Add Toplevel Modul Instance. Then select the
PersistenceManager.
Double click on Channels and add the Persistence Channel and Data Storage either
ASCIIFileStorage or BinaryFileStorage.
Type in the sArchiveName for example \FlashDisk\Codesys
Select your Application with a double click on PersistenceManager.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 20 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Adding variables to the PersistenceManager you have to set the Attribute
ac_persist:=PersistenceChannel.
Downloading the project to the Touch-it CE Panel you have to click on
Composer->Generate, Build and Login.
Now the PersistenceChannel file will be created on your device in the sArchiveName.
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 21 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
9 Fieldbus
9.1 EtherCAT Implementation
Adding the fieldbus EtherCAT to your application
click right on Device ->add Device
Then select EtherCAT -> Master -> EtherCAT Master
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 22 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
First be sure that the Network path is set (see chapter 6.3)
Then click on EtherCAT_Master -> General -> Source Address (MAC) -> Browse
Choose the Name AX887961
This Port is the EtherCAT Port on the Touch-it CE Device.
The next step is to add your EtherCAT device to the project.
Click right on EtherCAT_Master -> Add Device
And select your Device.
Be sure you have added the device description (.xml File) to the Device Repository first.
(see Chapter 4)
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 23 / 24 Dec. 2015, Revision 04
a member of the Christ Company Group Document No.:E461132
Now adjust your specific settings for the EtherCAT Device and download the project.
If everything works the Codesys IDE should display following status:
Touch-it CE Codesys Operating Instructions / First Steps
Copyright / Christ-Elektronik GmbH 24 / 24 Dec. 2015, Revision 04
www.christ-elektronik.de Doucment No.: E461132
DISCLAIMER
Technical data are subject to modification and delivery subject to availability. Any liability that the data and illustrations
are complete, actual or correct is excluded. Designations may be trademarks and/or copyrights of the respective
manufacturer, the use of which by third parties for their own purposes may infringe the rights of such owner.