Programming Manual: Classiccontroller Cr0033
Programming Manual: Classiccontroller Cr0033
Programming Manual: Classiccontroller Cr0033
>
Programming Manual
ClassicController
CR0033
with integrated I/O modul: CR0133
English
10 / 2018
7391022 / 05
ClassicController CR0033 / CR0133
Contents
2 Safety instructions 10
2.1 Please note! .......................................................................................................................10
2.2 What previous knowledge is required? ..............................................................................11
2.3 Start-up behaviour of the controller....................................................................................11
2.4 Notes: serial number ..........................................................................................................12
2.5 Notes: TEST inputs ............................................................................................................12
3 System description 13
3.1 Information concerning the device .....................................................................................13
3.2 Hardware description .........................................................................................................14
3.2.1 Hardware structure ..................................................................................................................... 14
3.2.2 Operating principle of the delayed switch-off .............................................................................. 17
3.2.3 Relays: important notes! ............................................................................................................. 18
3.2.4 Monitoring concept ..................................................................................................................... 19
3.2.5 Inputs (technology) ..................................................................................................................... 23
3.2.6 Outputs (technology) .................................................................................................................. 28
3.2.7 Note on wiring ............................................................................................................................ 32
3.2.8 Safety instructions about Reed relays ........................................................................................ 32
3.2.9 Feedback in case of externally supplied outputs ........................................................................ 33
3.2.10 Status LED ................................................................................................................................. 34
3.3 Interface description ...........................................................................................................36
3.3.1 Serial interface ........................................................................................................................... 36
3.3.2 USB interface ............................................................................................................................. 36
3.3.3 CAN interfaces ........................................................................................................................... 37
3.4 Software description ..........................................................................................................38
3.4.1 Software modules for the device ................................................................................................ 38
3.4.2 Programming notes for CODESYS projects ............................................................................... 40
3.4.3 Operating states ......................................................................................................................... 44
3.4.4 Operating modes ........................................................................................................................ 48
3.4.5 Performance limits of the device ................................................................................................ 49
4 Configurations 50
4.1 Set up the runtime system .................................................................................................51
4.1.1 Reinstall the runtime system ...................................................................................................... 51
4.1.2 Update the runtime system......................................................................................................... 52
4.1.3 Verify the installation .................................................................................................................. 52
4.2 Set up the programming system ........................................................................................53
4.2.1 Set up the programming system manually ................................................................................. 53
4.2.2 Set up the programming system via templates........................................................................... 55
4.3 Function configuration in general .......................................................................................56
4.3.1 Configuration of the inputs and outputs (default setting) ............................................................ 56
4.3.2 System variables ........................................................................................................................ 56
4.4 Function configuration of the inputs and outputs ...............................................................57
4.4.1 Configure inputs ......................................................................................................................... 58
4.4.2 Configure outputs ....................................................................................................................... 63
4.5 Variables ............................................................................................................................67
4.5.1 Retain variables .......................................................................................................................... 67
2
ClassicController CR0033 / CR0133
7 Appendix 230
7.1 System flags.....................................................................................................................230
7.1.1 System flags: CAN ................................................................................................................... 231
7.1.2 System flags: SAE-J1939 ......................................................................................................... 232
7.1.3 System flags: error flags (standard side) .................................................................................. 233
7.1.4 System flags: status LED (standard side)................................................................................. 234
7.1.5 System flags: voltages (standard side) ..................................................................................... 235
7.1.6 System flags: 16 inputs and 16 outputs (standard side) ........................................................... 236
7.2 Address assignment and I/O operating modes ................................................................237
7.2.1 Addresses / variables of the I/Os .............................................................................................. 237
7.2.2 Possible operating modes inputs/outputs ................................................................................. 241
7.3 Integrated I/O module: Description ..................................................................................244
7.3.1 System description I/O module ExB01 ..................................................................................... 244
7.3.2 Configuration of the I/O module ................................................................................................ 258
7.3.3 Object directory of the integrated I/O module ........................................................................... 269
7.3.4 Operation of the I/O module ..................................................................................................... 303
7.3.5 System flag for the integrated ExB01 I/O module..................................................................... 305
7.3.6 Error messages for the I/O module .......................................................................................... 306
7.4 Error tables .......................................................................................................................309
7.4.1 Error codes ............................................................................................................................... 310
3
ClassicController CR0033 / CR0133
9 Index 332
4
ClassicController CR0033 / CR0133
>
1.1 Copyright
26002
© 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™
• EtherCAT® is a registered trade mark and patented technology, licensed by Beckhoff Automation GmbH, Germany
• IO-Link® (www.io-link.com) is the property of the →PROFIBUS Nutzerorganisation e.V., Germany
• ISOBUS is the property of the AEF – Agricultural Industry Electronics Foundation e.V., Deutschland
(→ www.aef-online.org)
• Microsoft® is the property of the Microsoft Corporation, USA (→ www.microsoft.com)
• Modbus® is the property of the Schneider Electric SE, France (→ www.schneider-electric.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
5
ClassicController CR0033 / CR0133
>
6
ClassicController CR0033 / CR0133
>
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
Important note
Non-compliance can result in malfunction or interference
Information
Supplementary note
► ... Request for action
> ... Reaction, result
→ ... "see"
abc Cross-reference
123 Decimal number
0x123 Hexadecimal number
0b010 Binary number
[...] Designation of pushbuttons, buttons or indications
7
ClassicController CR0033 / CR0133
>
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 → Appendix.
In case of malfunctions or uncertainties please contact the manufacturer at:
Contact → www.ifm.com
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:
→ www.ifm.com
16420
NOTE
These instructions are valid for the device without and with integrated I/O module.
► In both cases, make sure to set up the PLC configuration for the device CR0033!
You can find more information about the integrated I/O module in:
→ chapter Integrated I/O module: Description (→ p. 244) in the appendix of this documentation.
>
8
ClassicController CR0033 / CR0133
9
ClassicController CR0033 / CR0133
2 Safety instructions
Content
Please note! ............................................................................................................................................10
What previous knowledge is required? ..................................................................................................11
Start-up behaviour of the controller ........................................................................................................11
Notes: serial number ..............................................................................................................................12
Notes: TEST inputs ................................................................................................................................12
28333
>
No characteristics are warranted on the basis of the information, notes and examples provided in this
manual. The drawings, representations and examples imply no responsibility for the system and no
application-specific particularities.
► 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.
► Observe the installation and wiring information as well as the functions and features of the
devices!
→ supplied installation instructions or on ifm's homepage
► Please note the corrections and notes in the release notes for the existing hardware, software and
documentation, available on the ifm website
Website → www.ifm.com
28588
NOTICE
The driver module of the serial interface can be damaged!
Disconnecting or connecting the serial interface while live can cause undefined states which damage
the driver module.
► Do not disconnect or connect the serial interface while live.
10
ClassicController CR0033 / CR0133
>
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!
11
ClassicController CR0033 / CR0133
>
► In the user's production facility, draw a diagram of the controller network in the machine. Enter the
serial number of each controller installed into the network diagram.
► Before downloading a software component, read out this serial number and check the network
diagram to make sure that you are accessing the right controller.
>
► The TEST inputs of all the controllers in the machine should be wired individually and marked
clearly so that they can be properly allocated to the controllers.
► During a service access only activate the TEST input of the controller to be accessed.
12
ClassicController CR0033 / CR0133
3 System description
Content
Information concerning the device .........................................................................................................13
Hardware description ..............................................................................................................................14
Interface description ...............................................................................................................................36
Software description ...............................................................................................................................38
28392
>
This manual describes of the ecomatmobile family for mobile machines of ifm electronic gmbh:
ClassicController: CR0033
13
ClassicController CR0033 / CR0133
>
Start conditions
28418
The device does not start until sufficient voltage is applied to the supply connection VBBs (e.g. supply
of the relays on the standard side) and to clamp 15.
In vehicles clamp 15 is the plus cable switched by the ignition lock.
• permissible operating voltage = 8...32 V
• start condition: VBBs > 10 V
>
Relays
19661
The ClassicController has 2 internal output relays which can each separate 8 outputs from the terminal
voltage VBBx (x = o | r).
The relays are only activated under the following condition:
• the global bit ERROR = FALSE
AND
• the bit RELAIS_VBBx = TRUE
In an active condition the relay contacts connect the outputs to the terminal voltage VBBx.
Activate the corresponding outputs no earlier than > 45 ms after power-on of the relays!
14
ClassicController CR0033 / CR0133
>
Available memory
28798
>
FLASH-Speicher
8136
SRAM
8360
15
ClassicController CR0033 / CR0133
>
FRAM
20794
16
ClassicController CR0033 / CR0133
>
If the ecomatmobile controllers are disconnected from the supply voltage (ignition off), all outputs are
normally switched off at once, input signals are no longer read and processing of the controller
software (runtime system and application program) is interrupted. This happens irrespective of the
current program step of the controller.
If this is not requested, the controller must be switched off via the program. After switch-off of the
ignition this enables, for example, saving of memory states.
The ClassicControllers can be switched off via the program by means of a corresponding connection
of the supply voltage inputs and the evaluation of the related system flags. The block diagram in the
chapter Hardware structure (→ p. 14) shows the context of the individual current paths.
>
The internal PLC electronics is initialised via the terminal VBB15 if at terminal VBBs supply voltage is
applied.
These terminals VBB15 and VBBs are monitored internally. The applied terminal voltage VBB15 can
be monitored via the system flag CLAMP_15_VOLTAGE. The applied terminal voltage VBBs can be
monitored via the system flag SUPPLY_VOLTAGE.
>
Latching
2419
17
ClassicController CR0033 / CR0133
>
NOTICE
Risk of destruction of the relay contacts!
In an emergency situation, "sticking" relay contacts can no longer separate the outputs from the power
supply!
If VBBS (VBBrel) and clamp 15 are separated from the power supply at the same time, but the
potentials VBBx stay connected to it, then the relays can drop even before the outputs are deactivated
by the system.
In this case the relays separate the outputs from the power supply under load. This significantly
reduces the life cycle of the relays.
► If VBBx is permanently connected to the power supply:
• also connect VBBS (VBBrel) permanently and
• switch off the outputs via the program with the help of clamp 15.
18
ClassicController CR0033 / CR0133
The controller monitors the supply voltages and the system error flags.
Depending on the status...
• the controller switches off the internal relays
> the outputs are de-energised, but retain their logic state
> the program continues to run
or:
• the runtime system deactivates the controller
> the program stops
> the outputs change to logic "0"
> the status LED goes out
>
> The controller detects undervoltage. The outputs supplied by the terminal voltage VBBx are
deactivated.
> If the terminal voltage recovers and returns to the normal range (> 10 V), the outputs are
reactivated.
32395
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.
19
ClassicController CR0033 / CR0133
>
> The controller continues to operate until the voltage has dropped so far that the internal voltages
created from it also drop.
> In case of a drop of the internal voltages the controller goes into reset.
Execution of the runtime and application programs is interrupted.
This happens irrespective of the current program step of the PLC.
> A restart of the controller is not carried out before the supply voltages are above the limit value
again.
20
ClassicController CR0033 / CR0133
WARNING
Danger due to unintentional switch-off of all outputs!
If monitoring routines detect a system error:
> the device deactivates the energy for all outputs.
During program processing the output relays are completely controlled via the software by the user.
So a parallel contact of the safety chain, for example, can be evaluated as an input signal and the
output relay can be switched off accordingly. To be on the safe side, the corresponding applicable
national regulations must be complied with.
If an error occurs during program processing, the relays can be switched off using the system flag bit
ERROR to disconnect critical plant sections.
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!
21
ClassicController CR0033 / CR0133
>
The reference voltage output is used to supply sensors with a stable voltage which is not subjected to
the fluctuations of the supply voltage.
13402
NOTICE
Reference voltage output can get damaged!
► Do NOT apply any external voltage!
22
ClassicController CR0033 / CR0133
Analogue inputs
15446
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 / 3...680 (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.
33383
23
ClassicController CR0033 / CR0133
>
Binary inputs
1015
28811
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.
24
ClassicController CR0033 / CR0133
>
> If the analogue inputs are configured for current measurement, the device switches to the safe
voltage measurement range (0...32V DC) and the corresponding error bit in the flag byte
ERROR_CURRENT_Ix is set when the final value (> 21.7 mA) is exceeded.
The device checks once a second if the current value is again below the limit value. When the
value is again below the limit value, the input automatically switches back to the current
measurement range.
► For NAMUR: if the diagnosis function is to be used, additionally activate this mode:
• function block SET_INPUT_MODE > set input DIAGNOSTICS.
For NAMUR: The useful signal of the switches or sensors should not be higher than the system
supply voltage.
25
ClassicController CR0033 / CR0133
>
33456
> The result of the diagnostics is for example shown by the following system flags:
System flags (symbol name) Type Description
ERROR_BREAK_Ix DWORD input double word x: wire break error
(0...x, value depends on the device, or (resistance input): short to supply
→ data sheet) [Bit 0 for input 0] ... [bit z for input z] of this group
Bit = TRUE: error
Bit = FALSE: no error
ERROR_SHORT_Ix DWORD input double word x: short circuit error
(0...x, value depends on the device, only if input mode = IN_DIGITAL_H
→ data sheet) [Bit 0 for input 0] ... [bit z for input z] of this group
Bit = TRUE: error
Bit = FALSE: no error
> In the application program, the system variables ANALOG00...ANALOGxx can be used for
customer-specific diagnostics.
>
26
ClassicController CR0033 / CR0133
>
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 .
27
ClassicController CR0033 / CR0133
>
Binary outputs
28815
The following operating modes are possible for the device outputs (→ data sheet):
• binary output, plus switching (BH) with/without diagnostic function
• binary output minus switched (BL) without diagnostic function
28815
Basic circuit of output plus switching (BH) Basic circuit of output minus switching (BL)
for positive output signal for negative output signal
>
PWM outputs
28530
The following operating modes are possible for the device outputs (→ data sheet):
• PWM output, plus switching (BH) without diagnostic function
28530
Qn = pin output n
(L) = load
>
The outputs of this device are protected against overload and short circuit within specific ranges.
→ data sheet
>
Definition: overload
28846
28
ClassicController CR0033 / CR0133
>
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:
• function block SET_OUTPUT_MODE (→ p. 157) > input DIAGNOSTICS = TRUE and
• function block SET_OUTPUT_MODE > input PROTECTION = TRUE
>
In case of an overload or a short circuit, the behaviour of the output depends on its operating mode
(→ FB SET_OUTPUT_MODE (→ p. 157) > inputs DIAGNOSTICS and PROTECTION):
DIAGNOSTICS = FALSE and PROTECTION = FALSE:
> the output continues to be operated.
DIAGNOSTICS = TRUE and PROTECTION = FALSE:
> error is detected and signalled as error code (→ chapter Error codes (→ p. 310)).
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.
DIAGNOSTICS = TRUE and PROTECTION = TRUE:
> error is detected and signalled as error code (→ chapter Error codes).
> the respective output is switched off.
> The logic state of the output remains unaffected by this!
> The controller checks every second if the error has been eliminated.
If error eliminated: Controller switches the output on again.
>
29
ClassicController CR0033 / CR0133
>
NOTE
To protect the internal measuring resistors, the overload protection should always be active (default
setting). The following protection is given:
• current measuring range = 2 A: protection from 2.25 A
• current measuring range = 3 A: protection from 3.375 A
• current measuring range = 4 A: protection from 4.5 A.
The function is not supported in PWM mode.
The function can be deactivated if required.
For the limit values please make sure to adhere to the data sheet!
Wire break and short circuit detection are active when ...
• the output is configured as "binary plus switching" (BH) AND
• the output is switched ON.
► When using outputs switching to mass the supply voltage on the connected load must not be
higher than the supply voltage(s) of the output group(s)!
► Should be avoided that an output group can continued to be operated in spite of deactivated relay,
the load on an output switching against ground must only be supplied via an output switching
against a supply of the same output group.
33351
Depending on the ambient temperature a short circuit cannot be reliably detected from a certain
short circuit current since the output drivers temporarily deactivate themselves for protection against
destruction.
30
ClassicController CR0033 / CR0133
>
The diagnostics of these outputs is made via internal current measurement in the output:
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = TRUE
no current flows on the resistor Ri (no voltage drops).
Diagnosis = wire break: Without wire break the load current flows through the series resistor Ri
generating a voltage drop which is evaluated via the read back channel.
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = TRUE
Diagnosis = short circuit against GND: the supply voltage drops over the series resistor Ri
31
ClassicController CR0033 / CR0133
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.
32
ClassicController CR0033 / CR0133
>
In some applications actuators are not only controlled by outputs of the PLC but additionally by
external switches. In such cases the externally supplied outputs must be protected with blocking
diodes (→ see graphics below).
NOTICE
Destruction of outputs if there is inadmissible feedback!
If actuators are externally controlled, the corresponding potential bar of the same output group must
not become potential-free (e.g. for RELAIS = FALSE).
Otherwise the terminal voltage VBBx is fed back to the potential bar of the output group via the
protective diode integrated in the output driver of the external connected output. A possibly other set
output of this group thus triggers its connected load. The load current destroys the output which feeds
back.
► Protect externally supplied outputs by means of blocking diodes!
Example:
The flag RELAIS switches off the
supply VBBo of the output group.
Without blocking diodes the external
switch S1 feeds the supply VBBo via
the internal protective diode (red) from
output Q1 to the internal potential bar
of the outputs.
If output Q2 = TRUE (→ graphic), K2
will receive voltage via the protective
diode Q1 despite RELAIS = FALSE
(red lines). Due to overload this
protective diode burns out and the
output Q1 is destroyed!
Remedy:
Insert the blocking diodes V1 and V2
(→ green arrows)!
Successful:
If RELAIS = FALSE, K2 remains
switched off, even if Q2 = TRUE.
33
ClassicController CR0033 / CR0133
>
NOTE
Help for externally supplied outputs
► The externally supplied outputs must be decoupled via diodes so that no external voltage is
applied to the output terminal.
>
The operating states are indicated by the integrated status LED (default setting).
LED colour Display Description
Permanently off No operating voltage
Off
Flashing with 2 Hz TEST=TRUE: Application = RUN and ERROR STOP / FATAL ERROR
Red
(time frame = 200 ms)
Trap error or:
Briefly on
TEST=FALSE: FATAL ERROR
Red
(time frame = 200 ms)
Permanently on TEST=FALSE: ERROR STOP
Red
The status LED can be changed by the programming system for the operating states STOP and RUN.
34
ClassicController CR0033 / CR0133
>
With this device the status LED can also be set by the application program. To do so, the following
system variables are used (→ chapter System flags (→ p. 230)):
System flags (symbol name) Type Description
LED WORD LED color for "LED switched on":
0x0000 = LED_GREEN (preset)
0x0001 = LED_BLUE
0x0002 = LED_RED
0x0003 = LED_WHITE
0x0004 = LED_BLACK
0x0005 = LED_MAGENTA
0x0006 = LED_CYAN
0x0007 = LED_YELLOW
LED_X WORD LED color for "LED switched off":
0x0000 = LED_GREEN
0x0001 = LED_BLUE
0x0002 = LED_RED
0x0003 = LED_WHITE
0x0004 = LED_BLACK (preset)
0x0005 = LED_MAGENTA
0x0006 = LED_CYAN
0x0007 = LED_YELLOW
LED_MODE WORD LED flashing frequency:
0x0000 = LED_2HZ (flashes at 2 Hz; preset)
0x0001 = LED_1HZ (flashes at 1 Hz)
0x0002 = LED_05HZ (flashes at 0.5 Hz)
0x0003 = LED_0HZ (lights permanently with value in LED)
NOTE
► Do NOT use the LED color RED in the application program.
> In case of an error the LED color RED is set by the runtime system.
BUT: If the colors and/or flashing modes are changed in the application program, the above table
with the default setting is no longer valid.
35
ClassicController CR0033 / CR0133
>
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
This device features a USB interface for program download and debugging.
Connections and data → data sheet
Install the USB driver on the PC → installation instructions / operating instructions
Settings in CODESYS for [Online] > [Communication Parameters...] via USB:
Device Runtime system version Parameter Value
CR0032 < V03.00.00 Baud rate 115200
CR0032 > V03.00.01 Baud rate 4800...57600
CR0033, CR0133 < V02.00.01 Baud rate 115200
CR0033, CR0133 > V02.00.02 Baud rate 4800...57600
CR0232, CR0233 all Baud rate 115200
CR0234, CR0235 all Baud rate 4800...57600
CR7n32 < V01.00.04 Baud rate 115200
36
ClassicController CR0033 / CR0133
>
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:
• Layer 2: CAN at level 2 (→ chapter Function elements: CAN layer 2 (→ p. 74))
• CANopen master (→ chapter Function elements: CANopen master (→ p. 83))
• CANopen slave (→ chapter Function elements: CANopen slave (→ p. 93))
• CANopen network variables (via CODESYS)
• SAE J1939 (for drive management, → chapter Function elements: SAE J1939 (→ p. 106))
• bus load detection
• error frame counter
• download interface
• 100 % bus load without package loss
11793
The following CAN interfaces and CAN protocols are available in this ecomatmobile device:
CAN interface CAN 1 CAN 2 CAN 3 CAN 4
Which CANopen compatible interface works with which CANopen protocol is decided by the order
in which you append the subelements in the PLC configuration:
CODESYS > [PLC Configuration] > [CR0033 Configuration Vxx] > [Append subelement] >
[CANopen master] or [CANopen slave]
37
ClassicController CR0033 / CR0133
>
Bootloader
28807
38
ClassicController CR0033 / CR0133
>
Runtime system
28330
Basic program in the device, establishes the connection between the hardware of the device and the
application program.
→ chapter Software modules for the device (→ p. 38)
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
>
Application program
28795
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.
28795
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.
>
Libraries
14117
ifm electronic offers several libraries (*.LIB) to match each device containing program modules for
the application program. Examples:
Library Use
ifm_CR0033_Vxxyyzz.LIB device-specific library
Must always be contained in the application program!
ifm_CR0033_CANopenxMaster_Vxxyyzz.LIB (optional)
x = 1...4 = number of the CAN interface if a CAN interface of the device is to be operated as a CANopen
master
ifm_CR0033_CANopenxSlave_Vxxyyzz.LIB (optional)
x = 1...4 = number of the CAN interface if a CAN interface of the device is to be operated as a CANopen
slave
ifm_CR0033_J1939_Vxxyyzz.LIB (optional)
if a CAN interface of the device is to communicate with a Diesel
engine
Details: → chapter ifm libraries for the device CR0033 (→ p. 69)
39
ClassicController CR0033 / CR0133
>
NOTE
Function blocks must NOT be called in functions!
Otherwise: During execution the application program will crash.
All function elements must NOT be called recursively, nor indirectly!
An IEC application must contain max. 8,000 function elements!
Background:
All variables of functions...
• are initialised when called and
• become invalid after return to the caller.
Function blocks have 2 calls:
• an initialisation call and
• the actual call to do something.
Consequently that means for the FB call in a function:
• every time there is an additional initialisation call and
• the data of the last call gets lost.
40
ClassicController CR0033 / CR0133
>
NOTE
If the following elements are required in the application program:
• mathematical functions (e.g. ATAN),
• calculations,
• conversions (e.g. REAL_TO_BYTE),
then the following applies to the values at the inputs and outputs of the corresponding operators:
► Strictly observe the admissible value range in each individual case!
> Otherwise, this may cause an FPU error in the controller.
Examples:
28189
The value of the target format that can max. represented is exceeded.
Example:
REAL_TO_INT (12345678.3)
> INT is limited to -32768...+32767 (only integers)
28189
An existing real number is obviously in the value range of the target format.
In reality, however, the number is outside the target format (because of the internal representation of
the real number).
Example:
DW := REAL_TO_DWORD (4294967295.0);
> The most accurate representation of 4294967295 in REAL is 4.294967296E9
> Therefore the value exceeds the max. permissible value of the target format by 1.
> DWORD is limited to 0...4294967295.
>
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.
41
ClassicController CR0033 / CR0133
>
The application program is generated by the CODESYS 2.3 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 2.3 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.
42
ClassicController CR0033 / CR0133
>
Always save the related boot project together with your application project in the device. Only then
will the application program be available after a power failure in the device.
NOTE
Note: The boot project is slightly larger than the actual program.
However: Saving the boot project in the device will fail if the boot project is larger than the available
IEC code memory range. After power-on the boot project is deleted or invalid.
The ifm downloader 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 downloader. Advantage: A programming system with CODESYS licence is not required.
Here you will find the current ifm downloader (min. V06.18.26):
Homepage → www.ifm.com
>
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:
Homepage → www.ifm.com
43
ClassicController CR0033 / CR0133
After power on the ecomatmobile device can be in one of five possible operating states:
• BOOTLOADER
• INIT
• STOP
• RUN
• SYSTEM STOP (after ERROR STOP)
>
44
ClassicController CR0033 / CR0133
>
45
ClassicController CR0033 / CR0133
>
Bootloader state
28806
No runtime system was loaded. The ecomatmobile controller is in the boot loading state. Before
loading the application software the runtime system must be downloaded.
> The LED flashes green (5 Hz).
46
ClassicController CR0033 / CR0133
>
STOP state
28422
RUN state
28335
The ecomatmobile controller goes to this state if a non tolerable error (ERROR STOP) was found.
This state can only be left by a power-off-on reset.
> The LED lights red.
47
ClassicController CR0033 / CR0133
>
Independent of the operating states the controller can be operated in different modes.
>
TEST mode
28409
NOTICE
Loss of the stored software possible!
In the test mode there is no protection of the stored runtime system and application software.
28409
NOTE
> Connect the TEST connection to the supply voltage only AFTER you have connected the OPC
client!
This operating mode is reached by applying supply voltage to the test input
(→ installation instructions > chapter "Technical data" > chapter "Wiring").
The ecomatmobile controller can now receive commands via one of the interfaces in the RUN or
STOP mode and, for example, communicate with the programming system.
Only in the TEST mode the software can be downloaded to the controller.
The state of the application program can be queried via the flag TEST.
Summary Test input is active:
• Programming mode is enabled
• Software download is possible
• Status of the application program can be queried
• Protection of stored software is not possible
>
► The TEST inputs of all the controllers in the machine should be wired individually and marked
clearly so that they can be properly allocated to the controllers.
► During a service access only activate the TEST input of the controller to be accessed.
48
ClassicController CR0033 / CR0133
SERIAL_MODE
2548
The serial interface is available for the exchange of data in the application. Debugging the application
software is then only possible via all 4 CAN interfaces.
This function is switched off as standard (FALSE). Via the flag SERIAL_MODE the state can be
controlled and queried via the application program or the programming system.
→ chapter Function elements: serial interface (→ p. 118)
>
DEBUG mode
28844
If the input DEBUG of SET_DEBUG (→ p. 216) is set to TRUE, the programming system or the
downloader, for example, can communicate with the controller and execute some special system
commands (e.g. for service functions via the GSM modem CANremote).
In this operating mode a software download is not possible because the test input (→ chapter TEST
mode (→ p. 48)) is not connected to supply voltage.
>
>
Watchdog behaviour
28352
In this device, a watchdog monitors the program runtime of the CODESYS application.
If the maximum watchdog time (approx. 100 ms) is exceeded:
> the device performs a reset and reboots.
This you can read in the flag LAST_RESET.
>
CODESYS functions
2254
49
ClassicController CR0033 / CR0133
4 Configurations
Content
Set up the runtime system ......................................................................................................................51
Set up the programming system ............................................................................................................53
Function configuration in general ...........................................................................................................56
Function configuration of the inputs and outputs ...................................................................................57
Variables .................................................................................................................................................67
18065
33438
The device configurations described in the corresponding installation instructions or in the Appendix (→
p. 230) 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.
16420
NOTE
These instructions are valid for the device without and with integrated I/O module.
► In both cases, make sure to set up the PLC configuration for the device CR0033!
You can find more information about the integrated I/O module in:
→ chapter Integrated I/O module: Description (→ p. 244) in the appendix of this documentation.
50
ClassicController CR0033 / CR0133
>
On delivery of the ecomatmobile device no runtime system is normally loaded (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 (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:
→ www.ifm.com
28531
NOTE
The software versions suitable for the selected target must always be used:
• runtime system (ifm_CR0033_Vxxyyzz.H86),
• PLC configuration (ifm_CR0033_Vxx.CFG),
• device library (ifm_CR0033_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. "CR0033") and the software version number "xx" (e.g. "02") 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.
28531
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.
Contact → www.ifm.com
The runtime system is transferred to the device using the separate program "ifm downloader".
The software can be downloaded from ifm's website, if necessary:
→ www.ifm.com
Normally the application program is loaded to the device via the programming system. But it can also
be loaded using the ifm downloader if it was first read from the device→ upload).
>
51
ClassicController CR0033 / CR0133
An older runtime system is already installed on the device. Now, you would like to update the runtime
system on the device?
28404
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!
For this operation, the same instructions apply as in the previous chapter 'Reinstall the runtime
system'.
>
52
ClassicController CR0033 / CR0133
>
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_CR0033_Vxxyyzz.LIB manually!
53
ClassicController CR0033 / CR0133
>
During the configuration of the programming system (→ previous section) the PLC configuration was
also carried out automatically.
► The menu item [PLC Configuration] is reached via the tab [Resources].
Double-click on [PLC Configuration] to open the corresponding window.
► Click on the tab [Resources] in CODESYS:
Based on the configuration the user can find the following in the program environment:
all important 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.
The structure of the inputs and outputs
These can directly be designated symbolically (highly recommended!) in the window [PLC
Configuration] (→ figure below) and are available in the whole project as [Global Variables].
54
ClassicController CR0033 / CR0133
>
ifm offers ready-to-use templates (program templates), by means of which the programming system
can be set up quickly, easily and completely.
28325
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.
55
ClassicController CR0033 / CR0133
>
Inputs (preset)
20785
All system variables (→ chapter System flags (→ p. 230)) have defined addresses which cannot be
shifted.
> To indicate and process a watchdog error or causes of a new start the system variable
LAST_RESET is set.
56
ClassicController CR0033 / CR0133
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 (ifm_CR0033_Vxxyyzz.LIB
) for the configuration of the inputs and outputs.
For details → Possible operating modes inputs/outputs (→ p. 241).
57
ClassicController CR0033 / CR0133
>
Contacts of Reed relays may be clogged (reversibly) if connected to the device inputs without
series resistor.
58
ClassicController CR0033 / CR0133
>
A software filter that filters the measured input voltage on the analogue inputs can be configured via
the system variables Ixx_FILTER. In case of a step response the filter behaves like a conventional
low-pass filter, the limit frequency is set by the value entered in the system variable. Values of 0...8 are
possible.
Table: limit frequency software low-pass filter on analogue input
Ixx_FILTER Filter frequency [Hz] Signal rise time Remarks
0 Filter deactivated
1 390 1 ms
2 145 2.5 ms
3 68 5 ms
4 34 10 ms Recommended, default setting
5 17 21 ms
6 8 42 ms
7 4 84 ms
8 2 169 ms
>9 34 10 ms → Default setting
12969
After changing the filter setting, the value of this input or output is not output correctly at once. Only
after the signal rise time (→ table) will the value be correct again.
The signal rise time is the time taken by a signal at the output of the filter to rise from 10 % to 90 % of the final value if an
input step is applied. The signal fall time is the time taken by a signal to decrease from 90 % to 10 %.
>
59
ClassicController CR0033 / CR0133
>
32629
> The result of the diagnostics is for example shown by the following system flags:
System flags (symbol name) Type Description
ERROR_BREAK_Ix DWORD input double word x: wire break error
(0...x, value depends on the device, or (resistance input): short to supply
→ data sheet) [Bit 0 for input 0] ... [bit z for input z] of this group
Bit = TRUE: error
Bit = FALSE: no error
ERROR_SHORT_Ix DWORD input double word x: short circuit error
(0...x, value depends on the device, only if input mode = IN_DIGITAL_H
→ data sheet) [Bit 0 for input 0] ... [bit z for input z] of this group
Bit = TRUE: error
Bit = FALSE: no error
> In the application program, the system variables ANALOG00...ANALOGxx can be used for
customer-specific diagnostics.
60
ClassicController CR0033 / CR0133
>
Fast inputs
19318
The devices dispose of fast counting/pulse inputs for an input frequency up to 30 kHz (→ data sheet).
The input resistance of the fast inputs switches automatically depending on the applied mode or
function block:
Input resistance for mode / FB
3.2 kohms (standard) FAST_COUNT, FREQUENCY, INC_ENCODER, PERIOD and similar FBs
50.7 kohms input with fixed switching level 32 V
23900
The internal resistance Ri of the signal source must be substantially lower than the input
resistance Rinput of the used input (principle voltage alignment).
Otherwise the input signal of the fast input can be distort (low-pass characteristic).
14677
If, for example, mechanical switches are connected to these inputs, there may be faulty signals in
the controller due to contact bouncing.
If necessary, filter these "false signals" using the filters Ixx_DFILTER.
(→ chapter System flags (→ p. 230)) (not available for all inputs)
Appropriate function blocks are e.g.:
FAST_COUNT (→ p. 140) Counter block for fast input pulses
FREQUENCY (→ p. 142) Measures the frequency of the signal arriving at the selected channel
FREQUENCY_PERIOD (→ p. 144) Measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel
INC_ENCODER (→ p. 146) Up/down counter function for the evaluation of encoders
INC_ENCODER_HR (→ p. 148) Up/down counter function for the high resolution evaluation of encoders
PERIOD (→ p. 150) Measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel
PERIOD_RATIO (→ p. 152) Measures the frequency and the cycle period (cycle time) in [µs] during the indicated periods at
the indicated channel. In addition, the mark-to-space ratio is indicated in [‰].
PHASE (→ p. 154) Reads a pair of channels with fast inputs and compares the phase position of the signals
When using these units, the parameterised inputs and outputs are automatically configured, so the
programmer of the application does not have to do this.
61
ClassicController CR0033 / CR0133
>
A digital hardware filter can be configured on the fast counter and pulse inputs via the system variable
Ixx_DFILTER. The value in µs (max. 100 000) indicates how long a binary level must be applied
without interruption before it is adopted. Default = 0 µs.
The level change of the input signal is delayed by the value set in the filter.
The filter has an effect on the detected signals only for the following function blocks:
FAST_COUNT (→ p. 140) Counter block for fast input pulses
FREQUENCY (→ p. 142) Measures the frequency of the signal arriving at the selected channel
FREQUENCY_PERIOD (→ p. 144) Measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel
INC_ENCODER (→ p. 146) Up/down counter function for the evaluation of encoders
INC_ENCODER_HR (→ p. 148) Up/down counter function for the high resolution evaluation of encoders
PERIOD (→ p. 150) Measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel
PERIOD_RATIO (→ p. 152) Measures the frequency and the cycle period (cycle time) in [µs] during the indicated periods at
the indicated channel. In addition, the mark-to-space ratio is indicated in [‰].
Digital filters are not available for all fast counter and pulse inputs.
>
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!
62
ClassicController CR0033 / CR0133
>
Via the system variables Qxx_FILTER a software filter which filters the measured current values can
be configured.
In case of a step response the filter behaves like a conventional low-pass filter, the limit frequency
is set by the value entered in the system variable.
During current measuring the filter setting affects the diagnosis time.
Table: Limit frequency software low-pass filter for the current measurement on the output
Qxx_FILTER Filter frequency [Hz] Signal rise time Remarks
0 Filter deactivated
1 580 0.6 ms
2 220 1.6 ms
3 102 3.5 ms
4 51 7 ms Recommended, default setting
5 25 14 ms
6 12 28 ms
7 6 56 ms
8 3 112 ms
>9 51 7 ms → Default setting
12969
After changing the filter setting, the value of this input or output is not output correctly at once. Only
after the signal rise time (→ table) will the value be correct again.
The signal rise time is the time taken by a signal at the output of the filter to rise from 10 % to 90 % of the final value if an
input step is applied. The signal fall time is the time taken by a signal to decrease from 90 % to 10 %.
63
ClassicController CR0033 / CR0133
>
The following operating modes are possible for the device outputs (→ data sheet):
• binary output, plus switching (BH) with/without diagnostic function
• binary output minus switched (BL) without diagnostic function
32635
Basic circuit of output plus switching (BH) Basic circuit of output minus switching (BL)
for positive output signal for negative output signal
32635
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.
>
64
ClassicController CR0033 / CR0133
>
PWM outputs
14717
The following operating modes are possible for the device outputs (→ data sheet):
• PWM output, plus switching (BH) without diagnostic function
• PWM output pair H-bridge without diagnostic function
32563
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
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.
PWM outputs can be operated with and without current control function.
Current-controlled PWM outputs are mainly used for triggering proportional hydraulic functions.
The medium current across a PWM signal can only be correctly determined via the FB
OUTPUT_CURRENT if the current flowing in the switched-on state is within the measuring range.
>
Availability of PWM
15885
The following function blocks are available for the PWM function:
OUTPUT_BRIDGE (→ p. 161) H-bridge on a PWM channel pair
OUTPUT_CURRENT (→ p. 165) Measures the current (average via dither period) on an output channel
OUTPUT_CURRENT_CONTROL (→ p. 166) Current controller for a PWMi output channel
PWM1000 (→ p. 169) Initialises and configures a PWM-capable output channel
the mark-to-space ratio can be indicated in steps of 1 ‰
65
ClassicController CR0033 / CR0133
>
Current measurement of the coil current can be carried out via the current measurement channels
integrated in the controller. This allows for example that the current can be re-adjusted if the coil heats
up. Thus the hydraulic relationships in the system remain the same.
In principle, the current-controlled outputs are protected against short circuit.
66
ClassicController CR0033 / CR0133
4.5 Variables
Content
Retain variables ......................................................................................................................................67
Network variables ...................................................................................................................................68
28318
In this chapter you will learn more about how to handle variables.
28318
>
Variables declared as RETAIN generate remanent data. Retain variables keep the values saved in
them when the device is switched on/off or when an online reset is made.
The contents of the retain variables are lost if the device is in the STOP state during power-off!
32425
67
ClassicController CR0033 / CR0133
>
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
68
ClassicController CR0033 / CR0133
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.
>
This is the device library.This ifm library contains the following function blocks:
Function element Short description
CANx (→ p. 75) Initialises CAN interface x
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_BAUDRATE (→ p. 76) Sets the transmission rate for the bus participant on CAN interface x
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_BUSLOAD (→ p. 77) Determines the current bus load on CAN interface x and counts the occurred error frames
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_DOWNLOADID (→ p. 78) Sets the download identifier for CAN interface x
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_ERRORHANDLER (→ p. 79) Executes a "manual" bus recovery on CAN interface x
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_RECEIVE (→ p. 80) CAN interface x: Configures a data receive object and reads out the receive buffer of the data
object
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_SDO_READ (→ p. 102) CAN interface x: Reads the SDO with the indicated indices from the node
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_SDO_WRITE (→ p. 104) CAN interface x: writes the SDO with the indicated indices to the node
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CANx_TRANSMIT (→ p. 82) Transfers a CAN data object (message) to the CAN interface x for transmission at each call
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
CHECK_DATA (→ p. 213) Generates a checksum (CRC) for a configurable memory area and checks the data of the
memory area for undesired changes
DELAY (→ p. 187) Delays the output of the input value by the time T (dead-time element)
ERROR_REPORT (→ p. 220) Reports an application-specific error to the system
ERROR_RESET (→ p. 222) Resets upcoming error messages
FAST_COUNT (→ p. 140) Counter block for fast input pulses
FLASHREAD (→ p. 205) transfers different data types directly from the flash memory to the RAM
69
ClassicController CR0033 / CR0133
70
ClassicController CR0033 / CR0133
>
71
ClassicController CR0033 / CR0133
>
>
72
ClassicController CR0033 / CR0133
>
73
ClassicController CR0033 / CR0133
Here you will find the description of the ifm function elements suitable for this device, sorted by topic.
Here, the CAN function blocks (layer 2) for use in the application program are described.
74
ClassicController CR0033 / CR0133
CANx
2159
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2162
A change of the download ID and/or baud rate only becomes valid after power off/on.
If the unit is not executed, the interface works with 11-bit identifiers.
>
75
ClassicController CR0033 / CR0133
CANx_BAUDRATE
11834
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
11839
The new value will become effective on RESET (voltage OFF/ON or soft reset).
>
76
ClassicController CR0033 / CR0133
CANx_BUSLOAD
2178
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2180
Determines the current bus load on the CAN bus and counts the occurred error frames.
CANx_BUSLOAD determines the bus load via the number and length of the messages transferred via
the CAN bus during the time indicated in PERIOD by taking the current baud rate into account. The
value BUSLOAD is updated after the time indicated in PERIOD has elapsed.
If the bit RESET is permanently FALSE, the number of the error frames occurred since the last
RESET is indicated.
NOTE
If the communication on the CAN bus is carried out via the CANopen protocol, it is useful to set the
value of PERIOD to the duration of the SYNC cycle.
The measurement period is not synchronised with the CANopen SYNC cycle.
>
>
77
ClassicController CR0033 / CR0133
CANx_DOWNLOADID
11841
= CANx Download-ID
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
11846
The new value will become effective on RESET (voltage OFF/ON or soft reset).
>
78
ClassicController CR0033 / CR0133
CANx_ERRORHANDLER
2174
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2329
13991
If the automatic bus recover function is to be used (default setting) the function
CANx_ERRORHANDLER must not be integrated and instanced in the program!
79
ClassicController CR0033 / CR0133
CANx_RECEIVE
27450
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
13338
CANx_RECEIVE configures a data receive object and reads the receive buffer of the data object.
► The FB must be called once for each data object during initialisation to inform the CAN controller
about the identifiers of the data objects.
► In the further program cycle CANx_RECEIVE is called for reading the corresponding receive
buffer, also repeatedly in case of long program cycles.
► Depending on the CAN interface max. 256 instances are possible for the FB CANx_RECEIVE.
► In the Standard Mode all 2048 IDs can be used simultaneously
In the Extended Mode only 256 (any) IDs can be used simultaneously.
► Each ID (Standard or Extended) can be allotted to only one FB instance.
For multiple use of an ID: the last instance called.
► Set in FB CANx if CANx_RECEIVE should receive normal or extended frames.
> If CANx_RECEIVE is configured for the reception of a normal frame, the frame with this ID will not
be transferred to a CANopen Stack ( if available).
> If an ID is set outside the permissible range (depending on the setting in CANx), the function block
will not be executed.
► Evaluate the output AVAILABLE so that newly received data objects are read from the butter and
processed in time.
Receive buffer: max. 16 software buffers per identifier.
> Each call of the FB decrements the byte AVAILABLE by 1.
If AVAILABLE = 0, there is no data in the buffer.
► Evaluate the output OVERFLOW to detect an overflow of the data buffer.
If OVERFLOW = TRUE, at least 1 data object has been lost.
80
ClassicController CR0033 / CR0133
>
>
81
ClassicController CR0033 / CR0133
CANx_TRANSMIT
27812
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2166
CANx_TRANSMIT transmits a CAN data object (message) to the CAN controller for transmission.
The FB is called for each data object in the program cycle, also repeatedly in case of long program
cycles. The programmer must ensure by evaluating the output RESULT that his transmit order was
accepted. Simplified it can be said that at 125 kbits/s one transmit order can be executed per 1 ms.
The execution of the FB can be temporarily blocked (ENABLE = FALSE) via the input ENABLE. So,
for example a bus overload can be prevented.
To put it simply, at 125 kbits/s one transmit order can be executed per 1 ms.
Several data objects with the same or with different ID can be transmitted virtually at the same time if a
flag is assigned to each data object and controls the execution of the FB via the ENABLE input.
Transmit buffer: max. 16 software buffers and 1 hardware buffer for all identifiers together.
>
>
82
ClassicController CR0033 / CR0133
ifm electronic provides a number of FBs for the CANopen master which will be explained below.
83
ClassicController CR0033 / CR0133
CANx_MASTER_EMCY_HANDLER
2006
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxMaster_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27782
>
>
84
ClassicController CR0033 / CR0133
CANx_MASTER_SEND_EMERGENCY
2012
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxMaster_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27783
>
85
ClassicController CR0033 / CR0133
>
Example: CANx_MASTER_SEND_EMERGENCY
27890
86
ClassicController CR0033 / CR0133
CANx_MASTER_STATUS
2692
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxMaster_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27780
87
ClassicController CR0033 / CR0133
>
88
ClassicController CR0033 / CR0133
>
>
Here you can see the structures of the arrays used in this function block.
Using Controller CR0032 as an example, the following code fragments show the use of the function
block CANx_MASTER_STATUS→ chapter Example: CANx_MASTER_STATUS (→ p. 91).
>
Structure of CANx_EMERGENCY_MESSAGE
13996
89
ClassicController CR0033 / CR0133
>
Structure of CANx_NODE_STATE
13997
90
ClassicController CR0033 / CR0133
>
Example: CANx_MASTER_STATUS
27895
>
Slave information
2699
To be able to access the information of the individual CANopen nodes, you must create an array for
the corresponding structure. The structures are contained in the library. You can see them under [Data
types] in the library manager.
The number of the array elements is determined by the global variable MAX_NODEINDEX which is
automatically generated by the CANopen stack. It contains the number of the slaves minus 1 indicated
in the network configurator.
The numbers of the array elements do not correspond to the node ID. The identifier can be read
from the corresponding structure under NODE_ID.
>
91
ClassicController CR0033 / CR0133
>
>
Structure Emergency_Message
27712
92
ClassicController CR0033 / CR0133
ifm electronic provides a number of FBs for the CANopen slave which will be explained below.
93
ClassicController CR0033 / CR0133
CANx_SLAVE_EMCY_HANDLER
2050
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxSlave_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27786
>
>
94
ClassicController CR0033 / CR0133
CANx_SLAVE_NODEID
2044
Symbol in CODESYS:
>
Description
27781
CANx_SLAVE_NODEID enables the setting of the node ID of a CANopen slave at runtime of the
application program.
Normally, the FB is called once during initialisation of the controller, in the first cycle. Afterwards, the
input ENABLE is set to FALSE again.
>
95
ClassicController CR0033 / CR0133
CANx_SLAVE_SEND_EMERGENCY
2056
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxSlave_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27787
96
ClassicController CR0033 / CR0133
>
Example: CANx_SLAVE_SEND_EMERGENCY
27896
97
ClassicController CR0033 / CR0133
CANx_SLAVE_SET_PREOP
2700
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxSlave_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2703
98
ClassicController CR0033 / CR0133
CANx_SLAVE_STATUS
2706
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_CANopenxSlave_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2707
99
ClassicController CR0033 / CR0133
>
100
ClassicController CR0033 / CR0133
Here you will find ifm function elements for CANopen handling of Service Data Objects (SDOs).
101
ClassicController CR0033 / CR0133
CANx_SDO_READ
27448
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27791
CANx_SDO_READ reads the →SDO (→ p. 329) with the indicated indexes from the node.
Prerequisite: Node must be in the mode "PRE-OPERATIONAL" or "OPERATIONAL".
By means of these, the entries in the object directory can be read. So it is possible to selectively read
the node parameters.
Example:
>
102
ClassicController CR0033 / CR0133
>
103
ClassicController CR0033 / CR0133
CANx_SDO_WRITE
27807
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27790
CANx_SDO_WRITE writes the →SDO (→ p. 329) with the specified indexes to the node.
Prerequisite: the node must be in the state "PRE-OPERATIONAL" or "OPERATIONAL".
Using this FB, the entries can be written to the object directory. So it is possible to selectively set the
node parameters.
The value for LEN must be lower than the length of the transmit array. Otherwise, random data will
be sent.
Example:
104
ClassicController CR0033 / CR0133
>
105
ClassicController CR0033 / CR0133
For SAE J1939, ifm electronic provides a number of function elements which will be explained in the
following.
106
ClassicController CR0033 / CR0133
J1939_x
2274
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
2276
J1939_x serves as protocol handler for the communication profile SAE J1939.
To handle the communication, the protocol handler must be called in each program cycle. To do so,
the input ENABLE is set to TRUE.
Once set, ENABLE must remain TRUE!
The protocol handler is started if the input START is set to TRUE for one cycle.
Using MY_ADDRESS, a device address is assigned to the controller. It must differ from the addresses
of the other J1939 bus participants. It can then be read by other bus participants.
>
107
ClassicController CR0033 / CR0133
J1939_x_GLOBAL_REQUEST
2282
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27878
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
27878
NOTICE
Risk of inadmissible overwriting of data!
► Create a receiver array with a size of 1 785 bytes.
This is the maximum size of a J1939 message.
► Check the amount of received data:
the value must not exceed the size of the array created to receive data!
► Given that the request of data can be handled via several control cycles, this process must be
evaluated via the RESULT byte.
RESULT = 2: the POU is waiting for data of the participants.
RESULT = 1: data was received by a participant.
The output LEN indicates how many data bytes have been received.
Store / evaluate this new data immediately!
When a new message is received, the data in the memory address DST is overwritten.
RESULT = 0: no participant on the bus sends a reply within 1.25 seconds.
The FB returns to the non-active state.
Only now may ENABLE be set again to FALSE!
► For the reception of data from several participants at short intervals:
call the POU several times in the same PLC cycle and evaluate it at once!
108
ClassicController CR0033 / CR0133
>
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
>
109
ClassicController CR0033 / CR0133
J1939_x_RECEIVE
2278
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27785
Once the following parameters have been configured they can no longer be modified in the running
application program: PG, PF, PS, RPT, LIFE, DST.
27785
NOTICE
Risk of inadmissible overwriting of data!
► Create a receiver array with a size of 1 785 bytes.
This is the maximum size of a J1939 message.
► Check the amount of received data:
the value must not exceed the size of the array created to receive data!
This block must also be used if the messages are requested using the FBs J1939_..._REQUEST.
110
ClassicController CR0033 / CR0133
>
111
ClassicController CR0033 / CR0133
J1939_x_RESPONSE
2280
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27872
112
ClassicController CR0033 / CR0133
>
113
ClassicController CR0033 / CR0133
J1939_x_SPECIFIC_REQUEST
2281
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27873
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
27873
NOTICE
Risk of inadmissible overwriting of data!
► Create a receiver array with a size of 1 785 bytes.
This is the maximum size of a J1939 message.
► Check the amount of received data:
the value must not exceed the size of the array created to receive data!
114
ClassicController CR0033 / CR0133
>
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
>
115
ClassicController CR0033 / CR0133
J1939_x_TRANSMIT
279
x = 1...n = number of the CAN interface (depending on the device, → data sheet)
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_J1939_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
27875
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
116
ClassicController CR0033 / CR0133
>
Info
PGN = [Page] + [PF] + [PS]
PDU = [PRIO] + [PGN] + [J1939 address] + [data]
>
117
ClassicController CR0033 / CR0133
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
The function blocks listed below allow you to use the serial interface in the application program.
118
ClassicController CR0033 / CR0133
SERIAL_PENDING
27711
Symbol in CODESYS:
>
Description
12994
SERIAL_PENDING determines the number of data bytes stored in the serial receive buffer.
In contrast to SERIAL_RX the content of the buffer remains unchanged after this function has been
called.
The SERIAL FBs form the basis for the creation of an application-specific protocol for the serial
interface.
To do so, set the system flag bit SERIAL_MODE=TRUE!
32976
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
>
119
ClassicController CR0033 / CR0133
SERIAL_RX
27722
Symbol in CODESYS:
>
Description
12997
SERIAL_RX reads a received data byte from the serial receive buffer at each call.
If more than 1000 data bytes are received, the buffer overflows and data is lost. This is indicated by
the bit OVERFLOW.
If 7-bit data transmission is used, the 8th bit contains the parity and must be suppressed by the user if
necessary.
The SERIAL FBs form the basis for the creation of an application-specific protocol for the serial
interface.
To do so, set the system flag bit SERIAL_MODE=TRUE!
32837
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
>
>
120
ClassicController CR0033 / CR0133
SERIAL_SETUP
27723
Symbol in CODESYS:
>
Description
13000
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
>
121
ClassicController CR0033 / CR0133
SERIAL_TX
27720
Symbol in CODESYS:
>
Description
13003
SERIAL_TX transmits one data byte via the serial RS232 interface.
The FiFo transmission memory contains 1 000 bytes.
Using the input ENABLE the transmission can be enabled or disabled.
The SERIAL FBs form the basis for the creation of an application-specific protocol for the serial
interface.
To do so, set the system flag bit SERIAL_MODE=TRUE!
32838
NOTE
The serial interface is not available to the user by default, because it is used for program download
and debugging.
The interface can be freely used if the user sets the system flag bit SERIAL_MODE=TRUE.
Debugging of the application program is then only possible via any of the CAN interfaces.
>
122
ClassicController CR0033 / CR0133
5.2.7 Function elements: Optimising the PLC cycle via processing interrupts
Content
SET_INTERRUPT_I .............................................................................................................................124
SET_INTERRUPT_XMS ......................................................................................................................126
20965
28098
The PLC cyclically processes the stored application program in its full length. The cycle time can vary
due to program branchings which depend e.g. on external events (= conditional jumps). This can have
negative effects on certain functions.
By means of systematic interrupts of the cyclic program it is possible to call time-critical processes
independently of the cycle in fixed time periods or in case of certain events.
Since interrupt functions are principally not permitted for SafetyControllers, they are thus not available.
123
ClassicController CR0033 / CR0133
SET_INTERRUPT_I
27727
Symbol in CODESYS:
>
Description
19234
32443
SET_INTERRUPT_I handles the execution of a program part by an interrupt request via an input
channel.
In the conventional PLC the cycle time is decisive for real-time monitoring. So the PLC is at a
disadvantage as compared to customer-specific controllers. Even a "real-time operating system" does
not change this fact when the whole application program runs in one single block which cannot be
changed.
A possible solution would be to keep the cycle time as short as possible. This often leads to splitting
the application up to several control cycles. This, however, makes programming complex and difficult.
Another possibility is to call a certain program part only upon request by an input pulse independently
of the control cycle:
The time-critical part of the application is integrated by the user in a block of the type PROGRAM
(PRG). This block is declared as the interrupt routine by calling SET_INTERRUPT_I once (during
initialisation). As a consequence, this program block will always be executed if an edge is detected on
the input CHANNEL. If inputs and outputs are used in this program part, these are also read and
written in the interrupt routine, triggered by the input edge. Reading and writing can be stopped via the
FB inputs READ_INPUTS, WRITE_OUTPUTS and ANALOG_INPUTS.
So in the program block all time-critical events can be processed by linking inputs or global variables
and writing outputs. So FBs can only be executed if actually called by an input signal.
NOTE
The program block should be skipped in the cycle (except for the initialisation call) so that it is not
cyclically called, too.
The input (CHANNEL) monitored for triggering the interrupt cannot be initialised and further processed
in the interrupt routine.
The runtime of the main cycle plus the sum of the duration of all program parts called via interrupt
must always be within the max. permissible cycle time!
The user is responsible for data consistency between the main program and the program parts
running in the interrupt mode!
124
ClassicController CR0033 / CR0133
>
32443
Interrupt priorities:
All program parts called via interrupt have the same priority of execution. Several simultaneous
interrupts are processed sequentially in the order of their occurrence.
If a further edge is detected on the same input during execution of the program part called via
interrupt, the interrupt is listed for processing and the program is directly called again after
completion. As an option, interfering multiple pulses can be filtered out by setting the glitch filter.
The program running in the interrupt mode can be disrupted by interrupts with a higher priority
(e.g. CAN).
If several interrupts are present on the same channel, the last initialised FB (or the PRG) will be
assigned the channel. The previously defined FB (or the PRG) is then no longer called and no
longer provides data.
Do not use this function block on one input together with one of the following function blocks!
• INC_ENCODER_HR (→ p. 148)
>
125
ClassicController CR0033 / CR0133
SET_INTERRUPT_XMS
28322
Symbol in CODESYS:
>
Description
19363
NOTE
In the whole program call SET_INTERRUPT_XMS only once and only in the first cycle!
To avoid that the program block called by interrupt is additionally called cyclically, it should be
skipped in the cycle (with the exception of the initialisation call).
Several timer interrupt blocks can be active.
Restrictions for time permitted:
Runtime of the program part running in interrupt < REPEATTIME
The runtime of the main cycle plus the sum of the duration of all program parts called via interrupt
must always be within the max. permissible cycle time!
The user is responsible for data consistency between the main program and the program parts
running in the interrupt mode!
Please note: In case of a high CAN bus activity the set REPEATTIME may fluctuate.
The count of per interrupt running program parts (as SET_INTERRUPT_XMS) is limited to 16. More
definitions of program parts running per interrupt than SET_INTERRUPT_XMS will be ignored and not
executed.
126
ClassicController CR0033 / CR0133
>
Interrupt priorities:
All program parts called via interrupt have the same priority of execution. Several simultaneous
interrupts are processed sequentially in the order of their occurrence.
The program running in the interrupt mode can be disrupted by interrupts with a higher priority
(e.g. CAN).
>
127
ClassicController CR0033 / CR0133
In this chapter we show you ifm FBs which allow you to read and process the analogue or digital
signals at the device input.
NOTE
The analogue raw values shown in the PLC configuration of CODESYS directly come from the ADC.
They are not yet corrected!
Therefore different raw values can appear in the PLC configuration for identical devices.
Error correction and normalisation are only carried out by ifm function blocks. The function blocks
provide the corrected value.
128
ClassicController CR0033 / CR0133
INPUT_ANALOG
15916
Symbol in CODESYS:
>
Description
12912
12916
MODE FB Output
Input operating mode Global variable Unit
dec | hex OUT
0 0000 deactivated IN_NOMODE --- ---
1 0001 binary input, minus switching (BH) IN_DIGITAL_H 0/1 ---
2 0002 binary input, plus switching (BL) IN_DIGITAL_L 0/1 ---
4 0004 current input IN_CURRENT 0…20 000 µA
8 0008 voltage input IN_VOLTAGE10 0…10 000 mV
16 0010 voltage input IN_VOLTAGE30 0…32 000 mV
32 0020 voltage input, ratiometric IN_RATIO 0…1 000 ‰
64 0040 --- --- --- ---
128 0080 --- --- --- ---
256 0100 --- --- --- ---
3...680
512 0200 resistance input IN_RESISTANCE
16...30 000
20790
These and other operating modes of the inputs can also be configured with ...
SET_INPUT_MODE (→ p. 132) Assigns an operating mode to an input channel
129
ClassicController CR0033 / CR0133
>
13020
NOTE
When switching into another mode during runtime, it takes a few cycles before the output value is
correct again.
If the same input channel was configured differently during runtime, the most recent configuration will
apply.
>
130
ClassicController CR0033 / CR0133
>
131
ClassicController CR0033 / CR0133
SET_INPUT_MODE
15918
Symbol in CODESYS:
>
Description
11944
The function block INPUT_ANALOG (→ p. 129) can also be used to configure the operating mode on an
input.
18414
NOTE
When switching into another mode during runtime, it takes a few cycles before the output value is
correct again.
If the same input channel was configured differently during runtime, the most recent configuration will
apply.
132
ClassicController CR0033 / CR0133
>
>
133
ClassicController CR0033 / CR0133
If the values of analogue inputs or the results of analogue functions must be adapted, the following
FBs will help you.
134
ClassicController CR0033 / CR0133
NORM
27675
Symbol in CODESYS:
>
Description
27772
NORM normalises a value within defined limits to a value with new limits.
The FB normalises a value of type WORD within the limits of XH and XL to an output value within the
limits of YH and YL. This FB is for example used for generating PWM values from analogue input
values.
NOTE
► The value for X must be in the defined input range between XL and XH!
There is no internal plausibility check of the value X.
> Due to rounding errors the normalised value can deviate by 1.
> If the limits (XH/XL or YH/YL) are defined in an inverted manner, normalisation is also done in an
inverted manner.
>
>
135
ClassicController CR0033 / CR0133
>
136
ClassicController CR0033 / CR0133
NORM_DINT
2217
Symbol in CODESYS:
>
Description
2355
NORM_DINT normalises a value within defined limits to a value with new limits.
The FB normalises a value of type DINT within the limits of XH and XL to an output value within the
limits of YH and YL. This FB is for example used for generating PWM values from analogue input
values.
NOTE
► The value for X must be in the defined input range between XL and XH!
There is no internal plausibility check of the value X.
► The result of the calculation (XH-XL)•(YH-YL) must remain in the value range of data type DINT
(-2 147 483 648...2 147 483 647)!
> Due to rounding errors the normalised value can deviate by 1.
> If the limits (XH/XL or YH/YL) are defined in an inverted manner, normalisation is also done in an
inverted manner.
>
>
137
ClassicController CR0033 / CR0133
NORM_REAL
2218
Symbol in CODESYS:
>
Description
2358
NORM_REAL normalises a value within defined limits to a value with new limits.
The FB normalises a value of type REAL within the limits of XH and XL to an output value within the
limits of YH and YL. This FB is for example used for generating PWM values from analogue input
values.
NOTE
► The value for X must be in the defined input range between XL and XH!
There is no internal plausibility check of the value X.
► The result of the calculation (XH-XL)•(YH-YL) must remain in the value range of data type REAL
(-3,402823466•1038...3,402823466•1038)!
> Due to rounding errors the normalised value can deviate by 1.
> If the limits (XH/XL or YH/YL) are defined in an inverted manner, normalisation is also done in an
inverted manner.
>
>
138
ClassicController CR0033 / CR0133
5.2.10 Function elements: counter functions for frequency and period measurement
Content
FAST_COUNT ......................................................................................................................................140
FREQUENCY .......................................................................................................................................142
FREQUENCY_PERIOD .......................................................................................................................144
INC_ENCODER ...................................................................................................................................146
INC_ENCODER_HR ............................................................................................................................148
PERIOD ................................................................................................................................................150
PERIOD_RATIO ...................................................................................................................................152
PHASE..................................................................................................................................................154
19285
Depending on the ecomatmobile device up to 16*) fast inputs are supported which can process input
frequencies of up to 30 kHz. In addition to frequency measurement, the inputs can also be used for
the evaluation of incremental encoders (counter function).
*) ExtendedController: up to 32 fast inputs
Due to the different measuring methods errors can occur when the frequency is determined.
The following FBs are available for easy evaluation:
Function element Permissible values Explanation
Measurement of the frequency on the indicated channel.
FREQUENCY 0.1...30 000 Hz
Measurement error is reduced in case of high frequencies
Measurement of frequency and period duration (cycle time) on the indicated
PERIOD 0.1...5 000 Hz
channel
Measurement of frequency and period duration (cycle time) as well as
PERIOD_RATIO 0.1...5 000 Hz
mark-to-space ratio [‰] on the indicated channel
The FB combines the two FBs FREQUENCY and PERIOD or PERIOD_RATIO.
FREQUENCY_PERIOD 0.1...30 000 Hz
Automatic selection of the measuring method at 5 kHz
PHASE 0.1...5 000 Hz Reading of a channel pair and comparison of the phase position of the signals
INC_ENCODER 0.1...30 000 Hz Up/down counter function for the evaluation of encoders
INC_ENCODER_HR 0.1...5 000 Hz Up/down counter function for the high resolution evaluation of encoders
FAST_COUNT 0.1...30 000 Hz Counting of fast pulses
139
ClassicController CR0033 / CR0133
FAST_COUNT
15922
Symbol in CODESYS:
>
Description
20653
Do not use this function block on one input together with one of the following function blocks!
• FREQUENCY (→ p. 142)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER_HR (→ p. 148)
• PERIOD (→ p. 150)
• PERIOD_RATIO (→ p. 152)
• PHASE (→ p. 154)
32853
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
140
ClassicController CR0033 / CR0133
>
>
141
ClassicController CR0033 / CR0133
FREQUENCY
15924
Symbol in CODESYS:
>
Description
20656
20675
FREQUENCY measures the frequency of the signal arriving at the selected CHANNEL. The FB
evaluates the positive edge of the signal.
Depending on the TIMEBASE, frequency measurements can be carried out in a wide value range.
• high frequencies require a short timebase
• low frequencies require a longer timebase
Limit values:
TIMEBASE permissible, measurable frequency
57 000 ms
1 149 Hz
(= maximum value)
30 000 Hz
2 184 ms
(= maximum value)
The longer the timebase for the frequency to be measured, the more precise the measured value
determined.
Example of a frequency = 1 Hz:
TIMEBASE [ms] max. errors [%] Measurement [Hz]
1 000 100 0...2
10 000 10 0.9...1.1
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
7321
For frequency measuring: ensure that the function block does not receive more than 65 535
positive edges within the value of TIMEBASE!
Otherwise, the internal counting register may overflow and lead to incorrect results.
142
ClassicController CR0033 / CR0133
>
22690
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER_HR (→ p. 148)
• PERIOD (→ p. 150)
• PERIOD_RATIO (→ p. 152)
• PHASE (→ p. 154)
>
>
143
ClassicController CR0033 / CR0133
FREQUENCY_PERIOD
15926
Symbol in CODESYS:
>
Description
20659
20676
FREQUENCY_PERIOD measures the frequency and period duration (cycle time) in [µs] on the
indicated channel (allowed for all inputs). Maximum input frequency → data sheet.
The FB combines PERIOD/PERIOD_RATIO and FREQUENCY in a common function. The measuring
method is automatically selected at approx. 5 kHz:
• below 5.2 kHz the FB behaves like PERIOD or PERIOD_RATIO
• above 5.5 kHz the FB behaves like FREQUENCY.
This FB measures the frequency and the cycle time of the signal at the selected CHANNEL. To
calculate, all positive edges are evaluated and the average value is determined by means of the
number of indicated PERIODS.
For an input frequency > 5 kHz and an active FREQUENCY mode the ratio cannot be measured.
The maximum measuring range is approx. 15 min.
32856
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
7321
For frequency measuring: ensure that the function block does not receive more than 65 535
positive edges within the value of TIMEBASE!
Otherwise, the internal counting register may overflow and lead to incorrect results.
22690
144
ClassicController CR0033 / CR0133
>
22691
NOTE
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY (→ p. 142)
• INC_ENCODER_HR (→ p. 148)
• PERIOD (→ p. 150)
• PERIOD_RATIO (→ p. 152)
• PHASE (→ p. 154)
>
>
145
ClassicController CR0033 / CR0133
INC_ENCODER
15928
= Incremental Encoder
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
For the extended side of the ExtendedControllers the FB name ends with '_E'. (not for CR0133)
Symbol in CODESYS:
>
Description
19302
The outputs UP and DOWN indicate the current counting direction of the counter. The outputs are
TRUE if the counter has counted in the corresponding direction in the preceding program cycle (even
in case of overflow). If the counter stops, the direction output in the following program cycle is also
reset.
22616
146
ClassicController CR0033 / CR0133
>
22691
>
>
147
ClassicController CR0033 / CR0133
INC_ENCODER_HR
19225
Symbol in CODESYS:
>
Description
19231
The outputs UP and DOWN indicate the current counting direction of the counter:
Output = TRUE if the counter has counted in the corresponding direction in the preceding program
cycle (even in case of overflow).
If the counter stops, the direction output in the following program cycle is also reset.
Different in the event of overflow:
When the counter stops, the direction output = TRUE until an opposite count has been made.
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY (→ p. 142)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER (→ p. 146)
• PERIOD (→ p. 150)
• PERIOD_RATIO (→ p. 152)
• PHASE (→ p. 154)
• SET_INTERRUPT_I (→ p. 124)
148
ClassicController CR0033 / CR0133
>
>
149
ClassicController CR0033 / CR0133
PERIOD
15930
Symbol in CODESYS:
>
Description
20662
20677
PERIOD measures the frequency and period duration (cycle time) in [µs] on the indicated channel
(allowed for all inputs). Maximum input frequency → data sheet.
This FB measures the frequency and the cycle time of the signal at the selected CHANNEL. To
calculate, all positive edges are evaluated and the average value is determined by means of the
number of indicated PERIODS.
In case of low frequencies there will be inaccuracies when using FREQUENCY (→ p. 142). To avoid this,
PERIOD can be used. The cycle time is directly indicated in [µs].
The maximum measuring range is 10 seconds.
32860
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
22690
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY (→ p. 142)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER_HR (→ p. 148)
• PERIOD_RATIO (→ p. 152)
• PHASE (→ p. 154)
150
ClassicController CR0033 / CR0133
>
>
151
ClassicController CR0033 / CR0133
PERIOD_RATIO
15932
Symbol in CODESYS:
>
Description
20665
20678
PERIOD_RATIO measures the frequency and the period duration (cycle time) in [µs] over the
indicated periods on the indicated channel (allowed for all inputs). In addition, the mark-to-period ratio
is indicated in [‰]. Maximum input frequency → data sheet.
This FB measures the frequency and the cycle time of the signal at the selected CHANNEL. To
calculate, all positive edges are evaluated and the average value is determined by means of the
number of indicated PERIODS. In addition, the mark-to-period ratio is indicated in [‰].
For example: In case of a signal ratio of 25 ms high level and 75 ms low level the value RATIO1000 is
provided as 250 ‰.
In case of low frequencies there will be inaccuracies when using FREQUENCY (→ p. 142). To avoid this,
PERIOD_RATIO can be used. The cycle time is directly indicated in [µs].
The maximum measuring range is 10 seconds.
32859
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
22690
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY (→ p. 142)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER_HR (→ p. 148)
• PERIOD (→ p. 150)
• PHASE (→ p. 154)
152
ClassicController CR0033 / CR0133
>
>
153
ClassicController CR0033 / CR0133
PHASE
15934
Symbol in CODESYS:
>
Description
20668
20679
PHASE reads a pair of channels with fast inputs and compares the phase position of the signals.
Maximum input frequency → data sheet.
This FB compares a pair of channels with fast inputs so that the phase position of two signals towards
each other can be evaluated. An evaluation of the cycle period is possible even in the range of
seconds (max. 10 seconds).
32857
NOTE
In case of higher frequencies (higher than those guaranteed by ifm) the following problems may occur:
The switch-on and switch-off times of the outputs become more important.
Undue heating of the components may occur.
The influences mentioned above depend on the components used in the individual case.
These possible influences cannot be exactly predicted.
22690
Do not use this function block on one input together with one of the following function blocks!
• FAST_COUNT (→ p. 140)
• FREQUENCY (→ p. 142)
• FREQUENCY_PERIOD (→ p. 144)
• INC_ENCODER_HR (→ p. 148)
• PERIOD (→ p. 150)
• PERIOD_RATIO (→ p. 152)
154
ClassicController CR0033 / CR0133
>
>
155
ClassicController CR0033 / CR0133
For this device you can set the mode of some or all outputs. Here we show you a couple of function
elements to it.
156
ClassicController CR0033 / CR0133
SET_OUTPUT_MODE
15937
Symbol in CODESYS:
>
Description
12094
NOTE
Is the measuring range for ACTUAL_CURRENT to be changed (to 4 A) at the function block
OUTPUT_BRIDGE during operation?
► For both related outputs, during the init phase, call the function block SET_OUTPUT_MODE
before calling the function block OUTPUT_BRIDGE!
CURRENT_RANGE = 2 (for 4 A)
157
ClassicController CR0033 / CR0133
>
158
ClassicController CR0033 / CR0133
>
159
ClassicController CR0033 / CR0133
Here, you will find ifm function blocks that allow you to operate the outputs with Pulse-Width
Modulation (PWM).
160
ClassicController CR0033 / CR0133
OUTPUT_BRIDGE
2198
Symbol in CODESYS:
>
Description
19298
NOTE
When using the H-bridge current control is not supported.
Outputs which are operated in the PWM mode do not support any diagnostic functions and no ERROR
flags are set. This is due to the structure of the outputs.
Calling this FB with an output configured as B(L) is not permitted.
An output defined as PWM output can no longer be used as binary output afterwards.
The function overload protection is not active in this mode!
The function overload protection will be resetted by function OUTPUT_BRIDGE.
► Change the parameters only during operation when INIT=FALSE. The new parameters will not be
adopted before the current PWM period has elapsed.
Changes of the PWM frequencies during operation:
only permissible in the range 40...2 000 Hz.
If VALUE = 0, output will not be fully deactivated. In principle the output will be active during a timer
tick of the PWM timer (typically approx. 50 µs).
► FB must be called in each cycle.
161
ClassicController CR0033 / CR0133
>
NOTE
Is the measuring range for ACTUAL_CURRENT to be changed (to 4 A) at the function block
OUTPUT_BRIDGE during operation?
► For both related outputs, during the init phase, call the function block SET_OUTPUT_MODE
before calling the function block OUTPUT_BRIDGE!
CURRENT_RANGE = 2 (for 4 A)
Here you can see how a h-bridge can be run via PWM outputs at a ifm controller.
Basic circuit of a H-bridge with PWM control:
162
ClassicController CR0033 / CR0133
>
Program example:
163
ClassicController CR0033 / CR0133
>
>
164
ClassicController CR0033 / CR0133
OUTPUT_CURRENT
382
Symbol in CODESYS:
>
Description
28839
OUTPUT_CURRENT handles the current measurement in conjunction with an active PWM channel.
The FB provides the current output current if the outputs are used as PWM outputs or as plus
switching. The current measurement is carried out in the device, i.e. no external measuring resistors
are required.
>
>
165
ClassicController CR0033 / CR0133
OUTPUT_CURRENT_CONTROL
2196
Symbol in CODESYS:
>
Description
2200
166
ClassicController CR0033 / CR0133
>
NOTE
► When defining the parameter DITHER_VALUE make sure that the resulting PWM ratio in the
operating range of the loop control remains between 0...1000 %:
• PWM ratio + DITHER_VALUE < 1000 ‰ and
• PWM ratio - DITHER_VALUE > 0 ‰.
Outside this permissible area, DITHER_VALUE is internally reduced to the maximum possible
value temporarily, so that the average value of the PWM ratio corresponds to the required value.
> When the dither is activated, changes to PWM_FREQUENCY, DITHER_VALUE and
DITHER_FREQUENCY become effective only when the current dither period has been
completed.
► Change the parameters only during operation when INIT=FALSE. The new parameters will not be
adopted before the current PWM period has elapsed.
► Changes of the PWM frequencies during operation:
only permissible in the range 40...2 000 Hz.
> If the current indicated in the parameter DESIRED_CURRENT cannot be reached because the
PWM ratio is already at 100 %, this is indicated by the system variable ERROR_CONTROL_Qx.
> If KI = 0, there is no loop control.
> If during the loop control a PWM_RATIO = 0 results, the output is not deactivated completely. In
principle the output will be active during a timer tick of the PWM timer (typically approx. 50 µs).
► The initialisation of the FB (INIT = TRUE) may only be carried out once per PLC cycle.
► Calling this FB with an output configured as B(L) is not permitted.
► An output defined as PWM output can no longer be used as binary output afterwards.
> If the flowing current in the switched-on condition exceeds the measuring range, control will no
longer be possible because the AD converter is at the end of the measuring range and therefore
provides wrong values (the max. value).
167
ClassicController CR0033 / CR0133
>
>
168
ClassicController CR0033 / CR0133
PWM1000
326
Symbol in CODESYS:
>
Description
2311
PWM1000 handles the initialisation and parameter setting of the PWM outputs.
The FB enables a simple use of the PWM function in the device. For each channel an own PWM
frequency, the mark-to-period ratio and the dither can be set.
The PWM frequency FREQUENCY can be directly indicated in [Hz] and the mark-to-period ratio
VALUE in steps of 1 ‰.
If VALUE = 0, output will not be fully deactivated. In principle the output will be active during a timer
tick of the PWM timer (typically approx. 50 µs).
► When defining the parameter DITHER_VALUE make sure that the resulting PWM ratio in the
operating range of the loop control remains between 0...1000 %:
• PWM ratio + DITHER_VALUE < 1000 ‰ and
• PWM ratio - DITHER_VALUE > 0 ‰.
Outside this permissible area, DITHER_VALUE is internally reduced to the maximum possible
value temporarily, so that the average value of the PWM ratio corresponds to the required value.
► Activate the function block permanently!
► Calling this FB with an output configured as B(L) is not permitted.
NOTE
The function change of a channel defined as PWM function during operation is not possible. The PWM
function remains set until a hardware reset is carried out on the controller power off and on again.
For high PWM frequencies differences can occur between the set ratio and the ratio on the output due
to the system.
► Change the parameters only during operation when INIT=FALSE. The new parameters will not be
adopted before the current PWM period has elapsed.
► Changes of the PWM frequencies during operation:
only permissible in the range 40...2 000 Hz.
169
ClassicController CR0033 / CR0133
>
170
ClassicController CR0033 / CR0133
The following function blocks are needed from the library UTIL.Lib (in the CODESYS package):
• RAMP_INT
• CHARCURVE
These function blocks are automatically called and configured by the function blocks of the hydraulics
library.
The following function blocks are needed from the library:ifm_CR0033_Vxxyyzz.LIB
OUTPUT_CURRENT (→ p. 165) Measures the current (average via dither period) on an output channel
OUTPUT_CURRENT_CONTROL (→ p. 166) Current controller for a PWMi output channel
These function blocks are automatically called and configured by the function blocks of the hydraulics
library.
171
ClassicController CR0033 / CR0133
CONTROL_OCC
2735
Symbol in CODESYS:
>
Description
2737
172
ClassicController CR0033 / CR0133
>
173
ClassicController CR0033 / CR0133
JOYSTICK_0
6250
Symbol in CODESYS:
>
Description
27776
JOYSTICK_0 scales signals from a joystick to clearly defined characteristic curves, standardised
to 0...1000.
For this FB the characteristic curve values are specified (→ figures):
Rising edge of the ramp = 5 increments/PLC cycle
Fast Controllers have a very short cycle time!
Falling edge of the ramp = no ramp
Mode 0:
characteristic curve linear for the range XL to XH
174
ClassicController CR0033 / CR0133
Mode 1:
Characteristic curve linear with dead band
Values fixed to:
Dead band:
0…10% of 1000 increments
Mode 2:
2-step linear characteristic curve with dead band
Values fixed to:
Dead band:
0…10% of 1000 increments
Step:
X = 50 % of 1000 increments
Y = 20 % of 1000 increments
175
ClassicController CR0033 / CR0133
>
176
ClassicController CR0033 / CR0133
JOYSTICK_1
6255
Symbol in CODESYS:
>
Description
27775
Mode 0:
Linear characteristic curve
100 % = 1000 increments
Mode 1:
Characteristic curve linear with dead band
Value for the dead band (DB) can be set in % of 1000
increments
100 % = 1000 increments
DB = Dead_Band
177
ClassicController CR0033 / CR0133
Mode 2:
2-step linear characteristic curve with dead band
Values can be configured to:
Dead band:
0…DB in % of 1000 increments
Step:
X = CPX in % of 1000 increments
Y= CPY in % of 1000 increments
100 % = 1000 increments
DB = Dead_Band
CPX = Change_Point_X
CPY = Change_Point_Y
178
ClassicController CR0033 / CR0133
>
179
ClassicController CR0033 / CR0133
>
180
ClassicController CR0033 / CR0133
JOYSTICK_2
6258
Symbol in CODESYS:
>
Description
27778
JOYSTICK_2 scales the signals from a joystick to a configurable characteristic curve. Free selection of
the standardisation.
For this FB, the characteristic curve is freely configurable (→ figure):
181
ClassicController CR0033 / CR0133
>
182
ClassicController CR0033 / CR0133
>
183
ClassicController CR0033 / CR0133
NORM_HYDRAULIC
394
Symbol in CODESYS:
>
Description
27771
NORM_HYDRAULIC standardises input values with fixed limits to values with new limits.
This function block corresponds to NORM_DINT from the CODESYS library UTIL.Lib.
The function block standardises a value of type DINT, which is within the limits of XH and XL, to an
output value within the limits of YH and YL.
Due to rounding errors deviations from the standardised value of 1 may occur. If the limits (XH/XL or
YH/YL) are indicated in inversed form, standardisation is also inverted.
If X is outside the limits of XL…XH, the error message will be X_OUT_OF_RANGE = TRUE.
184
ClassicController CR0033 / CR0133
>
Example: NORM_HYDRAULIC
27881
185
ClassicController CR0033 / CR0133
The section below describes in detail the units that are provided for set-up by software controllers in
the ecomatmobile device. The units can also be used as basis for the development of your own
control functions.
>
For controlled systems, whose time constants are unknown the setting procedure to Ziegler and
Nickols in a closed control loop is of advantage.
>
Setting control
28405
At the beginning the controlling system is operated as a purely P-controlling system. In this respect the
derivative time TV is set to 0 and the reset time TN to a very high value (ideally to ) for a slow system.
For a fast controlled system a small T N should be selected.
Afterwards the gain KP is increased until the control deviation and the adjustment deviation perform
steady oscillation at a constant amplitude at KP = KPcritical. Then the stability limit has been reached.
Then the time period Tcritical of the steady oscillation has to be determined.
Add a differential component only if necessary.
TV should be approx. 2...10 times smaller than TN.
KP should be equal to KD.
Idealised setting of the controlled system:
Control unit KP = KD TN TV
P 2.0 • KPcritical –– ––
For this setting process it has to be noted that the controlled system is not harmed by the
oscillation generated. For sensitive controlled systems KP must only be increased to a value at which
no oscillation occurs.
>
Damping of overshoot
27829
To dampen overshoot PT1 (→ p. 192) (low pass) can be used. In this respect the preset value XS is
damped by the PT1 link before it is supplied to the controller function.
The setting variable T1 should be approx. 4...5 times greater than TN of the controller.
186
ClassicController CR0033 / CR0133
DELAY
27826
Symbol in CODESYS:
>
Description
27770
DELAY delays the output of the input value by the time T (dead-time element).
>
>
187
ClassicController CR0033 / CR0133
PID1
19235
Symbol in CODESYS:
>
Description
19237
>
188
ClassicController CR0033 / CR0133
>
Recommended settings
19242
► Start values:
KP = 0
KD = 0
► Adapt KI to the process.
► Then modify KP and KI gradually.
189
ClassicController CR0033 / CR0133
PID2
344
Symbol in CODESYS:
>
Description
6262
190
ClassicController CR0033 / CR0133
>
>
>
Recommended setting
27708
191
ClassicController CR0033 / CR0133
PT1
28577
Symbol in CODESYS:
>
Description
27819
The output of the FB can become instable if T1 is shorter than the SPS cycle time.
The output variable Y of the low-pass filter has the following time characteristics (unit step):
>
192
ClassicController CR0033 / CR0133
Using this FB the control can be restarted via an order in the application program.
193
ClassicController CR0033 / CR0133
SOFTRESET
27714
Symbol in CODESYS:
>
Description
28134
In case of active communication: the long reset period must be taken into account because
otherwise guarding errors will be signalled.
>
194
ClassicController CR0033 / CR0133
195
ClassicController CR0033 / CR0133
TIMER_READ
27719
Symbol in CODESYS:
>
Description
27827
The system timer goes up to 0xFFFF FFFF at the maximum (corresponds to 49d 17h 2min 47s
295ms) and then starts again from 0.
>
196
ClassicController CR0033 / CR0133
TIMER_READ_US
27716
Symbol in CODESYS:
>
Description
27793
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
>
197
ClassicController CR0033 / CR0133
198
ClassicController CR0033 / CR0133
TEMPERATURE
2216
Symbol in CODESYS:
>
Description
2365
199
ClassicController CR0033 / CR0133
5.2.18 Function elements: saving, reading and converting data in the memory
Content
Storage types for data backup .............................................................................................................200
File system............................................................................................................................................201
Automatic data backup .........................................................................................................................202
Manual data storage .............................................................................................................................204
28364
>
Flash memory
28829
Properties:
• non-volatile memory
• writing is relatively slow and only block by block
• before re-writing, memory content must be deleted
• fast reading
• limited writing and reading frequency
• really useful only for storing large data quantities
• saving data with FLASHWRITE
• reading data with FLASHREAD
>
FRAM memory
28831
FRAM indicates here all kinds of non-volatile and fast memories.
Properties:
• fast writing and reading
• unlimited writing and reading frequency
• any memory area can be selected
• saving data with FRAMWRITE
• reading data with FRAMREAD
200
ClassicController CR0033 / CR0133
>
File system
2690
The file system coordinates the storage of the information in the memory. The size of the file system is
128 kbytes.
The file names of the data system are limited:
max. length for Controller: CR0n3n, CR7n3n: 15 characters
max. for all other units: 11 characters
Behaviour of the file system in the Controller: CR0n3n, CR7n3n:
The controller always tries to write the file, even if the same file name already exists. The file might
be saved several times. Only the current file is used. Via the download (see below) this multiple
filing can be prevented.
Individual files cannot be overwritten or deleted.
The file system is completely deleted during each download (boot project download or RAM
download). Then e.g. a symbol file or a project file (FBs in CODESYS) can be written.
The file system is also deleted during a [Reset (Original)] (CODESYS function in the menu
[Online]).
201
ClassicController CR0033 / CR0133
The ecomatmobile controllers allow to save data (BOOL, BYTE, WORD, DWORD) non-volatilely
(= saved in case of voltage failure) in the memory. If the supply voltage drops, the backup operation is
automatically started. Therefore it is necessary that the data is defined as RETAIN variables
(→ CODESYS).
A distinction is made between variables declared as RETAIN and variables in the flag area which can
be configured as a remanent block with MEMORY_RETAIN_PARAM (→ p. 203).
Details → chapter Variables (→ p. 67)
The advantage of the automatic backup is that also in case of a sudden voltage drop or an interruption
of the supply voltage, the storage operation is triggered and thus the current values of the data are
saved (e.g. counter values).
202
ClassicController CR0033 / CR0133
MEMORY_RETAIN_PARAM
27673
Symbol in CODESYS:
>
Description
28023
MEMORY_RETAIN_PARAM determines the remanent data behaviour for various events. Variables
declared as VAR_RETAIN in CODESYS have a remanent behaviour from the outset.
Remanent data keep their value (as the variables declared as VAR_RETAIN) after an uncontrolled
termination as well as after normal switch off and on of the controller. After a restart the program
continues to work with the stored values.
For groups of events that can be selected (with MODE), this function block determines how many
(LEN) data bytes (from flag byte %MB0) shall have retain behaviour even if they have not been
explicitly declared as VAR_RETAIN.
Event MODE = 0 MODE = 1 MODE = 2 MODE = 3
Power OFF ON Data is newly initialised Data is remanent Data is remanent Data is remanent
Soft reset Data is newly initialised Data is remanent Data is remanent Data is remanent
Cold reset Data is newly initialised Data is newly initialised Data is remanent Data is remanent
Reset default Data is newly initialised Data is newly initialised Data is remanent Data is remanent
Load application program Data is newly initialised Data is newly initialised Data is remanent Data is remanent
Load runtime system Data is newly initialised Data is newly initialised Data is newly initialised Data is remanent
If MODE = 0, only those data have retain behaviour as with MODE=1 which have been explicitly
declared as VAR_RETAIN.
If the FB is never called, the flag bytes act according to MODE = 0. The flag bytes which are above the
configured area act according to MODE = 0, too.
Once a configuration has been made, it remains on the device even if the application or the runtime
system is reloaded.
>
203
ClassicController CR0033 / CR0133
Besides the possibility to store data automatically, user data can be stored manually, via function block
calls, in integrated memories from where they can also be read.
By means of the storage partitioning (→ chapter Available memory (→ p. 15)) the programmer can
find out which memory area is available.
204
ClassicController CR0033 / CR0133
FLASHREAD
27888
Symbol in CODESYS:
>
Description
27769
FLASHREAD 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 contents are read completely during the cycle in which the FB is called up.
► Please make sure that the target memory area in the RAM is sufficient.
► To the destination address DST applies:
Determine the address by means of the operator ADR and assigne it to the POU!
>
205
ClassicController CR0033 / CR0133
FLASHWRITE
27885
Symbol in CODESYS:
>
Description
19245
► Activate the TEST input to use the function block! Otherwise, a watchdog error occurs.
Test input is active:
• Programming mode is enabled
• Software download is possible
• Status of the application program can be queried
• Protection of stored software is not possible
32442
WARNING
Danger due to uncontrollable process operations!
The status of the inputs/outputs is "frozen" during execution of FLASHWRITE.
► Do not execute this FB when the machine is running!
FLASHWRITE enables writing of different data types directly into the flash memory.
Using this FB, large data volumes are to be stored during set-up, to which there is only read access in
the process.
► If a page has already been written (even if only partly), the entire flash memory area needs to be
deleted before new write access to this page. This is done by write access to the address 0.
► Never write to a page several times! Always delete everything first!
Otherwise, traps or watchdog errors occur.
► Do not delete the flash memory area more often than 100 times. Otherwise, the data
consistency in other flash memory areas is no longer guaranteed.
► During each SPS cycle, FLASHWRITE may only be started once!
► To the source start address SRC applies:
Determine the address by means of the operator ADR and assigne it to the POU!
> The FB writes the contents of the address SRC into the flash memory. In doing so, as many bytes
as indicated under LEN are transmitted.
If destination start address DST is outside the permissible range: no data transfer!
206
ClassicController CR0033 / CR0133
>
207
ClassicController CR0033 / CR0133
FRAMREAD
27886
Symbol in CODESYS:
>
Description
28176
FRAMREAD enables quick reading of different data types directly from the FRAM memory ¹).
The FB reads the contents as from the address of SRC from the FRAM memory. In doing so, as many
bytes as indicated under LEN are transmitted.
If the FRAM memory area were to be exceeded by the indicated number of bytes, only the data up to
the end of the FRAM memory area will be read.
► To the destination address DST applies:
Determine the address by means of the operator ADR and assigne it to the POU!
¹) FRAM indicates here all kinds of non-volatile and fast memories.
>
208
ClassicController CR0033 / CR0133
FRAMWRITE
27863
Symbol in CODESYS:
>
Description
28167
FRAMWRITE enables the quick writing of different data types directly into the FRAM memory ¹).
The FB writes the contents of the address SRC to the non-volatile FRAM memory. In doing so, as
many bytes as indicated under LEN are transmitted.
If the FRAM memory area were to be exceeded by the indicated number of bytes, only the data up to
the end of the FRAM memory area will be written.
► To the source address SRC applies:
Determine the address by means of the operator ADR and assigne it to the POU!
If the target address DST is outside the permissible range: no data transfer!
¹) FRAM indicates here all kinds of non-volatile and fast memories.
>
209
ClassicController CR0033 / CR0133
MEMCPY
27672
= memory copy
Unit type = function block (FB)
Unit is contained in the libraryifm_CR0033_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
15944
32818
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 POU!
> 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.
> If the memory area into which the data are to be copied is not entirely in a permissible memory
area, the data will not be copied and a parameter error will be signalled.
DST memory area Device Memory size
Application data (all) 192 Kbytes
210
ClassicController CR0033 / CR0133
MEMSET
2348
Symbol in CODESYS:
>
Description
2350
211
ClassicController CR0033 / CR0133
The FBs described in this chapter control the data access and enable a data check.
212
ClassicController CR0033 / CR0133
CHECK_DATA
27809
Symbol in CODESYS:
>
Description
27768
CHECK_DATA generates a checksum (CRC) for a configurable memory area and checks the data of
the memory area for undesired changes.
► Create a separate instance of the function block for each memory area to be monitored.
► Determine the address by means of the operator ADR and assigne it to the POU!
► In addition, indicate the number of data bytes LENGTH (length from the STARTADR).
Undesired change: Error!
If input UPDATE = FALSE and data in the memory is changed inadvertently, then RESULT = FALSE.
The result can then be used for further actions (e.g. deactivation of the outputs).
Desired change:
Data changes in the memory (e.g. of the application program or ecomatmobile device) are only
permitted if the output UPDATE is set to TRUE. The value of the checksum is then recalculated. The
output RESULT is permanently TRUE again.
>
>
213
ClassicController CR0033 / CR0133
>
Example: CHECK_DATA
27893
In the following example the program determines the checksum and stores it in the RAM via pointer pt:
214
ClassicController CR0033 / CR0133
GET_IDENTITY
14505
Symbol in CODESYS:
>
Description
14507
215
ClassicController CR0033 / CR0133
SET_DEBUG
27721
Symbol in CODESYS:
>
Description
27815
SET_DEBUG handles the DEBUG mode without active test input (→ chapter TEST mode (→ p. 48)).
If the input DEBUG of the FB is set to TRUE, the programming system or the downloader, for
example, can communicate with the device and execute some special system commands (e.g. for
service functions via the GSM modem CANremote).
In this operating mode a software download is not possible because the test input is not connected
to supply voltage. Only read access is possible.
>
216
ClassicController CR0033 / CR0133
SET_IDENTITY
11927
Symbol in CODESYS:
>
Description
27814
Downloader reads:
Downloader reads: CR0020
BOOTLD_H 020923 V2.0.0 041004
CR0020 00.00.01 ifm electronic gmbh
Nozzle in front *)
217
ClassicController CR0033 / CR0133
SET_PASSWORD
27724
Symbol in CODESYS:
>
Description
27816
SET_PASSWORD sets a user password for the program and memory upload with the
DOWNLOADER.
If the password is activated, reading of the application program or the data memory with the software
tool DOWNLOADER is only possible if the correct password has been entered.
If an empty string (default condition) is assigned to the input PASSWORD, an upload of the application
software or of the data memory is possible at any time.
A new password can be set only after resetting the previous password.
The password is reset when loading a new application program as boot project.
>
218
ClassicController CR0033 / CR0133
219
ClassicController CR0033 / CR0133
ERROR_REPORT
12357
Symbol in CODESYS:
>
Description
12364
With ERROR_REPORT the application program signals an application-specific error to the system.
► Program the result of the error condition to the input ENABLE.
If ENABLE=TRUE, the function block enters the error code in the error list.
• view current error list with SHOW_ERROR_LIST (→ p. 225)
• delete an error entry from the error list using ERROR_RESET (→ p. 222)
► Program the corresponding error code to the input ERRORCODE:
Structure: yy xx 00 00 → chapter Error codes (→ p. 310)
xx = application-specific error code
yy = error class
Here, the function block PACK_ERRORCODE (→ p. 224)
> The function block output signals whether this function block call has been configured correctly.
The function block does not analyse whether the error codes are meaningful.
>
220
ClassicController CR0033 / CR0133
>
221
ClassicController CR0033 / CR0133
ERROR_RESET
12376
Symbol in CODESYS:
>
Description
12378
With ERROR_RESET the application program can reset upcoming error messages:
a single error message
a group of error messages of the same type (same source or same cause)
application-specific error:
• All errors containing the indicated USER error code are deleted.
• The error class is ignored.
• Error cause and error source must have the value '0'.
If an error of class 3 or 4 is reset, then...
• the flag ERROR=FALSE is set
• all other errors of classes 3 and 4 are also deleted.
all errors
Depending on the entered ERRORCODE the following happens with ENABLE=TRUE:
ERRORCODE Note Description
0xCL 00 SO 00 Eror cause = 0 Reset all errors with the same error source
0xCL 00 00 CA Error source = 0 Reset all errors with the same error cause
0xXX AS SO CA Application-specific error Reset all errors with the same number (irrespective of
the error class)
0x00 00 00 00 Error code = 0 Reset all errors
Legend:
CL = code for error class
AS = code for application-specific error
SO = code for error source
CA = code for error cause
XX = code value without any effect
> As long as an error is active, the following happens with a reset:
• The fault is reset briefly.
• When the diagnostic time has elapsed plus 1 program cycle: The fault is signalled again.
► Between two reset actions of the FB:
set ENABLE=FALSE (at least for one PLC cycle)!
222
ClassicController CR0033 / CR0133
>
>
>
Example: ERROR_RESET
13054
If all errors "Overload" are to be reset with the error class "General errors",
ERRORCODE=0x01000004 needs to be indicated:
4th byte 3rd byte 2nd byte 1st byte
Error class Application-specific error code Error source Error cause
0x01 0x00 0x00 0x04
General error No application-specific error All error sources Overload
223
ClassicController CR0033 / CR0133
PACK_ERRORCODE
12382
Symbol in CODESYS:
>
Description
12384
>
224
ClassicController CR0033 / CR0133
SHOW_ERROR_LIST
12360
Symbol in CODESYS:
>
Description
12367
The function block SHOW_ERROR_LIST serves to read the currently present error codes.
With ENABLE=TRUE the function block creates a list of up to 64 currently existing error codes.
ENABLE=FALSE preserves an unchanged version of the most recent list.
If the list is full, no more error codes are accepted.
>
>
225
ClassicController CR0033 / CR0133
UNPACK_ERRORCODE
13650
Symbol in CODESYS:
>
Description
13653
>
226
ClassicController CR0033 / CR0133
>
6.1 Diagnosis
28856
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
28834
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".
227
ClassicController CR0033 / CR0133
>
When errors are detected the system flag ERROR can also be set in the application program. Thus, in
case of a fault, the controller reacts as follows:
> the operation LED lights red,
> the output relays switch off,
> the outputs protected by the relays are disconnected from power,
> the logic signal states of the outputs remain unchanged.
NOTE
If the outputs are switched off by the relays, the logic signal states remain unchanged.
► The programmer must evaluate the ERROR bit and thus also reset the output logic in case of a
fault.
NOTICE
Premature wear of the relay contacts possible.
► In normal operation, only switch the relays without load!
For this purpose, set all relevant outputs to FALSE via the application program!
>
The programmer has the sole responsibility for the safe processing of data in the application
software.
► Process the specific error flags and/or error codes in the application program!
An error description is provided via the error flag / error code.
This error flag / error code can be further processed if necessary.
After analysis and elimination of the error cause:
► As a general rule, reset all error flags via the application program.
Without explicit reset of the error flags the flags remain set with the corresponding effect on the
application program.
228
ClassicController CR0033 / CR0133
>
229
ClassicController CR0033 / CR0133
7 Appendix
Content
System flags .........................................................................................................................................230
Address assignment and I/O operating modes ....................................................................................237
Integrated I/O module: Description .......................................................................................................244
Error tables ...........................................................................................................................................309
28796
Additionally to the indications in the data sheets you find summary tables in the appendix.
The addresses of the system flags can change if the PLC configuration is extended.
► While programming only use the symbol names of the system flags!
230
ClassicController CR0033 / CR0133
>
231
ClassicController CR0033 / CR0133
>
232
ClassicController CR0033 / CR0133
>
233
ClassicController CR0033 / CR0133
>
234
ClassicController CR0033 / CR0133
>
235
ClassicController CR0033 / CR0133
>
236
ClassicController CR0033 / CR0133
>
237
ClassicController CR0033 / CR0133
238
ClassicController CR0033 / CR0133
239
ClassicController CR0033 / CR0133
240
ClassicController CR0033 / CR0133
>
Value
Inputs Possible operating mode Set with function block Function block input
dec hex
INPUT_ANALOG
I00…I11 IN_NOMODE off MODE 0 0000
SET_INPUT_ANALOG
INPUT_ANALOG
IN_DIGITAL_H plus MODE 1 0001
SET_INPUT_ANALOG
INPUT_ANALOG
IN_DIGITAL_L minus MODE 2 0002
SET_INPUT_ANALOG
INPUT_ANALOG
IN_CURRENT 0…20 000 µA MODE 4 0004
SET_INPUT_ANALOG
INPUT_ANALOG
IN_VOLTAGE10 0…10 000 mV MODE 8 0008
SET_INPUT_ANALOG
INPUT_ANALOG
IN_VOLTAGE30 0…32 000 mV MODE 16 0010
SET_INPUT_ANALOG
INPUT_ANALOG
IN_RATIO 0…1 000 ‰ MODE 32 0020
SET_INPUT_ANALOG
Diagnosis for IN_DIGITAL_H SET_INPUT_MODE DIAGNOSTICS TRUE
Frequency measurement FREQUENCY
Interval measurement 0…30 000 Hz FREQUENCY_PERIOD
Phase measurement PHASE
Interval measurement 0,1...5 000 Hz PERIOD
Period and ratio
0,1...5 000 Hz PERIOD_RATIO
measurement
Counter 0…30 000 Hz FAST_COUNT
0…30 000 Hz INC_ENCODER
I00...I07 Detect encoder
0...5 000 Hz INC_ENCODER_HR
INPUT_ANALOG
I12...I14 IN_NOMODE off MODE 0 0000
SET_INPUT_ANALOG
INPUT_ANALOG
IN_DIGITAL_H plus MODE 1 0001
SET_INPUT_ANALOG
Diagnosis for IN_DIGITAL_H SET_INPUT_MODE DIAGNOSTICS TRUE
INPUT_ANALOG
IN_RESISTANCE 16…30 000 MODE 512 0200
SET_INPUT_ANALOG
INPUT_ANALOG
I15 IN_NOMODE off MODE 0 0000
SET_INPUT_ANALOG
INPUT_ANALOG
IN_DIGITAL_H plus MODE 1 0001
SET_INPUT_ANALOG
Diagnosis for IN_DIGITAL_H SET_INPUT_MODE DIAGNOSTICS TRUE
INPUT_ANALOG
IN_RESISTANCE 3…680 MODE 512 0200
SET_INPUT_ANALOG
241
ClassicController CR0033 / CR0133
>
242
ClassicController CR0033 / CR0133
>
Operating mode Q00 Q01 Q02 Q03 Q04 Q05 Q06 Q07
OUT_DIGITAL_H plus X X X X X X X X
OUT_DIGITAL_L minus -- X -- X -- -- -- --
for OUT_DIGITAL_H
Diagnosis X X X X X X X X
via current measurement
for OUT_DIGITAL_H
Overload protection X X X X X X X X
with current measurement
2A X X X X -- -- -- --
Current measuring range 3A -- -- -- -- X X X X
4A X X X X -- -- -- --
PWM X X X X X X X X
PWMi X X X X X X X X
H-bridge -- X -- X -- -- -- --
Operating mode Q08 Q09 Q10 Q11 Q12 Q13 Q14 Q15
OUT_DIGITAL_H plus X X X X X X X X
OUT_DIGITAL_L minus -- X -- X -- -- -- --
for OUT_DIGITAL_H
Diagnosis X X X X X X X X
via current measurement
for OUT_DIGITAL_H
Overload protection X X X X X X X X
with current measurement
2A X X X X -- -- -- --
Current measuring range 3A -- -- -- -- X X X X
4A X X X X -- -- -- --
PWM X X X X X X X X
PWMi X X X X X X X X
H-bridge -- X -- X -- -- -- --
243
ClassicController CR0033 / CR0133
244
ClassicController CR0033 / CR0133
>
245
ClassicController CR0033 / CR0133
>
The operating states are indicated by the integrated status LED (default setting).
LED colour Display Description
Permanently off No operating voltage
Off
246
ClassicController CR0033 / CR0133
247
ClassicController CR0033 / CR0133
>
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.
33386
248
ClassicController CR0033 / CR0133
>
Binary inputs
1015
28811
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.
249
ClassicController CR0033 / CR0133
>
250
ClassicController CR0033 / CR0133
>
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 .
>
251
ClassicController CR0033 / CR0133
252
ClassicController CR0033 / CR0133
>
If the supply voltage VBB1 or VBB2 is not available, all outputs are switched off (OFF).
The diagnostics of these outputs is made via internal current and voltage measurement in the output:
>
253
ClassicController CR0033 / CR0133
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = FALSE
the resistor Ru pulls the read back channel to HIGH
Diagnosis = wire break: potential (power supply)
Without the wire break the low-resistance load (RL < 10 kΩ) would force a
LOW (logical 0).
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = TRUE
Diagnosis = short circuit against GND: the read back channel is pulled to LOW potential (GND)
>
The diagnostics of these outputs is made via internal voltage measurement in the output:
>
Diagnosis: overload
28858
254
ClassicController CR0033 / CR0133
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = FALSE
the resistor Ru pulls the read back channel to HIGH
Diagnosis = wire break: potential (power supply)
Without the wire break the low-resistance load (RL < 10 kΩ) would force a
LOW (logical 0).
>
Wire-break detection is done via the read back channel inside the output.
Prerequisite for diagnosis: output = TRUE
Diagnosis = short circuit against GND: the read back channel is pulled to LOW potential (GND)
>
255
ClassicController CR0033 / CR0133
>
The following CAN interfaces and CAN protocols are available in the integrated I/O module of the
device:
CAN interface CAN 1 CAN 2 CAN 3 CAN 4
Default download ID ID 123 ID 122 --- ---
CAN protocols --- CANopen slave --- ---
The following CAN interfaces and CAN protocols are available in the integrated I/O module of the
device:
CAN interface CAN 1 CAN 2 CAN 3 CAN 4
Default download ID ID 125 ID 124 --- ---
CAN protocols --- CANopen slave --- ---
The integrated I/O module of the device is based on the Smart Controller CR2530:
• This side is preset as CANopen slave ExB01
• Use this side as input/output module.
We recommend the following connection method:
256
ClassicController CR0033 / CR0133
257
ClassicController CR0033 / CR0133
258
ClassicController CR0033 / CR0133
>
Integrate the internal I/O module of the device as CANopen slave via the CODESYS control
configuration!
For this, the same method is used as for integrating an external I/O module:
► Left clicking on the first line (CR0033 Configuration Vxx) in the CODESYS control configuration
for highlighting.
► A click on the right mouse button opens the context menu.
► Select [Append Subelement] there.
► Select [CANopen master...] in the context menu.
It always makes sense to configure the first CANopen master for CAN1.
► Open the context menu again by right clicking on [CANopen master].
► Select [Append Subelement] there.
► Select the EDS file for the integrated I/O module of the device in the context menu:
[ExB01_Vxxyyzz.EDS].
> Result:
The IEC addresses for CAN-Input and CAN-Output result from the following details:
• type of the device used as CANopen master,
• position of the I/O module behind the CANopen master,
• assigned node ID.
The I/O module uses three consecutive node IDs. Rule:
[node ID of the following CAN slave] > [node ID of the I/O module] + 3
► Set the CAN parameter:
• node ID
• nodeguarding
• heartbeat settings
► Parameter setting of the inputs and outputs in the I/O module:
→ chapter Object directory of the integrated I/O module (→ p. 269)
259
ClassicController CR0033 / CR0133
>
ifm offers ready-to-use templates (program templates), by means of which the programming system
can be set up quickly, easily and completely.
33498
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.
260
ClassicController CR0033 / CR0133
>
261
ClassicController CR0033 / CR0133
>
>
The devices dispose of fast counting/pulse inputs for an input frequency up to 30 kHz (→ data sheet).
14677
If, for example, mechanical switches are connected to these inputs, there may be faulty signals in
the controller due to contact bouncing.
Configuration of each input is made via the PLC configuration:
Permissible values → chapter Inputs: operating modes (I/O module) (→ p. 267)
3804
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!
262
ClassicController CR0033 / CR0133
>
The following operating modes are possible for the device outputs (→ data sheet):
• binary output, plus switching (BH) with/without diagnostic function
33379
Basic circuit of output plus switching (BH) Basic circuit of output minus switching (BL)
for positive output signal for negative output signal
33379
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.
263
ClassicController CR0033 / CR0133
>
>
The following operating modes are possible for the device outputs (→ data sheet):
• PWM output, plus switching (BH) without diagnostic function
33529
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
264
ClassicController CR0033 / CR0133
>
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.
PWM outputs can be operated with and without current control function.
Current-controlled PWM outputs are mainly used for triggering proportional hydraulic functions.
The medium current across a PWM signal can only be correctly determined if the current
flowing in the switched-on state is within the measuring range.
>
Availability of PWM
16364
of which
Number of available PWM frequency
Device current-controlled
PWM outputs [Hz]
(PWMi)
Integrated I/O module ExB01 12 2 20...250
>
The following settings are available for the PWM function of the outputs:
• Mode = 4 (OUT_PWM) or
• Mode = 5 (OUT_CURRENT)
Permissible values → chapter Outputs: Operating modes (I/O module) (→ p. 267)
>
Current measurement of the coil current can be carried out via the current measurement channels
integrated in the controller. This way, the current can for example be re-adjusted if the coil heats up.
The hydraulic conditions in the system are maintained.
In principle, the current-controlled outputs are protected against short circuit.
265
ClassicController CR0033 / CR0133
>
Overview
15859
For the inputs and outputs the following operating modes are possible (detailed description: → the
following pages):
SDO value Input
Mode Description
dec | hex Output
Input
0 0x00 OFF switched off, without function
Output
binary plus switching, digital detection
1 0x01 IN_BINARY_LOW_DIGITAL Input
(if possible use mode 10 instead!)
binary plus switching:
2 0x02 OUT_BINARY_HIGH Output output = FALSE 0 V
output = TRUE supply voltage of the outputs
3 0x03 IN_VOLTAGE_10V Input analogue voltage measurement in the 10 V measuring range
4 0x04 OUT_PWM Output PWM mode
5 0x05 OUT_CURRENT Output current-controlled
6 0x06 IN_VOLTAGE_RATIO Input analogue voltage measurement, ratiometric with regard to the supply voltage VBBs
7 0x07 IN_CURRENT Input analogue current measurement (up to 23 mA)
8 0x08 --- --- reserved
9 0x09 IN_VOLTAGE_32 Input analogue voltage measurement in the 32 V measuring range
binary plus switching (depending on the supply voltage VBBs)
10 0x0A IN_BINARY_LOW Input
(analogue or digital detection)
binary plus switching with diagnosis (analogue detection)
11 0x0B IN_BINARY_LOW_DIAG Input depending on the supply voltage VBBs
diagnosis of short circuit with VBBs or GND
binary minus switching (analogue detection)
12 0x0C IN_BINARY_HIGH Input
depending on the supply voltage VBBs
13 0x0D --- --- reserved
14 0x0E IN_FREQUENCY Input frequency measurement (digital detection)
binary plus switching:
output = FALSE 0 V
15 0x0F OUT_BINARY_HIGH_DIAG Output
output = TRUE supply voltage of the outputs
diagnosis of wire break and short circuit
binary plus switching:
output = FALSE 0 V
16 0x10 OUT_BINARY_HIGH_DIAG_PROT Output output = TRUE supply voltage of the outputs
diagnosis of wire break and short circuit
output is switched off in case of short circuit
17 0x11 --- --- reserved
18 0x12 IN_RESISTOR Input resistance measurement (analogue detection)
19 0x13 --- --- reserved
20 0x14 IN_PERIOD_RATIO Input period duration measurement as ratio (digital detection)
21 0x15 --- --- reserved
266
ClassicController CR0033 / CR0133
267
ClassicController CR0033 / CR0133
OUT02
off 0x2000 0x13...0x18 0 0x00
…OUT07
binary output highside plus 0x2000 0x13...0x18 2 0x02
analogue output with
0x2000 0x13...0x18 4 0x04
pulse-width modulation
binary output highside with
plus 0x2000 0x13...0x18 15 0x0F
diagnosis
binary output highside with
plus 0x2000 0x13...0x18 16 0x10
diagnosis and protection
OUT08
off 0x2000 0x19...0x1A 0 0x00
…OUT09
binary output highside plus 0x2000 0x19...0x1A 2 0x02
analogue output with
0x2000 0x19...0x1A 4 0x04
pulse-width modulation
analogue output with
pulse-width modulation, (at pins 25 + 43) 0x2000 0x19...0x1A 4 0x04
voltage-controlled
OUT10
off 0x2000 0x1B...0x1C 0 0x00
…OUT11
binary output highside plus 0x2000 0x1B...0x1C 2 0x02
analogue output with
0x2000 0x1B...0x1C 4 0x04
pulse-width modulation
OUT12
off 0x2000 0x1D...0x20 0 0x00
…OUT15
binary output highside plus 0x2000 0x1D...0x20 2 0x02
268
ClassicController CR0033 / CR0133
269
ClassicController CR0033 / CR0133
>
General
15967
► Activate or deactivate the automatic saving of the communication and device parameters via the
entry [Save Parameter] (→ object directory, index 0x1010):
If SubIndex 0x1 = 0x02:
save all parameters automatically when changed
If SubIndex 0x1 = 0x00:
do not save the parameters automatically.
Changed parameters are only valid ...
• until the device is switched off
• until the next reset.
► Restore the preset values of the parameters via the function [Restore] (→ object directory,
index 0x1011) (does not apply to baud rate and node ID). These values become valid with the
next power on.
>
EDS data type IEC 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
0x0005 USINT 0 255 8 bits = 1 byte
0x0003 INT -32 768 32 767 16 bits = 2 bytes
0x0006 UINT 0 65 535 16 bits = 2 bytes
DINT -2 147 483 648 2 147 483 647 32 bits = 4 bytes
0x0007 UDINT 0 4 294 967 295 32 bits = 4 bytes
0x0008 REAL -3.402823466 • 1038 3.402823466 • 1038 32 bits = 4 bytes
ULINT 0 18 446 744 073 709 551 615 64 bits = 8 bytes
0x0009 STRING number of char. + 1
270
ClassicController CR0033 / CR0133
>
271
ClassicController CR0033 / CR0133
>
272
ClassicController CR0033 / CR0133
273
ClassicController CR0033 / CR0133
274
ClassicController CR0033 / CR0133
275
ClassicController CR0033 / CR0133
276
ClassicController CR0033 / CR0133
277
ClassicController CR0033 / CR0133
278
ClassicController CR0033 / CR0133
>
279
ClassicController CR0033 / CR0133
>
280
ClassicController CR0033 / CR0133
>
281
ClassicController CR0033 / CR0133
282
ClassicController CR0033 / CR0133
>
283
ClassicController CR0033 / CR0133
284
ClassicController CR0033 / CR0133
>
285
ClassicController CR0033 / CR0133
286
ClassicController CR0033 / CR0133
>
287
ClassicController CR0033 / CR0133
288
ClassicController CR0033 / CR0133
289
ClassicController CR0033 / CR0133
290
ClassicController CR0033 / CR0133
291
ClassicController CR0033 / CR0133
>
292
ClassicController CR0033 / CR0133
293
ClassicController CR0033 / CR0133
294
ClassicController CR0033 / CR0133
>
295
ClassicController CR0033 / CR0133
296
ClassicController CR0033 / CR0133
297
ClassicController CR0033 / CR0133
298
ClassicController CR0033 / CR0133
299
ClassicController CR0033 / CR0133
300
ClassicController CR0033 / CR0133
301
ClassicController CR0033 / CR0133
302
ClassicController CR0033 / CR0133
>
The following table contains the following entries from the control configuration:
• CAN input
• transmit PDO mapping
Bit coding:
0b---- ---X = IN00 (IN08)
...
0bX--- ---- = IN07 (IN15)
COB ID =
TX-PDO Variable type Comment
node ID + ...
1 USINT 0x180 Input byte 0 (IN00…IN07)
1 USINT 0x180 Input byte 1 (IN08…IN15)
1 USINT 0x180 Short circuit between VBBS and the input (IN00...IN07)
1 USINT 0x180 Short circuit between VBBS and the input (IN08…IN15)
1 USINT 0x180 Wire break on input (IN00…IN07)
1 USINT 0x180 Wire break on input (IN08…IN15)
1 USINT 0x180 Overcurrent on input (IN00...IN03)
303
ClassicController CR0033 / CR0133
COB ID =
TX-PDO Variable type Comment
node ID + ...
The following table contains the following entries from the control configuration:
• CAN output
• Receive PDO mapping
Bit coding:
0b---- ---X = OUT00 (OUT08)
...
0bX--- ---- = OUT07 (OUT15)
COB ID =
RX-PDO Variable type Comment
node ID + ...
1 USINT 0x200 Output byte 0 (OUT00…OUT07)
1 USINT 0x200 Output byte 1 (OUT08…OUT15)
304
ClassicController CR0033 / CR0133
>
There are no system flags for the integrated I/O module of the device.
Feedback is given for Process Data Objects (PDOs) via the EDS file.
→ Chapter Inputs: PDO mapping (I/O module) (→ p. 303)
305
ClassicController CR0033 / CR0133
>
EMCY objects
15981
CANopen does not provide for two identical EMCY objects to be sent consecutively.
306
ClassicController CR0033 / CR0133
>
0x2020 0x0 Input – short to supply voltage ro USINT 2 Largest sub-index supported
0x1 Short to supply voltage ro USINT 0 0 = normal channels (bit coded)
IN00...IN07 1 = short circuit 0b---- ---X = IN00
0b---- --X- = IN01
0b---- -X-- = IN02
0b---- X--- = IN03
0b---X ---- = IN04
0b--X- ---- = IN05
0b-X-- ---- = IN06
0bX--- ---- = IN07
0x2 Short to supply voltage ro USINT 0 0 = normal channels (bit coded)
IN08…IN11 1 = short circuit 0b---- ---X = IN08
0b---- --X- = IN09
0b---- -X-- = IN10
0b---- X--- = IN11
0b---X ---- = IN12
0b--X- ---- = IN13
0b-X-- ---- = IN14
0bX--- ---- = IN15
0x2021 0x0 Input – wire break ro USINT 2 Largest sub-index supported
0x1 Wire break IN00...IN07 ro USINT 0 0 = normal channels (bit coded)
1 = wire break 0b---- ---X = IN00
0b---- --X- = IN01
0b---- -X-- = IN02
0b---- X--- = IN03
0b---X ---- = IN04
0b--X- ---- = IN05
0b-X-- ---- = IN06
0bX--- ---- = IN07
0x2 Wire break IN08…IN11 ro USINT 0 0 = normal channels (bit coded)
1 = wire break 0b---- ---X = IN08
0b---- --X- = IN09
0b---- -X-- = IN10
0b---- X--- = IN11
0b---X ---- = IN12
0b--X- ---- = IN13
0b-X-- ---- = IN14
0bX--- ---- = IN15
307
ClassicController CR0033 / CR0133
308
ClassicController CR0033 / CR0133
309
ClassicController CR0033 / CR0133
310
ClassicController CR0033 / CR0133
>
Value
Description
dec | hex
No error cause
0 00
or: application-specific error
1 01 Break
2 02 Short
4 04 Overload
5 05 Undervoltage
6 06 Overvoltage
7 07 Current control
24 18 Temperature
26 20 Memory test
27 21 Memory test
56 38 FPU underflow
57 39 FPU overflow
58 3A FPU division by zero
59 3B FPU unspecific error
128 80 CRC
129 81 Corrupt data
130 82 Memory protection
131 83 No data
144 90 Watchdog
145 91 Trap
311
ClassicController CR0033 / CR0133
>
Value
Description
dec | hex
No error source
0 00
or: application-specific error
1 01 CPU
2 02 Peripheral processor
3 03 Coprocessor
312
ClassicController CR0033 / CR0133
Value
Description
dec | hex
198 C6 Scratchpad RAM
Value
Description
dec | hex
0 00 No error
General error, not relevant to safety
1 01 > Error flag, error code
> Error reset possible
ERROR STOP
> Error code
3 03 > Application program aborted
> Safe state
Power-off-on reset is required
Fatal error
> Error code
4 04 > Application program aborted
> Safe state
> Device restarts again (soft-reset)
14025
Fatal errors and ERROR STOP are only visible in the application if the TEST input was already
active when the error occurred.
If TEST input = FALSE:
• an ERROR STOP causes the controller to STOP
• an fatal error causes the controller to reboot
313
ClassicController CR0033 / CR0133
>
Byte 2 Byte 1
Error source [hex] Error cause [hex] Description Function block
10...1F 01 Wire break Ixx INPUT_ANALOG
20...3F (Ex) 01 Wire break Ixx_E INPUT_ANALOG_E
40...4F 01 Wire break Qxx
50...6F (Ex) 01 Wire break Qxx_E
10...1F 02 Short circuit Ixx INPUT_ANALOG
20...3F (Ex) 02 Short circuit Ixx_E INPUT_ANALOG_E
40...4F 02 Short circuit Qxx
50...6F (Ex) 02 Short circuit Qxx_E
10...1F 04 Overcurrent Ixx INPUT_ANALOG
20...3F (Ex) 04 Overcurrent Ixx_E INPUT_ANALOG_E
40...4F 04 Overload Qxx
50...6F (Ex) 04 Overload Qxx_E
90 05 Undervoltage relay voltage VBBs
91 05 Undervoltage relay voltage VBBr
92 05 Undervoltage VBBo
93 05 Undervoltage VBBr
94 05 Undervoltage VBBs
95 05 Undervoltage clamp 15
96...99 (Ex) 05 Undervoltage relay voltage VBBx
9A (Ex) 05 Undervoltage VBBrel
9B...9E (Ex) 05 Undervoltage VBBx
90 06 Overvoltage relay voltage VBBs
91 06 Overvoltage relay voltage VBBr
92 06 Overvoltage VBBo
93 06 Overvoltage VBBr
94 06 Overvoltage VBBs > 32 V
94 06 Overvoltage VBBs > 34 V
95 06 Overvoltage clamp 15
96...99 (Ex) 06 Overvoltage relay voltage VBBx
9A (Ex) 06 Overvoltage VBBrel
9B...9E (Ex) 06 Overvoltage VBBx
40...4F 07 Current control Qxx
50...6F (Ex) 07 Current control Qxx_E
10...1F 08 (safe) Safety diagnostics on the current input
10...1F 09 (safe) Safety diagnostics on the voltage input
40...4F 0A (safe) Safety diagnostics on the activated output (stuck at 1, cross fault)
10...17 0B (safe) Safety diagnostics on the SafetySwitch SAFETY_SWITCH
A0 0C (safe) Analogue values monitoring/multiplexer SAFETY_SWITCH
314
ClassicController CR0033 / CR0133
Byte 2 Byte 1
Error source [hex] Error cause [hex] Description Function block
40...4F 0D (safe) Safety diagnostics on the deactivated output (stuck at 1)
00 18 Temperature error
90...91 19 (safe) Contact fault relays VBBo / VBBr
B3 20 RAM memory test failed
E4 20 FRAM/MRAM memory test failed
B3 21 (safe) RAM address test failed
01 30 (safe) Incorrect / missing interrupt
01 31 (safe) Error time base CPU
08 39 Floating-Point Overflow
08 3A Floating-point division by 0
08 3B Unspecified floating-point error
C2 80 Checksum error in the runtime system code (ifm code)
C3 (safe) 80 Checksum error in the PCP data RAM
C4 80 Checksum error in the boot project
C5 80 Checksum error in the application program code
C6 80 Checksum error in the SP-RAM
C7 (safe) 80 Checksum error in the PCP code RAM
E0 80 Checksum error in the system data
E1 80 Checksum error in the system variables
E2 80 Checksum error in the system parameters
E3 80 Checksum error in the calibration data
B3 81 Corrupt data in the RAM
E3 83 Corrupt calibration data
04 92 (safe) Safety core stopped
05 92 (safe) Error safety code
80...83 C1 CANx warning
80...83 C2 CANx Busoff
80...83 C3 (safe) CANsafety reception error
80...83 C4 (safe) CANsafety transmission error
80, 82 C5 (safe) CANsafety configuration corrupt
00 (Ex) E1 Board link error
00 F0 Serial number error
00 F1 Runtime system expired
00 F8 Parameter error All FBs with ERROR output
INPUT_ANALOG
10...1F F8 Parameter error Ixx
SET_INPUT_MODE
INPUT_ANALOG_E
20...3F (Ex) F8 Parameter error Ixx_E
SET_INPUT_MODE_E
40...4F F8
315
ClassicController CR0033 / CR0133
Legend:
(Ex) = applies to ExtendedController only
(safe) = applies to SafetyController only
The resulting error class (= byte 4) results from the context of the situation and the parameter setting.
Here, byte 3 (application-specific error code) is always = 0.
>
The indications for CANx also apply to each of the CAN interfaces.
316
ClassicController CR0033 / CR0133
>
The following EMCY messages are sent automatically in the following cases:
• as CANopen master: if CANx_MASTER_EMCY_HANDLER (→ p. 84) is called cyclically
• as CANopen slave: if CANx_SLAVE_EMCY_HANDLER (→ p. 94) is called cyclically
EMCY code Object
Manufactor specific information
object 0x1003 0x1001
Byte 0 Byte 1 Byte 2
Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Description
[hex] [hex] [hex]
317
ClassicController CR0033 / CR0133
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.
318
ClassicController CR0033 / CR0133
>
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.
319
ClassicController CR0033 / CR0133
>
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
320
ClassicController CR0033 / CR0133
>
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.
321
ClassicController CR0033 / CR0133
>
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).
322
ClassicController CR0033 / CR0133
>
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.
Disadvantages of flash memories
A storage cell can tolerate a limited number of write and delete processes:
• Multi-level cells: typ. 10 000 cycles
• Single level cells: typ. 100 000 cycles
Given that a write process writes memory blocks of between 16 and 128 Kbytes at the same time,
memory cells which require no change are used as well.
>
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
323
ClassicController CR0033 / CR0133
>
Instructions
Superordinate word for one of the following terms:
installation instructions, data sheet, user information, operating instructions, device manual, installation
information, online help, system manual, programming manual, etc.
>
Intended use
Use of a product in accordance with the information provided in the instructions for use.
>
IP address
IP = Internet Protocol.
The IP address is a number which is necessary to clearly identify an internet participant. For the sake
of clarity the number 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
324
ClassicController CR0033 / CR0133
>
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
>
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 (→ p. 323)
>
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
325
ClassicController CR0033 / CR0133
>
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.
>
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
326
ClassicController CR0033 / CR0133
>
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).
>
PDU
PDU = Protocol Data Unit = protocol data unit.
The PDU is a term from the →CAN protocol →SAE J1939. It refers to a component of the target
address (PDU format 1, connection-oriented) or the group extension (PDU format 2,
message-oriented).
>
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 = 6 zero bits + 1 bit reserved + 1 bit data page + 8 bit PDU Format (PF) + 8 PDU Specific (PS)
The parameter group number is a term from the →CAN protocol →SAE J1939.
>
Pictogram
Pictograms are figurative symbols which convey information by a simplified graphic representation.
(→ chapter What do the symbols and formats mean? (→ p. 7))
>
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).
327
ClassicController CR0033 / CR0133
>
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.
>
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.
328
ClassicController CR0033 / CR0133
>
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.
→ chapter Software modules for the device (→ p. 38)
>
rw
RW = read/ write
Bidirectional data transmission: Data can be read and also changed.
>
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.
329
ClassicController CR0033 / CR0133
>
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? (→ p. 7))
>
System variable
Variable to which access can be made via IEC address or symbol name from the PLC.
>
T
Target
The target contains the hardware description of the target device for CODESYS, e.g.: inputs and
outputs, memory, file locations.
Corresponds to an electronic data sheet.
>
TCP
The Transmission Control Protocol is part of the TCP/IP protocol family. Each TCP/IP data connection
has a transmitter and a receiver. This principle is a connection-oriented data transmission. In the
TCP/IP protocol family the TCP as the connection-oriented protocol 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).
330
ClassicController CR0033 / CR0133
>
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.
331
ClassicController CR0033 / CR0133
CANx_SDO_WRITE ............................................................................104
9 Index CANx_SLAVE_EMCY_HANDLER ........................................................94
CANx_SLAVE_NODEID........................................................................95
A CANx_SLAVE_SEND_EMERGENCY ..................................................96
CANx_SLAVE_SET_PREOP ................................................................98
About this manual ....................................................................................5
CANx_SLAVE_STATUS .......................................................................99
Activate the PLC configuration (e.g. CR0033) ......................................54
CANx_TRANSMIT .................................................................................82
Address ................................................................................................318
CHECK_DATA.....................................................................................213
Address assignment and I/O operating modes ...................................237
CiA .......................................................................................................319
Addresses / variables of the I/Os ........................................................237
CiA DS 304 ..........................................................................................319
Analogue inputs .............................................................................23, 248
configuration and diagnosis .......................................................................... 59
CiA DS 401 ..........................................................................................319
configuration and diagnosis (I/O module ExB01) ....................................... 261 CiA DS 402 ..........................................................................................319
Appendix ..............................................................................................230 CiA DS 403 ..........................................................................................319
Application program ...............................................................................39 CiA DS 404 ..........................................................................................319
Application software.............................................................................318 CiA DS 405 ..........................................................................................319
Application-specific error code (3rd byte) ............................................313 CiA DS 406 ..........................................................................................319
Architecture..........................................................................................318 CiA DS 407 ..........................................................................................319
Automatic data backup ........................................................................202 Clamp 15..............................................................................................319
Availability of PWM ........................................................................65, 265 COB ID.................................................................................................319
Available memory ..................................................................................15 CODESYS ...........................................................................................320
CODESYS functions..............................................................................49
B Configuration of the I/O module ..........................................................258
Baud.....................................................................................................318 Configuration of the inputs and outputs (default setting) ......................56
Binary inputs ..................................................................................24, 249 Configurations........................................................................................50
configuration and diagnosis .......................................................................... 60 Configure inputs.....................................................................................58
Configuration and diagnosis (I/O module ExB01) ...................................... 262 Configure inputs of the integrated I/O module ....................................261
Binary outputs ........................................................................................28 Configure outputs ..................................................................................63
configuration .................................................................................................. 64 Configure outputs for PWM functions..................................................265
Configuration (I/O module ExB01) .............................................................. 264 Configure outputs of the integrated I/O module ..................................263
configuration and diagnosis .......................................................................... 64 Configure software filter of the inputs (I/O module) ............................261
configuration and diagnosis (I/O module ExB01) ....................................... 263 Configure software filter of the outputs (I/O module) ..........................263
Diagnosis (I/O module ExB01).................................................................... 264
Configure the hardware filter .................................................................62
Diagnostics .................................................................................................... 64
Configure the software filters of the inputs ............................................59
Boot loader ..........................................................................................318
Configure the software filters of the outputs ..........................................63
Bootloader..............................................................................................38
Connect integrated I/O module ExB01 as CANopen slave.................256
Bootloader state.....................................................................................46
Connect terminal VBB15 to the ignition switch .....................................17
Bus .......................................................................................................318
Control the LED in the application program ..........................................35
C CONTROL_OCC .................................................................................172
Copyright..................................................................................................5
Calculations and conversions in the application program .....................41 Creating application program ................................................................42
CAN .....................................................................................................318 CSV file ................................................................................................320
interfaces and protocols ................................................................................ 37
Current control with PWM (= PWMi) .............................................66, 265
Interfaces and protocols
Cycle time ............................................................................................320
I/O module in CR0133........................................................................ 256
I/O module in CR2532........................................................................ 256
D
CAN / CANopen
errors and error handling............................................................................. 229 Damping of overshoot .........................................................................186
CAN interfaces.......................................................................................37 Data type..............................................................................................320
CAN interfaces I/O module ..................................................................256 Data types in the EDS file....................................................................270
CAN stack ............................................................................................318 DC ........................................................................................................320
CANx......................................................................................................75 DEBUG mode ........................................................................................49
CANx_BAUDRATE ................................................................................76 Definition
CANx_BUSLOAD ..................................................................................77 overload ......................................................................................................... 28
CANx_DOWNLOADID ..........................................................................78 short circuit .................................................................................................... 29
CANx_ERRORHANDLER .....................................................................79 DELAY .................................................................................................187
CANx_MASTER_EMCY_HANDLER ....................................................84 Description ...... 75, 76, 77, 78, 79, 80, 82, 84, 85, 87, 94, 95, 96, 98, 99,
102, 104, 107, 108, 110, 112, 114, 116, 119, 120, 121, 122, 124, 126,
CANx_MASTER_SEND_EMERGENCY ...............................................85
129, 132, 135, 137, 138, 140, 142, 144, 146, 148, 150, 152, 154, 157,
CANx_MASTER_STATUS ....................................................................87 161, 165, 166, 169, 172, 174, 177, 181, 184, 187, 188, 190, 192, 194,
CANx_RECEIVE....................................................................................80 196, 197, 199, 203, 205, 206, 208, 209, 210, 211, 213, 215, 216, 217,
CANx_SDO_READ..............................................................................102 218, 220, 222, 224, 225, 226
332
ClassicController CR0033 / CR0133
333
ClassicController CR0033 / CR0133
334
ClassicController CR0033 / CR0133
335
ClassicController CR0033 / CR0133
T
Target...................................................................................................330
TCP ......................................................................................................330
TEMPERATURE..................................................................................199
Template ..............................................................................................330
Terminal voltage VBBs falls below the limit value of 10 V ....................20
Terminal voltage VBBx falls below the limit value of 5.25 V .................19
TEST mode............................................................................................48
TIMER_READ......................................................................................196
TIMER_READ_US...............................................................................197
U
UDP .....................................................................................................330
UNPACK_ERRORCODE ....................................................................226
Update the runtime system....................................................................52
USB interface.........................................................................................36
Use as binary inputs ..............................................................................62
Use, intended.......................................................................................331
Using ifm downloader ............................................................................43
Using ifm maintenance tool ...................................................................43
V
Variables ................................................................................................67
Verify the installation .............................................................................52
W
Watchdog .............................................................................................331
Watchdog behaviour..............................................................................49
What do the symbols and formats mean? ...............................................7
What previous knowledge is required? .................................................11
336