CR0401 Original Programming Manual BasicController
CR0401 Original Programming Manual BasicController
BasicController
CR0401
English
2015-03-30
7390999_04_UK
1
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Contents
Contents
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) .................................................................................................................. 19
3.2.4 Note on wiring ............................................................................................................................ 24
3.2.5 Safety instructions about Reed relays ........................................................................................ 24
3.2.6 Status LED ................................................................................................................................. 25
3.3 Interface description ...........................................................................................................26
3.3.1 CAN interfaces ........................................................................................................................... 26
3.4 Software description ..........................................................................................................27
3.4.1 Software modules for the device ................................................................................................ 27
3.4.2 Programming notes for CODESYS projects ............................................................................... 30
3.4.3 Operating states ......................................................................................................................... 34
3.4.4 Performance limits of the device ................................................................................................ 36
4 Configurations 38
4.1 Set up the runtime system .................................................................................................38
4.1.1 Reinstall the runtime system ...................................................................................................... 39
4.1.2 Update the runtime system......................................................................................................... 40
4.1.3 Verify the installation .................................................................................................................. 40
4.2 Set up the programming system ........................................................................................41
4.2.1 Set up the programming system manually ................................................................................. 41
4.2.2 Set up the programming system via templates........................................................................... 45
4.3 Function configuration in general .......................................................................................45
4.3.1 System variables ........................................................................................................................ 45
4.4 Function configuration of the inputs and outputs ...............................................................46
4.4.1 Configuration of the inputs and outputs (default setting) ............................................................ 46
4.4.2 Configure inputs ......................................................................................................................... 47
4.4.3 Configure outputs ....................................................................................................................... 52
4.5 Variables ............................................................................................................................54
4.5.1 Retain variables.......................................................................................................................... 54
4.5.2 Network variables ....................................................................................................................... 55
2
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Contents
7 Annex 202
7.1 System flags.....................................................................................................................202
7.2 Address assignment and I/O operating modes................................................................203
7.2.1 Address assignment inputs / outputs ........................................................................................ 203
7.2.2 Possible operating modes inputs/outputs ................................................................................. 205
7.3 Error tables .......................................................................................................................208
7.3.1 Error flags ................................................................................................................................. 208
7.3.2 Errors: CAN / CANopen............................................................................................................ 208
9 Index 223
3
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
About this manual Copyright
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
History of the instructions (CR040n) ................................................................................................... 8
202
>
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
4
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
About this manual Overview: documentation modules for ecomatmobile devices
>
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 (CR0401) Runtime System V03.02 2015-03-30
About this manual What do the symbols and formats mean?
>
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
6
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
About this manual 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]
7
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
About this manual History of the instructions (CR040n)
>
8
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Safety instructions Please note!
2 Safety instructions
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 (CR0401) Runtime System V03.02 2015-03-30
Safety instructions What previous knowledge is required?
>
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.
>
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!
10
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Information about the device
3 System description
This manual describes of the ecomatmobile family for mobile machines of ifm electronic gmbh:
• BasicController: CR0401
>
11
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
Available memory
13736
>
FLASH-Speicher
13053
SRAM
12269
FRAM
2262
12
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
13
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
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.
8971
>
14
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
Digital inputs
1015
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
Basic circuit of binary input plus switching (BL) Basic circuit of binary input minus switching (BH)
for positive sensor signal: for negative sensor signal:
Input = open signal = low (GND) Input = open signal = high (supply)
For some of these inputs (→ data sheet) the potential can be selected to which it will be switched.
15
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
16
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
Resistance measurement
9773
8970
The resistance for this device is not linearly dependent on the resistance value, → figure:
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 Ω.
17
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
18
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
The outputs of this device are protected against overload and short circuit within specific ranges.
→ data sheet
>
Definition: overload
15249
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.
19
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
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 178) > input MODE = 16
This is also the default setting if only the flags in the control configuration are used.
>
In case of an overload or a short circuit, the behaviour of the output depends on its operating mode
(→ FB OUTPUT (→ page 178) > 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!
>
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.
20
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
21
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
The diagnostics of these outputs is made via internal voltage measurement in the output:
>
Diagnosis: overload
19448
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).
>
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 (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
The diagnostics of these outputs is made via internal voltage measurement in the output:
>
Diagnosis: overload
19448
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).
>
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).
23
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
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
Binary high side output: plus switching for positive output signal
BL Binary low side input: plus switching for positive sensor signal
Binary low side output: minus switching for negative output signal
CYL Input period measurement
ENC Input encoder signals
FRQ Frequency input
H bridge Output with H-bridge function
PWM Pulse-width modulated signal
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
Contacts of Reed relays may be clogged (reversibly) if connected to the device inputs without
series resistor.
24
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Hardware description
>
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
STOP state with error: application is stopped
Red 5 Hz
reason: undervoltage
STOP state with error: application is stopped
Cause: exceeded timeout of the application or visualisation:
Red 10 Hz 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
Red permanently on
PowerOn reset
Reload the BasicSystem into the device
Reload the application into the device
If without success:
Hardware error: send device to ifm!
.
The operating states STOP and RUN can be changed by the programming system.
>
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.
25
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Interface description
>
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 64))
• CANopen master / CANopen slave (→ chapter Function elements: CANopen (→ page 90))
• CANopen network variables (via CODESYS) (→ chapter Network variables (→ page 55))
• SAE J1939 (for drive management, → chapter Function elements: SAE J1939 (→ page 135))
• Bus load detection
• Error frame counter
• Download interface
• 100 % bus load without package loss
14591
The following CAN interfaces and CAN protocols are available in this ecomatmobile device:
CAN interface CAN 1 CAN 2 CAN 3 CAN 4
26
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
Bootloader ........................................................................................................................................... 28
Runtime system ................................................................................................................................... 28
Application program............................................................................................................................. 28
Libraries ............................................................................................................................................... 29
14110
27
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
Bootloader
14111
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.
28
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
Libraries
15409
ifm electronic offers a series of libraries (*.LIB) suitable for each device, containing the program
modules for the application program. Examples:
Library Use
ifm_CR0401_Vxxyyzz.LIB Device-specific library
Must always be contained in the application program!
ifm_RawCAN_NT_Vxxyyzz.LIB (optional)
when a CAN interface of the device is to be operated with CAN
Layer 2
ifm_CANopen_NT_Vxxyyzz.LIB (optional)
when a CAN interface of the device is to be operated as
CANopen master or CANopen slave
ifm_J1939_NT_Vxxyyzz.LIB (optional)
when a CAN interface of the device is to communicate with a
motor control
Detail information → ifm libraries for the device CR0401 (→ page 56)
29
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
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 may contain maximum 8000 function elements; in this device maximum 512
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 function block call in a function:
• every time there is an additional initialisation call and
• the data of the last call gets lost.
30
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
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.
31
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
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.
32
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
The ifm Maintenance Tool serves for easy transfer of the program code from the programming station
to the controller. As a matter of principle each application software can be copied to the controllers
using the ifm Maintenance Tool. Advantage: A programming system with CODESYS licence is not
required.
Here you will find the current ifm Maintenance Tool:
→ www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines]
→ ecomatmobile DVD "Software, tools and documentation" under the tab 'R360 tools [D/E]'
>
We recommend the following sequence, if the application software is to be copied to the series
machine and used:
• Saving the software
After completion of program development the latest version of the application program loaded in
the controller using the ifm Maintenance Tool has to be read from the controller and saved on a
data carrier using the name project_file.RESX. Only this process ensures that the application
software and its checksums are stored.
• Download of the software.
To equip all machines of a series production with an identical software only this file may be loaded
in the controllers using the ifm Maintenance Tool.
• An error in the data of this file is automatically recognised by the integrated checksum when
loaded again using the ifm Maintenance Tool.
33
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
After power on the ecomatmobile device can be in one of five possible operating states:
• BOOTLOADER
• INIT
• STOP
• RUN
• SYSTEM STOP
>
STOP state
8288
34
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
RUN state
8287
ERROR state
8290
35
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
>
Watchdog behaviour
15365
In this device, a watchdog monitors the program runtime of the CODESYS application.
If the maximum watchdog time (100 ms) is exceeded:
> the device changes to the "Timeout Error" state
> all processes are stopped (reset)
> all outputs are switched off
> the status LED flashes red at 10 Hz
Eliminate the fault:
Delete application program!
PowerOn reset
Reload the application program into the device
If the watchdog in question fails:
> a second watchdog leads the device to the state "Fatal Error"
> the status LED lights red
Eliminate the fault:
PowerOn reset
If without success:
Goto Bootloader
PowerOn reset
Reload the runtime system into the device
Reload the application program into the device
If without success:
Hardware error: send device to ifm!
36
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
System description Software description
>
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).
Some Raw-CAN function elements enable transmitting and receiving of several messages in one PLC
cycle as the messages are temporarily stored in a FiFo:
- CAN_TX..., → Function elements: transmit RAW-CAN data
- CAN_RX_ENH_FIFO (→ page 74)
- CAN_RX_RANGE_FIFO (→ page 78)
The number of FIFo messages is limited. The following limitations of the devices are valid:
Device BasicController: CR040n,
CR041n, CR043n
Criterion PDM360 NG: CR108n
BasicDisplay: CR045n
SmartController: CR253n
max. FiFo transmit
- with FB CAN_TX... 4 messages 4 messages
- with FB CAN_TX_ENH... 16 messages 16 messages
max. FiFo receive
- with FB CAN_RX_..._FIFO 32 messages 32 messages
>
37
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the runtime system
4 Configurations
The device configurations described in the corresponding installation instructions or in the Annex
(→ page 202) to this documentation are used for standard devices (stock items). They fulfil the
requested specifications of most applications.
Depending on the customer requirements for series use it is, however, also possible to use other
device configurations, e.g. with respect to the inputs/outputs and analogue channels.
>
38
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the runtime system
>
On delivery of the ecomatmobile controller no runtime system is normally loaded (LED flashes green
at 5 Hz). Only the boot loader is active in this operating mode. It provides the minimum functions for
loading the operating system (e.g. RS232, CAN).
Normally it is necessary to download the runtime system only once. The application program can then
be loaded to the device (also several times) without influencing 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 at:
→ www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines]
NOTICE
Risk of data loss!
In case of power failure during the data transmission data can be lost so that the device is no longer
functionable. Repair is only possible by ifm electronic.
► Ensure an uninterrupted power supply during the data transmission!
NOTE
The software versions suitable for the selected target must always be used:
• runtime system (ifm_CR0401_Vxxyyzz.RESX),
• PLC configuration (ifm_CR0401_Vxx.CFG),
• device library (ifm_CR0401_Vxxyyzz.LIB ) and
• the further files.
V version
xx: 00...99 target version number
yy: 00...99 release number
zz: 00...99 patch number
The basic file name (e.g. "CR0401") and the software version number "xx" (e.g. "01") 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.
4368
It may happen that the target system cannot or only partly be programmed with your currently
installed version of CODESYS. In such a case, please contact the technical support department of ifm
electronic gmbh.
The runtime system is transferred to the device using the separate program "Maintenance Tool". (The
downloader is on the ecomatmobile DVD "Software, tools and documentation" or can be downloaded
from ifm's website, if necessary):
→ www.ifm.com > Select your country > [Service] > [Download] > [Systems for mobile machines].
Normally the application program is loaded to the device via the programming system. But it can also
be loaded using the "Maintenance Tool" if it was first read from the device.
39
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the runtime system
>
An older runtime system is already installed on the device. Now, you would like to update the runtime
system on the device?
14158
NOTICE
Risk of data loss!
When deleting or updating the runtime system all data and programs on the device are deleted.
► Save all required data and programs before deleting or updating the runtime system!
3084
When the operating system software or the CODESYS runtime system is considerably improved, ifm
releases a new version. The versions are numbered consecutively (V01, V02, V03, ...).
Please see the respective documentation for the new functions of the new software version. Note
whether special requirements for the hardware version are specified in the documentation.
If you have a device with an older version and if the conditions for the hardware and your project are
OK, you can update your device to the new software version.
For this operation, the same instructions apply as in the previous chapter 'Reinstall the runtime
system'.
>
40
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the programming system
>
41
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the programming system
>
When creating a new project in CODESYS the target file corresponding to the device must be loaded.
► Select the requested target file in the dialogue window [Target Settings] in the menu
[Configuration].
> The target file constitutes the interface to the hardware for the programming system.
> At the same time, several important libraries and the PLC configuration are loaded when selecting
the target.
► If necessary, in the window [Target settings] > tab [Network functionality] > activate [Support
parameter manager] and / or activate [Support network variables].
► If necessary, remove the loaded (3S) libraries or complement them by further (ifm) libraries.
► Always complement the appropriate device library ifm_CR0401_Vxxyyzz.LIB manually!
NOTE
The software versions suitable for the selected target must always be used:
• runtime system (ifm_CR0401_Vxxyyzz.RESX),
• PLC configuration (ifm_CR0401_Vxx.CFG),
• device library (ifm_CR0401_Vxxyyzz.LIB ) and
• the further files.
V version
xx: 00...99 target version number
yy: 00...99 release number
zz: 00...99 patch number
The basic file name (e.g. "CR0401") and the software version number "xx" (e.g. "01") 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.
4368
It may happen that the target system cannot or only partly be programmed with your currently
installed version of CODESYS. In such a case, please contact the technical support department of ifm
electronic gmbh.
42
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the programming system
>
The PLC configuration is automatically loaded with the target system. The PLC configuration maps the
contents of the file CR0401.cfg in CODESYS. Like this, the programmer has easy access to
predefined system and error flags, inputs and outputs as well as to the CAN interfaces of the device.
To access the PLC configuration (e.g. CR1080):
► Click on the tab [Resources] in CoDeSys:
> Based on the configuration the following is available in the program environment for the user:
• System and error flags
Depending on the application and the application program, these flags must be processed and
evaluated. Access is made via their symbolic names.
• Structure of the inputs and outputs
These can be directly symbolically designated (highly recommended!) in the window [PLC
Configuration] (example → figure below) and are available in the whole project as [Global
Variables].
43
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Set up the programming system
>
In the CODESYS PLC configuration you now have to declare the CAN interface(s).
► Right-click on the name of the PLC configuration. [CANopen Interface [FIX]] of the desired CAN
interface.
► Click on [Append Subelement].
► Even if the device is operated as a CANopen slave: Click on [CANopen Master...]:
Info
If the device is operated as a slave, the selection [CanSlave_Device] would also be possible.
For the simpler configuration as a master, all CAN Layer 2 and network variable functions can also be
used.
> The CAN parameters of the PLC configuration are displayed. Some CAN parameters are already
set as default:
► If the device is operated on CAN Layer 2 or as a slave via network variables or CAN_RX /
CAN_TX:
Check whether the correct baud rate is set for the device (baud rate must be identical for all
participants).
► If the device is operated as a CANopen master:
Check all parameter settings.
► Close the window [PLC Configuration].
► In the menu [File] > [Save as ...] give a sensible name to the project and save it in the requested
directory.
► In the application program always call an own instance of the FB CANOPEN_ENABLE
(→ page 91) for every CAN interface!
44
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration in general
ifm offers ready-to-use templates (program templates), by means of which the programming system
can be set up quickly, easily and completely.
970
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 V…\Projects\Template_DVD_V…
► Open the requested template in CODESYS via:
[File] > [New from template…]
> CODESYS creates a new project which shows the basic program structure. It is strongly
recommended to follow the shown procedure.
>
All system variables (→ chapter System flags (→ page 202)) have defined addresses which cannot be
shifted.
45
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
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).
• Constants are predefined (e.g. IN_DIGITAL_H) in the device libraries (e.g. ifm_CR0020_Vx.LIB)
for the configuration of the inputs and outputs.
For details → Possible operating modes inputs/outputs (→ page 205).
>
• All inputs and outputs are in the binary mode (plus switching!) when delivered.
• The diagnostic function is not active.
• The overload protection is active.
46
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
Valid operating modes → chapter Possible operating modes inputs/outputs (→ page 205)
>
Contacts of Reed relays may be clogged (reversibly) if connected to the device inputs without
series resistor.
47
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
Via the input FILTER in the FB INPUT (→ page 173) a software filter can be configured which filters the
measured input voltage at the analogue inputs.
The filter behaves like a low-pass filter; the filter frequency is set with the value entered in FILTER. For
FILTER, values from 0...8 are permitted.
Table: limit frequency software low-pass filter at the analogue input
Step response [ms] for ...
FILTER Filter frequency [Hz] Remarks
0…70 % 0…90 % 0…99 %
0 Filter deactivated
1 120 2 4 7
2 47 5 9 17
3 22 10 18 35
4 10 19 36 72 recommended
5 5 38 73 146
6 2.5 77 147 293
7 1.2 154 294 588
8 0.7 308 589 1177
Figure: course of time binary signal at the input upon switch-on / switch-off
48
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
49
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
50
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
Fast inputs
8292
The devices dispose of fast counting/pulse inputs for an input frequency up to 30 kHz (→ data sheet).
If, for example, mechanical switches are connected to these inputs, there may be faulty signals in the
controller due to contact bouncing.
Appropriate function blocks are e.g.:
FAST_COUNT Counter block for fast input pulses
INC_ENCODER (→ page 170) Up/down counter function for the evaluation of encoders
PERIOD (→ page 175) Measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel
When using these units, the parameterised inputs and outputs are automatically configured, so the
programmer of the application does not have to do this.
>
The permissible high input frequencies also ensure the detection of faulty signals, e.g. bouncing
contacts of mechanical switches.
► If required, suppress the faulty signals in the application program!
51
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
Valid operating modes → chapter Possible operating modes inputs/outputs (→ page 205)
>
The following operating modes are possible for the device outputs (→ data sheet):
• binary output, plus switching (BH) with/without diagnostic function
15451
Qn = pin output n
(L) = load
WARNING
Dangerous restart possible!
Risk of personal injury! Risk of material damage to the machine/plant!
If in case of a fault an output is switched off via the hardware, the logic state generated by the
application program is not changed.
► Remedy:
• Reset the output logic in the application program!
• Remove the fault!
• Reset the outputs depending on the situation.
>
52
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Function configuration of the inputs and outputs
>
PWM outputs
14705
The following operating modes are possible for the device outputs (→ data sheet):
• PWM output, plus switching (BH) without diagnostic function
15451
Qn = pin output n
(L) = load
WARNING
Property damage or bodily injury possible due to malfunctions!
For outputs in PWM mode:
• there are no diagnostic functions
• the overload protection OUT_OVERLOAD_PROTECTION is NOT active
9980
NOTE
PWM outputs must NOT be operated in parallel, e.g. in order to increase the max. output current. The
outputs do not operate synchronously.
Otherwise the entire load current could flow through only one output. The current measurement would
no longer function.
>
Availability of PWM
14711
The following function blocks are available for the PWM function:
PWM1000 (→ page 180) Initialises and configures a PWM-capable output channel
the mark-to-space ratio can be indicated in steps of 1 ‰
53
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Variables
>
4.5 Variables
In this chapter you will learn more about how to handle variables.
14486
>
Retain variables can be saved automatically in a protected memory area and be reloaded
automatically during a reboot.
14166
54
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Configurations Variables
>
In the device the data type RETAIN is only stored in the volatile memory (RAM) during the runtime.
To save the data permanently, at the end of each cycle they are automatically be saved in the FRAM
memory ¹).
¹) FRAM indicates here all kinds of non-volatile and fast memories.
NOTE
In this device, do NOT use the following functions from the 3S library SysLibPlcCtrl.lib:
- FUN SysSaveRetains
- FUN SysRestoreRetains
>
After power on and before the first program cycle the device automatically writes the saved data back
to the working memory once. To do so, no additional FBs must be integrated into the application
program.
NOTE
In this device, do NOT use the following functions from the 3S library SysLibPlcCtrl.lib:
- FUN SysSaveRetains
- FUN SysRestoreRetains
>
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.
► Integrate the following library/libraries into the CODESYS project:
3S_CANopenNetVar.lib
ifm_NetVarLib_NT_Vxxyyzz.lib
>
55
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
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.
>
Here you will find a list of the ifm function elements matching this device, sorted according to the
CODESYS libraries.
56
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
>
57
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
>
58
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
>
59
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
60
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm libraries for the device CR0401
>
61
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
Here you will find the description of the ifm function elements suitable for this device, sorted by topic.
62
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
63
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
Here we describe the RAW-CAN function blocks (CAN Layer 2) of ifm electronic to be used in the
application program.
>
CAN_ENABLE ..................................................................................................................................... 65
CAN_RECOVER ................................................................................................................................. 66
CAN_SETDOWNLOADID ................................................................................................................... 67
CAN_STATUS ..................................................................................................................................... 68
15049
64
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
65
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_RECOVER
7512
Symbol in CODESYS:
>
Description
7513
66
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
67
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_STATUS
7499
Symbol in CODESYS:
>
Description
7501
68
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
69
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_RX .............................................................................................................................................. 71
CAN_RX_ENH .................................................................................................................................... 72
CAN_RX_ENH_FIFO .......................................................................................................................... 74
CAN_RX_RANGE ............................................................................................................................... 76
CAN_RX_RANGE_FIFO ..................................................................................................................... 78
15050
70
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_RX
7586
Symbol in CODESYS:
>
Description
7588
71
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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 71)):
• select the frame type (11 or 29 bits),
• define a mask for the evaluation of the CAN ID.
72
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
73
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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 72)). 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.
>
74
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
75
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_RX_RANGE
7592
Symbol in CODESYS:
>
Description
7594
76
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
77
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_RX_RANGE_FIFO
7601
Symbol in CODESYS:
>
Description
7603
No overwriting takes place when the FiFo is full. Inbound messages will be lost.
In this event:
► Use ENABLE to deactivate and reactivate the function.
> The FiFo is deleted and can be newly filled.
>
78
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
79
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_TX .............................................................................................................................................. 81
CAN_TX_ENH ..................................................................................................................................... 82
CAN_TX_ENH_CYCLIC ..................................................................................................................... 84
15055
80
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_TX
7522
Symbol in CODESYS:
>
Description
7523
81
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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 81) is not required.
> If an instance of this FB is called several times during a cycle, the data is also sent several times.
>
82
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
83
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_TX_ENH_CYCLIC
7568
Symbol in CODESYS:
>
Description
7569
If a period is too short, this could lead to a high bus load which could affect the performance of the
complete system.
>
84
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
85
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_REMOTE_REQUEST ................................................................................................................ 87
CAN_REMOTE_RESPONSE ............................................................................................................. 88
15057
86
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CAN_REMOTE_REQUEST
7625
Symbol in CODESYS:
>
Description
7627
87
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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
max. 40 remote messages
BasicDisplay: CR045n
PDM360 NG: CR108n max. 100 remote messages
>
88
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
89
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
For CANopen, ifm electronic provides a number of function elements which will be explained in the
following.
>
CANOPEN_ENABLE........................................................................................................................... 91
CANOPEN_GETBUFFERFLAGS ....................................................................................................... 93
CANOPEN_GETSTATE...................................................................................................................... 95
CANOPEN_SETSTATE ...................................................................................................................... 97
15061
90
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_ENABLE
7785
Symbol in CODESYS:
>
Description
7787
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 65) has not been activated before.
>
91
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
92
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETBUFFERFLAGS
7890
Symbol in CODESYS:
>
Description
7892
93
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
94
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
95
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
96
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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 101). At the same time admissibility checks are
carried out. For reasons of consistency no inputs are provided for this purpose.
97
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
98
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
99
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETNMTSTATESLAVE
7851
Symbol in CODESYS:
>
Description
7853
100
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_NMTSERVICES
7843
Symbol in CODESYS:
>
Description
7844
101
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
102
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
103
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETODCHANGEDFLAG
7927
Symbol in CODESYS:
>
Description
7928
104
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_READOBJECTDICT
7933
Symbol in CODESYS:
>
Description
7935
105
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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!
>
106
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
107
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
Here you will find ifm function elements for CANopen handling of Service Data Objects (SDOs).
108
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
109
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
110
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
111
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
112
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
113
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
114
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
115
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
116
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
117
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
118
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
119
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
120
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETSYNCSTATE.......................................................................................................... 122
CANOPEN_SETSYNCSTATE .......................................................................................................... 124
15069
121
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
122
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
123
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_SETSYNCSTATE
7883
Symbol in CODESYS:
>
Description
7884
124
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
125
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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
>
126
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETGUARDHBSTATSLV
7902
Symbol in CODESYS:
>
Description
7904
127
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
128
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETEMCYMESSAGES................................................................................................. 130
CANOPEN_GETERRORREGISTER ................................................................................................ 132
CANOPEN_SENDEMCYMESSAGE ................................................................................................ 133
15073
129
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
130
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
131
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_GETERRORREGISTER
7915
Symbol in CODESYS:
>
Description
7917
CANOPEN_GETERRORREGISTER reads the error registers 0x1001 and 0x1003 from the controller.
>
132
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
CANOPEN_SENDEMCYMESSAGE
7908
Symbol in CODESYS:
>
Description
7910
133
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
134
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
For SAE J1939, ifm electronic provides a number of function elements which will be explained in the
following.
>
J1939_ENABLE................................................................................................................................. 136
J1939_GETDABYNAME ................................................................................................................... 138
J1939_NAME .................................................................................................................................... 140
J1939_STATUS................................................................................................................................. 142
15077
135
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_ENABLE
7641
Symbol in CODESYS:
>
Description
7642
136
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
137
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
• If a specific value is set on the optional inputs:
the result list will only show the participants with this specific value.
• If no value or the default value is set on the optional inputs:
this entry is not taken into account during filtration of the list.
138
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
139
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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:
Data type Description
Parameter
arbitrary address capable 1 bit any desired address available
industry group 3 bits industry group of the device
vehicle system instance 4 bits instance of the vehicle system
vehicle system 7 bits vehicle system
reserved 1 bit reserved
function 8 bits function of the device
function instance 5 bits instance of the function
ECU instance 3 bits instance of the controller
manufacturer code 11 bits manufacturer code (must be applied for at SAE)
identify number 21 bits serial number of the device (should not be overwritten)
Table: Composition of the 64 bit NAME information according to SAE J1939-81
140
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
141
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_STATUS
7670
Symbol in CODESYS:
>
Description
7672
Via J1939_STATUS, relevant information can be read back to the J1939 stack.
>
142
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
143
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_SPEC_REQ
15023
Symbol in CODESYS:
>
Description
15026
144
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_SPEC_REQ_MULTI
15033
Symbol in CODESYS:
>
Description
15036
145
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
146
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
147
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
148
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
149
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_RX_MULTI
7736
Symbol in CODESYS:
>
Description
7741
150
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
151
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_TX
7688
Symbol in CODESYS:
>
Description
7689
152
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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
Multi frame messages → J1939_TX_ENH_MULTI (→ page 157).
>
153
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
154
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_TX_ENH_CYCLIC
7716
Symbol in CODESYS:
>
Description
7718
>
155
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
156
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_TX_ENH_MULTI
7699
Symbol in CODESYS:
>
Description
7705
157
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
158
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
159
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
J1939_DM1RX
14977
Symbol in CODESYS:
>
Description
7761
160
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
161
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
162
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
163
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
164
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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 136) 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 The CAN stack sends DM1 "zero active faults" messages in compliance with standards every second.
(preset) A manual transmission of DM1 messages via the FB J1939_DM1TX (→ page 162)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 162) 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.
>
165
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
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.
>
166
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
FASTCOUNT..................................................................................................................................... 168
INC_ENCODER ................................................................................................................................ 170
INPUT ................................................................................................................................................ 173
PERIOD ............................................................................................................................................. 175
1302
In this chapter we show you ifm FBs which allow you to read and process the analogue or digital
signals at the device input.
167
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
FASTCOUNT
8112
= Fast Count
Unit type = function block (FB)
Unit is contained in the library ifm_CR0401_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
8114
FASTCOUNT operates as counter block for fast input pulses (up to 30 kHz).
This FB detects pulses at the fast input channels (→ data sheet).
>
168
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
169
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
INC_ENCODER
8134
= Incremental Encoder
Unit type = function block (FB)
Unit is contained in the library ifm_CR0401_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
8135
170
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
RESOLUTION = 1
counts for every fourth edge
(= resolution of the encoder).
RESOLUTION = 2
counts for every second edge
RESOLUTION = 4
counts for every rising and falling edge
>
171
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
172
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
INPUT
8103
Symbol in CODESYS:
>
Description
8104
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
results from the operating mode indicated via MODE:
- digital input (lowside) (with/without diagnosis)
- digital input (highside)
- analogue input 0...20 mA
- analogue input 0...10 V
- analogue input 0...32 V
- analogue input ratiometric measurement 0...32 V
- analogue input resistance measurement 0...3600 Ω
.
173
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
174
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
PERIOD
8122
>
Description
15850
PERIOD measures the frequency in [Hz] or the period time (cycle time) in [µs] or the phase shift in [°]
on the specified channel, depending on the set operating mode:
MODE
Description
dec | hex
0 00 no measurement
14 0E Frequency measurement
Count the positive edges for a certain time.
19 13 Period duration measurement (better replace by MODE = 20!)
Measure the time interval between two positive edges.
Specify the average value over a certain number of periods.
20 14 Period duration and ratio measurement
Measure the time interval between two positive edges.
Specify the average value over a certain number of periods.
25 19 (LZS version 03.02.zz or higher)
Phase shift (0...359°) between channel A and channel B of an input channel pair
(message makes only sense if no great jumps > 179° can occur in the system)
.
175
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
176
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
For this device you can set the mode of some or all outputs. Here we show you a couple of function
elements to it.
177
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
OUTPUT
8078
Symbol in CODESYS:
>
Description
8079
OUTPUT assigns an operating mode to an output channel (→ data sheet). The FB enables the status
detection on the selected output channel.
The measurement and the output value result from the operating mode indicated via MODE:
• binary output, plus switching (BH) with/without diagnostic function
• binary output, plus switching (BH) with diagnostic function and protection
.
>
178
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
179
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
PWM1000
8060
>
Description
8062
PWM1000 handles the initialisation and parameter setting of the PWM outputs.
The FB enables a simple use of the PWM FB in the device. For each channel an own PWM frequency,
the mark-to-space ratio and the dither can be set.
The PWM frequency FREQUENCY can be directly indicated in [Hz] and the mark-to-space ratio
VALUE in steps of 1 ‰.
>
180
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
Output parameters
8523
181
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
182
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
FLASH_INFO
11580
Symbol in CODESYS:
>
Description
11588
183
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
FLASH_READ
8147
Symbol in CODESYS:
>
Description
11579
FLASH_READ enables reading of different types of data directly from the flash memory.
The FB reads the contents as from the address of SRC from the flash memory. In doing so, as many
bytes as indicated under LEN are transmitted.
► The address resulting from SRC + LEN must be < 65 408.
► To the destination address DST applies:
Determine the address by means of the operator ADR and assigne it to the FB!
>
184
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
GET_APP_INFO
11581
Symbol in CODESYS:
>
Description
11593
GET_APP_INFO provides information about the application software stored in the device:
• name (= file name of the CODESYS project),
• version (= from CODESYS menu [Project] > [Project Info] > [Version]),
• unambiguous CoDeSys build number,
• CoDeSys build date.
>
185
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
GET_HW_INFO
11582
Symbol in CODESYS:
>
Description
1599
186
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
GET_IDENTITY
8166
Symbol in CODESYS:
>
Description
15411
GET_IDENTITY reads the identification stored in the device (has previously been saved by means of
SET_IDENTITY (→ page 195)).
>
187
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
GET_SW_INFO
11583
Symbol in CODESYS:
>
Description
11596
188
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
GET_SW_VERSION
14763
Symbol in CODESYS:
>
Description
14765
189
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
MEM_ERROR
14770
= Memory Error
Unit type = function block (FB)
Unit is contained in the library ifm_CR0401_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
14772
190
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
MEMCPY
8160
= memory copy
Unit type = function block (FB)
Unit is contained in the library ifm_CR0401_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
412
MEMCPY enables writing and reading different types of data directly in the memory.
The FB writes the contents of the address of SRC to the address DST.
► To the addresses SRC and DST apply:
Determine the address by means of the operator ADR and assigne it to the FB!
> In doing so, as many bytes as indicated under LEN are transmitted. So it is also possible to
transmit exactly one byte of a word variable.
>
191
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
192
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
OHC
14777
Symbol in CODESYS:
>
Description
14778
>
193
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
194
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
SET_IDENTITY
8174
Symbol in CODESYS:
>
Description
8535
195
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
SET_LED
8052
Symbol in CODESYS:
>
Description
8054
Via SET_LED frequency and color of the status LED can be changed in the application program.
If the flashing mode is changed in the application program, the default setting table is no longer
valid (→ chapter Status LED (→ page 25)).
>
196
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
197
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
SET_PASSWORD
8178
Symbol in CODESYS:
>
Description
8179
SET_PASSWORD sets a user password for program and memory upload via the maintenance tool.
If the user password is active, reading of the application program or the data memory via the
maintenance tool is only possible if the correct password has been entered.
If an empty string (default condition) is assigned to the PASSWORD input, the password is reset. Than
an upload of the application software or of the data memory is possible at any time.
>
198
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
ifm function elements ifm function elements for the device CR0401
>
TIMER_READ_US
8219
Symbol in CODESYS:
>
Description
660
Info
The system timer runs up to the counter value 4 294 967 295 µs at the maximum and then starts
again from 0.
4 294 967 295 µs = 1h 11min 34s 967ms 295µs
>
199
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Diagnosis and error handling Diagnosis
6.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.
>
6.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".
200
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Diagnosis and error handling Response to system errors
>
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.
>
201
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex System flags
7 Annex
Additionally to the indications in the data sheets you find summary tables in the annex.
>
Die zur den Systemmerkern gehörenden Merkeradressen können sich bei einer Erweiterung
der Steuerungskonfiguration ändern.
► Für die Programmierung nur die Symbolnamen der Systemmerker nutzen!
202
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Address assignment and I/O operating modes
>
203
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Address assignment and I/O operating modes
>
%IB04 IN04
%IB05 IN05
%IB06 IN06
%IB07 IN07
%IB08 IN08
%IB09 IN09
%IB10 IN10
%IB11 IN11
>
%QB4 OUT04
%QB5 OUT05
%QB6 OUT06
%QB7 OUT07
204
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Address assignment and I/O operating modes
>
205
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Address assignment and I/O operating modes
>
Value
Inputs Possible operating mode Set with function block Function block input
dec hex
IN00…IN03 Off INPUT MODE 0 00
206
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Address assignment and I/O operating modes
>
Value
Outputs Possible operating mode Set with function block Function block input
dec hex
OUT00
off OUTPUT MODE 0 00
…OUT03
binary output plus switching OUTPUT MODE 2 02
analogue output with pulse-
PWM1000
width modulation
OUT04
off OUTPUT MODE 0 00
…OUT07
binary output plus switching OUTPUT MODE 2 02
binary output with diagnosis plus switching OUTPUT MODE 15 0F
analogue output with pulse-
PWM1000
width modulation
207
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Error tables
>
The indications for CANx also apply to each of the CAN interfaces.
208
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Annex Error tables
>
In the CANopen stack none of these EMCY codes are fix implemented. Advice:
► Make these EMCY codes with CANOPEN_SENDEMCYMESSAGE.
209
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
8 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.
>
Application software
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.
>
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
>
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.
>
Bus
Serial data transmission of several participants on the same cable.
>
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'.
>
CAN stack
CAN stack = software component that deals with processing CAN messages.
210
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
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
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
>
CiA DS 405
DS = Draft Standard
CANopen specification of the interface to programmable controllers (IEC 61131-3)
>
CiA DS 406
DS = Draft Standard
CANopen device profile for encoders
>
CiA DS 407
DS = Draft Standard
CANopen application profile for local public transport
>
Clamp 15
In vehicles clamp 15 is the plus cable switched by the ignition lock.
>
COB ID
COB = Communication Object
ID = Identifier
ID of a CANopen communication object
Corresponds to the identifier of the CAN message with which the communication project is sent via the
CAN bus.
211
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
CODESYS
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
>
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 1.3
value 2.0 value 2.1 value 2.2 value 2.3
value 3.0 value 3.1 value 3.2 value 3.3
>
Cycle time
This is the time for a cycle. The PLC program performs one complete run.
Depending on event-controlled branchings in the program this can take longer or shorter.
>
D
Data type
Depending on the data type, values of different sizes can be stored.
Data type min. value max. value size in the memory
BOOL FALSE TRUE 8 bits = 1 byte
BYTE 0 255 8 bits = 1 byte
WORD 0 65 535 16 bits = 2 bytes
DWORD 0 4 294 967 295 32 bits = 4 bytes
SINT -128 127 8 bits = 1 byte
USINT 0 255 8 bits = 1 byte
INT -32 768 32 767 16 bits = 2 bytes
UINT 0 65 535 16 bits = 2 bytes
DINT -2 147 483 648 2 147 483 647 32 bits = 4 bytes
UDINT 0 4 294 967 295 32 bits = 4 bytes
REAL -3.402823466 • 1038 3.402823466 • 1038 32 bits = 4 bytes
ULINT 0 18 446 744 073 709 551 615 64 Bit = 8 Bytes
STRING number of char. + 1
>
DC
Direct Current
212
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
Diagnosis
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.
>
Dither
Dither is a component of the →PWM signals to control hydraulic valves. It has shown for
electromagnetic drives of hydraulic valves that it is much easier for controlling the valves if the control
signal (PWM pulse) is superimposed by a certain frequency of the PWM frequency. This dither
frequency must be an integer part of the PWM frequency.
>
DLC
Data Length Code = in CANopen the number of the data bytes in a message.
For →SDO: DLC = 8
>
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.
>
DTC
DTC = Diagnostic Trouble Code = error code
In the protocol J1939 faults and errors well be managed and reported via assigned numbers – the
DTCs.
>
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.
213
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
Embedded software
System software, basic program in the device, virtually the →runtime system.
The firmware establishes the connection between the hardware of the device and the application
program. The firmware is provided by the manufacturer of the controller as a part of the system and
cannot be changed by the user.
>
EMC
EMC = Electro Magnetic Compatibility.
According to the EC directive (2004/108/EEC) concerning electromagnetic compatibility (in short EMC
directive) requirements are made for electrical and electronic apparatus, equipment, systems or
components to operate satisfactorily in the existing electromagnetic environment. The devices must
not interfere with their environment and must not be adversely influenced by external electromagnetic
interference.
>
EMCY
abbreviation for emergency
Message in the CANopen protocol with which errors are signalled.
>
Ethernet
Ethernet is a widely used, manufacturer-independent technology which enables data transmission in
the network at a speed of 10...10 000 million bits per second (Mbps). Ethernet belongs to the family of
so-called "optimum data transmission" on a non exclusive transmission medium. The concept was
developed in 1972 and specified as IEEE 802.3 in 1985.
>
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 performed by one or more safety-related systems.
>
F
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
• The stored data are maintained even if there is no supply voltage.
• Due to the absence of moving parts, flash is noiseless and insensitive to shocks and magnetic
fields.
214
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
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.
>
H
Heartbeat
The participants regularly send short signals. In this way the other participants can verify if a
participant has failed.
>
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.
215
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
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 is written in 4 decimal values, e.g. 127.215.205.156.
>
ISO 11898
Standard: Road vehicles – Controller area network
• Part 1: Data link layer and physical signalling
• Part 2: High-speed medium access unit
• Part 3: Low-speed, fault-tolerant, medium dependent interface
• Part 4: Time-triggered communication
• Part 5: High-speed medium access unit with low-power mode
>
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
>
ISO 16845
Standard: Road vehicles – Controller area network (CAN) – Conformance test plan
>
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
A link is a cross-reference to another part in the document or to an external document.
>
LSB
Least Significant Bit/Byte
216
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
M
MAC-ID
MAC = Manufacturer‘s Address Code
= manufacturer's serial number.
→ID = Identifier
Every network card has a MAC address, a clearly defined worldwide unique numerical code, more or
less a kind of serial number. Such a MAC address is a sequence of 6 hexadecimal numbers, e.g. "00-
0C-6E-D0-02-3F".
>
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.
>
MMI
→ HMI (→ page 215)
>
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
>
N
NMT
NMT = Network Management = (here: in the CANopen protocol).
The NMT master controls the operating states of the NMT slaves.
>
Node
This means a participant in the network.
>
Node Guarding
Node = here: network participant
Configurable cyclic monitoring of each →slave configured accordingly. The →master verfies if the
slaves reply in time. The slaves verify if the master regularly sends requests. In this way failed network
participants can be quickly identified and reported.
217
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
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.
>
OPC
OPC = OLE for Process Control
Standardised software interface for manufacturer-independent communication in automation
technology
OPC client (e.g. device for parameter setting or programming) automatically logs on to OPC server
(e.g. automation device) when connected and communicates with it.
>
Operational
Operating state of a CANopen participant. In this mode →SDOs, →NMT commands and →PDOs can
be transferred.
>
P
PC card
→PCMCIA card
>
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.
>
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).
218
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
PDU
PDU = Protocol Data Unit.
The PDU is an item of the →CAN protocol →SAE J1939. PDU indicates a part of the destination or
source address.
>
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.
>
Pictogram
Pictograms are figurative symbols which convey information by a simplified graphic representation.
(→ chapter What do the symbols and formats mean? (→ page 6))
>
PID controller
The PID controller (proportional–integral–derivative 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.
• At the beginning of the cycle the PLC reads the conditions of all inputs into the process image.
During the cycle the PLC cannot detect changes to the inputs.
• During the cycle the outputs are only changed virtually (in the process image).
• At the end of the cycle the PLC writes the virtual output states to the real outputs.
219
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
PWM
PWM = pulse width modulation
The PWM output signal is a pulsed signal between GND and supply voltage.
Within a defined period (PWM frequency) the mark-to-space ratio is varied. Depending on the mark-to-
space ratio, the connected load determines the corresponding RMS current.
>
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 time. Frequent use for the storage of error message
protocols.
>
Runtime system
Basic program in the device, establishes the connection between the hardware of the device and the
application program.
>
rw
RW = read/ write
Bidirectional data transmission: Data can be read and also changed.
220
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
S
SAE J1939
The network protocol SAE J1939 describes the communication on a →CAN bus in commercial
vehicles for transmission of diagnosis data (e.g.engine speed, temperature) and control information.
Standard: Recommended Practice for a Serial Control and Communications Vehicle Network
• Part 2: Agricultural and Forestry Off-Road Machinery Control and Communication Network
• Part 3: On Board Diagnostics Implementation Guide
• Part 5: Marine Stern Drive and Inboard Spark-Ignition Engine On-Board Diagnostics Implementation
Guide
• Part 11: Physical Layer – 250 kBits/s, Shielded Twisted Pair
• Part 13: Off-Board Diagnostic Connector
• Part 15: Reduced Physical Layer, 250 kBits/s, Un-Shielded Twisted Pair (UTP)
• Part 21: Data Link Layer
• Part 31: Network Layer
• Part 71: Vehicle Application Layer
• Part 73: Application Layer – Diagnostics
• Part 81: Network Management Protocol
>
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.
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.
>
Self-test
Test program that actively tests components or devices. The program is started by the user and takes
a certain time. The result is a test protocol (log file) which shows what was tested and if the result is
positive or negative.
>
Slave
Passive participant on the bus, only replies on request of the →master. Slaves have a clearly defined
and unique →address in the bus.
>
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 6))
221
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Glossary of Terms
>
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 assumes the task of data
protection, data flow control and takes measures in the event of data loss. (compare: →UDP)
>
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.
222
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Index
CANOPEN_GETGUARDHBSTATSLV ...............................................127
9 Index CANOPEN_GETNMTSTATESLAVE ..................................................100
CANOPEN_GETODCHANGEDFLAG ................................................104
A CANOPEN_GETSTATE ........................................................................95
CANOPEN_GETSYNCSTATE ............................................................122
About this manual ....................................................................................4
CANOPEN_NMTSERVICES ...............................................................101
Activate the PLC configuration ..............................................................43
CANOPEN_READOBJECTDICT ........................................................105
Activation of the input diagnosis ............................................................50
CANOPEN_SDOREAD .......................................................................109
Address ................................................................................................210
CANOPEN_SDOREADBLOCK ...........................................................111
Address assignment ............................................................................203
CANOPEN_SDOREADMULTI ............................................................113
Address assignment and I/O operating modes ...................................203
CANOPEN_SDOWRITE .....................................................................115
Address assignment inputs / outputs ..................................................203
CANOPEN_SDOWRITEBLOCK .........................................................117
Address assignment of the inputs .......................................................204
CANOPEN_SDOWRITEMULTI...........................................................119
Address assignment of the outputs .....................................................204
CANOPEN_SENDEMCYMESSAGE ..................................................133
Analogue inputs .....................................................................................14
configuration and diagnosis .......................................................................... 49
CANOPEN_SETSTATE ........................................................................97
Annex ...................................................................................................202 CANOPEN_SETSYNCSTATE ............................................................124
Application program ...............................................................................28 CANOPEN_WRITEOBJECTDICT ......................................................106
Application software.............................................................................210 CiA .......................................................................................................211
Architecture..........................................................................................210 CiA DS 304 ..........................................................................................211
Availability of PWM ................................................................................53 CiA DS 401 ..........................................................................................211
Available memory ..................................................................................12 CiA DS 402 ..........................................................................................211
CiA DS 403 ..........................................................................................211
B CiA DS 404 ..........................................................................................211
CiA DS 405 ..........................................................................................211
Baud.....................................................................................................210
CiA DS 406 ..........................................................................................211
Binary inputs
CiA DS 407 ..........................................................................................211
configuration and diagnosis .......................................................................... 50
Binary outputs Clamp 15..............................................................................................211
configuration and diagnosis .......................................................................... 52 COB ID.................................................................................................211
Boot loader ..........................................................................................210 CODESYS ...........................................................................................212
Bootloader..............................................................................................28 CODESYS programming manual ............................................................5
Bus .......................................................................................................210 Configuration of the inputs and outputs (default setting) ......................46
Configuration of the output diagnosis ....................................................52
C Configurations........................................................................................38
Configure inputs.....................................................................................47
CAN .....................................................................................................210
interfaces and protocols ................................................................................ 26 Configure outputs ..................................................................................52
CAN / CANopen Configure the software filters of the inputs ............................................48
errors and error handling............................................................................. 201 Control the LED in the application program ..........................................25
CAN declaration (e.g. CR1080).............................................................44 Copyright..................................................................................................4
CAN interfaces.......................................................................................26 Creating application program ................................................................32
CAN stack ............................................................................................210 CSV file ................................................................................................212
CAN_ENABLE .......................................................................................65 Cycle time ............................................................................................212
CAN_RECOVER ...................................................................................66
CAN_REMOTE_REQUEST ..................................................................87
D
CAN_REMOTE_RESPONSE................................................................88 Data type..............................................................................................212
CAN_RX ................................................................................................71 DC ........................................................................................................212
CAN_RX_ENH.......................................................................................72 Definition
CAN_RX_ENH_FIFO ............................................................................74 overload ......................................................................................................... 19
CAN_RX_RANGE .................................................................................76 short circuit .................................................................................................... 19
CAN_RX_RANGE_FIFO .......................................................................78 Diagnosis .................................................................................... 200, 213
CAN_SETDOWNLOADID .....................................................................67 binary outputs (via voltage measuring) ................................................... 22, 23
overload ................................................................................................... 22, 23
CAN_STATUS .......................................................................................68
short circuit .............................................................................................. 22, 23
CAN_TX .................................................................................................81
wire break ................................................................................................ 22, 23
CAN_TX_ENH .......................................................................................82 Diagnosis and error handling...............................................................200
CAN_TX_ENH_CYCLIC........................................................................84 Digital inputs ..........................................................................................15
CANOPEN_ENABLE .............................................................................91 Distribution of the application program..................................................33
CANOPEN_GETBUFFERFLAGS .........................................................93 Dither ...................................................................................................213
CANOPEN_GETEMCYMESSAGES...................................................130 DLC ......................................................................................................213
CANOPEN_GETERRORREGISTER ..................................................132 DRAM ..................................................................................................213
CANOPEN_GETGUARDHBERRLIST ................................................126 DTC......................................................................................................213
223
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Index
E GET_IDENTITY ...................................................................................187
GET_SW_INFO ...................................................................................188
ECU .....................................................................................................213 GET_SW_VERSION ...........................................................................189
EDS-file ................................................................................................213
Embedded software .............................................................................214 H
EMC .....................................................................................................214 Hardware description.............................................................................11
EMCY...................................................................................................214
Hardware setup .....................................................................................12
EMCY codes
Heartbeat .............................................................................................215
CANx ........................................................................................................... 208
History of the instructions (CR040n) .....................................................8
I/Os, system................................................................................................. 209
HMI ......................................................................................................215
Error flags ............................................................................................208
How is this documentation structured? ...................................................7
ERROR state .........................................................................................35
Error tables ..........................................................................................208 I
Errors
CAN / CANopen .......................................................................................... 208 ID .........................................................................................................215
Ethernet ...............................................................................................214 IEC 61131 ............................................................................................215
EUC .....................................................................................................214 IEC user cycle ......................................................................................215
Example process for response to an error message ..........................201 ifm function elements.............................................................................56
ifm function elements for the device CR0401 .......................................62
F ifm libraries for the device CR0401 .......................................................56
Fast inputs .............................................................................................51 ifm weltweit • ifm worldwide • ifm à l’échelle internationale.................231
FASTCOUNT .......................................................................................168 INC_ENCODER...................................................................................170
FATAL ERROR state .............................................................................35 Information about the device .................................................................11
Fault .....................................................................................................200 INIT state (Reset) ..................................................................................34
FB, FUN, PRG in CODESYS ................................................................30 INPUT ..................................................................................................173
FBs for PWM functions ..........................................................................53 Input group I0 (IN0...IN3) .......................................................................16
FiFo ......................................................................................................214 Input group I1 (IN4...IN7) .......................................................................16
Flash memory ......................................................................................214 Input group I2 (IN8...IN11) .....................................................................18
FLASH_INFO.......................................................................................183 Inputs
address assignment .................................................................................... 204
FLASH_READ .....................................................................................184
operating modes .......................................................................................... 206
FLASH-Speicher ....................................................................................12
Inputs (technology) ................................................................................13
FRAM .............................................................................................12, 215
Instructions ..........................................................................................215
Function configuration ...........................................................................46
Intended use ........................................................................................216
Function configuration in general ..........................................................45
Interface description ..............................................................................26
Function configuration of the inputs and outputs ..................................46
IP address............................................................................................216
Function element outputs ......................................................................63
ISO 11898 ............................................................................................216
Function elements
ISO 11992 ............................................................................................216
CANopen ....................................................................................................... 90
CANopen emergency .................................................................................. 129
ISO 16845 ............................................................................................216
CANopen guarding ...................................................................................... 125 ISO11992 .............................................................................................167
CANopen network management ................................................................... 99
CANopen object directory ........................................................................... 103
J
CANopen SDOs .......................................................................................... 108 J1939 ...................................................................................................216
CANopen status ............................................................................................ 90 J1939_DM1RX ....................................................................................160
CANopen SYNC .......................................................................................... 121
J1939_DM1TX .....................................................................................162
output functions ........................................................................................... 177
J1939_DM1TX_CFG ...........................................................................165
processing input values............................................................................... 167
RAW-CAN (Layer 2) ...................................................................................... 64 J1939_DM3TX .....................................................................................166
RAW-CAN remote ......................................................................................... 86 J1939_ENABLE ...................................................................................136
RAW-CAN status ........................................................................................... 64 J1939_GETDABYNAME .....................................................................138
receive RAW-CAN data ................................................................................ 70 J1939_NAME.......................................................................................140
receive SAE J1939 ...................................................................................... 146 J1939_RX ............................................................................................147
SAE J1939................................................................................................... 135 J1939_RX_FIFO ..................................................................................148
SAE J1939 diagnosis .................................................................................. 159
J1939_RX_MULTI ...............................................................................150
SAE J1939 request ..................................................................................... 143
J1939_SPEC_REQ .............................................................................144
SAE J1939 status ........................................................................................ 135
J1939_SPEC_REQ_MULTI ................................................................145
system ......................................................................................................... 182
transmit RAW-CAN data ............................................................................... 80 J1939_STATUS ...................................................................................142
transmit SAE J1939 .................................................................................... 151 J1939_TX.............................................................................................152
J1939_TX_ENH ...................................................................................153
G J1939_TX_ENH_CYCLIC ...................................................................155
GET_APP_INFO..................................................................................185 J1939_TX_ENH_MULTI ......................................................................157
GET_HW_INFO ...................................................................................186
224
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Index
225
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Index
226
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Notizen • Notes • Notes
227
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Notizen • Notes • Notes
228
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Notizen • Notes • Notes
229
ifm Programming Manual ecomatmobile BasicController (CR0401) Runtime System V03.02 2015-03-30
Notizen • Notes • Notes
230
11 ifm weltweit • ifm worldwide •
ifm à l’échelle internationale
Stand: 2015-03-06 8310
231