Académique Documents
Professionnel Documents
Culture Documents
7391029_00_UK
2015-08-27
English
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Contents
Contents
1
Copyright ..............................................................................................................................6
Overview: documentation modules for ecomatmobile devices ............................................6
CODESYS programming manual ........................................................................................7
What do the symbols and formats mean? ...........................................................................7
How is this documentation structured? ................................................................................8
History of the instructions .....................................................................................................8
Safety instructions
2.1
2.2
2.3
System description
3.1
3.2
12
3.3
Interfaces ...........................................................................................................................18
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3.4
Installation
4.1
4.2
4.3
27
Notes .......................................................................................................................................... 30
Enter the recovery mode ............................................................................................................ 31
Update the runtime system......................................................................................................... 31
Configure IP parameter of ethernet interface ............................................................................. 34
Quit the recovery mode .............................................................................................................. 37
Device configuration
5.1
5.2
38
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Contents
5.2.4
5.3
5.4
5.5
5.6
5.7
Programming
6.1
83
6.2
6.3
6.4
6.5
6.6
154
7.2
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Contents
7.2.2
7.2.3
7.2.4
7.2.5
7.2.6
7.2.7
7.2.8
7.2.9
7.2.10
7.2.11
342
Diagnosis .........................................................................................................................343
Fault .................................................................................................................................343
Response to system errors ..............................................................................................343
8.3.1
8.4
Annex
9.1
9.2
344
9.3
9.4
10
Glossary of Terms
369
11
Index
378
12
383
13
384
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
About this manual
2015-08-27
Copyright
Copyright ..................................................................................................................................................6
Overview: documentation modules for ecomatmobile devices ................................................................6
CODESYS programming manual .............................................................................................................7
What do the symbols and formats mean? ................................................................................................7
How is this documentation structured? ....................................................................................................8
History of the instructions .........................................................................................................................8
202
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
About this manual
2015-08-27
Copyright
>
1.1
Copyright
6088
All rights reserved by ifm electronic gmbh. No part of this manual may be reproduced and used
without the consent of ifm electronic gmbh.
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
IO-Link ( www.io-link.com) is the property of the PROFIBUS Nutzerorganisation e.V., Germany
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
Data sheet
Contents
Source
www.ifm.com > select your country > [Data sheet search] > CR1201 > [Technical data in PDF format]
2.
Contents
Source
3.
Contents
Source
www.ifm.com > select your country > [Data sheet search] > CR1201 > [Operating instructions]
4.
Contents
Source
www.ifm.com > select your country > [Data sheet search] > CR1201 > [Operating instructions]
*) The descriptions in brackets are only included in the instructions of certain devices.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
About this manual
2015-08-27
CODESYS programming manual
>
1.3
In the additional "Programming Manual for CODESYS V2.3" you obtain more details about the use of
the programming system.
This manual can be downloaded free of charge from ifm's website:
www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines]
You also find manuals and online help for ecomatmobile at:
ecomatmobile DVD "Software, tools and documentation"
>
1.4
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
Important notes concerning malfunctions or disturbances
Other remarks
...
>
Reaction, result
...
...
"see"
abc
Cross-reference
123
0x123
0b010
Decimal number
Hexadecimal number
Binary number
[...]
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
1.5
This documentation is a combination of different types of manuals. It is for beginners and also a
reference for advanced users. This document is addressed to the programmers of the applications.
How to use this manual:
Using the index you can also quickly find a term you are looking for.
At the beginning of a chapter we will give you a brief overview of its contents.
1.6
Date
Theme
2015-04-08
Change
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Safety instructions
2015-08-27
History of the instructions
Safety instructions
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Safety instructions
2015-08-27
What previous knowledge is required?
>
2.1
This document is intended for people with knowledge of control technology and PLC programming
with IEC 61131-3.
To program the PLC, the people should also be familiar with the CODESYS software.
The document is intended for specialists. These specialists are people who are qualified by their
training and their experience to see risks and to avoid possible hazards that may be caused during
operation or maintenance of a 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 the document during the entire duration of use of the device.
Adhere to the safety instructions.
>
2.2
Note!
7328
11212
No characteristics are warranted with the information, notes and examples provided in this manual.
With the drawings, representations and examples given no responsibility for the system is assumed
and no application-specific particularities are taken into account.
The manufacturer of the machine/equipment is responsible for ensuring the safety of the
machine/equipment.
Follow the national and international regulations of the country in which the machine/installation is
to be placed on the market!
WARNING
Non-observance of these instructions can lead to property damage or personal injury!
ifm electronic gmbh does not assume any liability in this regard.
The acting person must have read and understood the safety instructions and the corresponding
chapters in this manual before working on and with this device.
The acting person must be authorised to work on the machine/equipment.
The acting person must have the qualifications and training required to perform this work.
Adhere to the technical data of the devices!
You can find the current data sheet on ifm's homepage at:
www.ifm.com > Select your country > [Data sheet search] > (article number.) > [Technical data
in PDF format]
Note the installation and wiring information as well as the functions and features of the devices!
supplied installation instructions or on ifm's homepage:
www.ifm.com > Select your country > [Data sheet search] > (article number.) > [Operating
instructions]
Please note the corrections and notes in the release notes for the existing documentation,
available on the ifm website:
www.ifm.com > Select your country > [Data sheet search] > (article number.) > [Operating
instructions]
NOTE
To ensure the protection rating:
- Cover the unused M12 sockets using the protective caps E73004!
- Permissible tightening torque of the protective caps = 0.6...0.8 Nm.
10
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Safety instructions
2015-08-27
Start-up behaviour of the controller
NOTICE
Danger of burn-in effects!
If the device is operated with the same visualisation for many hours, the image may be burned into the
screen.
Operate the device with changing visualisations!
>
2.3
WARNING
Danger due to unintentional and dangerous start of machine or plant sections!
When creating the program, the programmer must ensure that no unintentional and dangerous
start of machines or plant sections after a fault (e.g. e-stop) and the following fault elimination can
occur!
Realise restart inhibit!
In case of an error, set the outputs concerned to FALSE in the program!
A restart can, for example, be caused by:
voltage restoration after power failure
reset after watchdog response because of too long a cycle time
error elimination after an E-stop
To ensure a safe behaviour of the controller:
monitor the voltage supply in the application program.
In case of an error switch off all relevant outputs in the application program.
Additionally monitor relay contacts which can cause hazardous movements in the application
program (feedback).
If necessary, ensure that welded relay contacts in the application project cannot trigger or continue
hazardous movements.
Additionally monitor relay contacts which can cause hazardous movements in the application
program (feedback).
If necessary, ensure that welded relay contacts in the application project cannot trigger or continue
hazardous movements.
11
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Information concering the device
System description
3.1
These instructions describe the following models of the device familiy 'PDM360' from ifm electronic
gmbh:
PDM360 NG -12": CR1201
Software release:
Runtime system: V02.03.xx
12
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Hardware
>
3.2
Hardware
13
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Hardware
>
3.2.1
Display elements
19388
Display
1166
Designation
Data
Technology
TFT
Screen diagonal
Aspect ratio
15:9
Resolution
Colour depth
Background illumination
LED
Photoelectric sensor
Measures the brightness of the environment at the installation location of the device.
Can be used to dim the background illumination and/or the key LEDs.
>
Status-LED
7372
The intergrated status LED indicates the operating states of the device. By default the following colour
codes and flashing frequencies apply:
LED colour
Flashing frequency
Description
Black
Permanently off
no supply voltage
Green
5 Hz
2 Hz
Permanently on
2 Hz
5 Hz
Permanently on
Red / orange
2 Hz (alternating)
Error: Temperature too high or too low; Device is in RESET mode until
temperature is back again in normal range
Orange
5 Hz
2 Hz
Permanently on
System reset
Red
Colour and flashing frequency of the status LED can be programmed in the CODESYS
application.
>
14
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Hardware
Key LEDs
19468
All keys are seperately backlit by LEDs. The LEDs can be programmed in the CODESYS application.
Behaviour in Setup mode: Key functionality ( page 41)
>
The audio signalling device integrated into the device can be programmed in the CODESYS
application.
>
3.2.2
Operating elements
19328
Function keys
Navigation key
Touch screen
Resistive technology,
i.e. display reacts to pressure by fingers (can be also operated when wearing gloves) and
pens
15
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Hardware
>
3.2.3
Memory area
Size
Memory for bitmap files (80 x 100 pixels each, 24-bit colour depth)
45 Mbytes
Memory for font files
System need
75 Mbytes
legend:
1 ...
2 ...
16
The data memory /data is NOT initialised during the start process any more as
from firmeware V01.05 on. To use the data memory it must be mounted to the file
system of the device in the CODESYS application program by means of the
function block INIT_DATA_MEMORY.
The memory can be extended optionally at the USB interface. The USB memory
device is only for momentary use (e.g. to back up files)!
The USB connectors are not suitable for permanent operation in mobile
applications.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Hardware
>
3.2.4
The device contains a real-time clock. During the system start the device synchronises the
(secondary) system clock with the (primary) real-time clock. The system clock can be used as follows:
read the current clock time in the application program
time stamp in (automatically generated) event protocols
registration of operating times
Features of the real-time clock:
is battery backed and continues to run in the switched-off device
can be set to different UTC based time zones
device monitors the charging status of the backup battery
The functions from the following libraries control the real-time clock or retrieve the values:
SysLibRtc.lib (3S)
This library offers functions to access the real-time clock of the device:
reading and setting the real-time clock
reading the current display mode
checking the status of the battery
The processing is done synchronously.
SysLibTime.lib (3S)
This library is required for representing the task time evaluation in the task editor of CODESYS.
reading the real-time clock of the device with the function blocks from this library
The processing is done synchronously.
>
3.2.5
Camera visualisation
7366
Interface
Type of signal
Characteristics
Ethernet
Digital
Analogue
2 analogue connections
17
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Interfaces
Motec: MC3100-3R
>
3.3
Interfaces
14332
18
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Interfaces
>
3.3.1
Inputs (technology)
19
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Interfaces
>
Operating modes
19930
>
Binary inputs
7345
In = pin binary-input n
(CR) = device
(1) = input filter
(2a) = input minus switching
(2b) = input plus switching
(3) = voltage
Figure: basic circuit of binary input minus switching / plus switching for negative and positive sensor signals
(S) = sensor
(S) = sensor
20
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Interfaces
>
Analogue inputs
7346
The analogue inputs can be configured via the application program. The measuring range can be set
as follows:
current input 0...20 mA
voltage input 0...10 V
voltage input 0...32 V
If in the operating mode "0...32 V" the supply voltage is read back, the measurement can also be
performed ratiometrically. This means potentiometers or joysticks can be evaluated without additional
reference voltage. A fluctuation of the supply voltage then has no influence on this measured value.
In case of ratiometric measurement the connected sensors should be supplied with VBBS of the
device. So, faulty measurements caused by offset voltage are avoided.
8971
21
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Interfaces
>
3.3.2
Outputs (technology)
14093
>
Binary output
19931
The device offers 1 output channel (OUT00). It can be operated as a binary, high side output.
>
3.3.3
CAN
The device has 4 CAN interfaces. They can be used to realize the following functions:
Available protocols:
CAN interface
Download ID (default)
CAN protocols
22
CAN 1
CAN 2
CAN 3
CAN 4
ID 127
ID 126
ID 125
ID 124
CAN Layer 2
CAN Layer 2
CAN Layer 2
CAN Layer 2
CANopen
CANopen
CANopen
CANopen
SAE J1939
SAE J1939
SAE J1939
SAE J1939
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Interfaces
>
3.3.4
USB
14326
The device offers 2 USB interfaces. They can be used to realize the following functions:
Connect USB memory to the device (supported file systems: FAT16, FAT32, VFAT, EXT2, EXT3)
>
3.3.5
Ethernet
14325
The device offers 1 Ethernet interface. It can be used to realize the following functions:
3.3.6
The device offers 2 analogue video inputs. They can be used to realize the following functions:
23
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Software description
>
3.4
Software description
24
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
System description
Software description
>
3.4.1
Software components
19091
The device has the following software componentscommunicates with the hardware as below:
Software component
Operating system (Linux derivate)
Runtime system (RTS) 2
Application program
with libraries
No
---
Upgrade yes
Downgrade no
Image file
Yes
CODESYS
Legend:
1 ...
The operating system will be changed partially while updating the runtime system of the device. Therefore, an
downgrade of the runtime system is not possible.
2 ...
The runtime system version number must correspond to the target version number in the CODESYS target system
setting.
>
Runtime system
19093
Basic program in the device, establishes the connection between the hardware of the device and the
application program.
Normally it is necessary to download the runtime system only once. Then, the application program can
be loaded into the controller (also repeatedly) without affecting the runtime system.
ifm electronic maintains the runtime system and releases update packages. The user can download
the current release from the website of ifm electronic gmbh:
www.ifm.com > Select your country > [Service] > [Download]
>
Application program
15274
14118
Software specific to the application, implemented by the machine manufacturer, generally containing
logic sequences, limits and expressions that control the appropriate inputs, outputs, calculations and
decisions.
8340
WARNING
The user is responsible for the reliable function of the application programs he designed. If necessary,
he must additionally carry out an approval test by corresponding supervisory and test organisations
according to the national regulations.
The visualisati pages and embedded graphics are part of the CODESYS application program.
25
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
System description
2015-08-27
Software description
>
3.4.2
The user can create application programs for the CR1201 by using the programming system
CODESYS 2.3. In this manual we refer to the CODESYS version 2.3.9.25.
In the "programming manual CODESYS 2.3" you will find more details about how to use
the programming system "CODESYS for Automation Alliance". This manual can be
downloaded free of charge from ifm's website at:
(www.ifm.com) > Select your country > [Service] > [Download]
ecomatmobile DVD "Software, tools and documentation"
3.4.3
ifm electronic provides a device-specific target package for the programming system CODESYS 2.3.
By using the components included in the package the user can easily access the device functions.
The target package contains the following components:
>
3.4.4
Operating states
7370
Power on
- booting
Normal operation
Power off
- shutoff
- restart
- shutdown
- clamp 15 switch-off
- delayed switch-off
26
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Software description
Installation
27
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Install the CODESYS programming system
>
4.1
Download the installation file for CODESYS 2.3 from the ifm website.
www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines]
Install the CODESYS 2.3 programming system on the PC/laptop ( CODESYS software manual).
>
4.2
Detailed information on the device-specific target package: ifm target package for
CODESYS ( page 26)
To install the device-specific target package for the CR1201:
Download the "CR1201 target package" with version V02.03.xx.
www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines]
Open the ZIP file and unzip the contents of the folder CR1201_V02 into the subdirectory
..\Targets\ifm in the CODESYS programm directory.
> Components of the target file can be used in CODESYS 2.3.
28
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
4.3
Notes ......................................................................................................................................................30
Enter the recovery mode ........................................................................................................................31
Update the runtime system.....................................................................................................................31
Configure IP parameter of ethernet interface .........................................................................................34
Quit the recovery mode ..........................................................................................................................37
18159
29
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
4.3.1
Notes
18162
The user can download the current version of the runtime system from the ifm website.
Access the download from the ifm website.
( www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines])
Download the ZIP archive with the update file and unzip (e.g. V020301_NoWD_PDM360NG.zip).
> The update file is stored on the PC/laptop (e.g. V020301_NoWD_PDM360NG.ifm).
>
>
During the update process the following software compknents of the device will be updated:
1. System software (Linux)
2. Firmware of the keys
3. Firmware of the I/O co-processor
4. Firmware of the watchdog co-processor
30
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
4.3.2
4.3.3
NOTICE
Risk of data loss!
Interrupting the update process can result in a loss of the user data stored in the device.
Do not interrupt the update process!
The runtime system of the device can only be updated in the recovery mode.
The current version of the runtime system can be downloaded from the ifm electronic website
( Download the update file ( page 30)).
Select one of the following options:
Runtime system update via USB memory device ( page 32)
Runtime system update via web browser ( page 33)
31
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
32
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
33
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
4.3.4
In order to update the runtime system of the CR1201 via a network infrastructure, the device's
ethernet interface needs to be configured. The device provides the following options for configuration
of the ethernet interface:
Manual
The operator sets the interface parameters (IP address, subnet mask,
gateway address) manually.
Automatic
34
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
1
2
If successful:
> [Network Setup] menu page appears.
> Information bar shows active values of the IP parameters [IP-address], [netmask] und
[gateway].
> Device can be accessed via the IP network by using the shown parameters.
If not successful:
> Error message is displayed.
Press [ESC] to return to the [Network Setup] menu page.
Remove the error cause and repeat the procedure.
35
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
3
4
36
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Installation
2015-08-27
Update the runtime system of the device
>
4.3.5
37
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Update the runtime system of the device
Device configuration
This chapter describes the configuration of the device in the setup mode.
38
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Enter the setup mode
>
5.1
If no valid application is stored in the device, the device passes automatically in the setup
mode after power on.
Disconnect the device from power supply.
Perform the following actions simultaneously:
Press any 2 keys simultaneously and keep them pressed.
Switch on the device.
Keep both keys pressed until the setup menu appears.
> Device boots and passes into the setup mode.
> The start screen of the setup mode appears.
Description
[SETUP]
[PDF-VIEWER]
[LOAD APPLICATION]
39
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
5.2
Operating instructions
40
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
Operating instructions
>
5.2.1
Key functionality
18155
The assignment of the function keys is context sensitive. The function of a key is described by the text
label of the corresponding button on the screen.
Only active function keys have a labeled button.
Only active function keys are backlit by the key LED.
The following table provides an overview of the available key functions:
Button
Description
Example
[SELECT]
[BACKSEL]
[ENTER]
[EXIT]
[LOAD]
[RELOAD]
Update
[SAVE]
Save IP address
[START]
Start process
[STOP]
Stop process
[], [],
[], []
move to direction
41
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
42
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
>
>
Use [SELECT] or [BACKSEL] to select the requested GUI element (i.e. number field, option field).
The selected GUI element has a black frame.
The selected GUI element is activated and can be changed.
Use [ENTER] to activate / deactivate the selected GUI element (i.e. option field)
OR:
Use []/[] to increment/decrement the value of the selected GUI element (i.e. number field).
> The changes are displayed.
Use [SAVE] to confirm and apply the changes.
Use [EXIT] to change to the higher-level menu.
43
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
>
>
>
>
44
Use [SELECT] to select a specific window (i.e. [Name], [Places], [Favorites] and [UP])
The selected window is focused (black frame or dark-grey header).
Use []/[] to select an specific item within the selected window (i.e. file, directory).
The selected item has a light-grey background.
Use [ENTER] to change into the selected directory.
OR
Start action according to key label (i.e. Use [RESTORE] to restore the data saved in the selected
backup file).
Selected action is proceeded.
Use [EXIT] to change to the higher-level menu.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
The user interface of the runtime system has an on-screen keyboard. It appears automatically as soon
as the user is expected to enter characters.
The on-screen keyboard shows the German character set (QWERTZ keyboard layout).
To protect sensitive information only the character entered last appears in plain text. All other
characters are replaced by an *.
To enter a text:
>
>
45
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
5.2.2
Navigation key
18158
4 direction keys (, , , )
The keys of the navigation key can be used as an alternative as well as an equivalent to function keys.
The following table shows operating elements with the same function:
Navigation key
Function key
Function
[]
Move up
[]
Move left
[BACKSEL]
[]
[SELECT]
[]
[ENTER]
>
5.2.3
Touchscreen
18156
46
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
5.2.4
If the password protection is enabled, the operator has only accress to the following menu functions:
Setup: Enter the password for full access to the setup menu ( page 48)
47
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Operating instructions
>
Setup: Enter the password for full access to the setup menu
11759
48
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
5.3
Description
[SYSTEM SETTINGS]
[SYSTEM INFORMATION]:
[ACTIONS]
49
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
5.3.1
The menu [SETUP] > [SYSTEM SETTINGS] provides access to the following functions:
Menu item
Function
[ETHERNET]
[CAN]
[RTC]
[BACKLIGHT]
[NETWORK SERVICES]
[PASSWORD SETTINGS]
50
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
The device provides the following options for configuration of the Ethernet interface:
Manual
The operator sets the interface parameters (IP address, subnet mask,
gateway address) manually.
Automatic
Name
Description
Possible values
[IP Address]
i.e. 192.68.82.247
[Netmask]
i.e. 255.255.255.0
[Gateway]
i.e. 192.168.82.1
Set IP parameters
Use [SELECT] / [BACKSEL] to select the required number field.
Use [] / [] to increment / decrement the number in the selected number field until the
requested value has been reached.
> Number field shows the required value.
Optional: Repeat the procedure until the values in all number fields are correctly set.
Save changed values
Press [SAVE] to confirm and save the changed values.
51
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
To use DHCP, the device must be connected to a DHCP server via the Ethernet interface.
To set the IP parameters of the Ethernet interface by means of the Dynamic Host Configuration
Protocol (DHCP).
1 Select menu page
Navigation path: [SETUP] > [SYSTEM SETTINGS] > [ETHERNET] > [DHCP]
> Menu page displays the following information:
Bezeichung
Bedeutung
[DHCP Client]
Mgliche Werte
DHCP client disabled
DHCP client enabled
[IP Address]
i.e. 192.68.82.247
[Netmask]
i.e. 255.255.255.0
[Gateway]
i.e. 192.68.82.1
If successful:
> [IP Address], [Netmask] and [Gateway] show valid values assigned by the DHCP server.
> Status message appears: DHCP configured successfully
If not successful:
> Status message appears: Failed to get DHCP lease!
Use [EXIT] to stop the configuration process.
Check the connection to the DHCP server!
Repeat the configuration process (s.a.).
52
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
Description
[CAN Bus 1]
[CAN Bus 2]
[CAN Bus 3]
[CAN Bus 4] *
Description
Possible values
0 kBit/s
20 kBit/s
50 kBit/s
100 kBit/s
125 kBit/s
250 kBit/s
500 kBit/s
800 kBit/s
1 MBit/s
53
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
54
Name
Description
Possible values
[YYYY]
Year
[MM]
Month
1 ... 12
[DD]
Day
1 ... 31
[hh]
Hour
0 ... 23
[mm]
Minute
0 ... 59
[ss]
Second
0 ... 59
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
The setup menu is always displayed with a 100 % brightness. The changed brightness
will only become effective outside the setup menu.
So set the display brightness:
1 Select menu page
Navigationspfad: [SETUP] > [SYSTEM SETTINGS] > [BACKLIGHT]
> Men u page displays the following informations:
Name
Description
Possible values
[Brightness in %]
0
...
100
minimal brightness
maximal brightness
55
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
The secure network services Secure Shell (SSH) and Secure Copy (SCP) are always
available. The user can therefore access the device via SSH and SCP if the network
services Telnet and FTP are inactive.
( Access the device with SSH ( page 119), Copy the files with SCP ( page 120)).
To set the Telnet and FTP network services.
1 Select menu page
Navigation path: [SETUP] > [SYSTEM SETTINGS] > [NETWORK SERVICES]
Menu page displays the following informations:
Name
Description
[Telnet]
Possible values
Telnet enabled
Telnet disabled
[FTP]
FTP enabled
FTP disabled
56
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
The menu page [SETUP] > [SYSTEM SETTINGS] > [PASSWORD SETTINGS] provides access to the
following options:
>
57
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
58
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
5.3.2
Bedeutung
[Serial Number]
[SW Version]
Software version
[MAC Address]
[Supply Voltage]
[Internal Voltages]
[System Temperatures]
59
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
5.3.3
The submenu [SETUP] > [ACTIONS] provides access to the following functions:
Menu item
Function
[REBOOT]
[CAN TEST]
[SPLASH SCREEN]
[KEYBOARD TEST]
[BACKUP/RESTORE]
[USB REMOVE]
[FONTS]
[FORMAT STORAGE]
[Calibrate Touchscreen]
60
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
61
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
>
To test the CAN interfaces of the device, process one of the following functiions:
>
Description
Possible values
byte:
00 = 0
...
FF = 255
00000000
...
FFFFFFFF
Set the test CAN message to be sent in hex format in [Tx Bytes (hex)].
Set the test CAN message to be sent in hex format in [Tx Bytes (hex)].
4 Transmit test message
Press [START] to start the transmission.
> Device tries to send the test message on the selected CAN interface.
> The number of the CAN messages sent since the beginning of the transfer appears in [Tx
Frame Counter].
If successful:
> Information bar displays confirmation message.
Press [STOP] to finish the cyclic transmission of the test message.
If not successful:
> Information bar displays error message.
Press [STOP] to finish the cyclic transmission of the test message.
Check the CAN interface connection.
Repeat the procedure.
62
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Device configuration
If no baudrate of the CAN interface was set the test will be processed with 125 Kbits/s.
>
>
>
>
Name
Description
Possible values
byte:
00 = 0
...
FF = 255
00000000
...
FFFFFFFF
Press [START] to start receiving messages on the selected CAN interface. ( note)
[Rx Bytes (hex)] displays the content of the received messages (hexadecimal value).
[CAN Rx-Id (hex)] displays CAN ID related to the revceived message (hexadecimal value).
[Rx Frame Counter] displays the number of messages received sicne the start of the
transmission.
If successful:
> [Rx Frame Counter] displays value > 0.
Press [STOP] to finish receiving CAN messages.
If not successful:
> [Rx Frame Counter] displays value 0.
Pres [STOP] to finish receiving CAN messages.
Check the CAN interface connection.
Repeat the procedure.
If no baudrate of the CAN interface was set the test will be processed with 125 Kbits/s.
63
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
Specifications for the image file, which is used as splash screen Visualisation limits ( page
127)
To change the splash screen of the device:
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [SPLASH SCREEN]
2 Select source of image file
> Menu page displays the following options:
Name
Description
Load the image file from the directory /tmp of the device
Use [SELECT] / [BACKSEL] to select the requested menu item and press [ENTER] to confirm.
> Menu page displays the selected image source.
Set splash screen
Select the requested image file.
> Selected image file has focus.
Use [LOAD] to save the file in the device and to use the image as splash screen.
>
The user can define a user-defined splash screen. The image file has the following restricitions:
Parameter
Restriction
File type
File name
Resolution
Colours
File size
512 kByte
64
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
To test the function of the keys, the key LEDs and the navigation switch:
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [KEYBOARD TEST]
> [Keyboard Test] menu page appears.
2 Test function keys
Press any function key and keep it pressed.
> The key-related area on the screen is displayed brighter.
> The key LED is off.
3 Test navigation switch
Use [OK] or [] / [] to switch between the two input fields of the group [Navigation Switch
Test].
> Selected field gets a black frame.
Use [] / [] to increment / decrement the value displayed in the selected field.
65
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
To backup data stored on the device as well as to restore data to the device, the following options are
available:
Name
Description
[BACKUP SYSTEM]
[RESTORE SYSTEM]
66
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
Bezeichnung
Bedeutung
[Save to /tmp]
[Save to ...]
Use [SELECT] / [BACKSEL] to select the requested menu item and press [ENTER] to confirm.
> Menu page displays the content of the selected memory location.
Save the system information
Select requested directory.
Press [SAVE] to save the system information.
> Devices saves the file containing the system information in the selected directory.
67
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
WARNING
If the backup and the restore device have different runtime versions, the restoration of a backup file
can lead to an undefinable system behaviour of the PDM360 NG!
The runtime versions on the backup and restore devices must be identical.
Ensure that the runtime systems on the backup and restore device are of the same version!
( Update the runtime system of the device ( page 29))
To save the system files to a selectable location:
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [BACKUP/RESTORE]
> [System Backup & Restore] menu page appears.
Select [BACKUP SYSTEM] and press [ENTER] to confirm.
2 Select software components
> Menu page displays the following options:
Name
Description
[Select All]
Splash screen
Retain data
Use [SELECT] / [BACKSEL] to select the required components and press [ENTER] zu enable /
disable.
= Exclude software component from backup file
= Include software component in backup file
Optional: Repeat procedure for additional software components.
Check [Select All] to include all software components in the backup file.
Description
[Save to /tmp]
[Save to ...]
Use [SELECT] / [BACKSEL] to select the requested menu item and press [ENTER] to confirm.
68
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
69
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
WARNING
If the backup and the restore device have different runtime versions, the restoration of a backup file
can lead to an undefinable system behaviour of the PDM360 NG!
The runtime versions on the backup and restore devices must be identical.
Ensure that the runtime systems on the backup and restore device are of the same version!
( Update the runtime system of the device ( page 29))
Use the option "Auto Restore" for the automatic restoration of system files from a backup
file ( Automatically restore system files ( page 82)).
To restore the system files from a backup file (*.bup):
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [BACKUP/RESTORE]
> [System Backup & Restore] menu page appears.
Select [RESTORE SYSTEM] and press [ENTER] to confirm.
2 Select backup file
Menu page displays the following options:
Name
Description
Use [SELECT] / [BACKSEL] to select the memory location of the backup file and press
[ENTER] to confirm.
> Menu page displays content of selected memory location.
Select backup file.
Press [RESTORE] to load the selected backup file.
Select software components
> Menu page displays list of software components included in the backup file.
Software components not included in the backup file are geyed out!
Use [SELECT] / [BACKSEL] to select the software components to be restored and press
[ENTER] to check / uncheck the option field:
= Exclude software component from restoring process
= Include software component in restoring process
Optional: Repeat procedure for additional software components.
Press [CONFIRM] to confirm the selection.
> Device restores the selected software components.
> Status bar displays progess of restoring process.
If required, press [EXIT] to cancel the restoring process.
>
70
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
NOTICE
Risk of data loss on the USB device!
Unmount USB devices before removing them from the runtime system!
Do not remove the USB device before unmounting has been confirmed!
To safely remove a USB device:
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [USB REMOVE]
2 Remove the USB device from runtime system
> Menu page displays directory /media containing all mounted USB devices (grey background).
Use [] / [] to select the requested USB device.
Press [REMOVE] to unmount the selected USB device from the file system.
> USB device is unmounted.
> Informaation bar displays confirmation message.
> Operator can safetly disconnect the USB device from the system.
71
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
To manage font files (True Type Fonts) on the device, the following options are available:
Name
Description
[LOAD FONT]
[REMOVE FONT]
72
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
Name
Description
Use [SELECT] / [BACKSEL] to select the requested menu item and press [ENTER] to confirm.
> Menu page displays selected source.
Install font file
Select the requested font file.
> Selected font file has focus.
Press [LOAD] to save the selected font file on the device.
> After rebooting the device the installed font file can be used in CODESYS projects.
Optional: Repeat steps 2 and 3 to install additional font file on the device.
>
73
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
NOTICE
Risk of data loss!
> When this action is confirmed, all user data in the directory /data of the storage medium is
irretrievably deleted!
Save files that you will need to an external medium prior to formatting!
To format the user data of the device:
To format the device-internal storage:
1 Select menu page
Navigation path: [SETUP] > [ACTIONS] > [FORMAT STORAGE]
> [Format internal Mass storage] menu page appears.
2 Speicher formatieren
Press [ENTER] to start the formating process.
> The device-internal user data in directory /data is formated.
> Information bar displays a confirmation message.
74
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: start screen
>
75
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
PDF file viewer
>
5.4
The setup menu uitlises a PDF file viewer. The operator can use it to display PDF files stored in the
directories /home/pdf and /media.
To display a PDF file:
Enter the setup mode ( Enter the setup mode ( page 39))
Select [PDF-Viewer] menu item.
Use [ENTER] to change to the PDF file viewer.
Choose one of the following options:
76
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
PDF file viewer
>
5.4.1
Select requested PDF file and press [ENTER] to open the file ( Operation: Navigate in the file
directory ( page 44)).
> PDF file is loaded.
> Display shows the content of the PDF file:
77
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
PDF file viewer
>
5.4.2
78
Use
/
to select the next / previous page of the PDF file.
Use [>] / [<] to shift the document view to the right / left.
Use
to return to the standard view ( PDF: Navigating in the PDF file ( page 77)).
Use [] to change to the extended menu ( PDF-Viewer: Display extended menu ( page 79)).
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
PDF file viewer
>
5.4.3
Use [SELECT] / [BACKSEL] to select one of the following menu items and press [ENTER]:
79
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
PDF file viewer
>
5.4.4
>
Display PDF file in full-screen mode ( PDF-Viewer: Display PDF file in full-screen mode ( page 78)).
Change to extended menu ( PDF-Viewer: Display extended menu ( page 79)).
Select [SHOW INDEX OF: /Verzeichnis/Dateiname] menu item and press [ENTER].
Menu page displays the tabel of contents of PDF file:
80
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Setup: Start the application
>
5.5
Enter the setup mode ( Enter the setup mode ( page 39))
Select [LOAD APPLICATION] button.
Use [ENTER] to start the application.
If a valid application program is saved:
> The application starts.
> The LED flashes green at 2 Hz ( Status-LED ( page 14)).
If no valid application program is saved:
> A white blank screen appears.
> The LED lights green.
Transfer a valid application to the device via CODESYS
Reboot the device (supply voltage OFF > ON)
81
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Device configuration
2015-08-27
Automatically restore system files
>
5.6
The function "Auto Restore" automatically identifies backup files saved in the root directory of a USB
memory device (*.bup) and restores their contents. Several devices can be easily and time-savingly
provided with the same software configuration (e.g. install a backup on controllers of the same type in
several vehicles).
1 Create a backup file
Enter the setup modus ( Enter the setup mode ( page 39))
Create backup of device configuration of the master device and store the backup file on an
USB memory device ( Backup: Save the system files ( page 68)).
The device only recognises backup files in the root directory of the USB memory device.
Save the master backup file in the root directory of the USB memory device!
2
Connect the USB memory device with the master backup file with the target device
Enter the setup mode ( Enter the setup mode ( page 39))
Select [SETUP] and press [ENTER] to change in the setup menu.
> The setup automatically recognises the structure and contents of the backup file.
> The menu screen shows the system components contained in the backup file.
Press [START] to start the restore process.
> The selected system components are transferred to the device.
If successful:
> The menu screen shows the completion message.
3 Reboot the device
Press [REBOOT] to reboot the device.
> Device reboots.
> If a valid project is loaded, this project is started after rebooting.
If no valid project is loaded, the device enters the setup mode after rebooting.
>
5.7
82
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Exit setup, reboot device
Programming
This chapter describes the programming of the device with CODESYS 2.3.
83
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
6.1
84
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
6.1.1
When installing the ecomatmobile DVD "Software, tools and documentation", projects with
templates have been stored in the program directory of your PC:
...\ifm electronic\CoDeSys V2.3\Projects\Template_DVD_Vx.y
Open the requested template in CODESYS via:
[Datei] > [Neu aus Vorlage]
> CODESYS creates a new project which shows the basic program structure. It is strongly
recommended to follow the shown procedure.
1
Start CODESYS
Double click on the program symbol "CoDeSys V2.3" on the Windows desktop
OR:
Activate [Start] > [All Programs] > [ifm electronic] > [CoDeSys V2.3] > [CoDeSys V2.3].
> The CODESYS programming environment appears.
Create a new project with CR1201
Select [File] > [New].
> The window [Target Settings] appears.
In the list [Configuration] select CR1201 and press [OK] to apply the selection.
When selecting the target system make sure that the target version matches the
version of the runtime system installed on the device!
> The window with the configuration options of the target system appears.
Press [OK] to apply the basic settings.
Select the programming language
> The window [New POU] appears.
Select type and programming language of the POU PLC_PRG and press [OK] to confirm.
> From the target file, CODESYS loads the description of the device hardware, the default
configuration of the device and the standard libraries with important basic functions.
> The program editor appears with the opened POU PLC_PRG.
Save the project
Save the project with [File] > [Save as ...].
85
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
6.1.2
In the PLC configuration the programmer can configure the target system.
To access the PLC configuration:
In the project organizer select the tab [Ressourcen]:
86
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
6.1.3
The CR1201 is designed as a display for representing process data. It is thus conditionally
real-time capable. Computationally intensive processes can cause long cycle times!
Avoid computationally intensive functions (controller, encoder, control of diesel engines,
operation as CANopen master)!
Monitor the cycle time during the runtime of the PLC program! Cycle times in the range
from 5 ... 10 ms are no problem.
The device can be configured either as CANopen master or CanSlave. The configuration is carried out
in the PLC configuration (. Configure the controller ( page 86)).
>
87
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
88
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
6.1.4
Characteristics
cannot be deactivated
Setup menu
The passwords to protect the setup menu and the Linux runtime system are
identical!
IEC project
89
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Set the target system
>
The access protection for the IEC project is set/changed in CODESYS via the PLC browser.
The password to protect the IEC project does not have to be identical with the password to
protect the Linux runtime system.
Additional information about the command setpwd and to delete the password for the
protection of the IEC project: CODESYS help function.
1
90
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
6.2
First steps
91
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
6.2.1
92
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
NOTE
Function blocks must NOT be called in functions!
Otherwise: During execution the application program will crash.
All function elements must NOT be called recursively, nor indirectly!
An IEC application must contain max. 8,000 function elements!
Background:
All variables of functions...
are initialised when called and
become invalid after return to the caller.
Function blocks have 2 calls:
an initialisation call and
the actual call to do something.
Consequently that means for the FB call in a function:
every time there is an additional initialisation call and
the data of the last call gets lost.
93
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
First steps
>
Variables
11739
>
Declaration place
Validity area
Memory behaviour
local
volatile
volatile
volatile
local retain
global
global retain
Network
Network retain
nonvolatile
nonvolatile
nonvolatile
Retain variables
3131
Variables declared as RETAIN generate remanent data. Retain variables keep the values saved in
them when the device is switched on/off or when an online reset is made.
14166
94
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
First steps
>
Global network variables are used for data exchange between controllers in the network. The values
of global network variables are available to all CoDeSys projects in the whole network if the variables
are contained in their declaration lists.
A distinction is made between export and import variables:
Import variables do not originate from the local project but from another project.
Their values cannot be influenced locally.
The variables are used with read access in the local project (and possibly also in several other
projects). To do so, these variables must be imported into the corresponding local project.
To export or import, the global network variables must be combined in lists. You can assign an
EXP file to every global variable list.
In this example each project has 3 lists of global network variables:
- 1 list with export variables (with local data for reading in other controllers) and
- 2 lists with import variables (with data of the other controllers for local reading).
When you create a global variable list please note:
By selecting [Export before compile] in the window [Properties] CoDeSys updates the
corresponding EXP file (e.g. ExportProj1.exp) when the project is compiled.
By selecting [Import before compile] in the window [Properties], CoDeSys refers to the
corresponding EXP file (e.g. ExportProj1.exp) when the project is compiled, and updates
the list.
UDP (User Datagram Protocol) is a minimal connectionless network protocol belonging to the
transport layer of the internet protocol family. The task of UDP is to pass data which is transmitted via
the internet to the right application.
Example:
Information is to be exchanged between 3 devices (controller/PDM) and 1 PC. This is done by means
of the "global network variables" ( figure below). The example only shows the variables x1, x2 and
x3 in the global network variable lists of the corresponding projects.
95
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
The project "DemoProj1" contains the global network variable list "Global_Variables_Export_Proj1".
In the properties of this list enter the file ExportProj1.exp.
Activate [Export before compile].
> When this project is compiled, ExportProj1.exp is updated.
The project "DemoProj2" contains the global network variable list "Global_Variables_Import_Proj1".
In the properties of this list enter the file ExportProj1.exp.
Activate [Import before compile].
> When compilation of this project starts, the list "Globale_Variablen_Import_Proj1" is updated by
means of the file ExportProj.exp and then used for the compilation.
NOTE
If a project with variables to be exported is changed, all projects which import these global network
variable lists must then be rebuilt to update the lists:
Menu [Project] > [Rebuild all]
Menu [Online] > [Create boot project]
> The boot project is saved in the controller/PDM.
96
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Complete and transmit the project (global network variables) ( page 101)
Step 8
Step 9
Step 10
97
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
When a new project is created in CoDeSys the target file corresponding to the controller must be
loaded. It is selected in the dialogue window for every hardware and acts as an interface to the
hardware for the programming system.
Add the entries shown on the following screenshot to the program POU PLC_PRG:
98
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
With [File] > [Save as ...] save the project in the requested directory.
Here: filename = "DemoProj1" (for the first device in the network)
>
The same communication parameters must be set for the PC, the device (controller/PDM) and the
project.
Open the following dialogue with [Online] > [Communication Parameters...].
> The following window appears:
Click [New]
> The following window appears:
99
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
Enter the corresponding IP address of the controller (compare with step 2).
applies only to the following devices:
- PDM360: CR1050, CR1051
- PDM360compact: CR1052, CR1053, CR1055, CR1056:
Set [Motorola byteorder] = YES.
Confirm with [OK].
>
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
Integrate libraries
3633
>
To demonstrate the exchange of data via global network variables, write one project each for all three
devices. These projects are suitable for this purpose mainly because of the contained global variable
lists.
The example shows the project for device 1.
101
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
>
102
2015-08-27
First steps
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
NOTE
In the field [Link to file] > [Filename] it is expected to indicate an EXP file. (After [Project] > [Rebuild
all]) this external file contains the list of global network variables of this project to be exported, but is
NOT saved together with the project. ( CoDeSys online help).
We recommend another method which integrates the lists of global network variables in the project:
Write projects for more devices ( page 105) > create import lists.
Here you see that the COB ID = 51 was assigned to the export variables of DemoProj1 in device 1
and that these variables can be found again with the COB ID = 51 in DemoProj2 and DemoProj3 in
device 2 and device 3. In this example we have used this procedure for the definition of the COB IDs.
NOTE
For the selection of the COB IDs observe the following:
The export list and its corresponding import lists must be assigned to the same COB ID.
In the whole network each COB ID may only be assigned to one export list.
104
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
First steps
Also create export lists for the projects DemoProj2 and DemoProj3.
Now create corresponding projects with export lists for the two other devices: DemoProj2.pro and
DemoProj3.pro. These files are necessary for the following steps.
Filenames and entries following table:
>
Device
Project filename
COB ID
Global variable
DemoProj1.pro
Globale_Variablen_Export_Proj1
51
x1:INT
DemoProj2.pro
Globale_Variablen_Export_Proj2
52
x2:INT
DemoProj3.pro
Globale_Variablen_Export_Proj3
53
x3:INT
105
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
106
2015-08-27
First steps
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
From the menu "[Project] > [Merge]" repeat the process with DemoProj3.pro and its export list.
> The resources in DemoProj1.pro are now as follows:
Transmit projects
3654
Check whether all 3 devices together with the PC are available with their corresponding IP
addresses in the LAN.
107
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
Check the behaviour of the data transmission by looking at the corresponding global variable lists.
If, for example, in the project DemoProj1.pro you open the variable list
"Globale_Variablen_Import_Proj2", you should note that the value of x2 is increasing.
Also check the other projects and make sure that the transmission of the global variables in the
network functions.
108
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
System flags
18107
System flags are factory set global variables. System flags are mapped to IEC addresses (%Ixx,
%Qxx). The programmer can access the following elemnts by using symbol names in the program
code:
109
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
First steps
>
Libraries
7425
ifm electronic provides the following device-specific function libraries for programming the CR1201
using CODESYS 2.3:
Library
Description
ifm_CR1201_Vxxyyzz.lib
Device-specific functions
ifm_PDMng_util_Vxxyyzz.lib
Help functions
ifm_PDM360NG_USB_Vxxyyzz.lib
ifm_PDM360NG_USB_LL_Vxxyyzz.lib
ifm_PDM360NG_linux_syscall_asynch_Vxxyyzz.lib
ifm_RAWCan_NT_Vxxyyzz.lib
ifm_CANopen_NT_Vxxyyzz.lib
ifm_J1939_NT_Vxxyyzz.lib
ifm_NetVarLib_NT_Vxxyyzz.lib
Further information about the ifm function libraries: ifm libraries for the device CR1201 ( page
155)
To add additional libraries to a CODESYS project: Add additional libraries ( page 114)
>
For the programmable devices from the controller family ecomatmobile numerous functions are
available which enable use of the devices in a wide range of applications.
As these units use more or fewer system resources depending on their complexity it is not always
possible to use all units at the same time and several times.
NOTICE
Risk that the device acts too slowly!
Cycle time must not become too long!
When designing the application program the above-mentioned recommendations must be
complied with and tested.
If necessary, the cycle time must be optimised by restructuring the software and the system
set-up.
110
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
First steps
>
Watchdog behaviour
11789
In this device a watchdog monitors the runtime of system processes, including the process of the
CODESYS application. Each process has to call the wathcdog monitor within a defined time intervall.
If the maximum watchdog time is exceeded:
> all processes are stopped (reset)
> all outputs are switched off
> the screen goes black
> the status LED flashes red at 5 Hz
A process needs a certain time to proceed reset and initialisation routines (watchdog reset).
The following tabel shows the watchdog times for each process:
Prozess
Chain-ID
Watchdog-Timeout [ms]
Watchdog-Reset [ms]
ppc-plclinux
10
1 000
500
eplc main
20
10 000
500
eplc overlay
21
10 000
500
keyboard-service
40
2 000
500
io-coproc-service
50
2 000
500
wd-coproc-service
60
2 000
500
Operating sequence
7427
In principle, there are two options to create a project for display devices:
Sequence
Advantages
Disadvantages
In both cases we urgently recommend to design a precise structure of the visualisation and its
contents before starting.
111
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
The application program is generated by the CODESYS programming system and loaded in the
controller several times during the program development for testing:
In CODESYS: [Online] > [Login] > load the new program.
For each such download via CODESYS the source code is translated again. The result is that each
time a new checksum is formed in the controller memory. This process is also permissible for safety
controllers until the release of the software.
112
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
6.2.2
Only some networks are necessary for an executable program. You do not need any special function
block to be able to use important device functions. All monitor functions you can control via system
variables in the PLC configuration ( System flags ( page 346)).
Familiarise yourself with the programming system CODESYS 2.3!
Familiarise yourself with the programming according to IEC 61131-3!
To create a PLC application.
In the Object Organizer, select the [POUs] tab:
113
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
6.2.3
For the CR1201, ifm electronic provides additional CODESYS libraries, that contain device-specific
functions. The libraries will be installed together with the target package of the device ( ifm libraries
for the device CR1201 ( page 155)).
The following libraries needs to be installed in order to program the device:
LinuxSystemLib.Lib
Standard library Standard.Lib from \CoDeSys\Library\
Device library CR1201_Vxxyyzz.Lib aus
\CoDeSys\Targets\ifm\Library\ifm_CR1201\
If not already installed, add the libraries one by one to the project!
The release numbers of the libraries and the target package must be equal.
V
xx: 00...99
yy: 00...99
zz: 00...99
version
target version number
release number
patch number
The basic file name (e.g. "CR1201") and the software version number "xx" (e.g. "04") must
always have the same value! Otherwise the device goes to the STOP mode.
The values for "yy" (release number) and "zz" (patch number) do not have to match.
To add additional libraries to the project:
1 Start library manager
Click on the [Resources] tab in CODESYS:
114
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
6.2.4
Programming interfaces
Ethernet interface
115
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
The device can be programmed over the Ethernet interface (Position of the connectors: Installation
instrcution).
Device and CODESYS pc/laptop can be connected directly oder via a ethernet network.
Only use recommended accessories! ( Installation instruction)
For the connection in the network an experienced user or system administrator should set
up the network addresses and do the configuration.
To configure the programming interface:
1 Connect device and CODESYS pc /laptop
Connect the Ethernet interface of the device with Ethernet interface of the CODESYS
pc/laptop ( Installation instruction)
2 Set the IP parameters of the Ethernet interfaces
Set the IP parameters of the Ethernet interface of the device ( Setup: Configure the Ethernet
interface ( page 51))
Set the TCP/IP settings of the Ethernet interface of the CODESYS pc/laptop.
The device and the pc/laptop need to belong to the same ip address space.
Note the settings of the IP address and the subnet mask! ( Address assignment in Ethernet
networks ( page 345))
3
116
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
117
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
To access the Linux runtime system of the device directly via the Ethernet inerface, use one of the
following options.
118
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
Download the Telnet client and install it on the PC (e.g. PuTTY the operating system of the
Telnet client
Start the Telnet client
> The program window appears
Use the following parameters to create a new connection profile:
- PC name/IP address: 192.168.82.247
- Port: 23
- Transfer protocol: Telnet
Establish a connection to the device with the created connection profile
> The program window with a prompt appears.
Enter the following details and confirm with [ENTER]
- User name/login: root
- Password: pdm360ng
> The prompt of the root directory # appears
Enter the requested command
When done, enter exit in the prompt and confirm with [ENTER]
> The program window is closed
>
To establish a secure terminal connection between the PC and the device, proceed as follows:
Download the SSH client and install it on the PC (e.g. PuTTY ( www.putty.org))
Establish an Ethernet connection between the PC and the device.
If necessary, adapt the IP network settings of the PC and/or the device.
Help function of the PC operating system
Setup: Configure the IP parameters manually ( page 51)
Start the SSH client
Use the following parameters to create a new connection profile:
- IP address = 192.168.82.247
- Connection type = SSH
- Port number = 22
Save the connection profile
Establish a secure connection between the PC and the device with the saved connection profile
> A safety note appears
Confirm the safety note
> The terminal window appears
Enter the following details and confirm with [Enter]:
- login as: = root
- root@192.168.82.247' password: pdm360ng
> The success message Welcome using SSH/SCP on IFM PDM360NG ! appears
Execute the requested commands in the command line
Help function of the SSH client
When done, separate the secure connection with [Shift]+[Strg]+[D]
119
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
First steps
>
For some purposes an FTP connection between the PC and the device can be useful:
- Quick data transmission
- Connection also possible via the internet
- If no access to the USB port is possible
In case of doubt or problems please contact your system administrator.
Establish an Ethernet connection between the PC and the device.
The PC and the device must have compatible IP addresses and the same subnet mask.
Setup: Configure the IP parameters manually ( page 51).
Start the file manager on the PC.
Enter the IP address of the device and, if needed, the requested directory as target address
following "ftp://", e.g.
ftp://192.168.82.247/home (default IP address in the device)
After a right-click in the right space of the file manager click [Login as...] in the context menu.
> The dialogue [Login as...] opens.
Enter the following:
- User name = root
- Password = pdm360ng
Connect with the device with mouse click on [Login]
Copy the requested files
Close the file manager to disconnect the FTP connection.
>
To transfer files via a secure SCP connection (Secure CoPy) between the device and the PC, proceed
as follows:
Download the SCP client and install it on the PC (e.g. WinSCP ( www.winscp.net))
Establish an Ethernet connection between the PC and the device.
If necessary, adapt the IP network settings of the PC and/or the device.
Help function of the PC operating system
Setup: Configure the IP parameters manually ( page 51)
Start the SCP client
Use the following parameters to create a new connection profile:
- IP address = 192.168.82.247
- Connection type = SCP
- Port number = 22
- User name/Login = root
- Password = pdm360ng
Save the connection profile
Establish a secure connection between the PC and the device with the saved connection profile
> The program windows with the file systems of the PC and the device appear
Copy the requested files
Help function of the SCP client
When done, separate the secure connection
End the SCP client
>
120
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
6.2.5
2015-08-27
First steps
Requirements:
Device and CODESYS pc/laptop are connected via ethernet interfaces.
Programming interface is set.
1 Compile project
Use [Project] > [Rebuild All] to compile the program code for the device.
> After all libraries and variables have been inserted and parameterised as described, no error
messages should appear.
If a project was changed (or a new one created) it must be cleaned before transferring it to the
device. Without cleaning, the program can become unstable due to memory overflow.
Use [Project] > [Clean all] to clean the project.
> During cleaning, all program elements are reorganised and combined thus reducing the
volume.
121
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Configuration of the inputs and outputs
>
6.3
Notes ....................................................................................................................................................123
Configure input .....................................................................................................................................123
Configure output ...................................................................................................................................123
7308
1394
For some devices of the ecomatmobile controller family, additional diagnostic functions can be
activated for the inputs and outputs. So, the corresponding input and output signal can be monitored
and the application program can react in case of a fault.
Depending on the input and output, certain marginal conditions must be taken into account when
using the diagnosis:
It must be checked by means of the data sheet if the device used has the described input and
output groups ( data sheet).
122
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Configuration of the inputs and outputs
>
6.3.1
Notes
19934
>
Presets
13348
All inputs and outputs are factory set to binary, plus switching (BH).
>
The active configuration of the inputs and outputs can be displayed via the system flags IN00 and
OUT00.
Detailed information on the system flags: System flags: Inputs and Outputs ( page 348)
>
6.3.2
Configure input
7350
The inputs are configured usign teh function block INPUT in the application program.
Detailed information on the function block: INPUT ( page 166)
Possible operating mode: Possible operating modes inputs/outputs ( page 352)
>
6.3.3
Configure output
7347
The operting mode of the output is fixed (binary, plus switching (BH)).
123
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
6.4
Use visualisations
124
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
6.4.1
Notes on visualisations
19914
ifm electronic provides various components for CODESYS 2.3 supporting the
praogramming of visualisations.
POUs: Manage visualisation ( page 198)
>
Drawing area
YS_OBJECTID>
The left upper corner marks the home position (0,0) of the virtual and physical drawing area.
All elements in and outside the virtual drawing area are calculated.
The images used in the project can be larger than the given drawing area. In this case only a
selectable part of the image will be displayed.
>
If an image is loaded in the device which does not meet the requirements for size or colour, it is
resized before it is displayed and the colours used are "checked".
Each time the image is opened, it must be resampled. This often leads to much longer times to
change from one image to the other. Corrective measures:
First carry out all transformations of the bitmap or the image in an image processing program on
your computer.
Only for BasicDisplay: The colour palette is adapted when the image is integrated into the project
by CODESYS. On the device itself no adaptations will be made (size, scaling, colour).
Only save the suitably transformed images in the visualisation of the device.
>
Texts
7428
The smallest font size which is clearly visible on the device is 8 points.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
Permissible effects:
- None (standard)
- Underlined
- Crossed out
126
2015-08-27
Use visualisations
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
Visualisation limits
Limitations for visualisations .................................................................................................................128
CODESYS visualisation elements ........................................................................................................129
Movement of elements .........................................................................................................................130
7382
127
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Use visualisations
>
Designation
Limitation
< 2000
8000
Legend:
1
2
...
...
128
Specifications of the splash screen: Setup: Define the splash screen ( page 64)
POU (Program Organization Unit) = function, function block or program
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
Visualisation element
Polyline
Curve
Rectangle
No problems known
Rounded rectangle
Only for very restricted use, slows down the system very much
Circle, ellipse
Only for very restricted use, slows down the system very much
Polygon
Pie chart
Only for very restricted use, slows down the system very much
Visualisation
Possible but too many elements on one page slow down the system
Button
No problems known
Table
Trend curve
Supported from firmware V01.05 on; not all CODESYS functions are
available on embedded devices
Alarm table
Not supported
Scales
Possible but too many elements on one page slow down the system
the following note.
Pointer instrument
Bargraph
Histogram
Graphic file
ActiveX element
No problems known
- BMP
- BMP RLE compressed
- WMF (not recommended)
- JPG
No problems known:
The mode can be executed as follows:
- isotropic (uniform scaling of height / width)
- anisotropic (non-uniform scaling of height / width)
- fixed (without scaling)
Not supported
Legend:
+ ...
o ...
....
129
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
It is allowed to save colour bitmaps with a colour depth of 18 bits (max. 24 bits).
Some visualisations with the CODESYS options are not very satisfactory, e.g. round scales.
Solution:
Integrate the requested elements as (an externally generated) BMP graphic. It is then sufficient to
turn an arrow in the visualisation depending on values which could change its colour if limit values
are exceeded.
>
Movement of elements
7392
Image and text elements can be moved on the display in a defined manner.
Element movement
Description
Rotate
Shift
Relative shifting of
rectangle
ellipse / circle
horizontal
vertical
Each edge of the element can be shifted by a specified number of pixels via an
INT type variable:
130
horizontal edge up
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
6.4.2
Create visualisation
3100
131
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Use visualisations
>
6.4.3
The signals of the navigation key are evaluated independently of the signals of the
function keys and the touch screen.
The device detects several simultaneously pressed function keys and evaluates them.
When the function key is permanently activated, the device generates a key pulse
sequence (after an adjustable waiting time).
>
The following tasks have to be solved in the visualisations of the application program:
jump to the visualisati pages,
change parameter values in the input fields,
confirm messages.
To do so, the ecomatmobile PDM devices provide a number of operating elements.
For the devices of the PDM families you can assign functions to certain operating elements or signals.
There are several ways to do so which can also be combined in some cases:
>
The operating elements of the device are systematically numbered internally. In order to read or to
change the states of the input elements, the user can easily use symbol names in the programming
code of CODESYS.
The following figure shows the assignment of the individual operating elements with system flags:
Function keys:
>
132
Navigation key:
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Use visualisations
For each key of the device the system detects the following events. Using the results of this detection,
the system generates signals and maps them to system flags:
Event type
Events
Reference
State
key pressed
key released
Change of state
>
ifm provides the programmer with "edit controls". You can link functions to operating elements using
system variables in the PLC configuration.
For normal mode:
MD_KEYx_y
Keyword
Meaning in MAPPING
DOWN
---
ESC
ESCAPE
LEFT
---
RIGHT
---
SHIFT_TAB
---
SPACE
TAB
---
UP
---
>
133
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
IF Init =TRUE
THEN
(* Default Mapping ( MD ) *)
MD_KEY3_right:= 'TAB'; (* jump to next element foreward *)
MD_KEY3_left:='SHIFT_TAB';
(* jump to next element backwards *)
MD_KEY3_push:='SPACE'; (* select the element *)
(* Edit Mapping/ Edit mode ( ME )*)
ME_KEY3_UP:='UP';
(* Increment value *)
ME_KEY3_DOWN:='DOWN';
(* Decrement value *)
ME_KEY3_LEFT:='LEFT';
(* Move left on the value position *)
ME_KEY3_RIGHT:='RIGHT'; (* Move right on the value position *)
ME_KEY3_PUSH:='SPACE'; (* Take over value *)
ME_KEY1_5:= 'ESCAPE';
(* Exit edit mode *)
END_IF
134
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Use visualisations
>
6.4.4
All operating elements are backlit withLEDs. The LEDs can be controlledin the application
program.
Only switch those key LEDs in the program which can be sensibly actuated in the
current screen.
>
To generate an optical feedback indicating, which key can be used for user input, the programmer can
use the key LEDs. The following options are available:
Option
Functions
Reference
System flags
>
Control buzzer
11543
To generate an acoustical feedback indicating user inputs, the programmer can use the
device-internal buzzer. The following options are available:
Option
Functions
Reference
ifm POUs
135
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
6.4.5
The character sets supplied by the factory (fonts) are not sufficient for all applications. Here we show
you the example "Cyrillic" to learn how to add more character sets.
NOTICE
If after the installation of large fonts (e.g. Chinese fonts) a device with a CODESYS application is
restarted, the watchdog may be activated!
Reason: It takes some seconds until the new font is initialised.
Start the device once in the setup mode ( Enter the setup mode ( page 39)).
136
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use visualisations
>
Symbol files
14522
The unit is factory preset with the ISO symbols. An overview and explanations of the installed symbols
is given in the file ifm_iso-documentation.pdf ( ecomatmobile DVD "Software, tools and
documentation" or on your hard disk in the CODESYS installation directory
Targets\ifm\Library\Fonts\ifm_ISO.
Example: ifm_iso_f.ttf
137
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
6.5
>
6.5.1
General notes
14047
The use of touch operating elements is not suitable for the control of critical functions
(e.g. motor start/stop).
Use the mechanical keys for the implementation of critical functions!
The touch screen provides no mechanical feedback when a graphical operating element
has been activated (e.g. button). Therefore, the operator might not know if his input has
been successful.
Use visual feedback for graphical operating elements ( Use visual feedback ( page
140))!
Unfavourable light incidence and soiling of the screen surface might affect the
perceptibility of the graphical operating elements.
Touch operating elements must be sufficiently dimensioned!
Use a clearly readable font in a sufficient font size for labelling the touch operating
elements.
>
6.5.2
Operation of the touch screen can be programmed in CODESYS with standard input functions or via
PLC code.
The following table compares the two methods.
Criterion
PLC code
Flexibility
Programming
complexity
suitable for
Experienced programmers
138
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
CODESYS offers different input functions to define how elements of the graphical user interface (e.g.
buttons) react to actuation of the touch screen.
To access the input functions in CODESYS:
1 Preperations
Create/open CODESYS project.
Create new visualisation and create a new object ( Create visualisation ( page 131))
2 Configure input function
Selelct created object.
Select [Extras] > [Configure].
> The [Regular Element Configuration] window appears.
Select the [Input] item in the [Category] field.
> [Input] group shows options for input configuration:
Option
Description
[Toggle variable]
= function disabled
= function disabled
[Tap variable]
[Tap FALSE]
Possible values
= function enabled
= function enabled
[Execute program]
List
= function disabled
= function disabled
= function disabled
= function enabled
= function enabled
= function enabled
[Text]
= input field
[Numpad]
= Number pad
[Keypad]
139
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use of touch screen functions
To get an feedback from the system in case the display is getting touched, the programmer can use
the global data structure PointOfContact. It provides the following functions:
Variable
Funktion
PointOfContact.AfterGlow
PointOfContact.X
PointOfContact.Y
PointOfContact.ImagePath
PointOfContact.Overlap
>
6.5.3
CODESYS offers the following options to create visual feedback for graphical operating elements:
Option
Description
The appearance of the button automatically changes when the button is activated or
deactivated. The programmer does not have to make additional settings.
2 different bitmaps exist for each condition (activated, deactivated) of an input element.
Both graphics are positioned congruently on 2 visualisation levels. When the operating
element is activated, the bitmap graphics is switched to invisible for the inactive
condition.
The input element has a frame. When deactivated, the frame is colourless or in neutral
colours. The frame colour changes when the frame is activated.
140
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Use of touch screen functions
>
6.5.4
To be able to calibrate the touch screen from a PLC application, carry out the following changes in the
CODESYS project:
1 Create visualisati page
Open / Create a project.
Create an empty visualisati page with the designation TOUCHCALIBRATION ( Create
visualisation ( page 131))
2 Insert control code in PLC application
Define a condition for access to the visualisati page TOUCHCALIBRATION.
Define the visualisati page which will be opened after successful calibration.
Define the condition for the cancellation of the calibration process (e.g. change to the
visualisati page y when the function x is pressed)
Notes on use:
The calibration process is automatically started when the operator opens the visualisati page
TOUCHCALIBRATION.
Follow the instructions on the screen ( Setup: Calibrate the touchscreen ( page 75))!
> When the calibration process is cancelled: The values of the last successful calibration apply.
> When the calibration process has been successfully completed: The touch screen is
recalibrated.
The calibration process can only be cancelled as long as the operator has not yet touched the
last cross in the centre of the screen!
The new values apply immediately upon completion of the calibration process! It is not
necessary to reboot the device.
141
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Install and set up mobile camera
>
6.6
142
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
6.6.1
>
Create visualisation
Open CODESYS project.
In the Object Organizer, select the [Visualizations] tab
Create a new visualisation object.
> The drawing area appears.
Insert placeholder for camera image
Select [Insert] > [Bitmap].
Drag out the contour of the planned camera image on the drawing area.
> The [Open] window appears.
Select the file camera.bmp in the subdirectory ..\targets\ifm\library\bmp_ng.
> The placeholder graphic is inserted into the drawing area.
> Press [OK] to close the window.
Set size and position of the camera image
Select [Extras] > [Elementlist...].
> [Element list] window appears.
Select the requested image.
Under [Position] enter the following values:
Parameter
Description
Possible values
i.e. 290
i.e. 220
Width
recommended: 320
max.: 640
Height
recommended: 240
max: 480
Image resolutions that are in the range between recommended and maximum image
resolution or above the maximum image resolution, cause a high CPU load.
Avoid to set such values!
Only the visible area of the display can be used for the camera image ( datasheet,
resoltution of the display). Images outside this area (in the non-visible area) are ignored.
Instead the image is represented at the last valid position. If there was no valid position, NO
image is represented.
Press [OK] to apply the entered values and close the window.
143
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
Possible values
[Content]
e.g. 192.168.83.83
>
Possible values
[Angle]
e.g. PLC_PRG.camangle
0 = no rotation *
90 = rotate by 90
180 = rotate by 180
270 = rotate by 270
* ... default value which is also applied in case of a not defined variable
>
Possible values
[Input disable]
e.g. PLC_PRG.connect
>
Possible values
[Change color]
e.g. PLC_PRG.grey
* ... default value which is also applied in case of a not defined variable
>
144
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Possible values
[Umrechnungsbasis]
e.g. PLC_PRG.mirror
* ... default value which is also applied in case of a not defined variable
>
Possible values
[Conversion factor]
e.g. PLG_PRG.enable
[Tooltipdisplay]
>
Possible values
Cause
Remedy
framebuffer error or
plane already used
exclusively
145
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Install and set up mobile camera
>
>
146
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
6.6.2
>
Aspect ratio
PAL
720
576
5:4
NTSC
720
480
3:2
The CR1201 supports the following display modes for analog cameras:
Description
Capture mode
Overlay mode
Scalability
Scaling behaviour
Frame rate
Place the camera image only in the visible area of the display (datasheet, display resolution)!
Images outside the visible area will be ignored.
147
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Install and set up mobile camera
>
The original image can only be scaled in any manner as full-size image, also asymmetrically.
Original image:
Compressed image:
148
Streched image:
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Install and set up mobile camera
>
Image section 1:
Image section 2:
149
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
Create visualisation
Open CODESYS project.
In the Object Organizer, select the [Visualizations] tab
Create a new visualisation object.
> The drawing area appears.
Insert placeholder for camera image
Select [Insert] > [Bitmap].
Drag out the contour of the planned camera image on the drawing area.
> The [Open] window appears.
Select the file camera.bmp in the subdirectory ..\targets\ifm\library\bmp_ng.
> The placeholder graphic is inserted into the drawing area.
> Press [OK] to close the window.
Set size and position of the camera image
Select [Extras] > [Elementlist...].
> [Element list] window appears.
Select the requested image.
Under [Position] enter the following values:
Parameter
Description
Possible values
e.g. 290
e.g. 220
Width
Height
Image resolutions that are in the range between recommended and maximum image
resolution or above the maximum image resolution, cause a high CPU load.
Avoid to set such values!
Only the visible area of the display can be used for the camera image ( datasheet,
resoltution of the display). Positions outside this area (in the non-visible area) are ignored.
Press [OK] to apply the entered values and close the window.
150
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
>
>
Possible values
[Content]
Select camera
Use lower-case and upper-case letters when entering the parameter values!
Possible values
[Change color]
e.g. PLC_PRG.CamMode
>
Possible values
[Coversion base]
e.g. PLC_PRG.mirror
* ... default value which is also applied in case of a not defined variable
>
151
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Programming
Possible values
[Angle]
e.g. PLC_PRG.camangle
0 = no rotation *
90 = rotate by 90
180 = rotate by 180
270 = rotate by 270
* ... default value which is also applied in case of a not defined variable
[Tooltipdisplay]
>
Possible values
Cause
The camera image is not completely Check the settings of the camera
in the visible area of the display
Insert an analogue camera image in a CODESYS
project ( page 150)
framebuffer or plane
can't be used
exclusively
Remedy
>
152
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Programming
2015-08-27
Install and set up mobile camera
>
153
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
Install and set up mobile camera
All CODESYS function elements (FBs, PRGs, FUNs) are stored in libraries. Below you will find a list of
all the ifm libraries you can use with this device.
This is followed by a description of the function elements, sorted by topic.
154
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1
version
target version number
release number
patch number
Here you will find a list of the ifm function elements matching this device, sorted according to the
CODESYS libraries.
155
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.1
Library ifm_CR1201_Vxxyyzz.LIB
18536
Type
Short description
FOCUSED_ELEMENT ( page
200)
GV
FocusFrameImagePath ( page
202)
GV
GV
CurrentVisuDisplayed ( page
206)
GV
GV
contains the coordinates of the pressure point on the touch screen and
configuration options for visual feedback
TouchScreenDisable ( page
172)
GV
CamsOffOnPageSwitch ( page
173)
GV
GV
FUN
FB
GET_DEVICE_SERIAL ( page
176)
FB
FB
FB
FB
FB
LOAD_SPLASH_SCREEN ( page
171)
FB
SET_BOOTUP_BACKLIGHT
( page 170)
FUN
FB
Legend:
GV ...
FB ...
FUN ...
PRG ...
156
Global variable
Function block
Function
Program
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.2
Library ifm_PDMng_util_Vxxyyzz.LIB
15819
Type
Short description
SPEED_UP_VISU_TASK ( page
199)
FB
FB
FB
FB
enables the setting and resetting of a Boolean variable via only one input bit
INIT_DATA_MEMORY
FB
mounts the NAND flash memory into the file system of the device
PDM_PAGECONTROL
PRG
PRG
indicates the version and history of the library in the comment of the function
element
Legend:
GV ...
FB ...
FUN ...
PRG ...
7.1.3
Global variable
Function block
Function
Program
Library ifm_PDM360NG_special_V02yyzz.LIB
18577
Type
Short description
EXITPLC_START_APPLICATION
( page 228)
FUN
calls the appliclation indicated at input APPLICATION directly from the running
control program
Legend:
GV ...
FB ...
FUN ...
PRG ...
Global variable
Function block
Function
Program
157
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.4
Library ifm_PDM360NG_linux_syscall_asynch_V02yyzz.LIB
18579
Type
Short description
FB
sends any command to the Linux operating system (max. 255 characters)
Legend:
GV ...
FB ...
FUN ...
PRG ...
Global variable
Function block
Function
Program
>
7.1.5
Library ifm_PDM360NG_USB_Vxxyyzz.lib
19936
Type
Short description
USB_STORAGE_MANAGER
( page 186)
FB
COPY_PDM_TO_USB ( page
189)
PRG
COPY_USB_TO_PDM ( page
190)
PRG
USB_STORAGE_HANDLER
( page 191)
PRG
Legend:
GV ...
FB ...
FUN ...
PRG ...
158
Global variable
Function block
Function
Program
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.6
Library ifm_PDM360NG_USB_LL_V02yyzz.LIB
18578
7.1.7
Library ifm_PDM_input_V01yyzz.LIB
19920
Type
Short description
INIT_VAR_RETAIN_DINT ( page
218)
FB
INIT_VAR_RETAIN_INT ( page
220)
FB
INIT_VAR_RETAIN_REAL ( page
222)
FB
FB
FB
FB
Legend:
GV ...
FB ...
FUN ...
PRG ...
Global variable
Function block
Function
Program
159
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.8
Library ifm_RAWCan_NT_Vxxyyzz.LIB
14715
Short description
Send a corresponding request and return the response of the other device as a result
Provides data to the CAN controller in the device which is automatically sent as a response to
the request of a remote message
Configures a data receive object and reads out the receive buffer of the data object
Configures a data receive object and reads out the receive buffer of the data object
Frame type and mask can be selected
Configures a data receive object and reads out the receive buffer of the data object
Frame type and mask can be selected
Several CAN messages per cycle possible
Configures a range of data receive objects and reads out the receive buffer of the data objects
Frame type and mask can be selected
Configures a range of data receive objects and reads out the receive buffer of the data objects
Frame type and mask can be selected
Several CAN messages per cycle possible
Transfers a CAN data object (message) to the configured CAN interface for transmission at each
call
Transfers a CAN data object (message) to the configured CAN interface for transmission at each
call
CAN-specific characteristics can be set
Cyclically transfers a CAN data object (message) to the configured CAN interface for
transmission
CAN-specific characteristics can be set
160
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
>
7.1.9
Library ifm_CANopen_NT_Vxxyyzz.LIB
14914
Short description
= SDO write
Writes an "Expedited SDO" = Expedited Service Data Object
161
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm libraries for the device CR1201
Function element
Short description
>
7.1.10
Library ifm_J1939_NT_Vxxyyzz.LIB
14912
Short description
= J1939 TX enhanced
Sends individual single frame messages
Can also be set: transmission priority, data length
>
162
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
7.1.11
2015-08-27
ifm libraries for the device CR1201
Library ifm_NetVarLib_NT_Vxxyyzz.LIB
14915
163
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2
Here you will find the description of the ifm function elements suitable for this device, sorted by topic.
164
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.1
INPUT ...................................................................................................................................................166
SET_ETHERNET .................................................................................................................................168
SET_BOOTUP_BACKLIGHT ...............................................................................................................170
LOAD_SPLASH_SCREEN...................................................................................................................171
TouchScreenDisable ............................................................................................................................172
CamsOffOnPageSwitch........................................................................................................................173
KEY_MAPPING ....................................................................................................................................174
8566
Here you find units for the setup of the device from a CODESYS application.
165
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
INPUT
9673
Symbol in CODESYS:
>
Description
14351
INPUT enables determining the state at the input channels ( data sheet). The FB provides the
current state at the selected channel.
The measurement and the output value result from the operating mode indicated via MODE
binary input plus switching (BL) for positive sensor signal (with/without diagnosis)
binary input minus switching (BH) for negative sensor signal
analogue input 0...20 mA
analogue input 0...10 V
analogue input ratiometric 0...32 V
Do not change the operating mode during operation!
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
MODE
166
INPUT_ANALOG_MODE
S
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
VALUE
WORD
RESULT
INT
Description
00
FB is inactive
01
242
F2
If the value 1 or 242 is provided at output RESULT, reset the input ENABLE (ENABLE =
FALSE)!
167
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
SET_ETHERNET
11681
Symbol in CODESYS:
>
Description
11682
IP address
gateway address
of the device. If input ENABLE is set to TRUE, the values on the inputs IP_ADDRESS, NETMASK and
GATEWAY are written.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
IP ADDRESS
STRING(15)
NETMASK
STRING(15)
GATEWAY
STRING(15)
168
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
INT
Description
00
FB is inactive
01
08
64
40
65
41
80
50
81
51
82
52
If the value 1, 64, 65, 80, 81 or82 is provided at output RESULT, reset input ENABLE (ENABLE
= FALSE)!
169
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
SET_BOOTUP_BACKLIGHT
9681
Symbol in CODESYS:
>
Description
9683
With the function SET_BOOTUP_BACKLIGHT the brightness of the display can be set.
NOTICE
When functions are called too frequently (FUN) the Flash memory may be destroyed.
Call functions only if absolutely necessary!
>
Parameter
Data type
Description
BACKLIGHT
BYTE
>
Parameter
Data type
Description
SET_BOOTUP_BACKLIGHT
INT
Description
001
01
242
F2
170
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
LOAD_SPLASH_SCREEN
14531
Symbol in CODESYS:
>
Description
14533
LOAD_SPLASH_SCREEN loads an image file from a selectable location and saves it in the flash
memory of the device. The image file will be used as splash screen after the next reboot of the device.
NOTE
Each call of the FB executes a write operation on the flash memory of the device.
Do not call the function block cyclically in the program code!
Only one instance of the FB may be active at a time.
Observe the characteristics of the splash screen chapter Visualisation limits ( page 127)
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
PATH_TO_SPLASH
STRING (255)
>
Output parameters
19879
Parameter
Data type
Description
RESULT
INT
Description
00
FB is inactive
01
242
F2
If the value 1 or 242 is provided at the RESULT output, reset the ENABLE input (ENABLE =
FALSE)!
>
171
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
TouchScreenDisable
18884
Description
18901
Data type
Possible values
TouchScreenDisable
BOOL
FALSE
TRUE
172
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CamsOffOnPageSwitch
18888
Description
18894
Datentyp
Mgliche Werte
CamsOffOnPageSwitch
BOOL
173
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
KEY_MAPPING
8959
Description
8960
KEY_MAPPING contains the current key assignment with constant character strings.
174
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.2
GET_DEVICE_SERIAL ........................................................................................................................176
GET_ETHERNET .................................................................................................................................177
GET_VERSIONS ..................................................................................................................................179
19614
175
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
GET_DEVICE_SERIAL
11695
Symbol in CODESYS:
>
Description
11696
GET_DEVICE_SERIAL reads the serial number from the device. The current value is provided at
output SERIAL as long as the input ENABLE is set to TRUE. RESULT provides the return value of the
FB.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
>
Parameter
Data type
Description
SERIAL
STRING(14)
RESULT
INT
Description
00
FB is inactive
01
08
64
40
65
41
176
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
GET_ETHERNET
11673
Symbol in CODESYS:
>
Description
11674
GET_ETHERNET reads
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
177
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
IP ADDRESS
STRING(15)
NETMASK
STRING(15)
GATEWAY
STRING(15)
RESULT
INT
Description
00
FB is inactive
01
08
64
40
65
41
178
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
GET_VERSIONS
14360
>
Description
14362
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
179
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
SW_VERSION
STRING(80)
FW_VERSION_IO
STRING(80)
FW_VERSION_WD
STRING(80)
KBD1_VERSION
STRING(80)
KBD2_VERSION
STRING(80)
KBD3_VERSION
STRING(80)
RESULT
INT
Description
00
FB is inactive
01
08
64
40
65
41
180
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.3
NORM_DINT ........................................................................................................................................182
NORM_REAL .......................................................................................................................................183
TOGGLE ...............................................................................................................................................184
19615
181
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
NORM_DINT
13238
Symbol in CODESYS:
>
Description
3307
NORM_DINT normalises a value within defined limits to a value with new limits.
The FB normalises a value of type DINT, which is within the limits of XH and XL, to an output value
within the limits of YH and YL. This FB is for example used to generate PWM values from analogue
input values.
NOTE
The value for X must be in the defined input range between XL and XH!
There is no internal plausibility check of the value X.
Outside this value range the output X_OUT_OF_RANGE is set.
The result of the calculation (XH-XL)(YH-YL) must remain in the value range of data type DINT
(-2 147 483 648...2 147 483 647)!
> Due to rounding errors the normalised value can deviate by 1.
> If the limits (XH/XL or YH/YL) are defined in an inverted manner, normalisation is also done in an
inverted manner.
>
Parameter
Data type
Description
DINT
XH
DINT
XL
DINT
YH
DINT
YL
DINT
>
Parameter
Data type
Description
DINT
output value
X_OUT_OF_RANGE
BOOL
182
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
NORM_REAL
13243
Symbol in CODESYS:
>
Description
3310
NORM_REAL normalises a value within defined limits to a value with new limits.
The FB normalises a value of type REAL, which is within the limits of XH and XL, to an output value
within the limits of YH and YL. This FB is for example used to generate PWM values from analogue
input values.
NOTE
The value for X must be in the defined input range between XL and XH!
There is no internal plausibility check of the value X.
Outside this value range the output X_OUT_OF_RANGE is set.
The result of the calculation (XH-XL)(YH-YL) must remain in the value range of data type REAL
(-3,4028234661038...3,4028234661038)!
> Due to rounding errors the normalised value can deviate by 1.
> If the limits (XH/XL or YH/YL) are defined in an inverted manner, normalisation is also done in an
inverted manner.
>
Parameter
Data type
Description
REAL
Input value
XH
REAL
XL
REAL
YH
REAL
YL
REAL
>
Parameter
Data type
Description
REAL
Output value
X_OUT_OF_RANGE
BOOL
183
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
TOGGLE
13247
Symbol in CODESYS:
>
Description
3304
TOGGLE enables the setting and resetting of a Boolean variable via only one input bit.
The first rising edge on the input IN sets the output OUT to 'TRUE'.
The next rising edge resets the output back to 'FALSE'.
etc.
>
Parameter
Data type
Description
IN
BOOL
>
Parameter
Data type
Description
OUT
BOOL
184
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.4
185
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
USB_STORAGE_MANAGER
9691
Symbol in CODESYS:
>
Description
9708
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
186
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
CHANGED
BOOL
INSERTED
BOOL
REMOVED
BOOL
INDEX
BYTE
RESULT
INT
Description
00
FB is inactive
001
01
008
08
064
40
065
41
187
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
USB_STORAGE_REMOVE
9711
Symbol in CODESYS:
>
Description
9713
Parameter
Data type
Description
INDEX
BYTE
>
Parameter
Data type
Description
USB_STORAGE_REMOVE
INT
Description
001
01
242
F2
188
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
COPY_PDM_TO_USB
10098
Symbol in CODESYS:
>
Description
10100
COPY_PDM_TO_USB copies a file from the memory of the PDM to a connected USB memory device.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
TRUE:
FALSE:
COPY
BOOL
USB_PATH
STRING (80)
LOCAL_PATH
STRING (80)
LOCAL_FILE
STRING (80)
>
Parameter
Data type
Description
COMMAND
STRING (80)
DONE
BOOL
RET_VALUE
INT
189
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
COPY_USB_TO_PDM
10107
Symbol in CODESYS:
>
Description
10109
COPY_USB_TO_PDM copies a file from a connected USB memory device to the device.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
TRUE:
FALSE:
COPY
BOOL
USB_PATH
STRING (80)
LOCAL_PATH
STRING (80)
USB_FILE
STRING (80)
>
Parameter
Data type
Description
COMMAND
STRING (80)
DONE
BOOL
RET_VALUE
INT
190
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
USB_STORAGE_HANDLER
10090
Symbol in CODESYS:
>
Description
10092
Parameter
Data type
Description
REMOVE
BOOL
SCROLL_UP
BOOL
SCROLL_DOWN
BOOL
191
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
USB_PATH
STRING (80)
USB_IDX
BYTE
NUMBER_USB_DEVICES
WORD
SELECTED_DEVICE
WORD
REMOVE_RESULT
INT
USB_INSERTED
BOOL
TRUE:
FALSE:
Description
001
01
242
F2
192
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.5
BUZZER_CLICK ...................................................................................................................................194
BUZZER_ON ........................................................................................................................................195
KEY_CLICK ..........................................................................................................................................196
8650
Here we show you functions to control the LED and the buzzer in this device.
193
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
BUZZER_CLICK
9651
Symbol in CODESYS:
>
Description
9654
With BUZZER_CLICK the integrated buzzer of the device generates a click signal as soon as the
function is called. Adjustable features:
- click repetition time in [ms],
- tone pitch in [Hz].
>
Parameter
Data type
Description
FREQUENCY
WORD
DURATION
TIME
>
Parameter
Data type
Description
BUZZER_CLICK
INT
Description
001
01
Parameters are OK
242
F2
194
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
BUZZER_ON
9658
Symbol in CODESYS:
>
Description
9660
With BUZZER_ON the integrated buzzer of the device generates an adjustable tone:
- The tone duration is determined by the duration of the ENABLE signal.
- The tone pitch results from the parameter FREQUENCY.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
FREQUENCY
WORD
>
Parameter
Data type
Description
RESULT
INT
Description
00
FB is inactive
01
242
F2
If the value 1 or 242 is provided at output RESULT, reset the input ENABLE (ENABLE =
FALSE)!
195
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
KEY_CLICK
9667
Symbol in CODESYS:
>
Description
9669
With KEY_CLICK the integrated buzzer of the device generates an adjustable click tone as soon as
one of the keys is pressed:
- The tone pitch results from the parameter FREQUENCY.
- The click repetition time results from the parameter DURATION.
Do not use the FB KEY_CLICK simultaneously with the autorepeat function ( System flags
( page 346)).
Otherwise, the device will produce disagreeable noises.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
FREQUENCY
WORD
DURATION
TIME
196
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
INT
Description
00
FB is inactive
01
242
F2
If the value 1 or 242 is provided at output RESULT, reset the input ENABLE (ENABLE =
FALSE)!
197
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.6
SPEED_UP_VISU_TASK.....................................................................................................................199
FOCUSED_ELEMENT .........................................................................................................................200
CURSOR_POSITION ...........................................................................................................................201
FocusFrameImagePath ........................................................................................................................202
PDM_PAGECONTROL ........................................................................................................................203
OverlayVisu ..........................................................................................................................................205
CurrentVisuDisplayed ...........................................................................................................................206
INPUT_DINT ........................................................................................................................................207
INPUT_INT ...........................................................................................................................................210
INPUT_REAL .......................................................................................................................................215
INIT_VAR_RETAIN_DINT ....................................................................................................................218
INIT_VAR_RETAIN_INT ......................................................................................................................220
INIT_VAR_RETAIN_REAL ...................................................................................................................222
8617
198
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
SPEED_UP_VISU_TASK
11711
Symbol in CODESYS:
>
Description
11712
SPEED_UP_VISU_TASK accelerates the visualisation process of the PDM. This leads to a faster
change to the next page.
During the execution of the application program the FB can be activated or deactivated at any time.
The FB assigns additional CPU processing times to the visualisatoin process. Therefore there
are fewer resources available to other processes (e.g. CAN_communication, control process).
Before the FB is used, test thoroughly if the change has any negative effects on the correct
execution of the application program!
>
Parameter
Data type
Description
FAST
BOOL
TRUE:
FALSE:
>
Parameter
Data type
Description
FAST_VISU
BOOL
199
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
FOCUSED_ELEMENT
18891
Description
8897
FOCUSED_ELEMENT contains the ID of the visualisation objetc, which currently has the focus.
Parameter
Data type
Possible objects
FOCUSED_ELEMENT
DINT
200
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CURSOR_POSITION
18890
Description
18896
CURSOR_POSITION contains the current position of the cursor when entering alphanumerical
charachters (e.g. numpad, on-screen keyboard).
Parameter
Data type
CURSOR_POSITION
DINT
Possible values
201
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
FocusFrameImagePath
18892
Description
18898
FocusFrameImagePath contains the path of the directory where the image file of the user-specific
focus frame is stored.
Parameter
Data type
Possible values
FocusFrameImagePath
STRING[255]
The image file of the focus frame must have the following characteristics:
202
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
PDM_PAGECONTROL
18886
Description
3294
Also note the new 5-digit numbering when naming your existing visualisati pages!
>
Parameter
Data type
Description
INIT
BOOL
INIT_PAGE
WORD
PAGE_UP
BOOL
PAGE_DOWN
BOOL
PAGE_EXTERN
WORD
PAGE_MAX
WORD
BASENAME
STRING [35]
203
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
ACT_PAGE
WORD
204
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
OverlayVisu
18887
Description
18889
OverlayVisu contains the name of the visualisati page which is used as overlay visualisation. An
overlay visualisation overlays the active visualisati page.
Parameter
Data type
Possible values
OverlayVisu
STRING[40]
205
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CurrentVisuDisplayed
18889
Description
18895
Data type
Possible values
CurrentVisuDisplayed
STRING[40]
206
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
INPUT_DINT
3223
Symbol in CODESYS:
>
Description
3333
INPUT_DINT supports up to 6 input fields which can be assigned to 6 different objects in the
visualisation. The input objects are parameterised with the internal variables FIELD1...FIELD6,
COLOR_FIELD1...COLOR_FIELD6 and VALUE_FIELD1...VALUE_FIELD6.
The FB is an alternative to the input function integrated in CoDeSys and more flexible compared to the
CoDeSys input function.
The FB contains no visualisation elements.
>
Parameter
Data type
Description
INIT
BOOL
ENABLE
BOOL
FALSE:
TRUE:
FALSE:
INIT_VALUE
initialisation values for the input fields for the first call
NO_OF_FIELDS
BYTE
MIN_MAX_ARRAY
ESC
BOOL
TRUE:
FALSE:
INCREMENT
BOOL
207
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Parameter
Data type
Description
DECREMENT
BOOL
ENTER
BOOL
INCREMENT_VALUE
DINT
if KEY_INCREMENT_VALUE2 = FALSE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
KEY_INCREMENT_VALUE2
BOOL
INCREMENT_VALUE2
DINT
if KEY_INCREMENT_VALUE2 = TRUE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
CLEAR_ALL_VALUE
BOOL
TRUE:
FALSE:
>
Parameter
Data type
Description
INPUT_ACTIV
BOOL
FIELDCOUNTER
BYTE
VALUE_FIELD1
DINT
...
DINT
VALUE_FIELD6
DINT
208
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Internal parameters
3336
Parameter
Data type
Description
FIELD1
DINT
...
DINT
FIELD6
DINT
COLOR_FIELD1
DINT
...
DINT
COLOR_FIELD6
DINT
VALUE_FIELD_1
DINT
...
DINT
VALUE_FIELD_6
DINT
Sets the alarm colour of the input object (only PDM color).
The variable must be assigned in the visualisation.
>
209
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
INPUT_INT
3220
Symbol in CODESYS:
>
Description
3328
INPUT_INT supports up to 6 input fields which can be assigned to 6 different objects in the
visualisation. The input objects are parameterised with the internal variables FIELD1...FIELD6,
COLOR_FIELD1...COLOR_FIELD6 and VALUE_FIELD1...VALUE_FIELD6.
The FB is an alternative to the input function integrated in CoDeSys and more flexible compared to the
CoDeSys input function.
The FB contains no visualisation elements.
210
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
INIT
BOOL
ENABLE
BOOL
FALSE:
TRUE:
FALSE:
INIT_VALUE
initialisation values for the input fields for the first call
NO_OF_FIELDS
BYTE
MIN_MAX_ARRAY
ESC
BOOL
TRUE:
FALSE:
INCREMENT
BOOL
DECREMENT
BOOL
ENTER
BOOL
INCREMENT_VALUE
INT
if KEY_INCREMENT_VALUE2 = FALSE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
KEY_INCREMENT_VALUE2
BOOL
INCREMENT_VALUE2
INT
if KEY_INCREMENT_VALUE2 = TRUE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
CLEAR_ALL_VALUE
BOOL
TRUE:
FALSE:
211
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
INPUT_ACTIV
BOOL
FIELDCOUNTER
BYTE
VALUE_FIELD1
INT
...
INT
VALUE_FIELD6
INT
>
Internal parameters
3331
Parameter
Data type
Description
FIELD1
INT
...
INT
FIELD6
INT
COLOR_FIELD1
INT
...
INT
COLOR_FIELD6
INT
VALUE_FIELD_1
INT
...
INT
VALUE_FIELD_6
INT
>
212
Sets the alarm colour of the input object (only PDM color).
The variable must be assigned in the visualisation.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
Integrate the requested function block into the application program and link the inputs and outputs
to the parameters and variables:
Create the requested visualisati page. In the example the three right elements are intended for
the input of the values:
When the input elements are configured with the internal parameters FIELD1...FIELD3 a frame is
shown for the selected input object (FIELDn = TRUE, alarm colour frame = black). For the other
objects it is not visible.
213
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
214
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
INPUT_REAL
3225
Symbol in CODESYS:
>
Description
3337
INPUT_REAL supports up to 6 input fields which can be assigned to 6 different objects in the
visualisation. The input objects are parameterised with the internal variables FIELD1...FIELD6,
COLOR_FIELD1...COLOR_FIELD6 and VALUE_FIELD1...VALUE_FIELD6.
The FB is an alternative to the input function integrated in CoDeSys and more flexible compared to the
CoDeSys input function.
The FB contains no visualisation elements.
215
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
INIT
BOOL
ENABLE
BOOL
FALSE:
TRUE:
FALSE:
INIT_VALUE
initialisation values for the input fields for the first call
NO_OF_FIELDS
BYTE
MIN_MAX_ARRAY
ESC
BOOL
TRUE:
FALSE:
INCREMENT
BOOL
DECREMENT
BOOL
ENTER:
BOOL
INCREMENT_VALUE
REAL
if KEY_INCREMENT_VALUE2 = FALSE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
KEY_INCREMENT_VALUE2
BOOL
INCREMENT_VALUE2
REAL
if KEY_INCREMENT_VALUE2 = TRUE:
The value is changed by this amount in the active input
field for INCREMENT / DECREMENT.
CLEAR_ALL_VALUE
BOOL
TRUE:
FALSE:
216
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
INPUT_ACTIV
BOOL
FIELDCOUNTER
BYTE
VALUE_FIELD1
REAL
...
REAL
VALUE_FIELD6
REAL
>
Internal parameters
3340
Parameter
Data type
Description
FIELD1
REAL
...
REAL
FIELD6
REAL
COLOR_FIELD1
REAL
...
REAL
COLOR_FIELD6
REAL
VALUE_FIELD_1
REAL
...
REAL
VALUE_FIELD_6
REAL
Sets the alarm colour of the input object (only PDM color).
The variable must be assigned in the visualisation.
217
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
INIT_VAR_RETAIN_DINT
3232
Symbol in CODESYS:
>
Description
3344
INIT_VAR_RETAIN_DINT initialises the array of INPUT_DINT ( page 207) indicated on the input
INIT_VALUE with remanent input values.
If input values are to be saved permanently, the values must be initialised after switching on the
display, otherwise they are overwritten in the first cycle. The FB initialises the array INIT_VALUE of
INPUT_DINT with remanent input values.
The function element compares the values of VALUE1...VALUE6 with the values of INIT_VALUE:
> If the contents of VALUE1...VALUE6 = 0, VALUE1...VALUE6 are written to the array INIT_VALUE.
>
218
If the contents of VALUE1...VALUE6 0, the elements of the array INIT_VALUE are written to
VALUE1...VALUE6.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
>
2015-08-27
ifm function elements for the device CR1201
The following INPUT function block is then initialised with INIT_VALUE in the first cycle.
Parameter
Data type
VALUE1
DINT
...
DINT
VALUE6
DINT
INIT_VALUE
Description
The variables VALUE_FIELDx of INPUT_DINT ( page
207) declared as retain must be indicated on this input.
If the contents of VALUE1...VALUE6 0, the elements of
the array INIT_VALUE are written to VALUE1...VALUE6.
>
Parameter
Data type
Description
INIT_VALUE
219
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
INIT_VAR_RETAIN_INT
3229
Symbol in CODESYS:
>
Description
3341
INIT_VAR_RETAIN_INT initialises the array of INPUT_INT ( page 210) indicated on the input
INIT_VALUE with remanent input values.
If input values are to be saved permanently, the values must be initialised after switching on the
display, otherwise they are overwritten in the first cycle. The FB initialises the array INIT_VALUE of
INPUT_INT with the remanent input values.
The function element compares the values of VALUE1...VALUE6 with the values of INIT_VALUE:
> If the contents of VALUE1...VALUE6 = 0, VALUE1...VALUE6 are written to the array INIT_VALUE.
>
220
If the contents of VALUE1...VALUE6 0, the elements of the array INIT_VALUE are written to
VALUE1...VALUE6.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
>
2015-08-27
ifm function elements for the device CR1201
The following INPUT function block is then initialised with INIT_VALUE in the first cycle.
Parameter
Data type
VALUE1
INT
...
INT
VALUE6
INT
INIT_VALUE
Description
The variables VALUE_FIELDx of INPUT_INT ( page 210)
declared as retain must be indicated on this input.
If the contents of VALUE1...VALUE6 0, the elements of
the array INIT_VALUE are written to VALUE1...VALUE6.
>
Parameter
Data type
Description
INIT_VALUE
221
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
INIT_VAR_RETAIN_REAL
3235
Symbol in CODESYS:
>
Description
3347
INIT_VAR_RETAIN_REAL initialises the array of INPUT_REAL ( page 215) indicated on the input
INIT_VALUE with remanent input values.
If input values are to be saved permanently, the values must be initialised after switching on the
display, otherwise they are overwritten in the first cycle. The FB initialises the array INIT_VALUE of
INPUT_INT with the remanent input values.
The function element compares the values of VALUE1...VALUE6 with the values of INIT_VALUE:
> If the contents of VALUE1...VALUE6 = 0, VALUE1...VALUE6 are written to the array INIT_VALUE.
>
222
If the contents of VALUE1...VALUE6 0, the elements of the array INIT_VALUE are written to
VALUE1...VALUE6.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
>
2015-08-27
ifm function elements for the device CR1201
The following INPUT function block is then initialised with INIT_VALUE in the first cycle.
Parameter
Data type
VALUE1
REAL
...
REAL
VALUE6
REAL
INIT_VALUE
Description
The variables VALUE_FIELDx declared as retain have to
be indicated to the FB INPUT_REAL.INPUT_REAL
( page 215)
If the contents of VALUE1...VALUE6 is not 0, the
elements of the array INIT_VALUE are written to
VALUE1...VALUE6.
>
Parameter
Data type
Description
INIT_VALUE
>
223
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
7.2.7
2015-08-27
ifm function elements for the device CR1201
PointOfContact .....................................................................................................................................225
19928
224
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
PointOfContact
18885
Description
18900
PointOfContact is a structured variable. It provides information about the point of contact of the
touchscreen and gives access to configuration options for visual feedback. The following table shows
details regarding the different structure variables.
Variable
Data type
Description
PointOfContact
POC
Structured variable
INT
PointOfContact.AfterGlow
PointOfContact.X
PointOfContact.Y
PointOfContact.ImagePath
INT
INT
STRING
-1
>0
Directory path to the memory location of the image file, containing the
user-specific pressure point image *
Possible values:
Standard screen is used (blue square, 30x30 pixels) (default
setting)
'path'
PointOfContact.Overlap
BOOL
TRUE
Legend:
* ...
** ...
225
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.8
226
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
VERSION
9688
Symbol in CODESYS:
>
Description
9698
The program VERSION indicates the version and history of the library in the comment of the function
element.
227
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
EXITPLC_START_APPLICATION
11702
Symbol in CODESYS:
>
Description
11705
Parameter
Data type
Description
APPLICATION
STRING(80)
APP_PARAM1
STRING(255)
>
Parameter
Data type
Description
RESULT
INT
Description
01
242
F2
228
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
SYSTEM_ASYNCH
9693
Symbol in CODESYS:
>
Description
9700
SYSTEM_ASYNCH sends any command (max. 255 characters) to the Linux operating system. The
command is processed asynchronously in the background.
The function block must be executed (EXECUTE = TRUE) until the FB output DONE = TRUE.
Proper Linux knowledge is required to use the function element!
Monitor the function element using timeout functions!
>
Parameter
Data type
Description
EXECUTE
BOOL
COMMAND
STRING (255)
>
Parameter
Data type
Description
DONE
BOOL
BUSY
BOOL
ERROR
BOOL
RET_VAL
WORD
FALSE:
229
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.9
Here we describe the RAW-CAN function blocks (CAN Layer 2) of ifm electronic to be used in the
application program.
230
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
231
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_ENABLE
7492
Symbol in CODESYS:
>
Description
7494
With CAN_ENABLE the CAN hardware is initialised. Without this call no other calls are possible in
RAW-CAN or they return an error.
In order to change the baud rate the following procedure is required:
Maintain the function block on ENABLE=FALSE for the duration of one cycle.
> All protocols are reset.
> Re-initialisation of the CAN interface and the CAN protocols running on it. Any information
available for cyclical transmission is lost as well and must be newly created.
> At renewed ENABLE=TRUE, the new baud rate is adopted.
>
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
CHANNEL
BYTE
BAUDRATE
WORD := 250
Baudrate [kbits/s]
Permissible = 20, 50, 100, 125, 250, 500, 1000
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
09
242
F2
232
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RECOVER
7512
Symbol in CODESYS:
>
Description
7513
>
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
CHANNEL
BYTE
RECOVER_EXECUTE
BOOL
InhibitTime
(optional use of the parameter)
TIME := T#1s
Waiting time between bus off and restart of the CAN interface
233
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CAN_SETDOWNLOADID
7516
= Set download ID
Unit type = function block (FB)
Unit is contained in the library ifm_RawCAN_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7517
The download ID is required for data exchange when connecting the runtime system and the
CODESYS development environment. When the device is started the download ID is set with the
default value from the hardware configuration.
With CAN_SETDOWNLOADID this value can be set in the PLC program (e.g. using certain inputs).
The changed ID is also written into the hardware configuration.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
DOWNLOAD_ID
BYTE
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
234
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_STATUS
7499
Symbol in CODESYS:
>
Description
7501
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
CHANNEL
BYTE
CLEAR
BOOL := FALSE
TRUE:
FALSE:
235
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
BAUDRATE
WORD
DOWNLOAD_ID
BYTE
current download ID
BUSOFF
BOOL
WARNING_RX
BOOL
WARNING_TX
BOOL
VERSION
DWORD
BUSLOAD
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
08
09
242
F2
236
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
237
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RX
7586
Symbol in CODESYS:
>
Description
7588
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID
DWORD
>
Parameter
Data type
Description
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
238
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RX_ENH
7606
= CAN RX enhanced
Unit type = function block (FB)
Unit is contained in the library ifm_RawCAN_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7608
In addition, CAN_RX_ENH provides the following possibilities (as opposed to CAN_RX ( page 238)):
select the frame type (11 or 29 bits),
define a mask for the evaluation of the CAN ID.
Bit comparison of
ID and mask:
The CAN IDs with the following bit pattern are evaluated:
0bxxx1 0000 xxx0 (x = any), i.e. for this example (all in [hex]):
100, 102, 104, 106, 108, 10A, 10C, 10E,
300, 302, 304, 306, 308, 30A, 30C, 30E,
500, 502, 504, 506, 508, 50A, 50C, 50E,
700, 702, 704, 706, 708, 70A, 70C, 70E
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
ID_Mask
(optional use of the parameter)
DWORD := 0
239
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
MATCHED_ID
DWORD
DATALENGTHCOUNT
BYTE
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
240
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RX_ENH_FIFO
7615
Symbol in CODESYS:
>
Description
7616
In addition, CAN_RX_ENH_FIFO provides a FiFo for the received data (as opposed to CAN_RX_ENH
( page 239)). Thus several CAN messages can be received in one cycle.
No overwriting takes place when the FiFo is full. Inbound messages will be lost.
In this event:
Deactivate and reactive the FB via ENABLE.
> The FiFo is deleted and can be newly filled.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
ID_Mask
(optional use of the parameter)
DWORD := 0
241
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
MATCHED_ID
DWORD
DATALENGTHCOUNT
BYTE
DATA
MORE_DATA_AVAILABLE
BOOL
TRUE:
FALSE:
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
250
FA
242
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RX_RANGE
7592
Symbol in CODESYS:
>
Description
7594
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID_START
DWORD
ID_STOP
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
243
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
ID
DWORD
DATALENGTHCOUNT
BYTE
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
244
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_RX_RANGE_FIFO
7601
Symbol in CODESYS:
>
Description
7603
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID_START
DWORD
ID_STOP
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
245
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
ID
DWORD
DATALENGTHCOUNT
BYTE
DATA
MORE_DATA_AVAILABLE
BOOL
TRUE:
FALSE:
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
250
FA
246
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
247
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_TX
7522
Symbol in CODESYS:
>
Description
7523
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID
DWORD
DATA
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
250
FA
>
248
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_TX_ENH
7558
= CAN TX enhanced
Unit type = function block (FB)
Unit is contained in the library ifm_RawCAN_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7559
Additional setting options are offered through CAN_TX_ENH (for: enhanced). Here, all CAN specific
characteristics can be set individually, e.g.:
Is it an 11 or a 29 bit identifier?
>
The additional inputs can be preset so that CAN_TX ( page 248) is not required.
If an instance of this FB is called several times during a cycle, the data is also sent several times.
>
Parameter
Data type
Description
ENABLE
BOOL
FALSE:
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
DATALENGTHCODE
BYTE
DATA
249
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
250
FA
250
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_TX_ENH_CYCLIC
7568
Symbol in CODESYS:
>
Description
7569
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
DataLengthCode
(optional use of the parameter)
BYTE := 8
DATA
PERIOD
TIME
period duration
251
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
08
09
250
FA
252
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
253
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_REMOTE_REQUEST
7625
Symbol in CODESYS:
>
Description
7627
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
>
Parameter
Data type
Description
DATALENGTHCOUNT
BYTE
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
254
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
255
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CAN_REMOTE_RESPONSE
7631
Symbol in CODESYS:
>
Description
7633
CAN_REMOTE_RESPONSE provides data to the CAN controller in the device which is automatically
sent upon the request of a remote message.
This FB strongly depends on the device type. Only a limited number of remote messages can be set
up:
BasicController: CR040n, CR041n, CR043n
BasicDisplay: CR045n
>
Parameter
Data type
Description
ENABLE
BOOL
FALSE:
CHANNEL
BYTE
ID
DWORD
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
DATALENGTHCODE
BYTE
DATA
256
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
06
07
257
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.10
For CANopen, ifm electronic provides a number of function elements which will be explained in the
following.
258
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
259
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_ENABLE
7785
Symbol in CODESYS:
>
Description
7787
In the application program always call an own instance of the FB CANOPEN_ENABLE ( page
260) for every CAN interface!
To avoid guarding or heartbeat errors the nodes must be "shut down" via an appropriate sequence
first.
If the master is restarted after a stop, all other connected nodes also have to be re-initialised.
Without CANOPEN_ENABLE, the CANopen master is started automatically, as far as this has been
selected in the configuration.
The configured baud rate is only adopted if CAN_ENABLE ( page 232) has not been activated before.
>
Parameter
Data type
Description
ENABLE
BOOL := TRUE
TRUE:
Enable CANopen for the selected channel
Start CANopen manager or CANopen device
according to the configuration settings
FALSE:
Disable CANopen for the selected channel
Terminate CANopen manager or CANopen device
CHANNEL
BYTE
Baud rate
(optional use of the parameter)
WORD := 0
260
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameters
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
14
0E
FB is active
CANopen manager configures devices and sends SDOs
15
0F
FB is active
CANopen manager is started
238
EE
239
EF
242
F2
261
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_GETBUFFERFLAGS
7890
Symbol in CODESYS:
>
Description
7892
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
ResetRXFlags
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
ResetTXFlags
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
262
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
RXOVFL
BOOL
RXWARN
BOOL
TXOVFL
BOOL
TXWARN
BOOL
RESULT
BYTE
TRUE:
FALSE:
FALSE:
FALSE:
FALSE:
Description
00
FB is inactive
01
08
242
F2
263
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_GETSTATE
7865
= Get state
Unit type = function block (FB)
Unit is contained in the library ifm_CANopen_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7867
Via CANOPEN_GETSTATE, parameters of the master, a slave device or a specific node in the
network can be set.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
264
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
MASTERSTATE
BYTE
PLCNODEID
BYTE
PLCBAUDRATE
DWORD
PLCVERSION
DWORD
PLC version
CANSTATE
BYTE
NODESTATE
BYTE
Node state = internal node state of a slave seen from the master's
perspective. The input NODEID identifies the node.
-1 = 0xFF = reset after ResetNode
1 = 0x01 = waiting for BOOTUP
2 = 0x02 = after receipt of the BOOTUP message
3 = 0x03 = not yet configured: STOPPED
4 = 0x04 = after configuration with SDOs: PRE-OPERATIONAL
5 = 0x05 = after starting the node: OPERATIONAL
97 = 0x61 = optional node
98 = 0x62 = other device type configured than in 0x1000
99 = 0x63 = node guarding
LASTNODESTATE
BYTE
RESULT
BYTE
0x00
BOOTUP
0x04
STOPPED
0x05
OPERATIONAL
127
0x7F
PRE-OPERATIONAL
Description
00
FB is inactive
01
08
242
F2
265
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SETSTATE
7858
= Set state
Unit type = function block (FB)
Unit is contained in the library ifm_CANopen_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7860
Via CANOPEN_SETSTATE, parameters of the master, a slave device or a node in the network can be
set.
The treatment of the NMT state of master, node or device is carried out in the CAN stack or via the
commands of the FB CANOPEN_NMTSERVICES ( page 270). At the same time admissibility checks are
carried out. For reasons of consistency no inputs are provided for this purpose.
266
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
GlobalStart
(optional use of the parameter)
CfgTimeout
(optional use of the parameter)
BOOL := TRUE
TIME := T#0ms
FALSE:
InitNoSdos
(optional use of the parameter)
BOOL := FALSE
FALSE:
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
267
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
268
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_GETNMTSTATESLAVE
7851
Symbol in CODESYS:
>
Description
7853
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
>
Parameter
Data type
Description
NMTSTATE
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
269
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_NMTSERVICES
7843
Symbol in CODESYS:
>
Description
7844
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
NMTSERVICE
BYTE
network command
0 = init node (except master)
1 = enter PRE-OPERATIONAL
2 = start node
3 = reset node
4 = reset communication
5 = stop node
Timeout
(optional use of the parameter)
TIME := T#0ms
270
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
35
23
36
24
37
25
043
2B
241
F1
242
F2
271
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
272
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_GETODCHANGEDFLAG
7927
Symbol in CODESYS:
>
Description
7928
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
IDX
WORD
SUBIDX
BYTE
>
Parameter
Data type
Description
DATA
DWORD
parameter value
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
273
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_READOBJECTDICT
7933
Symbol in CODESYS:
>
Description
7935
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
IDX
WORD
SUBIDX
BYTE
>
Parameter
Data type
Description
DATA
DWORD
parameter value
RESULT
BYTE
Description
00
FB is inactive
01
08
40
28
242
F2
274
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_WRITEOBJECTDICT
7940
Symbol in CODESYS:
>
Description
7942
NOTICE
This could lead to falsification of important system settings, e.g.:
- guarding times
- heartbeat times
Carefully verify input parameters!
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
IDX
WORD
SUBIDX
BYTE
DATA
DWORD
parameter value
275
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
40
28
242
F2
276
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Here you will find ifm function elements for CANopen handling of Service Data Objects (SDOs).
277
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SDOREAD
7791
= SDO read
Unit type = function block (FB)
Unit is contained in the library ifm_CANopen_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7793
CANOPEN_SDOREAD is an easy function block for editing "Expedited SDOs", i.e. SDOs with max.
4 bytes of user data. This type usually represents the bigger part of the SDO communication.
Expedited SDO = Expedited Service Data Object
A considerable amount of memory space can be saved due to the limitation of the data volume to
max. 4 bytes of user data, as this FB only needs to reserve 4 bytes as buffer storage and does not
create a large data array itself.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
ID of the node
permissible values = 1...127 = 0x01...0x7F
IDX
WORD
SUBIDX
BYTE
Timeout
(optional use of the parameter)
TIME := T#10ms
278
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
LEN
BYTE
DATA
DWORD
RESULT
BYTE
Description
00
FB is inactive
01
05
32
20
33
21
TIMEOUT elapsed
242
F2
255
FF
279
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SDOREADBLOCK
14942
Symbol in CODESYS:
>
Description
14943
CANOPEN_SDOREADBLOCK reads the indicated entry in the object directory of a node in the
network via SDO block transfer.
> If the node doesn't support block transfer, the FB automatically changes to "segmented transfer".
You can also directly change to "segmented transfer" via the input.
> The COB ID for the SDO is calculated from the transmitted node ID.
The length of multiframe SDOs is generally not limited.
For systems without a file system (e.g. BasicController CR04nn) the following applies:
transmit an address to the FB which is accessed by the pointer for writing. The memory area
determined by the start address DATA and the amount of data MAX_LEN must be available!
> If the amount of data is greater than indicated, the transfer is stopped and signalled via RESULT.
For systems with a file system (e.g. PDM360NG CR108n) the following applies:
transmit the path and name of a file to the FB, in which the data is to be saved in binary format.
> The output RESULT provides information on the status of the SDO transmission.
280
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
IDX
WORD
SUBIDX
BYTE
DATA
DWORD
FILE
STRING(80)
Path and file name for storage of the received data in binary format
Input without function for device without file system
(BasicSystem).
MAX_LEN
DWORD
SegmentedTransfer
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
Timeout
(optional use of the parameter)
TIME := T#10ms
>
Parameter
Data type
Description
LEN
DWORD
RESULT
BYTE
Description
00
FB is inactive
01
16
10
17
11
32
20
33
21
TIMEOUT elapsed
64
40
65
41
66
42
242
F2
>
281
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_SDOREADMULTI
7806
Symbol in CODESYS:
>
Description
7808
CANOPEN_SDOREADMULTI reads the indicated entry in the object directory of a node in the
network. The COB ID for the SDO is calculated from the transmitted node ID according to CANopen
convention.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
IDX
WORD
SUBIDX
BYTE
Timeout
(optional use of the parameter)
TIME := T#10ms
282
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
LEN
DWORD
DATA
ARRAY [0..SDOMAXDATA] OF buffer memory for user data of the SDO data transmission
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
05
32
20
33
21
TIMEOUT elapsed
242
F2
255
FF
283
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SDOWRITE
7825
= SDO write
Unit type = function block (FB)
Unit is contained in the library ifm_CANopen_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7826
CANOPEN_SDOWRITE is an easy function block for editing "Expedited SDOs", i.e. SDOs with max.
4 bytes user data. This type usually represents the bigger part of the SDO communication.
Expedited SDO = expedited service data object
A considerable amount of memory space can be saved due to the limitation of the data volume to
max. 4 bytes of user data because this FB only needs to reserve 4 bytes as buffer storage and does
not create a large data array itself.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
ID of the node
permissible values = 1...127 = 0x01...0x7F
IDX
WORD
SUBIDX
BYTE
LEN
BYTE
DATA
Timeout
(optional use of the parameter)
TIME := T#10ms
284
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
32
20
33
21
TIMEOUT elapsed
242
F2
285
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SDOWRITEBLOCK
14961
Symbol in CODESYS:
>
Description
14963
CANOPEN _SDOWRITEBLOCK writes in the indicated entry in the object directory of a node in the
network via SDO block transfer.
You can change to segmented transfer via the FB input if required.
> The COB ID for the SDO is calculated from the transmitted node ID.
> The output RESULT provides information on the status of the SDO transmission.
The length of multiframe SDOs is generally not limited.
For systems without a file system (e.g. BasicController CR04nn) the following applies:
transmit an address to the FB which is accessed by the pointer for reading.
For systems with a file system (e.g. PDM360NG CR108n) the following applies:
Transmit the path and name of a file to the FB, from which the data is to be read in binary format.
286
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
IDX
WORD
SUBIDX
BYTE
LEN
DWORD
DATA
DWORD
FILE
STRING(80)
Path and file name for reading of the data to be transmitted in binary
format
Input without function for device without file system
(BasicSystem).
SegmentedTransfer
(optional use of the parameter)
BOOL := FALSE
Timeout
(optional use of the parameter)
TIME := T#10ms
TRUE:
FALSE:
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
16
10
17
11
32
20
33
21
TIMEOUT elapsed
65
41
242
F2
287
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_SDOWRITEMULTI
7832
Symbol in CODESYS:
>
Description
7834
CANOPEN_SDOWRITEMULTI writes the indicated entry in the object directory of a node in the
network. The COB ID for the SDO is calculated from the transmitted node ID according to CANopen
convention.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
NODE
BYTE
ID of the node
permissible values = 1...127 = 0x01...0x7F
IDX
WORD
SUBIDX
BYTE
LEN
DWORD
DATA
ARRAY [0..SDOMAXDATA] OF buffer memory for user data of the SDO data transmission
BYTE
Timeout
(optional use of the parameter)
TIME := T#10ms
288
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
32
20
33
21
TIMEOUT elapsed
242
F2
289
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
290
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
CANOPEN_GETSYNCSTATE
7871
Symbol in CODESYS:
>
Description
7872
CANOPEN_GETSYNCSTATE reads...
the setting of the SYNC functionality (active / not active),
the error state of the SYNC functionality (SyncError).
If the PLC CAN runs as CANopen slave, it is signalled via this FB whether SYNC signals are absent or
appear regularly.
Synchronous PDOS etc. are handled in the CAN stack. CANOPEN_GETSYNCSTATE, however,
provides the error state so that the application program can react accordingly.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
291
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
SYNC
BOOL
SYNC is activated:
SYNCERROR
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
292
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_SETSYNCSTATE
7883
Symbol in CODESYS:
>
Description
7884
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
SYNC
BOOL
SYNC is activated:
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
38
26
242
F2
293
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
294
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_GETGUARDHBERRLIST
7896
Symbol in CODESYS:
>
Description
7898
CANOPEN_GETGUARDHBERRLIST lists all nodes in an array for which the master has detected an
error:
guarding error
heartbeat error
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
ResetList
(optional use of the parameter)
BOOL := FALSE
FALSE:
295
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
N_NODES
WORD
NODEID
ARRAY
[0..MAXGUARDERROR] OF
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
296
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_GETGUARDHBSTATSLV
7902
Symbol in CODESYS:
>
Description
7904
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
Reset
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
297
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
GUARDSTATE
BYTE
PROD_HBSTATE
BYTE
CONS_HBSTATE
BYTE
CONS_HBCOBID
WORD
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
298
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
299
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_GETEMCYMESSAGES
7921
Symbol in CODESYS:
>
Description
7923
CANOPEN_GETEMCYMESSAGES returns all emergency messages that have been received by the
controller from other nodes in the network since the last deletion of messages.
The list can be reset by setting the according input. A maximum of MAXEMCYMSGS messages is
stored. Each message contains information from which the node it was sent. The most recent
message is in index 0.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
RstList
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
300
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
N_MSGS
DWORD
EMCY
ARRAY [0..MAXEMCYMSGS]
OF T_EMCY
Emergency messages
The most recent entry is in index 0.
Structure of T_EMCY:
.NODEID
.EEC
.ER
Error register
.MSEF
MAXEMCYMSG = 10
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
301
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_GETERRORREGISTER
7915
Symbol in CODESYS:
>
Description
7917
CANOPEN_GETERRORREGISTER reads the error registers 0x1001 and 0x1003 from the controller.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
Reset_1001
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
Reset_1003
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
302
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
ER
BYTE
ERROR_FIELD
ARRAY [0..MAXERR] OF
DWORD
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
303
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
CANOPEN_SENDEMCYMESSAGE
7908
Symbol in CODESYS:
>
Description
7910
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
ERRORACTIVE
BOOL
EEC
WORD
ER
(optional use of the parameter)
BYTE := 0
MSEF
Write1003
(optional use of the parameter)
BOOL := FALSE
TRUE:
FALSE:
SendSysStatus
(optional use of the parameter)
BOOL := FALSE
304
FALSE:
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
39
27
242
F2
305
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
7.2.11
For SAE J1939, ifm electronic provides a number of function elements which will be explained in the
following.
306
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
307
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_ENABLE
7641
Symbol in CODESYS:
>
Description
7642
If an ifm controller communicates with only one engine controller via J1939:
set ACE = FALSE.
>
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
CHANNEL
BYTE
Baud rate
(optional use of the parameter)
WORD := 250
PreferredAddress
(optional use of the parameter)
BYTE = 252
Ace
(optional use of the parameter)
BOOL := TRUE
308
TRUE:
FALSE:
No address claiming
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
09
242
F2
309
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_GETDABYNAME
7664
Symbol in CODESYS:
>
Description
7665
Via J1939_GETDABYNAME, the target address of one or several participants can be determined by
means of the name information.
310
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
IndustryGroup
(optional use of the parameter)
BYTE = 0xFF
VehicleSystemInstance
(optional use of the parameter)
BYTE := 0xFF
VehicleSystem
(optional use of the parameter)
BYTE := 0xFF
vehicle system
permissible values = 0...127 = 0x00...0x7F
255 = 0xFF = filter for all
nFunction
(optional use of the parameter)
WORD := 0xFFFF
FunctionInstance
(optional use of the parameter)
BYTE := 0xFF
ECUInstance
(optional use of the parameter)
BYTE := 0xFF
ManufacturerCode
(optional use of the parameter)
WORD := 0xFFFF
IdentityNumber
(optional use of the parameter)
>
Parameter
Data type
Description
DA
NUMBER
BYTE
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
311
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_NAME
7646
Symbol in CODESYS:
>
Description
7648
Via J1939_NAME, the device can be given a name for identification in the network.
By default the name of ifm is used.
The user has the following options to change the name of the device:
use the information from the CFG file or
overwrite the requested data via J1939_NAME.
> If no value or a default value is set at the optional inputs:
the preset value is not overwritten.
The following list shows the composition of the 64 bit NAME information according to SAE J1939-81:
Parameter
Data type
Description
1 bit
industry group
3 bits
4 bits
vehicle system
7 bits
vehicle system
reserved
1 bit
reserved
function
8 bits
function instance
5 bits
ECU instance
3 bits
manufacturer code
11 bits
identify number
21 bits
312
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
Fixed address
CHANNEL
BYTE
IndustryGroup
(optional use of the parameter)
BYTE = 0xFF
VehicleSystemInstance
(optional use of the parameter)
BYTE := 0xFF
VehicleSystem
(optional use of the parameter)
BYTE := 0xFF
vehicle system
permissible values = 0...127 = 0x00...0x7F
255 = 0xFF = filter for all
nFunction
(optional use of the parameter)
WORD := 0xFFFF
FunctionInstance
(optional use of the parameter)
BYTE := 0xFF
ECUInstance
(optional use of the parameter)
BYTE := 0xFF
ManufacturerCode
(optional use of the parameter)
WORD := 0xFFFF
IdentityNumber
(optional use of the parameter)
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
242
F2
313
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_STATUS
7670
Symbol in CODESYS:
>
Description
7672
Via J1939_STATUS, relevant information can be read back to the J1939 stack.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
>
Parameter
Data type
Description
SA
BYTE
CYCLIC
WORD
TIMEOUT
BYTE
source address of the node which did not provided data for the
process image in due time
255 = 0xFF = all nodes sent the data in due time
VERSION
DWORD
RESULT
BYTE
Description
00
FB is inactive
01
Protocol is active
02
03
04
Address lost
242
F2
>
314
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
315
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_SPEC_REQ
15023
Symbol in CODESYS:
>
Description
15026
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
PGN
DWORD
DA
BYTE
316
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
PRIO
BYTE
LEN
WORD
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
64
40
242
F2
317
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_SPEC_REQ_MULTI
15033
Symbol in CODESYS:
>
Description
15036
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
PGN
DWORD
DA
BYTE
318
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
PRIO
BYTE
LEN
WORD
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
242
F2
319
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
320
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_RX
7724
Symbol in CODESYS:
>
Description
7725
J1939_RX is the easiest method for receiving single frame messages. The message read last on the
CAN bus is returned.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
PGN
DWORD
Parameter
Data type
Description
SA
BYTE
PRIO
BYTE
LEN
WORD
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
09
242
F2
321
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_RX_FIFO
7732
Symbol in CODESYS:
>
Description
7733
J1939_RX_FIFO enables receipt of all specified messages and their successive reading from a FIFO.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
PGN
DWORD
322
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
SA
BYTE
PRIO
BYTE
LEN
BYTE
DATA
MORE_DATA_AVAILABLE
BOOL
TRUE:
FALSE:
RESULT
BYTE
Description
00
FB is inactive
01
05
242
F2
250
FA
323
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_RX_MULTI
7736
Symbol in CODESYS:
>
Description
7741
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
PGN
DWORD
Parameter
Data type
Description
SA
BYTE
PRIO
BYTE
LEN
WORD
DATA
RESULT
BYTE
Description
00
FB is inactive
01
05
242
F2
324
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
325
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_TX
7688
Symbol in CODESYS:
>
Description
7689
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
DA
BYTE := 249
PGN
DWORD
DATA
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
250
FA
326
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_TX_ENH
7696
= J1939 TX enhanced
Unit type = function block (FB)
Unit is contained in the library ifm_J1939_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7697
Additional setting options are provided by J1939_TX_ENH (for: enhanced) for single frame messages:
transmitting priority
data length
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
DA
BYTE := 249
Prio
(optional use of the parameter)
BYTE := 3
message priority
permissible values = 07
PGN
DWORD
Len
(optional use of the parameter)
BYTE := 8
DATA
327
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
250
FA
328
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_TX_ENH_CYCLIC
7716
Symbol in CODESYS:
>
Description
7718
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
DA
BYTE := 249
Prio
(optional use of the parameter)
BYTE := 3
message priority
permissible values = 07
PGN
DWORD
Len
(optional use of the parameter)
BYTE := 8
DATA
PERIOD
TIME
period duration
329
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
08
242
F2
330
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_TX_ENH_MULTI
7699
Symbol in CODESYS:
>
Description
7705
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
DA
BYTE := 249
Prio
(optional use of the parameter)
BYTE := 3
message priority
permissible values = 07
PGN
DWORD
Len
(optional use of the parameter)
BYTE := 8
DATA
Bam
(optional use of the parameter)
BOOL := FALSE
FALSE:
331
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
08
65
41
242
F2
332
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
333
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_DM1RX
14977
Symbol in CODESYS:
>
Description
7761
Parameter
Data type
Description
ENABLE
BOOL := FALSE
TRUE:
FALSE:
CHANNEL
BYTE
DA
BYTE
ACTIVE
BOOL
334
TRUE:
FALSE:
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
REDSTOPLAMP
BOOL
AMBERWARNINGLAMP
BOOL
PROTECTLAMP
BOOL
ON
OFF
ON
OFF
ON
OFF
NUMBER
BYTE
SPN
WORD
FMI
BYTE
SPN_CM
BOOL
conversion method
OC
BYTE
occurrence count
RESULT
BYTE
MIL_FC
BYTE
REDSTOPLAMP_FC
BYTE
AMBERWARNINGLAMP_FC
BYTE
PROTECTLAMP_FC
BYTE
Description
00
FB is inactive
01
08
242
F2
335
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_DM1TX
14993
Symbol in CODESYS:
>
Description
7747
With J1939_TX_DM1 (DM = Diagnostic Message) the controller can only transmit an active error
message to the CAN stack.
> This message is stored in the hardware configuration.
> The message is marked "active" and transmitted once per second as DM1.
> If the error has already occurred, the event counter is incremented.
The event counter is managed by the CAN stack.
> A disjunction of all bits of the trouble codes is executed. As soon as a bit is set in one of the
trouble codes, it is equally set in the lamp state.
Upon arrival of a request at DM2, the CAN stack can read the according information from the
hardware configuration and transmit it.
> When a DM3 message arrives, all inactive errors are deleted in the error memory in the hardware
configuration.
336
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
ACTIVE
BOOL
TRUE:
DTC is active
Cyclically transmitted (1x per second) as DM1
FALSE:
REDSTOPLAMP
BOOL
AMBERWARNINGLAMP
BOOL
PROTECTLAMP
BOOL
ON
OFF
ON
OFF
ON
OFF
SPN
WORD
FMI
BYTE
SPN_CM
BOOL
conversion method
MIL_FC
BYTE
REDSTOPLAMP_FC
BYTE
AMBERWARNINGLAMP_FC
BYTE
PROTECTLAMP_FC
BYTE
337
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
338
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
>
J1939_DM1TX_CFG
15424
Symbol in CODESYS:
>
Description
15426
As from runtime system V03.00.03 the CAN stack automatically sends a DM1 message every second
as soon as the FB J1939_ENABLE ( page 308) is called for the corresponding CAN interface.
Use the FB J1939_DM1TX_CFG if you do not want the CAN stack to automatically and cyclically
transmit DM1 messages.
The FB offers the following modes for cyclic transmission of DM1 messages:
MODE = 0
(preset)
The CAN stack sends DM1 "zero active faults" messages in compliance with standards every second.
A manual transmission of DM1 messages via the FB J1939_DM1TX ( page 336)is possible.
MODE = 1
The CAN stack does not send DM1 "zero active faults" messages.
DM2 requests are answered automatically.
A manual transmission of DM1 messages via the FBJ1939_DM1TX ( page 336) is possible.
MODE = 2
The CAN stack does not send cyclic DM1 "zero active faults" messages
Nor does the CAN stack automatically reply to DM2 requests.
>
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
FALSE:
CHANNEL
BYTE
MODE
BYTE := 0
339
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
340
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
ifm function elements
2015-08-27
ifm function elements for the device CR1201
>
J1939_DM3TX
15002
Symbol in CODESYS:
>
Description
15004
With J1939_DM3TX (DM = Diagnostic Message) you can delete the inactive DTCs on another device.
> As soon as a DM3 message is received, all inactive errors in the error memory are deleted in the
hardware configuration.
>
Parameter
Data type
Description
EXECUTE
BOOL := FALSE
CHANNEL
BYTE
DA
BYTE
>
Parameter
Data type
Description
RESULT
BYTE
Description
00
FB is inactive
01
242
F2
341
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Diagnosis and error handling
2015-08-27
ifm function elements for the device CR1201
Diagnosis ..............................................................................................................................................343
Fault ......................................................................................................................................................343
Response to system errors...................................................................................................................343
CAN / CANopen: errors and error handling..........................................................................................343
19598
342
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Diagnosis and error handling
2015-08-27
Diagnosis
>
8.1
Diagnosis
19601
During the diagnosis, the "state of health" of the device is checked. It is to be found out if and what
faults are given in the device.
Depending on the device, the inputs and outputs can also be monitored for their correct function.
- wire break,
- short circuit,
- value outside range.
For diagnosis, configuration and log data can be used, created during the "normal" operation of the
device.
The correct start of the system components is monitored during the initialisation and start phase.
Errors are recorded in the log file.
For further diagnosis, self-tests can also be carried out.
>
8.2
Fault
19602
A fault is the state of an item characterized by the inability to perform the requested function, excluding
the inability during preventive maintenance or other planned actions, or due to lack of external
resources.
A fault is often the result of a failure of the item itself, but may exist without prior failure.
In ISO 13849-1 "fault" means "random fault".
>
8.3
In principle, the programmer is responsible to react to the error messages in the application program.
An error description is provided via the error message.
> The system resets the error message as soon as the error causing state is not present anymore.
>
8.3.1
8.4
343
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CAN / CANopen: errors and error handling
Annex
Additionally to the indications in the data sheets you find summary tables in the annex.
344
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
>
9.1
NOTE
In the Ethernet network every IP address MUST be unique.
The following IP addresses are reserved for network-internal purposes and are therefore not allowed
as an address for participants: nnn.nnn.nnn.0 | nnn.nnn.nnn.255.
Only network participants whose subnet mask is identical and whose IP addresses are identical with
respect to the subnet mask can communicate with each other.
Rule:
If part of the subnet mask = 255, the corresponding IP address parts must be identical.
If part of the subnet mask = 0, the corresponding IP address parts must be different.
If the subnet mask = 255.255.255.0, 254 participants communicating with each other are possible in
the network.
If the subnet mask = 255.255.0.0, 256x254 = 65 024 participants communicating with each other are
possible in the network.
In the same physical network different subnet masks of the participants are allowed. They form
different groups of participants which cannot communicate with groups of participants having other
subnet masks.
In case of doubt or problems please contact your system administrator.
Examples:
Participant A
IP address
Participant A
Subnet mask
Participant B
IP address
Participant B
Subnet mask
Communication of
participants possible?
192.168.82.247
255.255.255.0
192.168.82.10
255.255.255.0
192.168.82.247
255.255.255.0
192.168.82.247
255.255.255.0
No (same IP address)
192.168.82.247
255.255.255.0
192.168.82.10
255.255.0.0
192.168.82.247
255.255.255.0
192.168.116.10
255.255.255.0
No (different IP address
range:
82 vs. 116)
192.168.222.213
255.255.0.0
192.168.222.123
255.255.0.0
192.168.111.213
255.255.0.0
192.168.222.123
255.255.0.0
192.168.82.247
255.255.255.0
192.168.82.0
255.255.255.0
345
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
System flags
>
9.2
System flags
The addresses of the system flags can change if the PLC configuration is extended.
While programming only use the symbol names of the system flags!
346
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
System flags
>
9.2.1
Data type
Access
Description
LIGHT_SENSOR
BYTE
SUPPLY_VOLTAGE
WORD
CLAMP_15_VOLTAGE
BOOL
TEMPERATURE1
INT
TEMPERATURE2
INT
BACKLIGHT
BYTE
r/w
SUPPLY_SWITCH
BOOL
r/w
CLAMP_15_SWITCHING_THRESHO
LD
WORD
r/w
Legend:
r ...
r/w ...
read only
read and write
347
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
System flags
>
9.2.2
Data type
IN00
BOOL
Access
r
Description
Status on binary input 00
Requirement: input is configured as binary input
(MODE = IN_DIGITAL_H)
TRUE:
FALSE:
OUT00
BOOL
r/w
output activated
output deactivated
Legend:
r ...
r/w ...
read only
read and write
>
9.2.3
Data type
LED
INT
r/w
LED_X
INT
r/w
LED_MODE
INT
r/w
Legend:
r ...
r/w ...
348
read only
read and write
Access
Description
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
System flags
>
9.2.4
The operating elements of the device are systematically numbered. Numbering of the operating
elements ( page 132)
Data type
Access
Description
KEY_PRESSED
BOOL
KEY_CHANGED
BOOL
EDIT_MODE_ACTIVE
BOOL
KEYx_KEYCODE
WORD
KEYx_y
BOOL
RT_KEYx_y
BOOL
FT_KEYx_y
BOOL
AR_KEYx_y
BOOL
MD_KEYx_y
STRING(31)
r/w
ME_KEYx_y
STRING(31)
r/w
LED_KEYx_y
BOOL
r/w
KEY_AUTOREPEAT_DELAY
TIME
r/w
Delay time until the pulse starts when the key remains
pressed
KEY_AUTOREPEAT_PERIOD
TIME
r/w
LED_MAX_VALUE
BYTE
r/w
LED_NIGHT
BOOL
r/w
LED_NIGHT_VALUE
BYTE
r/w
Legend:
x ...
y ...
r ...
r/w ...
1, 3 (ID of the group of keys Numbering of the operating elements ( page 132))
1...7 (ID of the function key within the group of keys Numbering of the operating elements ( page 132))
read only
read and write
349
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
System flags
>
9.2.5
The operating elements of the device are systematically numbered. Numbering of the operating
elements ( page 132)
Data type
KEY3_LEFT
BOOL
KEY3_RIGHT
BOOL
KEY3_UP
BOOL
KEY3_DOWN
BOOL
KEY3_PUSH
BOOL
RT_KEY3_LEFT
BOOL
RT_KEY3_RIGHT
BOOL
RT_KEY3_UP
BOOL
RT_KEY3_DOWN
BOOL
RT_KEY3_PUSH
BOOL
FT_KEY3_LEFT
BOOL
FT_KEY3_RIGHT
BOOL
FT_KEY3_UP
BOOL
FT_KEY3_DOWN
BOOL
FT_KEY3_PUSH
BOOL
AR_KEY3_LEFT
BOOL
AR_KEY3_RIGHT
BOOL
AR_KEY3_UP
BOOL
AR_KEY3_DOWN
BOOL
AR_KEY3_PUSH
BOOL
MD_KEY3_LEFT
STRING(31)
r/w
MD_KEY3_RIGHT
STRING(31)
r/w
MD_KEY3_UP
STRING(31)
r/w
350
Access
Description
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
System flags
Data type
Access
Description
MD_KEY3_DOWN
STRING(31)
r/w
MD_KEY3_PUSH
STRING(31)
r/w
ME_KEY3_LEFT
STRING(31)
r/w
ME_KEY3_RIGHT
STRING(31)
r/w
ME_KEY3_UP
STRING(31)
r/w
ME_KEY3_DOWN
STRING(31)
r/w
ME_KEY3_PUSH
STRING(31)
r/w
LED_NAVIGATION_SWITCH
BOOL
r/w
Legend:
r ...
r/w ...
read only
read and write
>
9.2.6
Data type
ERROR_TEMPERATURE
BOOL
Access
r
Description
Temperature error
TRUE:
FALSE:
ERROR_POWER
BOOL
FALSE:
Legend:
r ...
r/w ...
read only
read and write
351
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
9.3
Possible configuration combinations (where permissible) are created by adding the configuration
values.
Inputs
IN00
Outputs
hex
dec
IN_DIGITAL_H (plus)
IN_DIGITAL_L (minus)
IN_CURRENT
IN VOLTAGE10
IN_VOLTAGE30
10
16
IN_RATIO
20
32
352
Config. value
OUT00
Config. value
hex
dec
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
9.4
CANopen tables
The following tables will inform you about important values and settings of the CANopen interfaces.
353
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
9.4.1
DLC
X
Byte 1
X
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Data type
12
BYTE
1234
WORD
12345678
DWORD
354
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
The first part of a message is the COB ID. Structure of the 11-bit COB ID:
Nibble 0
11
10
--
Nibble 1
Nibble 2
function code
--
node ID
The COB ID consists of the Function code / Predefined Connectionset ( page 356) and the node ID.
Example:
Communication object = TPDO1 (TX)
Node number of the device = 0x020 = 32
Calculation:
Function code for the communication object TPDO1 = 0x03
Significance of the function code in the 11-bit COB ID = 0x03 0x80 = 0x180
Add the node number (0x020) the COB ID is: 0x1A0
1
--
0x03 = 3
0x020 = 32
355
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
COB ID [hex]
NMT
000
SYNC
080
TIME
100
1012, 1013
Function code
[hex]
COB ID [hex]
EMERGENCY
080 + node ID
1014, 1015
TPDO1 (TX)
180 + node ID
1800
RPDO1 (RX)
20016 + node ID
1400
TPDO2 (TX)
280 + node ID
1801
RPDO2 (RX)
30016 + node ID
1401
TPDO3 (TX)
380 + node ID
1802
RPDO3 (RX)
400 + node ID
1402
TPDO4 (TX)
480 + node ID
1803
RPDO4 (RX)
500 + node ID
1403
58016 + node ID
1200
60016 + node ID
1280
70016 + node ID
1016, 1017
Communication object
Point-to-point messages:
Communication object
356
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
DLC
Byte 1
XXX
Command
Byte 2
Byte 3
Index
Byte 4
Byte 5
Sub index
Byte 6
Byte 7
Byte 8
Data
depending on the data to be transmitted
Please note the reversed byte order! ( Little Endian or Intel format)
An SDO COB ID consists of:
CANopen
Node ID
COB ID SDO
TX: 0x580 + node ID
1127
DLC = Data Length Code = in CANopen the number of the data bytes in a message.
For SDO: DLC = 8
SDO command bytes:
Command
hex | dec
Message
21
33
request
22
34
request
14 bytes
23
35
request
4 bytes
27
39
request
3 bytes
2B
43
request
2 bytes
2F
47
request
1 byte
40
64
request
---
42
66
response
14 bytes
43
67
response
4 bytes
47
71
response
3 bytes
4B
75
response
2 bytes
4F
79
response
1 byte
60
96
response
---
80
128
response
4 bytes
Data length
Description
357
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
Description
0503 0000
0504 0000
0504 0001
0504 0002
0504 0003
0504 0004
0504 0005
out of memory
0601 0000
0601 0001
0601 0002
0602 0000
0604 0041
0604 0042
the number and length of the objects to be mapped would exceed PDO length
0604 0043
0604 0047
0606 0000
0607 0010
data type does not match, length of service parameter does not match
0607 0012
data type does not match, length of service parameter too high
0607 0013
data type does not match, length of service parameter too low
0609 0011
0609 0030
0609 0031
0609 0032
0609 0036
0800 0000
general error
0800 0020
0800 0021
0800 0022
data cannot be transferred or stored to the application because of the present device state
0800 0023
358
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
9.4.2
Boot-up message
9961
After booting, the CAN participate sends the boot-up message once:
COB ID
DLC
Byte 1
hex
0x700 + node ID
0x1
0x00
dec
1 792 + node ID
DLC
hex
0x080 + node ID
0x0
dec
128 + node ID
359
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
9.4.3
360
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
With the following network management commands the user can influence the operating mode of
individual or all CAN participants. Structure:
COB ID
DLC
Byte 1
Byte 2
0x000
Command
Node ID
Node ID = 00 command valid for all nodes in the network at the same time
COB ID
NMT command
Description
0x000
0x01 = 01
Node ID
start_remode_node
0x000
0x02 = 02
Node ID
stop_remode_node
0x000
0x80 = 128
Node ID
enter_pre-operational
0x000
0x81 = 129
Node ID
reset_node
Node reset
0x000
0x82 = 130
Node ID
reset_communication
>
NMT state
9963
The status byte informs about the state of the CAN participant.
Permitted transitions:
(1) State is automatically reached at power on
(2) Internal initialisation completed node
automatically goes to PRE-OPERATIONAL
(3) NMT service "Start Remote Node"
(4) + (7) NMT service "Enter PRE-OPERATIONAL"
(5) + (8) NMT service "Stop Remote Node"
(6) NMT service "Start Remote Node"
(9)...(11) NMT service "Reset Node"
(12)...(14) NMT service "Reset Communication"
Graphics: state transitions under CANopen
361
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
These statuses show the internal status of the CANopen master stack.
They are not defined by the CANopen specification.
State
hex | dec
Description
00
not defined
01
02
03
The master configures its slaves. To do so, all SDOs generated by the configurator are transmitted to the
slaves one after the other. Then the master changes to status 5.
05
After transmission of all SDOs to the slaves the master goes to state 5 and remains in this state. State 5 is the
normal operating state for the master.
CANx_MASTER_STATUS
output NODE_STATE
CANOPEN_GETSTATE
output MASTERSTATE
362
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
State
hex | dec
Description
FF
-1
The slave is reset by the NMT message "Reset Node" and automatically goes to state 1.
00
not defined
01
02
state = BOOTUP
After a delay of 0.5 s the slave automatically goes to state 3.
state = PREPARED
The slave is configured in state 3. The slave remains in state 3 as long as it has received all SDOs generated
by the configurator. It is not important whether during the slave configuration the response to SDO transfers is
abort (error) or whether the response to all SDO transfers is no error. Only the response as such received by
the slave is important not its contents.
03
If in the configurator the option "Reset node" has been activated, a new reset of the node is carried out after
transmitting the object 0x1011 sub-index 1 which then contains the value "load". The slave is then polled again
with the upload of the object 0x1000.
Slaves with a problem during the configuration phase remain in state 3 or directly go to an error state
(state > 5) after the configuration phase.
state = PRE-OPERATIONAL
A node always goes to state 4 except for the following cases:
04
it is an "optional" slave and it was detected as non available on the bus (polling for object 0x1000) OR:
the slave is present but reacted to the polling for object 0x1000 with a type in the lower 16 bits other than
expected by the configurator.
state = OPERATIONAL
State 5 is the normal operating state of the slave: [Normal Operation].
05
If the master was configured to [Automatic startup], the slave starts in state 4 (i.e. a "start node" NMT message
is generated) and the slave goes automatically to state 5.
If the flag GLOBAL_START was set, the master waits until all slaves are in state 4. All slaves are then started
with the NMT command [Start All Nodes].
61
97
62
98
A node goes to state 97 if it is optional (optional device in the CAN configuration) and has not reacted to the
SDO polling for object 0x1000.
If the slave is connected to the network and detected at a later point in time, it is automatically started. To do
so, you must have selected the option [Automatic startup] in the CAN parameters of the master.
A node goes to state 98 if the device type (object 0x1000) does not correspond to the configured type.
In case of a nodeguarding timeout the slave is set to state 99.
63
99
As soon as the slave reacts again to nodeguard requests and the option [Automatic startup] is activated, it is
automatically started by the master. Depending on the status contained in the response to the nodeguard
requests, the node is newly configured or only started.
To start the slave manually it is sufficient to use the method [NodeStart].
CANx_MASTER_STATUS
CANx_SLAVE_STATUS
output NODE_STATE
CANOPEN_GETSTATE
output NODESTATE
363
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
Node status according to CANopen (with these values the status is also coded by the node in the
corresponding messages).
Status
hex | dec
CANopen status:
Description
00
BOOTUP
04
STOPPED
The node is in the status STOPPED. There is no exchange of data and the node
cannot be configured, either.
05
OPERATIONAL
The node is in the status OPERATIONAL and participates in the normal exchange
of data.
7F
127
PRE-OPERATIONAL
If nodeguarding active: the most significant status bit toggles between the messages.
Read the node status from the function block:
Function block used
CANx_MASTER_STATUS
CANx_SLAVE_STATUS
Output NODE_STATE
CANOPEN_GETSTATE
Output LASTNODESTATE
364
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
>
9.4.4
365
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
Emergency messages
9973
Device errors in the slave or problems in the CAN bus trigger emergency messages:
COB ID
DLC
0x80 +
node ID
Byte 0
Byte 1
error code
Byte 2
object
0x1001
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
device-specific
Please note the reversed byte order! ( Little Endian or Intel format)
>
366
Meaning
00xx
Reset or no error
10xx
Generic error
20xx
Current
21xx
22xx
23xx
30xx
Voltage
31xx
Mains voltage
32xx
33xx
Output voltage
40xx
Temperature
41xx
Ambient temperature
42xx
Device temperature
50xx
Device hardware
60xx
Device software
61xx
Internal software
62xx
User software
63xx
Data set
70xx
Additional modules
80xx
Monitoring
81xx
Communication
8110
8120
8130
8140
8150
82xx
Protocol error
8210
8220
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Annex
2015-08-27
CANopen tables
Meaning
90xx
External error
F0xx
Additional functions
FFxx
Device specific
367
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Annex
CANopen tables
>
This object reflects the general error state of a CANopen device. The device is to be considered as
error free if the object 0x1001 signals no error any more.
Bit
Meaning (Bedeutung)
generic error
current
voltage
temperature
communication error
reserved always 0
manufacturer specific
For an error message more than one bit in the error register can be set at the same time.
Example: CR2033, message "wire break" at channel 2 ( installation manual of the device):
COB-ID
0x80 +
node ID
DLC
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
00
FF
81
10
00
00
00
00
368
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
10
Glossary of Terms
A
Address
This is the "name" of the bus participant. All
participants need a unique address so that the
signals can be exchanged without problem.
>
C
CAN
CAN = Controller Area Network
CAN is a priority-controlled fieldbus system for
large data volumes. There are several
higher-level protocols that are based on CAN,
e.g. 'CANopen' or 'J1939'.
>
Application software
CAN stack
>
Architecture
Specific configuration of hardware and/or
software elements in a system.
>
B
Baud
Baud, abbrev.: Bd = unit for the data
transmission speed. Do not confuse baud with
"bits per second" (bps, bits/s). Baud indicates
the number of changes of state (steps, cycles)
per second over a transmission length. But it is
not defined how many bits per step are
transmitted. The name baud can be traced
back to the French inventor J. M. Baudot
whose code was used for telex machines.
1 MBd = 1024 x 1024 Bd = 1 048 576 Bd
>
CiA
CiA = CAN in Automation e.V.
User and manufacturer organisation in
Germany / Erlangen. Definition and control
body for CAN and CAN-based network
protocols.
Homepage www.can-cia.org
>
CiA DS 304
DS = Draft Standard
CANopen device profile for safety
communication
>
CiA DS 401
DS = Draft Standard
CANopen device profile for binary and
analogue I/O modules
>
CiA DS 402
>
Boot loader
On delivery ecomatmobile controllers only
contain the boot loader.
The boot loader is a start program that allows
to reload the runtime system and the
application program on the device.
The boot loader contains basic routines...
for communication between hardware
modules,
for reloading the operating system.
The boot loader is the first software module to
be saved on the device.
DS = Draft Standard
CANopen device profile for drives
>
CiA DS 403
DS = Draft Standard
CANopen device profile for HMI
>
CiA DS 404
DS = Draft Standard
CANopen device profile for measurement and
control technology
>
>
Bus
Serial data transmission of several participants
on the same cable.
CiA DS 405
DS = Draft Standard
CANopen specification of the interface to
programmable controllers (IEC 61131-3)
>
>
369
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
CiA DS 406
DS = Draft Standard
CANopen device profile for encoders
>
>
CiA DS 407
Data type
DS = Draft Standard
CANopen application profile for local public
transport
min. value
max. value
size in the
memory
Clamp 15
BOOL
FALSE
TRUE
8 bits
BYTE
255
8 bits
WORD
65 535
16 bits
DWORD
32 bits
-128
127
8 bits
>
>
COB ID
SINT
CODESYS
is a registered trademark of 3S
Smart Software Solutions GmbH, Germany.
'CODESYS for Automation Alliance' associates
companies of the automation industry whose
hardware devices are all programmed with the
widely used IEC 61131-3 development tool
CODESYS.
Homepage www.codesys.com
CODESYS
USINT
255
8 bits
INT
-32 768
32 767
16 bits
UINT
65 535
16 bits
DINT
32 bits
UDINT
32 bits
REAL
-3.402823466
1038
3.402823466 1038
32 bits
ULINT
64 Bbts
STRING
number of
char. + 1
>
DC
Direct Current
>
>
Diagnosis
CSV file
CSV = Comma Separated Values (also:
Character Separated Values)
A CSV file is a text file for storing or
exchanging simply structured data.
The file extension is .csv.
Example: Source table with numerical values:
value 1.0
value 1.1
value 1.2
value 2.0
value 2.1
value 2.2
value 3.0
value 3.1
value 3.2
Cycle time
This is the time for a cycle. The PLC program
performs one complete run.
370
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
Dither
Embedded software
>
>
DLC
EMC
>
DRAM
DRAM = Dynamic Random Access Memory.
Technology for an electronic memory module
with random access (Random Access
Memory, RAM). The memory element is a
capacitor which is either charged or
discharged. It becomes accessible via a
switching transistor and is either read or
overwritten with new contents. The memory
contents are volatile: the stored information is
lost in case of lacking operating voltage or too
late restart.
>
EMCY
abbreviation for emergency
Message in the CANopen protocol with which
errors are signalled.
>
>
DTC
Ethernet
>
E
ECU
(1) Electronic Control Unit = control unit or
microcontroller
(2) Engine Control Unit = control device of a
engine
>
EDS-file
EDS = Electronic Data Sheet, e.g. for:
File for the object directory in the CANopen
master,
CANopen device descriptions.
Via EDS devices and programs can exchange
their specifications and consider them in a
simplified way.
>
>
EUC
EUC = Equipment Under Control.
EUC is equipment, machinery, apparatus or
plant used for manufacturing, process,
transportation, medical or other activities
( IEC 61508-4, section 3.2.3). Therefore, the
EUC is the set of all equipment, machinery,
apparatus or plant that gives rise to hazards
for which the safety-related system is required.
If any reasonably foreseeable action or
inaction leads to hazards with an intolerable
risk arising from the EUC, then safety functions
are necessary to achieve or maintain a safe
state for the EUC. These safety functions are
371
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
>
Heartbeat
FiFo
FIFO (First In, First Out) = Operating principle
of the stack memory: The data packet that was
written into the stack memory first, will also be
read first. Each identifier has such a buffer
(queue).
>
Flash memory
Flash ROM (or flash EPROM or flash memory)
combines the advantages of semiconductor
memory and hard disks. Similar to a hard disk,
the data are however written and deleted
blockwise in data blocks up to 64, 128, 256,
1024, ... bytes at the same time.
Advantages of flash memories
>
FRAM
FRAM, or also FeRAM, means Ferroelectric
Random Access Memory. The storage
operation and erasing operation is carried out
by a polarisation change in a ferroelectric
layer.
Advantages of FRAM as compared to
conventional read-only memories:
non-volatile,
compatible with common EEPROMs, but:
access time approx. 100 ns,
nearly unlimited access cycles possible.
>
HMI
HMI = Human Machine Interface
>
I
ID
ID = Identifier
Name to differentiate the devices / participants
connected to a system or the message
packets transmitted between the participants.
>
IEC 61131
Standard: Basics of programmable logic
controllers
Part 1: General information
Part 2: Production equipment requirements
and tests
Part 3: Programming languages
Part 5: Communication
Part 7: Fuzzy Control Programming
>
Instructions
Superordinate word for one of the following
terms:
installation instructions, data sheet, user
information, operating instructions, device
manual, installation information, online help,
system manual, programming manual, etc.
>
Intended use
Use of a product in accordance with the
information provided in the instructions for use.
>
IP address
IP = Internet Protocol.
The IP address is a number which is
necessary to clearly identify an internet
participant. For the sake of clarity the number
372
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
>
ISO 11898
MAC-ID
>
ISO 11992
Standard: Interchange of digital information on
electrical connections between towing and
towed vehicles
Part 1: Physical and data-link layers
Part 2: Application layer for brakes and
running gear
Part 3: Application layer for equipment other
than brakes and running gear
Part 4: Diagnostics
>
Master
Handles the complete organisation on the bus.
The master decides on the bus access time
and polls the slaves cyclically.
>
Misuse
The use of a product in a way not intended by
the designer.
The manufacturer of the product has to warn
against readily predictable misuse in his user
information.
>
>
ISO 16845
Standard: Road vehicles Controller area
network (CAN) Conformance test plan
MMI
HMI ( page 372)
>
>
J
J1939
SAE J1939
>
L
LED
LED = Light Emitting Diode.
Light emitting diode, also called luminescent
diode, an electronic element of high coloured
luminosity at small volume with negligible
power loss.
>
Link
MRAM
MRAM = Magnetoresistive Random Access
Memory
The information is stored by means of
magnetic storage elements. The property of
certain materials is used to change their
electrical resistance when exposed to
magnetic fields.
Advantages of MRAM as compared to
conventional RAM memories:
non volatile (like FRAM), but:
access time only approx. 35 ns,
unlimited number of access cycles possible.
>
MSB
Most Significant Bit/Byte
>
>
LSB
Least Significant Bit/Byte
NMT
NMT = Network Management = (here: in the
CANopen protocol).
>
373
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
Node
This means a participant in the network.
>
Node Guarding
PCMCIA card
PCMCIA = Personal Computer Memory Card
International Association, a standard for
expansion cards of mobile computers.
Since the introduction of the cardbus standard
in 1995 PCMCIA cards have also been called
PC card.
>
O
Obj / object
Term for data / messages which can be
exchanged in the CANopen network.
>
Object directory
Contains all CANopen communication
parameters of a device as well as
device-specific parameters and data.
>
OBV
Contains all CANopen communication
parameters of a device as well as
device-specific parameters and data.
PDM
PDM = Process and Dialogue Module.
Device for communication of the operator with
the machine / plant.
>
PDO
PDO = Process Data Object.
The time-critical process data is transferred by
means of the "process data objects" (PDOs).
The PDOs can be freely exchanged between
the individual nodes (PDO linking). In addition
it is defined whether data exchange is to be
event-controlled (asynchronous) or
synchronised. Depending on the type of data
to be transferred the correct selection of the
type of transmission can lead to considerable
relief for the CAN bus.
According to the protocol, these services are
unconfirmed data transmission: it is not
checked whether the receiver receives the
message. Exchange of network variables
corresponds to a "1 to n connection"
(1 transmitter to n receivers).
>
>
OPC
PDU
>
Operational
Operating state of a CANopen participant. In
this mode SDOs, NMT commands and
PDOs can be transferred.
>
P
PC card
PCMCIA card
>
374
>
PES
Programmable Electronic System ...
for control, protection or monitoring,
dependent for its operation on one or more
programmable electronic devices,
including all elements of the system such as
input and output devices.
>
PGN
PGN = Parameter Group Number
PGN = PDU format (PF) + PDU source (PS)
The parameter group number is an item of the
CAN protocol SAE J1939. PGN collects
the address parts PF and PS.
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
>
Pictogram
PWM
>
PID controller
The PID controller
(proportionalintegralderivative controller)
consists of the following parts:
P = proportional part
I = integral part
D = differential part (but not for the controller
CR04nn, CR253n).
>
PLC configuration
Part of the CODESYS user interface.
The programmer tells the programming
system which hardware is to be
programmed.
> CODESYS loads the corresponding
libraries.
> Reading and writing the periphery states
(inputs/outputs) is possible.
>
Pre-Op
Pre-Op = PRE-OPERATIONAL mode.
Operating status of a CANopen participant.
After application of the supply voltage each
participant automatically passes into this state.
In the CANopen network only SDOs and
NMT commands can be transferred in this
mode but no process data.
>
Process image
Process image is the status of the inputs and
outputs the PLC operates with within one
cycle.
>
>
R
ratiometric
Measurements can also be performed
ratiometrically. If the output signal of a sensor
is proportional to its suppy voltage then via
ratiometric measurement (= measurement
proportional to the supply) the influence of the
supply's fluctuation can be reduced, in ideal
case it can be eliminated.
analogue input
>
RAW-CAN
RAW-CAN means the pure CAN protocol
which works without an additional
communication protocol on the CAN bus (on
ISO/OSI layer 2). The CAN protocol is
international defined according to ISO 11898-1
and garantees in ISO 16845 the
interchangeability of CAN chips in addition.
>
remanent
Remanent data is protected against data loss
in case of power failure.
The runtime system for example
automatically copies the remanent data to a
flash memory as soon as the voltage supply
falls below a critical value. If the voltage supply
is available again, the runtime system loads
the remanent data back to the RAM memory.
The data in the RAM memory of a controller,
however, is volatile and normally lost in case of
power failure.
>
ro
RO = read only for reading only
Unidirectional data transmission: Data can only
be read and not changed.
>
RTC
RTC = Real Time Clock
Provides (batter-backed) the current date and
375
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
Runtime system
Basic program in the device, establishes the
connection between the hardware of the
device and the application program.
Examples:
Automatic configuration of all slaves via
SDOs at the system start,
reading error messages from the object
directory.
Every SDO is monitored for a response and
repeated if the slave does not respond within
the monitoring time.
>
>
rw
Self-test
RW = read/ write
Bidirectional data transmission: Data can be
read and also changed.
>
>
SAE J1939
Slave
>
SD card
An SD memory card (short for Secure Digital
Memory Card) is a digital storage medium that
operates to the principle of flash storage.
>
SDO
SDO = Service Data Object.
The SDO is used for access to objects in the
CANopen object directory. 'Clients' ask for the
requested data from 'servers'. The SDOs
always consist of 8 bytes.
376
>
stopped
Operating status of a CANopen participant. In
this mode only NMT commands are
transferred.
>
Symbols
Pictograms are figurative symbols which
convey information by a simplified graphic
representation. ( chapter What do the symbols
and formats mean? ( page 7))
>
System variable
Variable to which access can be made via IEC
address or symbol name from the PLC.
>
T
Target
The target contains the hardware description
of the target device for CODESYS, e.g.: inputs
and outputs, memory, file locations.
Corresponds to an electronic data sheet.
>
TCP
The Transmission Control Protocol is part of
the TCP/IP protocol family. Each TCP/IP data
connection has a transmitter and a receiver.
This principle is a connection-oriented data
transmission. In the TCP/IP protocol family the
TCP as the connection-oriented protocol
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Glossary of Terms
Template
A template can be filled with content.
Here: A structure of pre-configured software
elements as basis for an application program.
>
U
UDP
UDP (User Datagram Protocol) is a minimal
connectionless network protocol which belongs
to the transport layer of the internet protocol
family. The task of UDP is to ensure that data
which is transmitted via the internet is passed
to the right application.
At present network variables based on CAN
and UDP are implemented. The values of the
variables are automatically exchanged on the
basis of broadcast messages. In UDP they are
implemented as broadcast messages, in CAN
as PDOs.
According to the protocol, these services are
unconfirmed data transmission: it is not
checked whether the receiver receives the
message. Exchange of network variables
corresponds to a "1 to n connection"
(1 transmitter to n receivers).
>
Use, intended
Use of a product in accordance with the
information provided in the instructions for use.
>
W
Watchdog
In general the term watchdog is used for a
component of a system which watches the
function of other components. If a possible
malfunction is detected, this is either signalled
or suitable program branchings are activated.
The signal or branchings serve as a trigger for
other co-operating system components to
solve the problem.
>
wo
WO = write only
Unidirectional data transmission: Data can only
be changed and not read.
377
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Index
11
Index
A
About this manual ....................................................................................5
Access the device with SSH ................................................................119
Access the device with Telnet .............................................................119
Access to the Linux runtime system ....................................................118
Activate network variable support .......................................................100
Activate the access protection for an IEC project .................................90
Add additional libraries ........................................................................114
Address ................................................................................................369
Address assignment in Ethernet networks ..........................................345
Analogue inputs .....................................................................................21
Analogue video input .............................................................................23
Annex ...................................................................................................344
Application program ...............................................................................25
Application software.............................................................................369
Architecture..........................................................................................369
Audio signalling device (buzzer) ............................................................15
Automatically restore system files .........................................................82
B
Backup
Save the system files .................................................................................... 68
Save the system information......................................................................... 67
Baud.....................................................................................................369
Binary inputs ..........................................................................................20
Binary output..........................................................................................22
Boot loader ..........................................................................................369
Boot-up message.................................................................................359
Bus .......................................................................................................369
BUZZER_CLICK ..................................................................................194
BUZZER_ON .......................................................................................195
C
Calibration of the touch screen............................................................141
Camera visualisation .............................................................................17
CamsOffOnPageSwitch.......................................................................173
CAN ...............................................................................................22, 369
CAN / CANopen
errors and error handling............................................................................. 343
CAN_ENABLE .....................................................................................232
CAN_RECOVER .................................................................................233
CAN_REMOTE_REQUEST ................................................................254
CAN_REMOTE_RESPONSE..............................................................256
CAN_RX ..............................................................................................238
CAN_RX_ENH.....................................................................................239
CAN_RX_ENH_FIFO ..........................................................................241
CAN_RX_RANGE ...............................................................................243
CAN_RX_RANGE_FIFO .....................................................................245
CAN_SETDOWNLOADID ...................................................................234
CAN_STATUS .....................................................................................235
CAN_TX ...............................................................................................248
CAN_TX_ENH .....................................................................................249
378
2015-08-27
CANopen tables
CAN_TX_ENH_CYCLIC ......................................................................251
CANopen
Tables .......................................................................................................... 353
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Index
FocusFrameImagePath .......................................................................202
Fonts
Load the font .................................................................................................. 73
Remove the font ............................................................................................ 73
FRAM ...................................................................................................372
Function code / Predefined Connectionset .........................................356
Function elements
CANopen ..................................................................................................... 258
CANopen emergency .................................................................................. 299
CANopen guarding ...................................................................................... 294
CANopen network management ................................................................. 268
CANopen object directory ........................................................................... 272
CANopen SDOs .......................................................................................... 277
CANopen status .......................................................................................... 259
CANopen SYNC .......................................................................................... 290
Control LED + buzzer .................................................................................. 193
RAW-CAN (Layer 2) .................................................................................... 230
RAW-CAN remote ....................................................................................... 253
RAW-CAN status ......................................................................................... 231
receive RAW-CAN data .............................................................................. 237
receive SAE J1939 ...................................................................................... 320
SAE J1939 ................................................................................................... 306
SAE J1939 diagnosis .................................................................................. 333
SAE J1939 request ..................................................................................... 315
SAE J1939 status ........................................................................................ 307
transmit RAW-CAN data ............................................................................. 247
transmit SAE J1939..................................................................................... 325
D
Data type..............................................................................................370
DC ........................................................................................................370
Device configuration ..............................................................................38
Diagnosis .................................................................................... 343, 370
Diagnosis and error handling...............................................................342
Display ...................................................................................................14
Display elements ...................................................................................14
Display options for analogue cameras ................................................147
Display the I/O configuration ...............................................................123
Dither ...................................................................................................371
DLC ......................................................................................................371
Download the update file .......................................................................30
DRAM ..................................................................................................371
Drawing area .......................................................................................125
DTC......................................................................................................371
E
ECU .....................................................................................................371
EDS-file ................................................................................................371
Embedded software .............................................................................371
EMC .....................................................................................................371
EMCY...................................................................................................371
Emergency messages .........................................................................366
Enter the recovery mode .......................................................................31
Enter the setup mode ............................................................................39
Ethernet .........................................................................................23, 371
EUC .....................................................................................................371
Example
Capture mode .............................................................................................. 148
edit controls in CR1081 ............................................................................... 134
INPUT_INT with 3 input elements .............................................................. 213
Overlay mode .............................................................................................. 149
F
Fault .....................................................................................................343
FB, FUN, PRG in CODESYS ................................................................93
FiFo ......................................................................................................372
First steps ..............................................................................................91
Flash memory ......................................................................................372
FOCUSED_ELEMENT ........................................................................200
G
General notes ......................................................................................138
GET_DEVICE_SERIAL .......................................................................176
GET_ETHERNET ................................................................................177
GET_VERSIONS .................................................................................179
H
Hardware ...............................................................................................13
Heartbeat .............................................................................................372
History of the instructions ........................................................................8
HMI ......................................................................................................372
How is this documentation structured? ...................................................8
I
ID .........................................................................................................372
IEC 61131 ............................................................................................372
IEC user cycle ......................................................................................372
ifm function elements...........................................................................154
ifm function elements for the device CR1201 .....................................164
ifm libraries for the device CR1201 .....................................................155
ifm target package for CODESYS .........................................................26
ifm weltweit ifm worldwide ifm lchelle internationale.................384
Indicate the failure of an Ethernet camera ..........................................144
Information concering the device ..........................................................12
INIT_VAR_RETAIN_DINT ...................................................................218
INIT_VAR_RETAIN_INT .....................................................................220
INIT_VAR_RETAIN_REAL ..................................................................222
INPUT ..................................................................................................166
Input functions for touch screens ........................................................139
INPUT_DINT........................................................................................207
INPUT_INT ..........................................................................................210
INPUT_REAL.......................................................................................215
Inputs (technology) ................................................................................19
379
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Index
J
J1939 ...................................................................................................373
J1939_DM1RX ....................................................................................334
J1939_DM1TX .....................................................................................336
J1939_DM1TX_CFG ...........................................................................339
J1939_DM3TX .....................................................................................341
J1939_ENABLE ...................................................................................308
J1939_GETDABYNAME .....................................................................310
J1939_NAME.......................................................................................312
J1939_RX ............................................................................................321
J1939_RX_FIFO ..................................................................................322
J1939_RX_MULTI ...............................................................................324
J1939_SPEC_REQ .............................................................................316
J1939_SPEC_REQ_MULTI ................................................................318
J1939_STATUS ...................................................................................314
J1939_TX.............................................................................................326
J1939_TX_ENH ...................................................................................327
J1939_TX_ENH_CYCLIC ...................................................................329
J1939_TX_ENH_MULTI ......................................................................331
K
Key assignment in recovery mode ........................................................30
Key functionality.....................................................................................41
Key LEDs ...............................................................................................15
KEY_CLICK .........................................................................................196
KEY_MAPPING ...................................................................................174
Keywords for edit controls ...................................................................133
L
LED ......................................................................................................373
Libraries ...............................................................................................110
Library ifm_CANopen_NT_Vxxyyzz.LIB..............................................161
Library ifm_CR1201_Vxxyyzz.LIB .......................................................156
Library ifm_J1939_NT_Vxxyyzz.LIB ...................................................162
Library ifm_NetVarLib_NT_Vxxyyzz.LIB .............................................163
Library ifm_PDM_input_V01yyzz.LIB ..................................................159
Library ifm_PDM360NG_linux_syscall_asynch_V02yyzz.LIB ............158
Library ifm_PDM360NG_special_V02yyzz.LIB ...................................157
Library ifm_PDM360NG_USB_LL_V02yyzz.LIB.................................159
Library ifm_PDM360NG_USB_Vxxyyzz.lib .........................................158
Library ifm_PDMng_util_Vxxyyzz.LIB .................................................157
Library ifm_RAWCan_NT_Vxxyyzz.LIB ..............................................160
380
2015-08-27
CANopen tables
M
MAC-ID ................................................................................................373
Master ..................................................................................................373
Mirror the camera image at its horizontal axis ........................... 145, 151
Misuse..................................................................................................373
MMI ......................................................................................................373
Movement of elements ........................................................................130
MRAM ..................................................................................................373
MSB .....................................................................................................373
N
Navigation key .......................................................................................46
Network management (NMT) ..............................................................360
Network management commands.......................................................361
Network variables via UDP ....................................................................95
NMT .....................................................................................................373
NMT state ............................................................................................361
NMT state for CANopen master ..........................................................362
NMT state for CANopen slave .............................................................363
Node ....................................................................................................374
Node Guarding ....................................................................................374
NORM_DINT .......................................................................................182
NORM_REAL ......................................................................................183
Note the cycle time! .............................................................................110
Note! ......................................................................................................10
Notes..............................................................................................30, 123
Notes on visualisations ........................................................................125
Notizen Notes Notes .......................................................................383
Numbering of the operating elements ........................................ 132, 133
O
Obj / object ...........................................................................................374
Object 0x1001 (error register) .............................................................368
Object directory....................................................................................374
OBV .....................................................................................................374
OPC .....................................................................................................374
Open the configuration dialogue ................................................ 144, 151
Operating elements ...............................................................................15
Operating instructions............................................................................40
Operating modes ...................................................................................20
Operating modes of the inputs / outputs .............................................352
Operating sequence ............................................................................111
Operating states ....................................................................................26
Operation
Enter a text using the on-screen keyboard ................................................... 45
Navigate in the file directory .......................................................................... 44
Navigate in the setup menu .......................................................................... 42
Navigate within a menu screen ..................................................................... 43
Operational ..........................................................................................374
Output parameters ...............................................................................171
Outputs (technology) .............................................................................22
OverlayVisu .........................................................................................205
Overvi ew CANopen error codes ....................................................366
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
2015-08-27
Index
Overview
documentation modules for ecomatmobile devices ....................................... 6
P
PC card ................................................................................................374
PCMCIA card .......................................................................................374
PDF
Navigating in the PDF file ............................................................................. 77
PDM .....................................................................................................374
PDM_PAGECONTROL .......................................................................203
PDO .....................................................................................................374
PDU .....................................................................................................374
PES ......................................................................................................374
PGN .....................................................................................................374
Pictogram .............................................................................................375
Pictograms ...............................................................................................7
PID controller .......................................................................................375
PLC configuration ................................................................................375
PointOfContact ....................................................................................225
Possible operating modes inputs/outputs ...........................................352
POUs
Adjust analouge and digital values ............................................................. 181
Help functions .............................................................................................. 226
Manage visualisation ................................................................................... 198
Manage, read and write the USB memory device ...................................... 185
Read device information ............................................................................. 175
Setup the device .......................................................................................... 165
Use touch screen functions ......................................................................... 224
Q
Quit the recovery mode .........................................................................37
R
ratiometric ............................................................................................375
RAW-CAN ............................................................................................375
Real-time clock (RTC) ...........................................................................17
remanent..............................................................................................375
Resample / scale image ......................................................................125
Response to system errors..................................................................343
Restore
Restore the system files ................................................................................ 70
S
SAE J1939 .......................................................................... 165, 306, 376
Safety instructions ...................................................................................9
Safety instructions about Reed relays ...................................................21
Save changed values ................................................................. 146, 152
Save project in the device ...................................................................121
SD card ................................................................................................376
SDO .....................................................................................................376
SDO abort code ...................................................................................358
SDO command bytes ..........................................................................357
Select analogue camera ......................................................................151
Select first target system and create project .........................................98
Self-test ................................................................................................376
Set communication parameters.............................................................99
Set the display mode ...........................................................................151
Set the IP address of the Ethernet camera .........................................144
Set the target system .............................................................................84
SET_BOOTUP_BACKLIGHT ..............................................................170
SET_ETHERNET ................................................................................168
Setting-up the programming interface .................................................116
Setup
Backup / Restore software components ....................................................... 66
Calibrate the touchscreen ............................................................................. 75
Change the system password ....................................................................... 57
Configure the Ethernet interface ................................................................... 51
Configure the IP parameters automatically .................................................. 52
Configure the IP parameters manually ......................................................... 51
Define the splash screen............................................................................... 64
Display system information ........................................................................... 59
Enable / Disable password protection .......................................................... 58
Enter the password for full access to the setup menu ................................. 48
Format the internal storage ........................................................................... 74
Manage fonts ................................................................................................. 72
More functions ............................................................................................... 60
Reboot the device ......................................................................................... 61
Safely remove the USB device ..................................................................... 71
Set the CAN interfaces .................................................................................. 53
Set the display brightness ............................................................................. 55
Set the network services ............................................................................... 56
Set the password protection ......................................................................... 57
Set the real-time clock (RTC) ........................................................................ 54
Setup menu with restricted access rights ..................................................... 48
start screen .................................................................................................... 49
Start the application....................................................................................... 81
System settings ............................................................................................. 50
Test input elements ....................................................................................... 65
Test the CAN interfaces ................................................................................ 62
Working with enabled password protection .................................................. 47
381
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Index
T
Target...................................................................................................376
TCP ......................................................................................................376
Template ..............................................................................................377
Test transmission of the global network variables ..............................108
Texts ....................................................................................................125
TOGGLE ..............................................................................................184
Touchscreen ..........................................................................................46
TouchScreenDisable ...........................................................................172
Transmit projects .................................................................................107
U
UDP .....................................................................................................377
Update the runtime system....................................................................31
Update the runtime system of the device ..............................................29
USB........................................................................................................23
USB_STORAGE_HANDLER ..............................................................191
USB_STORAGE_MANAGER .............................................................186
USB_STORAGE_REMOVE ................................................................188
Use access protection ...........................................................................89
Use edit controls ..................................................................................133
Use of optical and acustical feedback .................................................135
Use of the Ethernet camera image in CODESYS ...............................146
Use of touch screen functions .............................................................138
Use the analogue camera image in CODESYS ..................................153
Use visual feedback.............................................................................140
Use visualisations ................................................................................124
Use, intended.......................................................................................377
V
Variables ................................................................................................94
VERSION .............................................................................................227
Visualisation limits ...............................................................................127
W
watchdog..................................................................................... 111, 377
382
2015-08-27
CANopen tables
Watchdog .............................................................................................377
Watchdog behaviour ............................................................................111
What do the symbols and formats mean?...............................................7
What previous knowledge is required? .................................................10
wo ........................................................................................................377
Write projects for more devices ...........................................................105
ifm Programming manual PDM360 NG 12" / Touch (CR1201) V02.03.xx, CODESYS 2.3
Notizen Notes Notes
12
2015-08-27
CANopen tables
13
Version: 2015-03-06
8310
A
OFF
B, L
BR
CH
CN
CND
CZ
DK
E
F
FIN
GB, IRL
GR
H
I
IL
IND
J
MAL
MEX
N
NL
P
PL
RA, ROU
ROK
RP
RUS
S
SGP
SK
THA
TR
UA
USA
ZA