Page 1

System Manual
PDM360NG
CR1080
CR1081
CoDeSys
English
®
2.3
preliminary !
7390707_02_UK 2011-07-28
Page 2

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
Contents
Contents
1 About this manual 7
1.1 What do the symbols and formats mean? ......................................................................7
1.2 How is this manual structured?.......................................................................................8
2 Safety instructions 9
2.1 Important!........................................................................................................................9
2.2 What previous knowledge is required?.........................................................................10
3 System description 11
3.1 Information concerning the device................................................................................11
3.1.1 Device variants ........................................................................................................11
3.1.2 Fastening and installation........................................................................................12
3.1.3 Colour display ..........................................................................................................13
3.1.4 Operating elements .................................................................................................14
3.1.5 Accessories .............................................................................................................16
3.2 Information concerning the software (Linux | CoDeSys 2.3) ........................................17
3.3 PLC configuration .........................................................................................................18
3.4 Interfaces ......................................................................................................................19
3.4.1 USB interface...........................................................................................................20
3.4.2 Camera visualisation ...............................................................................................20
3.5 Real-time clock (RTC)...................................................................................................21
4 Operating states and operating system 22
4.1 Operating states............................................................................................................22
4.2 Status LED....................................................................................................................22
4.2.1 Setting the LED via application program .................................................................23
5 Configurations 24
5.1 Set device parameters (setup)......................................................................................24
5.1.1 Start setup ...............................................................................................................25
5.1.2 Setup: system settings.............................................................................................27
5.1.3 Setup: display system information...........................................................................32
5.1.4 Setup: more functions..............................................................................................33
5.1.5 Exit setup, reboot device .........................................................................................44
5.1.6 Set up FTP access to the device.............................................................................44
5.2 Programming interfaces................................................................................................45
5.2.1 Programming via the Ethernet interface..................................................................45
5.3 Install character sets (fonts)..........................................................................................52
5.3.1 Symbol files .............................................................................................................53
5.4 Set up programming system.........................................................................................54
5.4.1 Set up programming system manually ....................................................................54
5.4.2 Set up programming system via templates .............................................................59
5.4.3 ifm demo programs..................................................................................................69
2
Page 3

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
Contents
5.5 Function configuration of the inputs and outputs..........................................................73
5.5.1 Configuration of the inputs and outputs (default setting).........................................73
5.5.2 System variables .....................................................................................................73
5.5.3 Configure inputs.......................................................................................................74
5.6 Hints to wiring diagrams ...............................................................................................79
5.7 First steps .....................................................................................................................81
5.7.1 Add missing libraries................................................................................................81
5.7.2 Create visualisation .................................................................................................83
5.7.3 Create PLC program................................................................................................85
5.7.4 Save project in the device .......................................................................................86
5.8 Install and configure the mobile camera.......................................................................86
5.9 Operating elements - functions.....................................................................................87
5.9.1 Use edit controls......................................................................................................87
5.10 Device update to new software version........................................................................89
5.10.1 Key assignment in the setup mode .........................................................................89
5.10.2 Prepare device update.............................................................................................90
5.10.3 Device update via web browser...............................................................................92
5.10.4 Device update via USB stick ...................................................................................93
6 Limitations and programming notes 94
6.1 Limits of the device .......................................................................................................94
6.1.1 CPU frequency ........................................................................................................94
6.1.2 Watchdog behaviour................................................................................................95
6.1.3 Limitations for visualisations....................................................................................96
6.1.4 Limitations for program and data memories............................................................97
6.2 Programming notes for CoDeSys projects ...................................................................98
6.2.1 FB, FUN, PRG in CoDeSys.....................................................................................98
6.2.2 Libraries ...................................................................................................................99
6.2.3 Operating sequence ............................................................................................. 100
6.2.4 CoDeSys visualisation elements .......................................................................... 101
6.2.5 Texts ..................................................................................................................... 102
6.2.6 Movement of elements ......................................................................................... 103
6.2.7 Save...................................................................................................................... 103
7 Visualisations in the device 104
7.1 Recommendations for user interfaces....................................................................... 104
7.1.1 Recommendations for a user-friendly product design.......................................... 105
7.1.2 Do you know the future users?............................................................................. 106
7.1.3 Check suitability for use........................................................................................ 107
7.1.4 Language as an obstacle...................................................................................... 107
7.1.5 Cultural details are often not transferable............................................................. 109
7.1.6 Directives and standards ...................................................................................... 111
7.2 Basic information about colours and bitmap graphics............................................... 119
7.2.1 Image size vector graphics / pixel graphics.......................................................... 120
7.2.2 Colour for bitmap graphics.................................................................................... 122
7.2.3 What colours are shown? ..................................................................................... 122
7.3 Power reserves of the device .................................................................................... 123
7.3.1 Resample / scale image ....................................................................................... 124
7.3.2 CoDeSys visualisations ........................................................................................ 124
7.4 Special information about bitmap graphics................................................................ 125
7.4.1 Additive colour mixing........................................................................................... 125
7.4.2 What graphics are suitable for which PDM and what steps must be carried out?126
3
Page 4

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
Contents
7.5 Operate camera(s) on the PDM................................................................................. 127
7.5.1 Using Ethernet camera(s) with PDM .................................................................... 127
7.5.2 Operation of analogue camera(s) on the PDM..................................................... 133
8 Variable 140
8.1 Retain variable........................................................................................................... 141
8.2 Network variable via UDP.......................................................................................... 142
8.2.1 Select first target system and create project ........................................................ 145
8.2.2 Set communication parameters............................................................................ 147
8.2.3 Activate network variable support......................................................................... 148
8.2.4 Integrate libraries.................................................................................................. 149
8.2.5 Complete and transmit the project (global network variables) ............................. 150
8.2.6 Write projects for more devices ............................................................................ 155
8.2.7 Transmit projects .................................................................................................. 157
8.2.8 Test transmission of the global network variables................................................ 157
9 CAN in the PDM360 158
9.1 General about CAN.................................................................................................... 158
9.1.1 Topology ............................................................................................................... 159
9.1.2 CAN interfaces...................................................................................................... 160
9.1.3 Available CAN interfaces and CAN protocols ...................................................... 160
9.1.4 System configuration ............................................................................................ 162
9.2 Physical connection of CAN ...................................................................................... 163
9.2.1 Network structure.................................................................................................. 163
9.2.2 CAN bus level ....................................................................................................... 164
9.2.3 Bus cable length ................................................................................................... 165
9.2.4 Wire cross-sections .............................................................................................. 166
9.3 Exchange of CAN data .............................................................................................. 167
9.3.1 Hints...................................................................................................................... 168
9.3.2 CAN functions in the IEC user cycle..................................................................... 170
9.4 CAN-FBs on layer 2 (RAW-CAN) .............................................................................. 174
9.4.1 Notes..................................................................................................................... 174
9.4.2 FBs for RAW-CAN (management) ....................................................................... 176
9.4.3 FBs for RAW-CAN (transmitting messages) ........................................................ 184
9.4.4 FBs for RAW-CAN (receiving messages)............................................................. 191
9.4.5 FBs for RAW-CAN (remote access)..................................................................... 202
9.5 CAN units acc. to SAE J1939.................................................................................... 207
9.5.1 CAN for the drive engineering .............................................................................. 207
9.5.2 Units for J1939 (management) ............................................................................. 212
9.5.3 Units for J1939 (send) .......................................................................................... 222
9.5.4 Units for J1939 (receive)....................................................................................... 233
9.6 CAN POUs to CANopen ............................................................................................ 242
9.6.1 Technical about CANopen.................................................................................... 242
9.6.2 ifm CANopen SDO units....................................................................................... 276
9.6.3 CANopen network management .......................................................................... 287
9.7 CAN errors and error handling................................................................................... 313
9.7.1 Structure of an EMCY message ........................................................................... 313
9.7.2 Overview CANopen error codes........................................................................... 315
9.7.3 CANopen POUs for error handling....................................................................... 318
4
Page 5

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
Contents
10 Input/output functions 325
10.1 Processing input values............................................................................................. 325
10.1.1 INPUT ................................................................................................................... 326
10.1.2 TOGGLE............................................................................................................... 328
10.2 Adapting analogue values ......................................................................................... 329
10.2.1 NORM_DINT ........................................................................................................ 330
10.2.2 NORM_REAL ....................................................................................................... 332
11 Managing the data 334
11.1 Saving, reading and converting data in the memory ................................................. 334
11.1.1 USB_STORAGE_HANDLER ............................................................................... 335
11.1.2 COPY_PDM_TO_USB ......................................................................................... 337
11.1.3 COPY_USB_TO_PDM ......................................................................................... 338
11.2 Data access and data check...................................................................................... 339
11.2.1 VERSION.............................................................................................................. 340
11.2.2 SYSTEM_ASYNCH.............................................................................................. 341
11.3 File managing ............................................................................................................ 342
11.3.1 File functions......................................................................................................... 342
12 LED, buzzer, visualisation 383
12.1 Program LED + buzzer .............................................................................................. 383
12.1.1 BUZZER_CLICK................................................................................................... 384
12.1.2 BUZZER_ON ........................................................................................................ 385
12.1.3 KEY_CLICK .......................................................................................................... 386
12.2 Manage visualisation ................................................................................................. 387
12.2.1 SET_BOOTUP_BACKLIGHT ............................................................................... 388
12.2.2 Library Instrumente............................................................................................... 389
12.3 Edit input fields in the visualisation............................................................................ 396
12.3.1 INPUT_INT ........................................................................................................... 397
12.3.2 INPUT_DINT......................................................................................................... 402
12.3.3 INPUT_REAL........................................................................................................ 405
12.3.4 INIT_VAR_RETAIN_INT....................................................................................... 408
12.3.5 INIT_VAR_RETAIN_DINT.................................................................................... 410
12.3.6 INIT_VAR_RETAIN_REAL................................................................................... 412
13 Annex 414
13.1 Rectify faults and errors............................................................................................. 414
13.2 Address assignment and I/O operating modes ......................................................... 415
13.2.1 Address assignment inputs / outputs.................................................................... 415
13.2.2 Possible operating modes inputs / outputs........................................................... 416
13.3 System flags .............................................................................................................. 417
13.3.1 System flags of the keys + LEDs (inputs)............................................................. 418
13.3.2 System flags of the keys + LEDs (outputs) .......................................................... 420
13.4 CANopen tables......................................................................................................... 421
13.4.1 IDs (addresses) in CANopen................................................................................ 421
13.4.2 Structure of CANopen messages......................................................................... 422
13.4.3 Bootup messsage ................................................................................................. 426
13.4.4 Network management (NMT) ............................................................................... 427
13.4.5 CANopen error code............................................................................................. 431
5
Page 6

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
Contents
13.5 Overview of the files and libraries used..................................................................... 434
13.5.1 Installation of the files and libraries ...................................................................... 434
13.5.2 General overview.................................................................................................. 435
13.5.3 What are the individual files and libraries used for?............................................. 437
14 Glossary of Terms 443
15 Index 458
16 ifm weltweit • ifm worldwide • ifm à l’échelle internationale 463
6
Page 7

ifm System Manual ecomatmobile PDM360NG (CR1080, CR1081, CR9042) Target V01 2011-07-28
About this manual What do the symbols and formats mean?
1 About this manual
What do the symbols and formats mean? .....................................................................................7
How is this manual structured?......................................................................................................8
202
In the additional "Programming Manual for CoDeSys V2.3" you will obtain more details about the use
of the programming system "CoDeSys for Automation
Alliance". This manual can be downloaded free
of charge from ifm's website:
a) www.ifm.com
> select your country > [Service] > [Download] > [Control systems]
b) ecomatmobile DVD "Software, tools and documentation"
Nobody is perfect. Send us your suggestions for improvements to this manual and you will receive a
little gift from us to thank you.
© 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.
1.1 What do the symbols and formats mean?
The following symbols or pictograms illustrate the notes in our instructions:
WARNING
Death or serious irreversible injuries may result.
2979
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
NOTE
Important notes on faults and errors.
Info
More notes.
7