IFM Electronic CR0403 Programming Manual

7391000_04_UK 2015-04-01
1
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Contents
Contents
1 About this manual 4
1.1 Copyright .............................................................................................................................. 4
1.2 Overview: documentation modules for ecomatmobile devices ............................................ 5
1.3 CODESYS programming manual ........................................................................................ 5
1.4 What do the symbols and formats mean? ........................................................................... 6
1.5 How is this documentation structured? ................................................................................ 7
1.6 History of the instructions (CR040n) .................................................................................. 8
2 Safety instructions 9
2.1 Please note! ......................................................................................................................... 9
2.2 What previous knowledge is required? ..............................................................................10
2.3 Start-up behaviour of the controller....................................................................................10
3 System description 11
3.1 Information about the device ..............................................................................................11
3.2 Hardware description .........................................................................................................11
3.2.1 Hardware setup .......................................................................................................................... 12
3.2.2 Inputs (technology) ..................................................................................................................... 13
3.2.3 Outputs (technology) .................................................................................................................. 18
3.2.4 Note on wiring ............................................................................................................................ 25
3.2.5 Safety instructions about Reed relays ........................................................................................ 25
3.2.6 Status LED ................................................................................................................................. 26
3.3 Interface description ...........................................................................................................27
3.3.1 CAN interfaces ........................................................................................................................... 27
3.4 Software description ..........................................................................................................28
3.4.1 Software modules for the device ................................................................................................ 28
3.4.2 Programming notes for CODESYS projects ............................................................................... 31
3.4.3 Operating states ......................................................................................................................... 35
3.4.4 Performance limits of the device ................................................................................................ 37
4 Configurations 39
4.1 Set up the runtime system .................................................................................................39
4.1.1 Reinstall the runtime system ...................................................................................................... 40
4.1.2 Update the runtime system ......................................................................................................... 41
4.1.3 Verify the installation .................................................................................................................. 41
4.2 Set up the programming system ........................................................................................42
4.2.1 Set up the programming system manually ................................................................................. 42
4.2.2 Set up the programming system via templates ........................................................................... 46
4.3 Function configuration in general .......................................................................................46
4.3.1 System variables ........................................................................................................................ 46
4.4 Function configuration of the inputs and outputs ...............................................................47
4.4.1 Configure inputs ......................................................................................................................... 48
4.4.2 Configure outputs ....................................................................................................................... 53
4.5 Variables ............................................................................................................................56
4.5.1 Retain variables .......................................................................................................................... 56
4.5.2 Network variables ....................................................................................................................... 57
5 ifm function elements 58
5.1 ifm libraries for the device CR0403 ....................................................................................58
5.1.1 Library ifm_CR0403_V03yyzz.LIB .............................................................................................. 59
5.1.2 Library ifm_RAWCan_NT_Vxxyyzz.LIB...................................................................................... 60
5.1.3 Library ifm_CANopen_NT_Vxxyyzz.LIB ..................................................................................... 61
5.1.4 Library ifm_J1939_NT_Vxxyyzz.LIB ........................................................................................... 63
2
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Contents
5.2 ifm function elements for the device CR0403 ....................................................................64
5.2.1 Function element outputs ........................................................................................................... 65
5.2.2 Function elements: RAW-CAN (Layer 2) .................................................................................... 66
5.2.3 Function elements: CANopen ..................................................................................................... 92
5.2.4 Function elements: SAE J1939 ................................................................................................ 137
5.2.5 Function elements: processing input values ............................................................................. 168
5.2.6 Function elements: output functions ......................................................................................... 177
5.2.7 Function elements: system ....................................................................................................... 184
6 Diagnosis and error handling 202
6.1 Diagnosis .........................................................................................................................202
6.2 Fault .................................................................................................................................202
6.3 Response to system errors ..............................................................................................203
6.3.1 Example process for response to an error message ................................................................ 203
6.4 CAN / CANopen: errors and error handling .....................................................................203
7 Annex 204
7.1 System flags .....................................................................................................................204
7.2 Address assignment and I/O operating modes ................................................................205
7.2.1 Address assignment inputs / outputs ........................................................................................ 205
7.2.2 Possible operating modes inputs/outputs ................................................................................. 207
7.3 Error tables .......................................................................................................................210
7.3.1 Error flags ................................................................................................................................. 210
7.3.2 Errors: CAN / CANopen............................................................................................................ 210
8 Glossary of Terms 212
9 Index 225
10 Notizen • Notes • Notes 229
11 ifm weltweit • ifm worldwide • ifm à l’échelle internationale 233
3
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
History of the instructions (CR040n) ................................................................................................... 8
About this manual Copyright

1 About this manual

Copyright ............................................................................................................................................... 4
Overview: documentation modules for ecomatmobile devices ............................................................. 5
CODESYS programming manual .......................................................................................................... 5
What do the symbols and formats mean? ............................................................................................. 6
How is this documentation structured? ................................................................................................. 7
>

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
• 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
®
( www.io-link.com) is the property of the →PROFIBUS Nutzerorganisation e.V., Germany
®
is the property of the →Microsoft Corporation, USA
202
4
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
About this manual Overview: documentation modules for ecomatmobile devices
>

1.2 Overview: documentation modules for ecomatmobile devices

The documentation for ecomatmobile devices consists of the following modules:
1. Data sheet
Contents Technical data in a table
Source www.ifm.com > select your country > [Data sheet search] > CR0403 > [Technical data in PDF format]
2. Installation instructions / operating instructions
Contents Instructions for installation, electrical installation, (commissioning*), technical data Source The instructions are supplied with the device
They are also found on ifm's homepage:
3. Programming manual + online help
Contents Description of the configuration and the functions of the device software Source www.ifm.com > select your country > [Data sheet search] > CR0403 > [Operating instructions]
4. System manual "Know-how ecomatmobile"
www.ifm.com > select your country > [Data sheet search] > CR0403 > [Operating instructions]
17405
Contents Know-how about the following topics:
• Overview Templates and demo programs
• CAN, CANopen
• Control outputs
• User flash memory
• Visualisations
• Overview of the files and libraries used
Source www.ifm.com > select your country > [Data sheet search] > CR0403 > [Operating instructions]
*) The descriptions in brackets are only included in the instructions of certain devices.
>

1.3 CODESYS programming manual

17542
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"
5
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
NOTICE
About this manual What do the symbols and formats mean?
>

1.4 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.
CAUTION
Slight reversible injuries may result.
Property damage is to be expected or may result.
Important notes concerning malfunctions or disturbances
Other remarks
... Request for action
203
> ... Reaction, result
... "see"
abc Cross-reference
123 0x123 0b010
[...] Designation of pushbuttons, buttons or indications
Decimal number Hexadecimal number Binary number
6
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
About this manual How is this documentation structured?
>

1.5 How is this documentation structured?

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:
Refer to the table of contents to select a specific subject.
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.
Abbreviations and technical terms Annex.
In case of malfunctions or uncertainties please contact the manufacturer at: www.ifm.com > Select your country > [Contact].
We want to become even better! Each separate section has an identification number in the top right corner. If you want to inform us about any inconsistencies, indicate this number with the title and the language of this documentation. Thank you very much for your support!
We reserve the right to make alterations which can result in a change of contents of the documentation. You can find the current version on ifm's website at: www.ifm.com > Select country > [Data sheet search] > (Article no.) > [Operating instructions]
204
1508
7
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
About this manual History of the instructions (CR040n)
>

1.6 History of the instructions (CR040n)

12110
What has been changed in this manual? An overview:
Date Theme Change
2012-07-24 Target upgrade to v02
2012-10-04 FB PWM1000 RESULT corrected
2013-06-24 various new document structure
2013-09-05 Target Upgrade to V03
2014-01-13 FBs FASTCOUNT, INC_ENCODER, PERIOD • permissible frequency areas corrected
2014-04-28 Various function blocks More precise description of the function block input
2014-04-29 FB CAN_REMOTE_RESPONSE More precise description of the function block ENABLE
2014-05-12 Limitations CAN Limitations added for CAN, CANopen and CAN J1939
2014-06-30 Name of the documentation "System manual" renamed as "Programming manual"
2014-08-08 FB PERIOD completed by operating mode "phase measurement"
2014-08-26 Description of inputs, outputs highside / lowside replaced by positive / negative
2014-11-12 Chapter "Outputs (technology)" Section "Diagnostics of the binary outputs"
2015-01-13 Structure of documentation for error codes, system
flags
2015-03-10 Available memory Description improved
>
• new RESULT for FB PERIOD
CHANNEL
(LZS V03.02.zz or higher)
switching
supplemented or corrected
• error flags: now only in the annex, chapter System flags
• CAN / CANopen errors and error handling: now only in the system manual "Know-How"
error codes, EMCY codes: now in the annex, chapter Error tables
8
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Start-up behaviour of the controller ..................................................................................................... 10
Safety instructions Please note!

2 Safety instructions

Please note! ........................................................................................................................................... 9
What previous knowledge is required? ............................................................................................... 10
>
213

2.1 Please note!

6091
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 bodily 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]
9
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Safety instructions What previous knowledge is required?
>

2.2 What previous knowledge is required?

215
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.3 Start-up behaviour of the controller

6827
15233
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.
>
10
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Software description ............................................................................................................................ 28
Status LED .......................................................................................................................................... 26
System description Information about the device

3 System description

Information about the device ............................................................................................................... 11
Hardware description........................................................................................................................... 11
Interface description ............................................................................................................................ 27
>

3.1 Information about the device

This manual describes of the ecomatmobile family for mobile machines of ifm electronic gmbh:
BasicController: CR0403
>

3.2 Hardware description

Hardware setup ................................................................................................................................... 12
Inputs (technology) .............................................................................................................................. 13
Outputs (technology) ........................................................................................................................... 18
Note on wiring ...................................................................................................................................... 25
Safety instructions about Reed relays ................................................................................................. 25
975
14551
14081
11
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>

3.2.1 Hardware setup

Basic device without cover Protection IP 20
>
Available memory
>
FLASH-Speicher
14561
13736
13053
FLASH memory (non-volatile, slow memory)
1 536 kByte
overall existing in the device
Thereof the following memory areas are reserved for ...
maximum size of the application program 512 kByte
data other than the application program
64 kByte
read data with FB FLASH_READ ( page 186) (files: 128 bytes less for header)
The remaining rest of the memory is reserved for system internal purposes.
>
SRAM
SRAM (volatile, fast memory) overall existing in the device SRAM indicates here all kinds of volatile and fast memories.
Thereof the following memory areas are reserved for ...
data reserved by the application program 128 kByte
The remaining rest of the memory is reserved for system internal purposes.
>
592 kByte
FRAM
14027
2262
FRAM (non-volatile, fast memory)
2 kByte overall existing in the device FRAM indicates here all kinds of non-volatile and fast memories.
Thereof the following memory areas are reserved for ...
variables in the application program, declared as VAR_RETAIN 128 Byte
fixed as remanent defined flags (%MB0...127) 128 Byte
The remaining rest of the memory is reserved for system internal purposes.
12
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Input group I2 (IN8...IN11) ................................................................................................................... 17
System description Hardware description
>

3.2.2 Inputs (technology)

Analogue inputs ................................................................................................................................... 13
Digital inputs ........................................................................................................................................ 14
Input group I0 (IN0...IN3) ..................................................................................................................... 15
Input group I1 (IN4...IN7) ..................................................................................................................... 15
>
14090
Analogue inputs
15444
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
• resistance measurement 16...30 000 (measurement to GND) The voltage measurement can also be carried out ratiometrically (0...1000 ‰, adjustable via function
blocks). This means potentiometers or joysticks can be evaluated without additional reference voltage. A fluctuation of the supply voltage has no influence on this measured value.
As an alternative, an analogue channel can also be evaluated binarily.
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.
In = pin multifunction input n
(CR) = device
(1) = input filter
(2) = analogue current measuring
(3a) = binary-input plus switching (3b) = binary-input minus switching
(4a) = analogue voltage measuring 0...10 V (4b) = analogue voltage measuring 0...32 V
(5) = voltage
(6) = reference voltage
8971
Figure: principle block diagram multifunction input
Figure: block diagram of the resistor survey input
In = pin resistor survey input n
(CR) = device
(1) = input filter
(2) = constant-current source
(3) = voltage
13
8972
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Digital inputs
The binary input can be operated in following modes:
binary input plus switching (BL) for positive sensor signal
• binary input minus switching (BH) for negative sensor signal Depending on the device the binary inputs can configured differently. In addition to the protective
mechanisms against interference, the binary inputs are internally evaluated via an analogue stage. This enables diagnosis of the input signals. But in the application software the switching signal is directly available as bit information
In = pin binary-input n
(CR) = device
(1) = input filter
(2a) = input minus switching
(2b) = input plus switching
(3) = voltage
1015 7345
Figure: basic circuit of binary input minus switching / plus switching for negative and positive sensor signals
In = pin binary-input n
(S) = sensor
Basic circuit of binary input plus switching (BL) for positive sensor signal: Input = open signal = low (GND)
For some of these inputs (data sheet) the potential can be selected to which it will be switched.
Basic circuit of binary input minus switching (BH) for negative sensor signal: Input = open signal = high (supply)
In = pin binary-input n
(S) = sensor
14
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Input group I0 (IN0...IN3)
These inputs are a group of multifunction channels. These inputs can be used as follows (each input separately configurable):
• analogue input 0...20 mA
• analogue input 0...10 V
• analogue input 0...32 V
• voltage measurement ratiometric 0...1000
• binary input plus switching (BL) for positive sensor signal (with/without diagnosis)
• binary input minus switching (BH) for negative sensor signal
• fast input for e.g. incremental encoders and frequency or interval measurement chapter Possible operating modes inputs/outputs ( page 207)
Sensors with diagnostic capabilities to NAMUR can be evaluated. All inputs show the same behaviour concerning function and diagnosis.
Detailed description chapter Address assignment inputs / outputs ( page 205)
Configuration of each input is made via the application program:
• FB INPUT ( page 173) > input MODE
• FBs FASTCOUNT ( page 169), INC_ENCODER ( page 171) or PERIOD ( page 175)
> If the analogue inputs are configured for current measurement, the device switches to the safe
voltage measurement range (0...32 V DC) and the output RESULT is set accordingly in the function block INPUT when the final value (23 mA for > 40 ms) is exceeded. After about one second the input automatically switches back to the current measuring range.
>
14568
Input group I1 (IN4...IN7)
These inputs are a group of multifunction channels. These inputs can be used as follows (each input separately configurable):
• binary input plus switching (BL) for positive sensor signal
• input for resistance measurement (e.g. temperature sensors or fuel sensors) chapter Possible operating modes inputs/outputs ( page 207)
Sensors with diagnostic capabilities to NAMUR can be evaluated. Configuration of each input is made via the application program:
• FB INPUT ( page 173) > input MODE
14569
15
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Resistance measurement
Typical sensors on these inputs:
• tank level
• temperature (PT1000, NTC)
Figure: block diagram of the resistor survey input
In = pin resistor survey input n
(CR) = device
(1) = input filter
(2) = constant-current source
(3) = voltage
9773
8972
The resistance for this device is not linearly dependent on the resistance value, figure:
Figure: resolution dependent on the
resistance value
(1) = resistance value at the input
(2) = resolution
By how many ohms does the measured value change when the signal of the A/D converter on the input changes by 1? Examples:
• In the range of 1...100 the resolution is 1.2 .
• In the range of 1 k the resolution is approx. 2 .
• In the range of 2 k the resolution is approx. 3 .
• In the range of 3 k the resolution is approx. 6 .
• In the range of 6 k the resolution is approx. 10 .
• In the range of 10 k the resolution is approx. 11
• In the range of 20 k the resolution is approx. 60 .
8970
16
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Input group I2 (IN8...IN11)
These inputs are a group of multifunction channels. These inputs can be used as follows (each input separately configurable):
• binary input plus switching (BL) for positive sensor signal (with/without diagnosis) chapter Possible operating modes inputs/outputs ( page 207)
Sensors with diagnostic capabilities to NAMUR can be evaluated. Configuration of each input is made via the application program:
• FB INPUT ( page 173) > input MODE
14570
17
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Output group Q3 (OUT10, OUT11) ..................................................................................................... 24
System description Hardware description
>

3.2.3 Outputs (technology)

Protective functions of the outputs ...................................................................................................... 18
Output group Q0 (OUT0, OUT1) ......................................................................................................... 20
Output group Q1 (OUT2, OUT3, OUT8, OUT9) .................................................................................. 22
Output group Q2 (OUT4...OUT7) ........................................................................................................ 23
>
Protective functions of the outputs
The outputs of this device are protected against overload and short circuit within specific ranges. data sheet
>
Definition: overload
Overload can only be detected on an output with current measurement. Overload is defined as ...
"a nominal maximum current of 12.5 %" according to the data sheet.
>
Definition: short circuit
A short circuit can be detected on all outputs with diagnostic capabilities and is defined as follows: A short circuit is defined as ...
"a drop of the output voltage below 93.5% (± 2.0%) of the corresponding supply voltage." > A ground fault can only be detected in case of output = TRUE.
14093
15248
15249
15644
18
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Reaction of the outputs to overload or short circuit
>
Self-protection of the output
The hardware protects itself, irrespective of the operating mode of the output and of the fault detection. In case of a too high thermal load (caused by short circuit or overload), the output driver begins to clock.
The driver may be damaged in case of too long clocking of the output (several hours).
We therefore recommend: that you operate device outputs with diagnostic capabilities in the following mode, since, in this case, the software protects the drivers additionally by switching off:
• FB OUTPUT ( page 180) > input MODE = 16 This is also the default setting if only the flags in the control configuration are used.
>
Reaction according to the operating mode of the output
In case of an overload or a short circuit, the behaviour of the output depends on its operating mode ( FB OUTPUT ( page 180) > input MODE):
MODE=2: binary output plus switched: no diagnosis and no protection > the output continues to be operated.
MODE=15: binary output plus switched with diagnosis > error is detected and signalled on the output RESULT by the FB OUTPUT: e.g.: RESULT = 128, 141, 142 or 145. This depends on the type of output and the current or voltage at the output. The programmer can react to the error in the program.
MODE=16: binary output plus switched with diagnosis and protection > error is detected and signalled on the output RESULT by the FB OUTPUT. > The respective output is switched off.
> The logic state of the output remains unaffected by this!
>
15251
15253
15252
Reaction when using PWM or CURRENT_CONTROL
The situation is different when the FBs PWM or CURRENT_CONTROL are used: There is no diagnosis. The self-protection of the output becomes active.
For outputs with current feedback:
Query the typical current for the output in the application program! It is the responsibility of the programmer to react to the event.
15254
19
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Output group Q0 (OUT0, OUT1)
14583
These outputs are a group of multifunction channels. These outputs provide several function options (each output separately configurable):
• binary output, plus switching (BH) with diagnostic function and protection
• analogue current-controlled output (PWMi)
• analogue output with Pulse Width Modulation (PWM)
chapter Possible operating modes inputs/outputs (→ page 207) Configuration of each output is made via the application program:
FB OUTPUT ( page 180)> input MODE
PWM output: → FB PWM1000 (→ page 182) Current control and load current indication → FB CURRENT_CONTROL ( page 178)
For the limit values please make sure to adhere to the data sheet!
>
Diagnosis: binary outputs (via current and voltage measuring)
19433 19434
The diagnostics of these outputs is made via internal current and voltage measurement in the output:
Figure: principle block diagram
(1) Output channel (2a) Read back channel for diagnosis via current measuring
(2b) Read back channel for diagnosis via voltage measuring
(3) Pin output n (4) Load
>
Diagnosis: overload
19437 15249
Overload can only be detected on an output with current measurement. Overload is defined as ...
"a nominal maximum current of 12.5 %" according to the data sheet.
>
Diagnosis: wire break (via current measurement)
19435 19400
Wire-break detection is done via the read back channel. When the output is switched (Qn=TRUE) wire break is detected when no current flows on the resistor Ri (no voltage drops). Without wire break the load current flows through the series resistor Ri generating a voltage drop which is evaluated via the read back channel.
>
Diagnosis: wire break (via voltage measurement)
19436 19404
Wire-break detection is done via the read back channel. When the output is blocked (Qn=FALSE) wire break is detected when the resistor Ru pulls the read back channel to HIGH potential (VBB). Without the wire break the low-resistance load (RL < 10 kΩ) would force a LOW (logical 0).
20
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Diagnosis: short circuit
Short-circuit detection is done via the read back channel. When the output is switched (Qn=TRUE) short circuit against GND is detected when the read back channel is pulled to LOW potential (GND).
19405
21
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Output group Q1 (OUT2, OUT3, OUT8, OUT9)
These outputs are a group of multifunction channels. These outputs provide several function options (each output separately configurable):
• binary output, plus switching (BH) with/without diagnostic function
• analogue output with Pulse Width Modulation (PWM)
chapter Possible operating modes inputs/outputs (→ page 207) Configuration of each output is made via the application program:
→ FB OUTPUT (→ page 180)> input MODE PWM output: → FB PWM1000 (→ page 182)
For the limit values please make sure to adhere to the data sheet!
>
Diagnosis: binary outputs (via voltage measuring)
The diagnostics of these outputs is made via internal voltage measurement in the output:
14577
19403 19397
Figure: principle block diagram
(1) Output channel (2) Read back channel for diagnosis
(3) Pin output n (4) Load
>
Diagnosis: overload
19448
The outputs have no current measuring, no overload detection.
>
Diagnosis: wire break
19404
Wire-break detection is done via the read back channel. When the output is blocked (Qn=FALSE) wire break is detected when the resistor Ru pulls the read back channel to HIGH potential (VBB). Without the wire break the low-resistance load (RL < 10 kΩ) would force a LOW (logical 0).
>
Diagnosis: short circuit
19405
Short-circuit detection is done via the read back channel. When the output is switched (Qn=TRUE) short circuit against GND is detected when the read back channel is pulled to LOW potential (GND).
22
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Output group Q2 (OUT4...OUT7)
These outputs are a group of multifunction channels. These outputs provide several function options (each output separately configurable):
• binary output, plus switching (BH)
• analogue output with Pulse Width Modulation (PWM)
• These outputs are not able for diagnosis.
chapter Possible operating modes inputs/outputs (→ page 207) Configuration of each output is made via the application program:
→ FB OUTPUT (→ page 180)> input MODE PWM output: → FB PWM1000 (→ page 182)
For the limit values please make sure to adhere to the data sheet!
15235
23
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>
Output group Q3 (OUT10, OUT11)
These outputs are a group of multifunction channels. These outputs provide several function options (each output separately configurable):
• binary output, plus switching (BH) with/without diagnostic function
• analogue output with Pulse Width Modulation (PWM)
chapter Possible operating modes inputs/outputs (→ page 207) Configuration of each output is made via the application program:
→ FB OUTPUT (→ page 180)> input MODE PWM output: → FB PWM1000 (→ page 182)
For the limit values please make sure to adhere to the data sheet!
>
Diagnosis: binary outputs (via voltage measuring)
The diagnostics of these outputs is made via internal voltage measurement in the output:
15237
19403 19397
Figure: principle block diagram
(1) Output channel (2) Read back channel for diagnosis
(3) Pin output n (4) Load
>
Diagnosis: overload
19448
The outputs have no current measuring, no overload detection.
>
Diagnosis: wire break
19404
Wire-break detection is done via the read back channel. When the output is blocked (Qn=FALSE) wire break is detected when the resistor Ru pulls the read back channel to HIGH potential (VBB). Without the wire break the low-resistance load (RL < 10 kΩ) would force a LOW (logical 0).
>
Diagnosis: short circuit
19405
Short-circuit detection is done via the read back channel. When the output is switched (Qn=TRUE) short circuit against GND is detected when the read back channel is pulled to LOW potential (GND).
24
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>

3.2.4 Note on wiring

1426
The wiring diagrams (installation instructions of the devices, chapter "Wiring") describe the standard device configurations. The wiring diagram helps allocate the input and output channels to the IEC addresses and the device terminals.
The individual abbreviations have the following meaning:
A Analogue input
BH Binary high side input: minus switching for negative sensor signal
BL Binary low side input: plus switching for positive sensor signal
CYL Input period measurement
ENC Input encoder signals
FRQ Frequency input
H bridge Output with H-bridge function
PWM
PWMi PWM output with current measurement
IH Pulse/counter input, high side: minus switching for negative sensor signal
IL Pulse/counter input, low side: plus switching for positive sensor signal
R Read back channel for one output
Binary high side output: plus switching for positive output signal
Binary low side output: minus switching for negative output signal
Pulse-width modulated signal
Allocation of the input/output channels: Catalogue, mounting instructions or data sheet
>

3.2.5 Safety instructions about Reed relays

For use of non-electronic switches please note the following:
Contacts of Reed relays may be clogged (reversibly) if connected to the device inputs without
series resistor.
Remedy: Install a series resistor for the Reed relay:
Series resistor = max. input voltage / permissible current in the Reed relay Example: 32 V / 500 mA = 64 Ohm
The series resistor must not exceed 5 % of the input resistance RE of the device input (→ data
sheet). Otherwise, the signal will not be detected as TRUE. Example: RE = 3 000 Ohm max. series resistor = 150 Ohm
7348
25
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Hardware description
>

3.2.6 Status LED

The operating states are indicated by the integrated status LED (default setting).
LED colour Flashing frequency Description
Off permanently off no operating voltage
Red / green briefly on INIT state, reset checks
Green 5 Hz no runtime system loaded
Green 2 Hz RUN state: application is running
Green permanently on STOP state: application is stopped
Red 5 Hz
Red 10 Hz
Red permanently on
.
The operating states STOP and RUN can be changed by the programming system.
>
STOP state with error: application is stopped reason: undervoltage
STOP state with error: application is stopped Cause: exceeded timeout of the application or visualisation:
Delete the application! PowerOn reset Reload the application into the device
FATAL ERROR: application is stopped Cause: software watchdog has failed PowerOn reset
If without success:
Goto Bootloader PowerOn reset Reload the BasicSystem into the device Reload the application into the device
If without success: Hardware error: send device to ifm!
7998
Control the LED in the application program
Via SET_LED frequency and color of the status LED can be changed in the application program.
The use of the LED function block in the application program replaces the system setting of the
status LED in the RUN state.
15481
26
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
CAN interfaces .................................................................................................................................... 27
CAN: interfaces and protocols ............................................................................................................. 27
System description Interface description
>

3.3 Interface description

>
14098

3.3.1 CAN interfaces

14101
Connections and data data sheet
>
CAN: interfaces and protocols
14589 15238
The devices are equipped with several CAN interfaces depending on the hardware design. Basically, all interfaces can be used with the following functions independently of each other:
• RAW-CAN (Layer 2): CAN on level 2 ( chapter Function elements: RAW-CAN (Layer 2) ( page 66))
• CANopen master / CANopen slave ( chapter Function elements: CANopen ( page 92))
• CANopen network variables (via CODESYS) ( chapter Network variables ( page 57))
• SAE J1939 (for drive management, chapter Function elements: SAE J1939 ( page 137))
• Bus load detection
• Error frame counter
• Download interface
• 100 % bus load without package loss
The following CAN interfaces and CAN protocols are available in this ecomatmobile device:
14591
CAN interface
Default download ID
CAN 1 CAN 2 CAN 3 CAN 4
ID 127 ID 126 ID 125 ID 124
CAN Layer 2 CAN Layer 2
CAN protocols
CANopen CANopen
Interface do not
exist
Interface do not
SAE J1939 SAE J1939
Standard baud rate = 250 Kbits/s
All CAN interfaces can operate with all CAN protocols at the same time. The IDs used must not
impair each other!
exist
27
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
Performance limits of the device ......................................................................................................... 37
Libraries ............................................................................................................................................... 30
System description Software description
>

3.4 Software description

Software modules for the device ......................................................................................................... 28
Programming notes for CODESYS projects ....................................................................................... 31
Operating states .................................................................................................................................. 35
>

3.4.1 Software modules for the device

Bootloader ........................................................................................................................................... 29
Runtime system ................................................................................................................................... 29
Application program............................................................................................................................. 29
The software in this device communicates with the hardware as below:
software module Can user change the module? By means of what tool?
Application program with libraries
Runtime system *)
Yes
Upgrade yes
Downgrade no
Bootloader No ---
(Hardware) No ---
*) The runtime system version number must correspond to the target version number in the CODESYS target system setting. chapter Set up the target ( page 43)
Below we describe this software module:
CODESYS,
MaintenanceTool
MaintenanceTool
14107
14110
28
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Software description
>
Bootloader
14111
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.
>
Runtime system
14112
Basic program in the device, establishes the connection between the hardware of the device and the application program.
On delivery, there is normally no runtime system loaded in the controller (LED flashes green at 5 Hz). Only the bootloader is active in this operating mode. It provides the minimum functions for loading the runtime system, among others support of the interfaces (e.g. CAN).
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.
The runtime system is provided with this documentation on a separate data carrier. In addition, the current version can be downloaded from the website of ifm electronic gmbh: www.ifm.com > Select your country > [Service] > [Download]
>
Application program
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.
29
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
System description Software description
>
Libraries
ifm electronic offers a series of libraries (*.LIB) suitable for each device, containing the program
modules for the application program. Examples:
Library Use
ifm_CR0403_Vxxyyzz.LIB Device-specific library
ifm_RawCAN_NT_Vxxyyzz.LIB (optional)
ifm_CANopen_NT_Vxxyyzz.LIB (optional)
ifm_J1939_NT_Vxxyyzz.LIB (optional)
Detail information ifm libraries for the device CR0403 ( page 58)
Must always be contained in the application program!
when a CAN interface of the device is to be operated with CAN Layer 2
when a CAN interface of the device is to be operated as CANopen master or CANopen slave
when a CAN interface of the device is to communicate with a motor control
15409
30
Loading...
+ 203 hidden pages