IFM CR1141 Owner's manual

Type
Owner's manual

This manual is also suitable for

Programming manual
4.3” ecomatDisplay
CR1140
CR1141
Operating system: V 1.0.x.x or higher
CODESYS version: 3.5 SP19
11534353 / 0009 / 2023
GB
CR1140 CR1141
2
Contents
1 Preliminary note ............................................................. 9
1.1 Legal and copyright information ............................................ 9
1.2 Purpose of the document ................................................. 9
1.3 Symbols used.......................................................... 9
1.4 Warnings.............................................................. 10
1.5 Overview: ifm user documentation .......................................... 10
1.6 Overview: CODESYS documentation........................................ 10
1.7 Change history......................................................... 11
1.7.1 Changes 09 / 2023.................................................. 11
2 Safety instructions............................................................ 12
2.1 Required background knowledge........................................... 12
2.2 Cyber security.......................................................... 12
2.2.1 Security functions................................................... 13
2.2.2 Recommended access protection for the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.3 Recommended access protection for the CODESYS project on the PC . . . . . . . . . . 13
3 System requirements ......................................................... 15
3.1 Hardware ............................................................. 15
3.2 Software.............................................................. 15
4 Installation.................................................................. 16
4.1 CODESYS Development System........................................... 16
4.1.1 Installing CODESYS Development System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 ifm package............................................................ 16
4.2.1 Components of the package........................................... 16
4.2.2 Install package (PC/laptop)............................................ 16
4.2.3 Update package (PC/laptop)........................................... 17
4.2.4 Uninstall package (PC/laptop).......................................... 17
4.3 Updating the runtime system of the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.1 General notes...................................................... 18
4.3.1.1 Downloading the software package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.2 Updating the runtime system........................................... 18
4.3.2.1 Firmware update via USB interface (local) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.2.2 Firmware update via web browser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.3 Setting the IP parameters of the Ethernet interface. . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.3.1 Obtaining the IP parameters from a DHCP server. . . . . . . . . . . . . . . . . . . . . . 21
4.3.3.2 Configuring the IP parameters manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Getting started .............................................................. 23
5.1 Starting CODESYS...................................................... 23
5.2 Creating a CODESYS project.............................................. 23
5.2.1 Project template .................................................... 23
5.2.2 Overview: Project structure with ecomatDisplay4.3" . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.3 Creating a new project with ecomatDisplay4.3“. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 Using the CODESYS operating instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.4 Configuring the programming interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.4.1 Unique identification of the device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.4.2 Setting the communication path of the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.5 Activating the access protection for a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6 Managing device users................................................... 26
5.7 Enter information about applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.8 Accessing the Linux system of the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6 Device set-up............................................................... 28
6.1 Starting the set-up mode.................................................. 28
6.1.1 Notes on operation.................................................. 29
6.1.1.1 Key function .................................................. 29
6.1.1.2 Navigation keys................................................ 30
6.1.1.3 touch screen.................................................. 30
6.1.1.4 Set-up: Enter password.......................................... 31
6.1.2 Set-up mode: Menus................................................. 31
CR1140 CR1141
3
6.1.2.1 Rebooting the device ........................................... 31
6.1.2.2 Starting the device in the recovery mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.1.3 Device info: Showing device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1.4 iOS: Displaying/controlling IO.......................................... 32
6.1.5 Set-up: Device setup................................................. 32
6.1.5.1 Setting the time zone ........................................... 33
6.1.5.2 Setting date and time ........................................... 33
6.1.5.3 Adjusting the display orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1.5.4 Setting the system password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1.5.5 Activating the system password for setup mode . . . . . . . . . . . . . . . . . . . . . . . 37
6.1.5.6 Disabling the system password for setup mode (not recommended). . . . . . . . 37
6.1.5.7 Setting the splash screen........................................ 37
6.1.5.8 Adjusting the display brightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1.6 Ethernet: Configuring the Ethernet interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1.7 Services: Setting the network services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.1.8 Backup: Creating a data backup........................................ 39
6.1.9 Tests: Testing the device ............................................. 40
6.1.10 CAN test: Testing the CAN interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.1.10.1 CAN test: Data received......................................... 40
6.2 Recovery mode......................................................... 41
6.2.1 Starting the local recovery mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.2.1.1 Notes on operation............................................. 43
6.2.2 Quitting the recovery mode............................................ 43
6.3 Starting the PLC application............................................... 44
6.4 Quitting the setup, rebooting the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7 System configuration.......................................................... 45
7.1 Configuring the PLC..................................................... 45
7.2 Adding a font........................................................... 45
7.3 Configuring CAN interfaces................................................ 45
7.3.1 Device description files (EDS files) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3.2 Adding and configuring a CANbus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3.3 RawCAN: configuring CANLayer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.3.4 CANopen: configuring CANopen Manager (master) . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.3.5 CANopen: configuring the CANopen Device (slave) . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.3.6 J1939: configuring J1939 Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8 Programming ............................................................... 50
8.1 Objects of the PLC application with ecomatDisplay4.3" template . . . . . . . . . . . . . . . . . . . 50
8.2 Creating a PLC application................................................ 51
8.2.1 Supported programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.2.2 PLC_PRG in FUP and ST............................................. 51
8.2.3 Available memory................................................... 52
8.2.4 Supported variable types ............................................. 52
8.2.5 Persistent variables.................................................. 52
8.2.6 Symbol names of the operating elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2.7 Procedure......................................................... 54
8.3 Using ifm function libraries ................................................ 54
8.3.1 Configuring the device ............................................... 55
8.3.2 Controlling the device................................................ 55
8.3.3 Configuring the Ethernet interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.3.4 Configuring device keys .............................................. 56
8.3.5 Configuring the device display ......................................... 56
8.3.6 Accessing device sensors and inputs/outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.3.7 Configuring/reading system time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.3.8 File management ................................................... 57
8.3.9 Configuring the touch screen .......................................... 57
8.3.10 Creating a screenshot................................................ 57
8.3.11 Managing CSV files.................................................. 57
8.3.12 Using help functions................................................. 58
8.3.13 Setting and using ecomatPanel......................................... 58
8.4 Using visualisations...................................................... 58
8.4.1 Settings in the project template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
CR1140 CR1141
4
8.4.2 Integrating external files .............................................. 59
8.4.2.1 File name conventions .......................................... 59
8.4.3 Texts and fonts..................................................... 59
8.4.4 Language selection.................................................. 60
8.4.4.1 Example of language switching by mouse click. . . . . . . . . . . . . . . . . . . . . . . . 60
8.4.4.2 Example Variable CurrentLanguage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.4.5 Using image pools................................................... 61
8.4.5.1 Image properties............................................... 61
8.4.5.2 Adjusting the boot screen........................................ 61
8.4.6 Using the visualisation manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.4.6.1 Defining functions for operating elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.4.6.2 Global switching of the visualisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.4.6.3 Local switching of the visualisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.4.6.4 Configuring the target visualisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.4.6.5 Configure web visualisation....................................... 64
8.4.7 Creating a visualisation............................................... 65
8.5 Using touch screen functions .............................................. 65
8.5.1 Notes ............................................................ 65
8.5.2 Configuring input objects of the visualisation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.5.3 Using multitouch functionality.......................................... 66
8.6 Operation without touch functionality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.7 CSV file logging ........................................................ 67
8.7.1 Writing a CSV file................................................... 67
8.7.1.1 How to proceed:............................................... 67
8.7.2 Reading a CSV file.................................................. 67
8.7.3 String format uiGenericLogSizeMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.8 CODESYS IIoT Libraries SL............................................... 68
8.9 Using CANopen ........................................................ 68
8.9.1 CANopen: Sending and receiving SDO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.9.2 CANopen: Network Management (NMT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.10 Using RawCAN (CAN Layer 2)............................................. 69
8.10.1 RawCAN: Controlling CAN network nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.10.2 RawCAN: Sending and receiving CAN messages. . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.10.3 RawCAN: Requesting and sending remote CAN messages . . . . . . . . . . . . . . . . . . . 70
8.11 Using J1939........................................................... 70
8.11.1 Adding a CAN bus .................................................. 70
8.11.2 Assign CAN interface ................................................ 70
8.11.3 Adding J1939 Manager............................................... 70
8.11.4 Setting J1939 Manager parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.11.5 Attaching J1939-ECU................................................ 71
8.11.6 Setting J1939-ECU parameters......................................... 71
8.12 Using EtherNet/IP....................................................... 71
8.12.1 Adding an Ethernet adapter to an Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.12.2 Attaching an EtherNet/IP adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.12.3 Attaching an EtherNet/IP module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.12.4 Configuring the EtherNet/IP interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.13 Using Modbus.......................................................... 73
8.13.1 Adding an Ethernet adapter to an Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.13.2 Attaching a Modbus TCP master........................................ 73
8.13.3 Attaching a Modbus TCP slave device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.13.4 Configuing a Modbus TCP slave device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.14 Configuring task processing ............................................... 74
8.14.1 Configuring a task................................................... 75
8.14.2 Configuring a visualisation task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
8.15 Using ecomatPanel...................................................... 75
8.15.1 Connecting and activating ecomatPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
9 Operation .................................................................. 77
9.1 Transferring CODESYS project to the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.1.1 Loading an application to the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.1.2 Deleting an application from the device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.2 Operating states of the PLC application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
CR1140 CR1141
5
9.2.1 Displaying operating mode of the PLC application . . . . . . . . . . . . . . . . . . . . . . . . . . 78
9.2.2 Starting the PLC application........................................... 78
9.2.3 Stopping the PLC application .......................................... 78
9.3 Reset ................................................................ 78
9.3.1 Supported reset variants.............................................. 78
9.3.2 Resetting the application (warm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.3.3 Resetting the application (cold) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.3.4 Resetting the application (origin). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.4 Displaying system information.............................................. 80
10 ifm function libraries .......................................................... 81
10.1 Behaviour model of the ifm function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
10.1.1 General........................................................... 81
10.1.1.1 Messages / diagnostic codes of the function blocks . . . . . . . . . . . . . . . . . . . . 81
10.1.2 Behaviour model ENABLE ............................................ 81
10.1.2.1 Response to errors............................................. 82
10.1.3 Behaviour model EXECUTE........................................... 82
10.1.3.1 Response to errors............................................. 82
10.2 Library ifm_ecomatDisplay43inch_Cnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.3 ifmCANopenManager.library............................................... 84
10.3.1 COP_GetNodeState................................................. 85
10.3.2 COP_SDOread..................................................... 87
10.3.3 COP_SDOwrite..................................................... 88
10.3.4 COP_SendNMT .................................................... 90
10.3.5 NMT_SERVICE (ENUM).............................................. 91
10.3.6 NMT_STATES (ENUM) .............................................. 91
10.4 Library ifmDevice_ecomatDisplay43inch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.4.1 Common.......................................................... 93
10.4.1.1 BootIntoRecovery.............................................. 93
10.4.1.2 BootIntoSetup................................................. 95
10.4.1.3 GetDeviceOrientation........................................... 97
10.4.1.4 HideSplashScreen ............................................. 99
10.4.1.5 LoadSplashScreen.............................................101
10.4.1.6 SetDeviceOrientation ...........................................103
10.4.1.7 ShutdownDevice...............................................105
10.4.2 ecomatPanel.......................................................107
10.4.2.1 SetKeyLED_ecomatPanel........................................107
10.4.2.2 ControlAllKeyLEDs_ecomatPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
10.4.2.3 SetKeyMapping_ecomatPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
10.4.2.4 GetKeyMapping_ecomatPanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
10.4.2.5 GetStatus_ecomatPanel.........................................115
10.4.3 Ethernet ..........................................................116
10.4.3.1 GetEthernetInterfaces...........................................116
10.4.3.2 GetIPsettings .................................................118
10.4.3.3 GetIPsettings2 ................................................120
10.4.3.4 SetIPsettings..................................................122
10.4.3.5 SetIPsettings2.................................................124
10.4.4 Keypad...........................................................126
10.4.4.1 GetKeyMapping ...............................................126
10.4.4.2 ResetAllKeyLED...............................................128
10.4.4.3 ResetKeyMapping..............................................129
10.4.4.4 SetKeyLED...................................................130
10.4.4.5 SetKeyMapping................................................131
10.4.5 LCD .............................................................132
10.4.5.1 GetBootupBacklight ............................................132
10.4.5.2 GetLCD_Backlight..............................................133
10.4.5.3 SetBootupBacklight.............................................134
10.4.5.4 SetLCD_Backlight..............................................136
10.4.6 Local IO ..........................................................137
10.4.6.1 GetServiceInput ...............................................137
10.4.6.2 GetTemperatures..............................................139
10.4.6.3 GetTemperatures2.............................................141
CR1140 CR1141
6
10.4.6.4 GetTemperaturesCyclic .........................................143
10.4.7 Status LED........................................................144
10.4.7.1 GetBootupStatusLEDState.......................................144
10.4.7.2 SetBootupStatusLEDState.......................................146
10.4.7.3 SetStatusLEDstate.............................................148
10.4.8 Storage...........................................................149
10.4.8.1 USBstorageHandler ............................................149
10.4.9 System Commands..................................................151
10.4.9.1 LinuxSysCallAsync.............................................151
10.4.9.2 LinuxSysCallAsync2............................................153
10.4.9.3 LinuxSysCallSync..............................................155
10.4.9.4 LinuxSysCallSync2.............................................157
10.4.10System info........................................................159
10.4.10.1 GetSysInfo ...................................................159
10.4.10.2 GetSysResources..............................................161
10.4.11System Time.......................................................163
10.4.11.1 GetAvailableTimesZones ........................................163
10.4.11.2 GetNTP_Settings ..............................................165
10.4.11.3 GetSysTime ..................................................167
10.4.11.4 GetSysTimeCyclic..............................................169
10.4.11.5 SetNTP_Settings ..............................................171
10.4.11.6 SetSysTime...................................................172
10.4.11.7 SetTimeZone .................................................174
10.4.12Touch............................................................176
10.4.12.1 DisableTouchScreen............................................176
10.4.12.2 SetTouchOptimisationMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
10.4.13Window Control.....................................................178
10.4.13.1 PrintScreen...................................................178
10.4.14Enums............................................................179
10.4.14.1 CAN_BAUDRATE (ENUM).......................................179
10.4.14.2 CAN_CHANNEL (ENUM)........................................180
10.4.14.3 eDAY_OF_WEEK (ENUM).......................................180
10.4.14.4 eETHERNET_INTERFACES (ENUM). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
10.4.14.5 eIP_ADDRESS_VERSION (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
10.4.14.6 eKEY_LED_ID (ENUM) .........................................181
10.4.14.7 eKEY_LED_ID_ECOMAT_PANEL (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . .181
10.4.14.8 eKEY_MAP_CODES (ENUM).....................................181
10.4.14.9 eOBJECT_FLIP (ENUM).........................................183
10.4.14.10eOBJECT_ROTATION (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
10.4.14.11eSTATUS_LED_FLASH_FREQ (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
10.4.14.12eTOUCH_OPTIMISATION_MODE (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . .184
10.4.15Structs............................................................184
10.4.15.1 stCPU_CORE (STRUCT)........................................184
10.4.15.2 stDATE_TIME (STRUCT)........................................184
10.4.15.3 stIPV4SETTING (STRUCT) ......................................185
10.4.15.4 stIP_SETTING (STRUCT)........................................185
10.4.15.5 stKEY_LED_NIGHT_MODE (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
10.4.15.6 stKEY_MAP_LIST (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
10.4.15.7 stKEY_MAP_LIST_ECOMAT_PANEL (STRUCT) . . . . . . . . . . . . . . . . . . . . .186
10.4.15.8 stLED_CONTROL_ECOMAT_PANEL (STRUCT) . . . . . . . . . . . . . . . . . . . . .186
10.4.15.9 stLED_SETTINGS (STRUCT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
10.4.15.10stLED_SETTINGS_ECOMAT_PANEL (STRUCT) . . . . . . . . . . . . . . . . . . . . .187
10.4.15.11stNETWORK_USAGE_INFO (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
10.4.15.12stNTP_SETTINGS .............................................188
10.4.15.13stSYSTEM_TEMPERATURES (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . .188
10.4.15.14stSYS_INFO_BASIC (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
10.4.15.15stSYS_INFO_EXTENDED (STRUCT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
10.4.15.16stSYS_INFO_INTERNAL (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
10.4.15.17stSYS_MEMORY (STRUCT) .....................................190
10.4.15.18stSYS_USAGE_INFO (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
10.4.16Types............................................................190
10.4.16.1 aETH_ITF_LIST (ALIAS).........................................190
CR1140 CR1141
7
10.4.16.2 aTIME_ZONE_LIST (ALIAS)......................................190
10.4.17Global Constants ...................................................190
10.4.17.1 CANconstants (GVL)............................................190
10.4.17.2 GCL_Data (GVL) ..............................................191
10.4.17.3 GCL_RGB_COLOUR(_ECOMAT_PANEL) (GVL) . . . . . . . . . . . . . . . . . . . . .191
10.4.18Global Variables....................................................191
10.4.18.1 GVL_Data....................................................191
10.5 ifmFileUtil.library........................................................192
10.5.1 Enums............................................................192
10.5.1.1 eCSV_MODE (ENUM) ..........................................192
10.5.2 Structs............................................................192
10.5.2.1 stCSV_HEADER (STRUCT)......................................192
10.5.2.2 stLOG_DATA (STRUCT) ........................................192
10.5.2.3 stLOG_FILE_CONFIG (STRUCT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
10.5.2.4 stSEPARATOR_CONFIG (STRUCT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
10.5.3 Generic File........................................................193
10.5.3.1 Copy_Device_To_USB..........................................193
10.5.3.2 Copy_USB_To_Device..........................................194
10.5.3.3 DeleteFile....................................................196
10.5.3.4 FileCopy.....................................................198
10.5.3.5 SyncFileMemory...............................................200
10.5.4 Log File...........................................................202
10.5.4.1 ReadCSV8Byte................................................202
10.5.4.2 ReadCSVData ................................................204
10.5.4.3 WriteCSV8Byte................................................206
10.5.4.4 WriteCSV8ByteHeader..........................................209
10.5.4.5 WriteCSVData_Linear...........................................211
10.5.4.6 WriteCSVData_Ring............................................214
10.5.4.7 WriteCSVHeader ..............................................217
10.5.5 Parameter File .....................................................219
10.5.5.1 ReadParmSingleAsync..........................................219
10.5.5.2 WriteParmSingleAsync..........................................221
10.5.6 Support...........................................................223
10.5.6.1 Buffer_To_String...............................................223
10.5.6.2 GetFileSizeAsync..............................................225
10.5.7 Function ..........................................................227
10.5.7.1 ANY_TYPE_TO_STRING........................................227
10.5.7.2 ByteArray_To_String............................................228
10.5.7.3 DW_To_4Byte.................................................229
10.5.7.4 ifmCONCAT..................................................230
10.5.7.5 ifmFIND......................................................231
10.5.7.6 ifmMID ......................................................232
10.5.7.7 Pack2Byte_To_Word ...........................................233
10.5.7.8 Pack4Byte_To_DW.............................................234
10.5.7.9 RTC_TO_STRING .............................................235
10.5.7.10 VALIDATE_FILE_NAME.........................................236
10.5.7.11 Word_To_2Byte ...............................................237
10.5.7.12 _8Byte_To_CSV...............................................237
10.5.8 GlobalConstants....................................................239
10.5.8.1 ifmGCL (GVL).................................................239
10.6 ifmRawCAN.library......................................................240
10.6.1 CAN_Enable.......................................................240
10.6.2 CAN_Recover......................................................241
10.6.3 CAN_RemoteRequest................................................242
10.6.4 CAN_RemoteResponse..............................................244
10.6.4.1 Input parameter................................................244
10.6.5 CAN_Rx..........................................................245
10.6.6 CAN_RxMask......................................................247
10.6.7 CAN_RxRange.....................................................248
10.6.8 CAN_RxRangeExt ..................................................250
10.6.9 CAN_Status .......................................................252
10.6.10CAN_Tx ..........................................................254
CR1140 CR1141
8
10.6.11BUS_STATE (ENUM)................................................255
10.6.12CAN_Info (GVL)....................................................255
10.6.13CAN_BUS_STATE (STRUCT).........................................255
11 Appendix...................................................................257
11.1 Address assignment in Ethernet networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
CR1140 CR1141
9
1 Preliminary note
You will find instructions, technical data, approvals and further information using the QR code on the
unit / packaging or at documentation.ifm.com.
1.1 Legal and copyright information
© All rights reserved by ifm electronic gmbh. No part of these instructions 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 AS-International Association, (→www.as-interface.net)
CAN is the property of Robert Bosch GmbH, Germany (→www.bosch.de)
CAN is the property of CiA (CAN in Automation e.V.), Germany (→www.can-cia.org)
CODESYS™ is the property of CODESYS GmbH, Germany (→www.codesys.com)
DeviceNet™ is the property of ODVA™ (Open DeviceNet Vendor Association), USA
(→www.odva.org)
EtherNet/IP® is the property of → ODVA™
EtherCAT® is a registered trademark and patented technology, licensed by
BeckhoffAutomationGmbH, Germany.
IO-Link® is the property of PROFIBUS Nutzerorganisation e.V., Germany (→www.io-link.com)
ISOBUS is the property of AEF - Agricultural Industry Electronics Foundation e.V., Germany
(→www.aef-online.org)
Microsoft® is the property of Microsoft Corporation, USA (→www.microsoft.com)
Modbus® is the property of Schneider Electric SE, France (→www.schneider-electric.com)
PROFIBUS® is the property of PROFIBUS Nutzerorganisation e.V., Germany
(→www.profibus.com)
PROFINET® is the property of →PROFIBUS Nutzerorganisation e.V., Deutschland
Windows® is the property of →Microsoft Corporation, USA
1.2 Purpose of the document
This document applies to the following devices of the type ecomatDisplay 4.3“ firmware version V
1.x.x.x and higher:
• CR1140
• CR1141
These instructions describe the following topics:
Configuration of the device in the setup mode
Firmware update of the device in the recovery mode
Configuration of the device with CODESYS 3.5
Programming of the device-internal PLC using the CODESYS 3.5 programming system.
Description of the device-specific CODESYS function libraries
1.3 Symbols used
Requirement
CR1140 CR1141
10
Instructions
Reaction, result
[...] Designation of keys, buttons or indications
Cross-reference
Important note
Non-compliance may result in malfunction or interference.
Information
Supplementary note
1.4 Warnings
Warnings indicate the possibility of personal injury and damage to property. This enables safe product
handling. Warnings are graded as follows:
WARNING
Warning of serious personal injury
wIf the warning is not observed, fatal and serious injuries are possible.
CAUTION
Warning of minor to moderate personal injury
wIf the warning is not observed, minor to moderate injuries are possible.
ATTENTION
Warning of damage to property
wIf the warning is not observed, damage to property is possible.
1.5 Overview: ifm user documentation
The documentation of the device consists of the following modules:
Document Content / Description
Data sheet Technical data
Installation instructions / Operating instructions Instructions for installation, electrical installation and
commissioning
Technical data
Programming manual Creation of a CODESYS project with this device
Target system configuration with CODESYS
Programming the device-internal PLC using CODESYS
Description of the device-specific CODESYS function
libraries
If any documents are not available, they can be requested from ifm or can be downloaded from the ifm
website: www.ifm.com
1.6 Overview: CODESYS documentation
CODESYS GmbH provides the following user documentation for programming the PLC of the device:
CR1140 CR1141
11
Document Content / description
Online help Context-sensitive help
Description of the CODESYS programming system
Description of the components and libraries
CODESYS installation and first steps Remarks about the installing of the programming system CODESYS
First steps for handling the CODESYS programming system
After the installation of the programming system CODESYS 3.5 all documents are stored on the hard
disk of the PC/laptop and can be accessed:
Online help
...\Programs (x86)\3S CODESYS\CODESYS\Online Help
CODESYS installation and first steps
...\Programs (x86)\3S CODESYS\CODESYS\Documentation
1.7 Change history
1.7.1 Changes 09 / 2023
New document created
CR1140 CR1141
12
2 Safety instructions
The unit described is a subcomponent for integration into a system.
The system architect is responsible for the safety of the system.
The system architect undertakes to perform a risk assessment and to create documentation in
accordance with legal and normative requirements to be provided to the operator and user of
the system. This documentation must contain all necessary information and safety instructions
for the operator, the user and, if applicable, for any service personnel authorised by the
architect of the system.
Read this document before setting up the product and keep it during the entire service life.
The product must be suitable for the corresponding applications and environmental conditions
without any restrictions.
Only use the product for its intended purpose (Ò Installation instructions / Operating instructions,
Intended use).
If the operating instructions or the technical data are not adhered to, personal injury and/or damage
to property may occur.
The manufacturer assumes no liability or warranty for any consequences caused by tampering with
the product or incorrect use by the operator.
Improper or non-intended use may lead to malfunctions of the device, to unwanted effects in the
application or to a loss of the warranty claims.
Installation, electrical connection, set-up, programming, configuration, operation and maintenance
of the product must be carried out by personnel qualified and authorised for the respective activity.
Observe applicable documents.
2.1 Required background knowledge
This document is for specialists. Specialists are people who are qualified by their appropriate training
and their experience to see risks and to avoid possible hazards that may be caused during operation
or maintenance of the device.
For programming these people should also have knowledge of control technology experience in PLC
programming to IEC 61131-3.
The document gives information concerning the correct handling of the product.
2.2 Cyber security
WARNING
If the device is operated in an unprotected network environment.
wUnauthorised data access (read or write) is possible.
wUnauthorised manipulation of the device function is possible.
uCheck and restrict access options to the device.
uRestrict access to authorised persons.
uDo not connect the device to open networks or the internet.
uIf access from the internet should be necessary, it is mandatory to choose a secure
method to connect the device (e.g. VPN).
uUse encrypted data transmission (e. g. https / TLS).
CR1140 CR1141
13
2.2.1 Security functions
The security functionalities of the device are based on the requirements of the Federal Office for
Information Security (BSI):
The device has the following security functions:
Design
Hardened Yocto-Linux distribution
Integrity
Convenient update of the complete system (recovery system)
Backup & restoring the system configuration
Authentication
User management via CODESYS Development System
Individual rights management for both the programming system and the runtime system via
CODESYS Development System
Individual system password to protect the system configuration and the backup & restore function
Individual system password to protect access via FTP, Telnet or SSH
Confidentiality
Secure data connection via SFTP or SCP
Restricted data flow
Factory separation of machine network (CAN) and OT network (Ethernet)
2.2.2 Recommended access protection for the device
uImplement the access protection of the device by combining the following measures:
uChange the default system password (Ò Changing the system password/35) to a unique
and secure password.
wAccess to the device via FTP, Telnet and SSH is only possible after entering the changed
system password.
uActivate (Ò Activating the system password for setup mode/37) the system password to
access the setup mode.
wAfter a device restart, changing settings and creating system backups in setup mode is
only possible after entering the changed system password.
uActivate the user management in CODESYS on the device and set up the user administrator
with an individual and secure password in CODESYS (Ò Managing device users/26).
wAccess to the device via CODESYS (e.g. connecting to the device, loading a project, etc.)
is only possible after entering the login data.
wWhen all the above measures have been implemented: The device is protected against
unauthorised access and unauthorised manipulation in the best possible way.
2.2.3 Recommended access protection for the CODESYS project on the PC
uImplement access protection for the CODESYS project on the PC using the following measure:
uActivate and set up user management (Ò Activating the access protection for a
project/26) for access to the CODESYS project.
CR1140 CR1141
14
wThe CODESYS project on the PC is protected against unauthorised access and unauthorised
manipulation.
CR1140 CR1141
15
3 System requirements
3.1 Hardware
The following hardware components are required to program the internal PLC of the ecomatDisplay
4.3":
A device of the ecomatDisplay 4.3" product family
A PC for the CODESYS programming system
For devices with an Ethernet interface:
An Ethernet connection between CODESYS PC and the Ethernet interface of the device.
For devices with USB interface:
A USB Ethernet adapter connected to the USB interface of the device
An Ethernet connection between CODESYS-PC and the USB Ethernet adapter
3.2 Software
The following software components are required to program the internal PLC of the ecomatDisplay
4.3":
Component Description Version
CODESYS Development
System
Programming software CODESYS for PLC programming ac-
cording to standard IEC 61131-3
3.5 SP19
Package "CODESYS for
ifm ecomatDisplay43"
Device and interface description of device
Function libraries for the programming of the device
1.0.x.x
The features and functions described in this manual can only be obtained by using the software
components in the versions stated here.
The software components can be downloaded on the ifm electronic website: www.ifm.com
CR1140 CR1141
16
4 Installation
4.1 CODESYS Development System
The CODESYS Development System (short: CODESYS) is a platform for the creation of PLC
applications according to the standard IEC 61131-3.
4.1.1 Installing CODESYS Development System
To install the software "CODESYS Development System":
uInstall the CODESYS programming system 3.5 SP19
wCODESYS 3.5 SP19 is installed on the PC/laptop.
4.2 ifm package
uFamiliarise yourself with the following CODESYS functions:
Package Manager: Ò Online help > CODESYS Development System > Manage packages
and licenses
4.2.1 Components of the package
ifm provides the CODESYS package "CODESYS for ifm ecomatDisplay43" for the programming of the
device-internal PLC. The package contains the following components:
Device description files
ifm function libraries and extensions
uDetailed information about the ifm function libraries: ifm function libraries (Ò/81)
4.2.2 Install package (PC/laptop)
To install a package:
Requirements
CODESYS 3.5 SP19 is installed on the PC/laptop.
The software package for the device 4.3” ecomatDisplay is saved and unpacked on the PC/laptop.
CODESYS is closed.
1 Start the CODESYS Installer
uIn Windows: Start the [CODESYS Installer] as administrator.
wThe [CODESYS Installer] appears.
wThe window displays the installed CODESYS components.
2 Install package
uClick on [Install File].
wThe file explorer is displayed.
uSelect the requested *.package file.
uClick on [Open] and confirm with [OK].
uActivate the field [I want to continue despite the missing signature(s)].
CR1140 CR1141
17
uClick on [Continue].
wThe package will be installed.
wA success message appears.
uClick on [OK].
wThe window [CODESYS Installer] shows the installed packages.
uOptional: To install another package, proceed again as described.
uClose the CODESYS Installer.
uStart CODESYS.
wThe installed package is now available.
4.2.3 Update package (PC/laptop)
To update a package:
1 Uninstall the old version of the package
uUninstalling the package (Ò Uninstall package (PC/laptop)/17)
2 Install the new version of the package
uInstalling the package (Ò Install package (PC/laptop)/16)
3 Update device
uIn the device tree: Highlight the node [4.3” ecomatDisplay (4.3” ecomatDisplay)].
uSelect [Project] > [Update Device...].
wA dialogue window appears.
uClick on [Update Device...] to start the update process.
wCODESYS loads new device libraries.
wDevice tree view is updated.
uClick on [Close] to quit the Package Manager.
uSave the project.
4.2.4 Uninstall package (PC/laptop)
To uninstall a package:
Requirements:
CODESYS is closed.
1 Start the CODESYS Installer
uIn Windows: Start the [CODESYS Installer] as administrator.
wThe [CODESYS Installer] appears.
wThe window displays the installed CODESYS components.
2 Uninstall package
uSelect the requested package in the [AddOns] area.
wInformation on the selected package will be displayed.
uSelect the package version to be uninstalled.
uClick on [Uninstall] and confirm with [OK].
CR1140 CR1141
18
wThe selected package version will be removed.
uClose the [CODESYS Installer].
4.3 Updating the runtime system of the device
4.3.1 General notes
To update the runtime system, the device must be in Recovery mode.
4.3.1.1 Downloading the software package
The update file is included in the software package for the device.
uDownload the current software package from the ifm website: www.ifm.com> Product page >
[Downloads] > [Software]
uUnzip the software package (zip archive) with the update file.
wThe update file is stored on the PC.
4.3.2 Updating the runtime system
ATTENTION
Risk of data loss!
wInterrupting the update process may result in a loss of the user data stored on the
device.
uDo not interrupt the update process!
The runtime system of the device can only be updated in the recovery mode.
The current version of the runtime system can be downloaded from the ifm electronic website.
Downloading the software package (Ò/18)
uSelect one of the following options:
Firmware update via USB interface (local) (Ò/18)
Firmware update via web browser (Ò/19)
4.3.2.1 Firmware update via USB interface (local)
uDownload the new runtime system from the ifm website: Downloading the software package
(Ò/18)
uCopy the *.swu update file to a USB memory
uConnect the USB memory to the device: Ò Operating instructions
uStart the recovery mode: Starting the local recovery mode (Ò/43)
CR1140 CR1141
19
Recovery App
INSTALL FROM FILE
NETWORK SETUP
START DEVICE SETUP
eth0: 192.168.82.245 255.255.255.0
RESTART
Fig.1: Local recovery mode
uDo not press any keys on the device during the update process.
uDo not interrupt the voltage supply during the update process.
uOpen the file browser with the [INSTALL FROM FILE] button.
wThe file browser appears.
uSelect the *.swu update file in the file browser.
uPress the button [OPEN] to start the update process.
wThe software components of the device are updated automatically: General notes (Ò/18)
wDisplay shows status messages.
wIf successful: status message appears on the display: [Success!]
uPress the button [RESTART] to restart the device.
wThe device reboots.
wThe firmware update is completed.
4.3.2.2 Firmware update via web browser
uDownload the new runtime system from the ifm website: Downloading the software package
(Ò/18)
uStart the recovery mode: Starting the recovery mode
uEstablish an Ethernet network connection between the device and the PC. Ò Operating
instructions
uOptional: Set the parameters of the Ethernet interface.
uEnter the following address in the address line of a browser: http://<IP-Adresse des
Geräts>:8080 ; default: http://192.168.82.245:8080
wThe web interface of the device appears in the browser.
wThe web interface switches directly to tab [Software Update].
CR1140 CR1141
20
Fig.2: Web recovery mode
The local recovery mode of the device must have been started in order to enable recovery
mode access via a web browser.
uDo not press any keys on the device during the update process.
uDo not push the [Restart] button in the web interface during the update process.
uDo not interrupt the voltage supply during the update process.
uClick on [Click here...] in the file area.
wThe Windows file explorer is displayed.
uSelect the downloaded *.swu update file, adopt it with [Open] and start the update.
wThe file area shows the file name of the selected update file.
wThe selected update file is loaded to the display.
wThe software components of the device are updated automatically: General notes (Ò/18)
wThe web interface and the device display indicate status messages.
wIf successful: status message appears in the web interface: [Update successfully] .
uClick the [Restart] button in the web interface.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257

IFM CR1141 Owner's manual

Type
Owner's manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI