Legal and copyright information ............................................................................................................... 4
Purpose of the document ......................................................................................................................... 4
Symbols and styles used .......................................................................................................................... 5
Overview: User documentation for AS-i Gateway AC14 .......................................................................... 5
Overview: CODESYS documentation of 3S ............................................................................................. 6
Modification history ................................................................................................................................... 6
All product names, pictures, companies or other brands used on our pages are the property of the
respective rights owners:
AS-i is the property of the AS-International Association, (→www.as-interface.net)
CAN is the property of the CiA (CAN in Automation e.V.), Germany (→www.can-cia.org)
CODESYS™ is the property of the 3S – Smart Software Solutions GmbH, Germany
(→www.codesys.com)
DeviceNet™ is the property of the ODVA™ (Open DeviceNet Vendor Association), USA
(→www.odva.org)
EtherNet/IP® is the property of the →ODVA™
EtherCAT® is a registered trade mark and patented technology, licensed by Beckhoff Automation
GmbH, Germany
IO-Link® (→www.io-link.com) is the property of the →PROFIBUS Nutzerorganisation e.V.,
Germany
ISOBUS is the property of the AEF – Agricultural Industry Electronics Foundation e.V.,
Deutschland (→www.aef-online.org)
Microsoft® is the property of the Microsoft Corporation, USA (→www.microsoft.com)
PROFIBUS® is the property of the PROFIBUS Nutzerorganisation e.V., Germany
(→www.profibus.com)
PROFINET® is the property of the →PROFIBUS Nutzerorganisation e.V., Germany
Windows® is the property of the →Microsoft Corporation, USA
>
1.2 Purpose of the document
This document applies to the following devices of the type"AS-i Gateway AC14":
AS-i Gateway AC14 with Profinet device interface (AC1401/AC1402)
AS-i Gateway AC14 with Profibus slave interface (AC1411/AC1412)
SmartSPS AC14 with EtherNet/IP device interface (AC1421/AC1422)
It is part of the device and contains information about the correct handling of the product.
► Read this document before using the device.
► Keep this document during the service life of the device.
Designation of pushbuttons, buttons or indications
Document
Content / Description
Data sheet
Technical data of the device as a table
Operating instructions *
Notes on mounting and electrical installation of the device
Set-up, description of the operating and display elements, maintenance information, scale
drawing
Device manual
Notes on operation of the device via GUI and web interface
Error elimination
Description of the fieldbus data
Supplement device manual
Description of the acyclic data sets and the command interface
Programming manual
Creation of a project with the device using CODESYS
Configuration of the device using CODESYS
Programming of the PLC of the device
Description of the device-specific CODESYS function libraries
The user can download all documents from the ifm website.
>
1.4 Overview: User documentation for AS-i Gateway AC14
ifm electronic provides the following user documentation for the models of the device class "AS-i
Gateway AC14":
13839
6998
*... The operating instructions are supplied with the device.
Warnings used .......................................................................................................................................... 8
>
2.1 General safety instructions
8516
Read this document before setting up the product and keep it during the entire service life.
Only use the product for its intended purpose.
If the operating instructions or the technical data are not adhered to, personal injury and/or damage to
property may occur.
Improper or non-intended use may lead to malfunctions of the device, to unwanted effects in the
application or to a loss of the warranty claims.
The manufacturer assumes no liability for any consequences caused by tampering with the device or
incorrect use by the operator.
► Observe these operating instructions.
► Adhere to the warning notes on the product.
>
2.2 Required background knowledge
13323
This document is intended for people with knowledge of control technology and PLC programming to
IEC 61131-3.
To program the PLC, these people should also be familiar with the CODESYS software.
This document is intended for specialists. Specialists are people who, based on their relevant training
and experience, are capable of identifying risks and avoiding potential hazards that may be caused
during operation or maintenance of the product. The document contains information about the correct
handling of the product.
► Read this document before use to familiarise yourself with operating conditions, installation and
operation. Keep this document during the entire duration of use of the device.
Programming software CODESYS Development System
für PLC programming according to norm IEC 61131-3
3.5 SP9 Patch 7 Hotfix 3
Package "CODESYS for ifm SmartPLC
StandardLine"
Device and interface description of AS-i Gateway
AC14
Function libraries for programming of the PLC
1.6.4.14
The assured characteristics and functions described in this manuals are only accessible with
the indicated releases of the software components!
ifm electronic provides the software components for downloading on its website:
→www.ifm.com > Service > Download > Industrial communication
>
16903
3.1 Hardware
16904
Device of the AS-i Gateway AC14 product family with firmware V4.2.x
PC/laptop for CODESYS development system (→ system requirements CODESYS development
system V3.x)
Ethernet connection between CODESYS-PC/laptop and configuration interface (X3) of the device
>
3.2 Software
16905
To program the device-internal PLC of the AS-i Gateway AC14, the following software components
are required:
Use of the device-internal CODESYS PLC of AS-i Gateway AC14 without valid license
constitutes a violation of applicable law!
3.3 Licensing
All models of the device family AS-i Gateway AC14, to be programmed using the CODESYS
Development System 3.5 SP9 Patch 7 Hotfix 3, must be licensed. A valid license label can be
purchased from ifm electronic.
The CODESYS Development System (short: CODESYS) is a platform for the creation of PLC
applications according to the standard IEC 61131-3.
>
4.1.1 Install CODESYS Development System
To install the software "CODESYS Development System":
► Install the programming system CODESYS 3.5 SP9 Patch 7 Hotfix 3 (→ CODESYS installation and first steps).
> CODESYS 3.5 SP9 Patch 7 Hotfix 3 is installed on the programming PC/laptop.
Uninstall the ifm package .......................................................................................................................14
► Familiarise yourself with the following CODESYS functions!
Package Manager
→ Online help > CODESYS Development System > Manage packages and licences
Component
Description
AC14SL.devdesc.xml
Device description of the basic module
ACnnnn_EthernetAdapterSL.devdesc.xml
Device description of Ethernet interface
ACnnnn_Modbus_Master.devdesc.xml
Device description of the Modbus master (extension of the Ethernet interface)
ACnnnn_Modbus_Slave.devdesc.xml
Device description of the Modbus slave device (extension of the Ethernet
interface)
ACnnnn_Utils.library
Function library with AS-i Gateway AC14 specific CODESYS function blocks and
data structures
ACnnnn_SYS_CMD.library
Function library with function block for access to the command interface of AS-i
Gateway AC14 from a CODESYS application
AC14SL.template
Template for AC14 StandardLine
AC14SL.template.project
Template for AC14 StandardLine project
AC14.ico
Symbol image of the AC14
4.2 ifm AS-i Package
>
4.2.1 Components of the ifm package
To program the AS-i Gateway AC14, ifm provides the CODESYS package "CODESYS for ifm
SmartPLC StandardLine" (short: ifm package). The ifm package (file:
ifm_SmartPLC_StandardLine_V1_6_4_14.package) contains the following components:
► Click on [Install...] to start the installation dialogue.
► Select the downloaded ifm package and carry out a complete installation.
> The [Package Manager] window displays the installed ifm package.
►Press [Exit] to close the package manager.
>
4.2.3 Update ifm package
To update an installed package "CODESYS for ifm SmartPLC StandardLine":
1 Download new version of the ifm package
► Got to the product page of the device on the ifm website.
► Download ifm_SmartPLC_StandardLine_V1_6_4_14.package and save it on the CODESYS PC/laptop.
2 Uninstall the old version of the ifm package
► → Uninstall the ifm package (→ p. 14)
3 Install a new version of the ifm package
► → Install the ifm package (→ p. 13)
4 Update device libraries
► In the device tree: Click on [Device (ifm_SmartPLC_StandardLine)].
► Select [Project] > [Update Device].
> [Update Device] windows appears.
► Click on [Update Device] to start the update process.
> New device libraries are loaded.
> Project tree view is updated.
► Click on [Exit] to close the Package Manager.
► Save the project.
► Select [Tools] > [Package Manager] to access the package manager.
> Window [Package Manager] shows the installed packages.
► Activate [Display version] checkbox.
> The window shows the version numbers of the installed packages.
► Select the package version to be uninstalled
► Click on [Uninstall...] to uninstall the selected package.
To avoid errors during manual system configuration, it is explicitly recommended to use the
project template from ifm electronic when creating the AS-i Gateway AC14 project in
CODESYS.
5.1.1 Create new project with AS-i Gateway AC14
Qualifications
> All required software components are correctly installed (→Installation (→ p. 11)).
> CODESYS successfully started.
1 Create a new project
► Select [File] > [New Project...].
> The window to enter the project properties appears:
3. [Location]: Select the storage location of the project file.
► Click on [OK] to verify the entered values.
> CODESYS creates a new project with AS-i Gateway AC14.
> The window [Devices] shows the device tree of the project (→Overview: Project structure with AS-i Gateway
5.1.2 Overview: Project structure with AS-i Gateway AC14
17132
A CODESYS project contains all components for the programming and administration of PLC
applications. All components of a project are shown in the window [Devices] in a hierarchic tree view.
CODESYS projects with an AS-i Gateway AC14 have the following structure:
► Familiarise yourself with the CODESYS development system! In particular with the
following topics:
Names and functions of the user interface elements
Basic menu functions
Programming techniques and methods for data retention
5.2 Use CODESYS online help
6989
This manual only describes the integration, configuration and the programming of the AS-i Gateway
AC14 using the CODESYS development system.
For the description of user actions and user interface elements the CODESYS terminology will be
used.
Standard functions and methods of CODESYS will not be described. At the beginning of each section
there will be a reference to the corresponding chapters of the CODESYS online help.
To access the online help of the CODESYS development system:
► Start CODESYS.
> The CODESYS user interface appears.
► Press [F1].
> Online help of the CODESYS development system appears.
To download the created projects and applications to the device a valid network path between the
CODESYS programming system and the PLC of the device has to be selected.
>
5.3.1 Set communication path to PLC
To configure the connection between CODESYS programming software and the PLC of the AS-i
Gateway AC14:
1 Preparations
► Connect CODESYS PC/laptop and configuration interface (X3) of the device.
► Optional: Adjust IP settings of the Ethernet interfaces.
2 Select communication settings
► In the device tree: Double click on [Device ifm_SmartPLC_StandardLine]
► In the editor window: Click on [Communiation Settings] tab.
> Editor window shows the communication settings of the device.
3 Select gateway
► Select the required gateway from the [Gateway] list.
► List shows the selected gateway.
4 Select network path
► Press [Scan network...].
> [Select Device] window appears.
► Select gateway and press [Scan network] to start the scanning process.
> CODESYS scans the Ethernet network for accessible devcies.
> Window shows network path and detected devices.
18494
18500
► Select the [AS-i Gateway AC14] node.
> Information field displays detailed information of the selected node.
► Press [OK] to select the network path to the PLC.
> CODESYS is able to download data to the PLC of the AS-i Gateway AC14.
► Familiarise yourself with the following CODESYS functions!
Generic device editor
→ Online help > CODESYS Development System > Reference user interface >
Objects> object 'device' and generic device editor
>
6.1 Configure PLC
The PLC is configured via the "Generic Device Editor" of the CODESYS programming system. The
programmer can access the device editor of the PLC via the following node in the device tree:
To configure the device-internal PLC:
► In the device tree: Double-click on [ifm_SmartPLC_StandardLine]
> The editor window shows device editor of the device-internal PLC.
► Configure PLC.
► Save the project to apply changes.
► Familiarise yourself with the following CODESYS functions!
Menu command "Attach device"
→ Online help > CODESYS Development System > Devices > Attach Device...
Configure EtherCAT (master)
→ Online help > Fieldbus support > EtherCAT Configuration Editor
Configure modbus TCP (master/slave)
→ Online help > Fieldbus support > Modbus Configuration Editor
Designation
Fieldbus
Manufacturer
Modbus TCP Master
Modbus TCP
3S - Smart Software Solutions GmbH
Modbus TCP Slave
Modbus TCP
3S - Smart Software Solutions GmbH
6.2 Configure Ethernet interface
>
6.2.1 Available fieldbus stacks
The Ethernet internet (X3) of the device can be declared and operated as an additional fieldbus
interface. For this, a fieldbus stack must be assigned to the interface in CODESYS. Presently, the
device supports the following fieldbus stacks:
► Familiarise yourself with the following CODESYS functions!
Modbus configurator
→ Online help > Fieldbus support > Modbus configurator
6.2.2 Add fieldbus stack
To declare the Ethernet interface as a fieldbus interface:
1 Create/load CODESYS project
► Create or load CODESYS project with the AS-i Gateway AC14.
2 Add fieldbus stack
► In the device tree: Right-click on [X3 (Ethernet)].
► In the context menu: Select [Add Device...].
> Window [Add device] appears.
► Set the following values:
1. [Vendor]: Select [<All vendors>].
2. In table: Select the requested fieldbus stack in the [Name] column.
3. [Name]: Enter name of the fieldbus stack.
► Click on [Add Device]to add the requested fieldbus stack to the project.
> In the device tree: CODESYS adds the selected fieldbus stack as sub-element of the Ethernet interface.
3 Configure the fieldbus stack
► Configure added fieldbus device.
► Save the project to apply changes.
Access input and output data .................................................................................................................27
Use functions of the ifm package ...........................................................................................................33
Use visualisations ...................................................................................................................................40
Testing the PLC application....................................................................................................................46
► Familiarise yourself with the programming according to the standard IEC 61131-3!
1
[Application] is the container of the PLC application
2
[Library manager] provides access to the standard and device-specific function libraries.
3
[PLC_PRG (PRG)] provides access to the program editor of the application
→ Create PLC application (→ p. 25)
4
[Task configuration] provides access to the settings of the task processing
→ Configure main task (→ p. 45)
This chapter provides information about the programming of the PLC of the device.
>
7.1 Objects of a PLC application
All objects of a PLC application are listed as subelements of the node [Application] in the device tree.
In the basic configuration a PLC application contains the following objects:
7074
7143
If needed, the programmer can add additional objects to the PLC application (→Add visualisation to a
► Familiarise yourself with the following CODESYS functions!
Program application
→ Online help > CODESYS Development System > Program application
Programming reference
→ Online help > CODESYS Development System > reference programming
The memory area for RETAIN variables comprises 4072 bytes.
► Pay attention to the maximum size of the RETAIN memory area when declaring RETAIN
variables!
7.2 Create PLC application
To create a PLC application:
► In device tree: Double-click on [PLC_PRG (PRG)]
> The editor window shows the programming surface:
17691
►Program the application in the editor.
>
7.2.1 Use remanent variables
The PLC of the device supports the use of remanent variables. Variables declared as VAR RETAIN
are stored in a memory area that is also maintained when the device is switched off.
The declaration of a variable as RETAIN also influences its behaviour when the PLC application is
reset (→Supported reset variants (→ p. 54)).
Risk of undesired system behaviour!
The use of the CODESYS function SysTimeRtcSet for setting the time may lead to malfunction.
► To set the system time (date, time) of the device only use the following device-specific commands:
Function block Set_DateTime (→Set_TimeDate (→ p. 111))
System command 0x1109 with function block ACnnnn_SysCmd (→ACnnnn_SysCmd
(→ p. 121))
7.2.2 Supported programming languages
The following table shows which programming languages according to IEC 61131 are supported by
the ifm function libraries:
Options to access input and output data ................................................................................................27
Validity of the interface data ...................................................................................................................28
Process data of the AS-i slaves .............................................................................................................29
Fieldbus data ..........................................................................................................................................31
► Familiarise yourself with the following CODESYS functions!
Addresses according to IEC standard 61131-3:
→ Online help > CODESYS Development System > Programming Reference >
Operanden > Addresses
Access to IEC address via AT declaration:
→ Online help > CODESYS Development System > Programming Reference >
Declaration > AT Declaration
Definition of an ALIAS for an IEC address:
→ Online help > CODESYS Development System > Programming Reference > Data
Types > References
Coupling of a program variable to an address (mapping):
→ Online help > CODESYS Development System > Configuring I/O Links
7.3 Access input and output data
>
17447
7.3.1 Options to access input and output data
In a CODESYS project, each input and output has a physical address according to the IEC standard
(e.g. %IW5). CODESYS offers the following options to access this address from a PLC application and
thereby to access the input and outputs data of the device:
Direct access to IEC address
Access to IEC address via AT declaration
Definition of an ALIAS for an IEC address
Link a program variable to an IEC address (mapping)
* ... only available for devices with 2 AS-i masters
► When linking variables with inputs and outputs, only use interfaces in the project tree, that
are updated by the CODESYS data mapper!
7.3.2 Validity of the interface data
18413
In order to facilitate the access to inputs and outputs of AS-i slaves, AS-i Gateway AC14 projects offer
clearly defined interfaces in the device tree (→Overview: Project structure with AS-i Gateway AC14
(→ p. 18)).
Depending on the active instance for accessing the outputs of the AS-i slaves (Manual, Gateway,
PLC), the CODESYS data mapper only updates certain address areas of the interfaces. The following
table shows which address areas of the i/o interfaces provide valid data values while in a certain
operating mode:
Digital input and output data of the slave at AS-i master 1: →Digital input and output data (→ p. 30)
2
Analogue input and output data of the slaves at AS-i master 1: →Analogue input and output data (→ p. 30)
3
Digital input and output data of the slave at AS-i master 2: →Digital input and output data (→ p. 30)
4
Analogue input and output data of the slaves at AS-i master 2: →Analogue input and output data (→ p. 30)
Consider validity of the interface data (→Validity of the interface data (→ p. 28))!
The function library ACnnnn_Utils.library contains the complex variable ASi_NET. The
variable represents all inputs and outputs of a completely developed AS-i network. The
programmer can use this data structure to store the process images of the inputs and outputs
of an AS-i network. (→ASI_NET (STRUCT) (→ p. 117))
7.3.3 Process data of the AS-i slaves
17584
The project tree offers direct access to the cyclically updated process images of the inputs and outputs
of the AS-i slaves.
To access the digital process data of the slaves at AS-i master 2 in a system with 2 AS-i masters:
► Double click on [ASi_2_binaryIO]
To access the analogue process data of the slaves atAS-i Master2 in a system with 2 AS-i masters:
► Double-click on [ASi_2_analogIO]
Digital input and output data
To access the digital process data of the slaves at AS-i master 1:
► In the device tree: Double click on [ASi_1_binaryIO]
> The editor window shows a structured list of the digital inputs and outputs of the AS-i slaves.
►In column [Variable]: Mouse click on to make individual variables visible.
>
Analogue input and output data
To access the analogue process data of the slaves at AS-i master 1:
► In the device tree: Double-click on [ASi_1_analogIO]
> Editor window shows a structured list of the analogue inputs and outputs of the AS-i slaves.
17625
17626
►In column [Variable]: Mouse click on to make individual variables visible.
30
Loading...
+ 101 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.