background image

ifm

 System Manual 

ecomat

mobile

 PDM360NG (CR1080, CR1081, CR9042) Target V01 

2011-07-28 

CAN in the PDM360

 

CAN POUs to CANopen

 

 

292 

 

CANOPEN_SETSTATE 

7858 

= Set State 

Unit type = function block (FB) 

Contained in the library:

 

ifm_CANopen_NT_Vxxyyzz.LIB

  

Available for the following devices: 
 - BasicController: CR040n 
 - BasicDisplay: CR0451 
 - PDM360NG: CR108n, CR9042 

 

Symbol in CoDeSys:

 

 

 

 

Description 

7860 

Via CANOPEN_SETSTATE, parameters of the master, a slave device or a node in the network can be 
set. 

The treatment of the NMT state of master, node or device is carried out in the CAN stack or via the 
commands of the FB CANOPEN_NMTSERVICES (

 page 

288

). At the same time admissibility 

checks are carried out. For reasons of consistency no inputs are provided for this purpose. 

 

 

Parameters of the inputs 

7861 

Parameter

 

Data type

 

Description

 

EXECUTE BOOL 

FALSE

TRUE (edge): 

 

POU is executed once 

otherwise:  POU not active 
 

A POU already started is processed. 

CHANNEL 

BYTE 

CAN interface (1...n) depending on the device 

NODE 

BYTE 

node ID = ID of the node (0...127) 

Controller as CANopen master:

 

value = 0: 
The changes only refer to the controller itself. 

value 

 0: 

node ID of a node in the network the parameters of which are to be 
changed. The established settings are only adopted for this node (not 
for the controller). 

Controller as CANopen slave:

 

In slave mode, the node ID of the slave can be set via this input. 

value = 0: 
no action 

value 

 0: 

The FB adopts this value as the new node ID of the controller. 

Содержание PDM360NG Series

Страница 1: ...System Manual PDM360NG CR1080 CR1081 CoDeSys 2 3 English 7390707_02_UK 2011 07 28 preliminary ...

Страница 2: ...3 4 Interfaces 19 3 4 1 USB interface 20 3 4 2 Camera visualisation 20 3 5 Real time clock RTC 21 4 Operating states and operating system 22 4 1 Operating states 22 4 2 Status LED 22 4 2 1 Setting the LED via application program 23 5 Configurations 24 5 1 Set device parameters setup 24 5 1 1 Start setup 25 5 1 2 Setup system settings 27 5 1 3 Setup display system information 32 5 1 4 Setup more fu...

Страница 3: ...for visualisations 96 6 1 4 Limitations for program and data memories 97 6 2 Programming notes for CoDeSys projects 98 6 2 1 FB FUN PRG in CoDeSys 98 6 2 2 Libraries 99 6 2 3 Operating sequence 100 6 2 4 CoDeSys visualisation elements 101 6 2 5 Texts 102 6 2 6 Movement of elements 103 6 2 7 Save 103 7 Visualisations in the device 104 7 1 Recommendations for user interfaces 104 7 1 1 Recommendation...

Страница 4: ...terfaces and CAN protocols 160 9 1 4 System configuration 162 9 2 Physical connection of CAN 163 9 2 1 Network structure 163 9 2 2 CAN bus level 164 9 2 3 Bus cable length 165 9 2 4 Wire cross sections 166 9 3 Exchange of CAN data 167 9 3 1 Hints 168 9 3 2 CAN functions in the IEC user cycle 170 9 4 CAN FBs on layer 2 RAW CAN 174 9 4 1 Notes 174 9 4 2 FBs for RAW CAN management 176 9 4 3 FBs for R...

Страница 5: ... 12 1 2 BUZZER_ON 385 12 1 3 KEY_CLICK 386 12 2 Manage visualisation 387 12 2 1 SET_BOOTUP_BACKLIGHT 388 12 2 2 Library Instrumente 389 12 3 Edit input fields in the visualisation 396 12 3 1 INPUT_INT 397 12 3 2 INPUT_DINT 402 12 3 3 INPUT_REAL 405 12 3 4 INIT_VAR_RETAIN_INT 408 12 3 5 INIT_VAR_RETAIN_DINT 410 12 3 6 INIT_VAR_RETAIN_REAL 412 13 Annex 414 13 1 Rectify faults and errors 414 13 2 Add...

Страница 6: ...13 5 Overview of the files and libraries used 434 13 5 1 Installation of the files and libraries 434 13 5 2 General overview 435 13 5 3 What are the individual files and libraries used for 437 14 Glossary of Terms 443 15 Index 458 16 ifm weltweit ifm worldwide ifm à l échelle internationale 463 ...

Страница 7: ...tools and documentation Nobody is perfect Send us your suggestions for improvements to this manual and you will receive a little gift from us to thank you All rights reserved by ifm electronic gmbh No part of this manual may be reproduced and used without the consent of ifm electronic gmbh All product names pictures companies or other brands used on our pages are the property of the respective rig...

Страница 8: ...al contains a search index in the annex At the beginning of a chapter we will give you a brief overview of its contents Abbreviations and technical terms are listed in the glossary In case of malfunctions or uncertainties please contact the manufacturer at www ifm com select your country Contact We want to become even better Each separate section has an identification number in the top right corne...

Страница 9: ...ng on and with this device The acting person must be authorised to work on the machine equipment Adhere to the technical data of the devices You can find the current data sheet on ifm s homepage at www ifm com select your country Data sheet search article no Technical data in PDF format Note the installation and wiring information as well as the functions and features of the devices supplied insta...

Страница 10: ...logy and PLC programming with IEC 61131 3 If this device contains a PLC in addition these persons should know 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 a...

Страница 11: ...perating elements 14 Accessories 16 7300 This manual describes the PDM360 monitor family of ifm electronic gmbh with a Linux operating system for mobile vehicles PDM360NG CR108n CR9042 Software release Operating system V01 01 00 3 1 1 Device variants 7304 Variants described in this manual Article no Operating keys Navigation with Camera connection CR1080 5 keys left 4 keys right encoder right 1x E...

Страница 12: ...11 07 28 System description Information concerning the device 12 3 1 2 Fastening and installation 7330 Fastening 7973 Types of fastening Installation in the cutout of the operating panel 182 x 136 mm using the frame EC2110 Fastening on the back using the RAM Mount accessories ...

Страница 13: ...spect ratio 15 9 Resolution 800 x 480 pixels Colour depth 6 bits per colour channel 18 bits 262 144 representable colours create image as True Color with 24 bits Background illumination LED dimmable in 1 steps Setting can be changed temporarily can be preset saved Light sensor Measures the brightness of the environment at the installation location of the device Can be used to dim the background il...

Страница 14: ...ts Function keys with pressure point Backlit with programmable LEDs Rotary button encoder with pushbutton 16 pulses revolution Backlit with programmable LEDs Scroll key as a combination of 5 independent keys Backlit with programmable LEDs The signals of the navigation elements encoder scroll key are evaluated irrespective of the signals of the keys The device detects several simultaneously pressed...

Страница 15: ...LEDs in the program Request to press a certain key Program the key LED so that it flashes Night design of the operating elements The LEDs for all operating elements are dimmable For the night operation the LEDs have ONE adjustable basic brightness for all operating elements So the operating elements are also backlit if the key LEDs were not switched on above Audio signalling device buzzer programm...

Страница 16: ...roups of keys Arrangement of the operating elements 7337 When the device is ordered the operating element groups on the sides can be arranged optionally Examples Left Right Article no 5 keys 4 keys encoder CR1080 5 keys 4 keys scroll key CR1081 5 keys 5 keys CR1082 8 keys bottom special unit Please ask your ecomatmobile specialist 3 1 5 Accessories 8665 A wide range of accessories is available for...

Страница 17: ... hard disc required HD 100 MB Runtime system platform Windows 2000 or higher CD ROM drive For more details on the current CoDeSys software DE http www 3s software com index shtml de_oem1 UK http www 3s software com index shtml en_oem1 FR http www 3s software com index shtml fr_oem1 Moreover the user must take into account which software version is used in particular for the operating system and th...

Страница 18: ... software according to GPL http www gnu org licenses 3 3 PLC configuration 1797 The control system ecomatmobile is a device concept for series use This means that the devices can be configured in an optimum manner for the applications If necessary special functions and hardware solutions can be implemented In addition the current version of the ecomatmobile software can be downloaded from our webs...

Страница 19: ...SAE J1939 250 kBaud Ethernet 1 PDM360NG CR108n CR9042 IP address and subnet mask configurable 10 100 MBit DHCP selectable default IP address 192 168 82 247 default subnet mask 255 255 255 0 up to 4 Ethernet cameras representable at the same time external access via Telnet FTP unencrypted external access via SSH SCP encrypted external accesses configurable USB 2 PDM360NG CR108n CR9042 according to ...

Страница 20: ...nmounting process with the program USB_STORAGE_HANDLER page 335 Do not remove the USB device before unmounting has been confirmed 3 4 2 Camera visualisation 7366 For device Interface Function PDM360NG CR1080 CR1081 CR1082 CR9042 Ethernet digital up to 4 camera images representable at the same time colour 24 bits greyscale 8 bits IMPORTANT More than 4 cameras connected to the network can have a str...

Страница 21: ...ntains a real time clock During the system start the device synchronises the secondary system clock with the primary real time clock The system clock can be used as follows read the current clock time in the application program time stamp in automatically generated event protocols registration of operating times Features of the real time clock is battery backed and continues to run in the switched...

Страница 22: ...tage green black 5 Hz boot process application green black 2 Hz application running RUN or setup running green permanently on application stopped STOP or no project available red black 2Hz Application is running with error e g ERROR_TEMPERATURE device temperature too high too low ERROR_POWER supply voltage too high too low red black 5 Hz system stopped e g Linux watchdog has triggered red permanen...

Страница 23: ... off or other colour colour constant from the data structure LED colour Allowed LED_GREEN LED_BLUE LED_RED LED_WHITE LED_MAGENTA LED_CYAN LED_YELLOW LED_ORANGE LED_BLACK LED off LED_MODE flashing frequency from the data structure LED_MODES Allowed LED_5HZ LED_2HZ LED_1HZ LED_05HZ 0 5 Hz LED_0HZ constant NOTE In the application do NOT use the LED colour RED In case of an error the LED colour RED is...

Страница 24: ...l and configure the mobile camera 86 Operating elements functions 87 Device update to new software version 89 3615 5 1 Set device parameters setup Start setup 25 Setup system settings 27 Setup display system information 32 Setup more functions 33 Exit setup reboot device 44 Set up FTP access to the device 44 7306 In this section you will learn how to set the device via the internal device setup In...

Страница 25: ...the CAN interfaces set the real time clock set the display brightness SYSTEM INFORMATION display the system data ACTIONS reboot the device test the CAN interfaces define the splash screen test the device keys format the memory data save the data General handling in all setup menus Select the requested menu item with SELECT down Select the requested menu item with BACKSEL up Execute the selected me...

Страница 26: ...s Ethernet subnet mask Ethernet gateway IP address Ethernet server IP address Configure the DHCP server Real time clock RTC time zone battery status CAN download ID separately for every CAN interface CAN baud rate for every CAN interface Test the CAN connection System test and diagnosis Reset the device to factory setting Display brightness Brightness of the background illumination Overview of the...

Страница 27: ...CAN interfaces 30 Setup set the real time clock RTC 31 Setup set the display brightness 31 9603 Select the menu item SYSTEM SETTINGS in the setup splash screen The menu System Settings appears Select the requested menu item with SELECT or BACKSEL and confirm with ENTER ETHERNET set the Ethernet interface CAN set the CAN interfaces RTC set the real time clock BACKLIGHT set the brightness of the PDM...

Страница 28: ...ngs appears Change to the next menu with MANUAL The menu Ethernet Manual Settings appears Change to the menu Ethernet Target Settings with TARGET SETTINGS The menu Ethernet Target Settings appears Select the requested group of numbers with SELECT or BACKSEL Increment or decrement the value of the selected group of numbers with UP or DOWN Confirm and save the changed value with SAVE Return to the r...

Страница 29: ...e in the network In the same physical network different subnet masks of the participants are allowed They form different groups of participants which cannot communicate with groups of participants having other subnet masks Examples Participant A IP address Participant A Subnet mask Participant B IP address Participant B Subnet mask Communication of participants possible 192 168 82 247 255 255 255 ...

Страница 30: ...n appears Select the requested CAN bus with SELECT and confirm with ENTER The menu Bus Settings of the selected CAN bus appears Change to the menu CAN Bus Settings Baudrate with Baudrate CAN Bus The menu CAN Bus Settings Baudrate appears Increment or decrement the CAN baud rate with UP or DOWN Only the allowed values are available Confirm and save the changed value with SAVE Return to the requeste...

Страница 31: ...rm and save the changed value with SAVE Change to the previous menu with EXIT Setup set the display brightness 7405 Select the menu item BACKLIGHT in the menu System Settings The menu Backlight Settings appears Select the group of numbers with SELECT Increment or decrement the selected value with UP or DOWN Check the changed display brightness with TEST Confirm and save the changed value with SAVE...

Страница 32: ...9042 Target V01 2011 07 28 Configurations Set device parameters setup 32 5 1 3 Setup display system information 7407 Select the menu item SYSTEM INFORMATION in the setup splash screen The menu System Information appears Change to the previous menu with EXIT ...

Страница 33: ...st of the keys 40 Setup format the memory 41 Setup backup restore 42 7409 Select the menu item ACTIONS in the setup splash screen The menu Actions appears Select the requested menu item with SELECT or BACKSEL and confirm with ENTER Change to the previous menu with EXIT REBOOT reboot the device CAN Test test the CAN interfaces SPLASH SCREEN define the splash screen KEYBOARD TEST test the device key...

Страница 34: ...p reboot the device 7410 Select the menu item REBOOT in the menu Actions The menu Reboot appears Select the function Perform reboot now with SELECT and confirm with ENTER The device reboots If a valid project is loaded this project is started after rebooting If no valid project is loaded the setup splash menu appears after rebooting ...

Страница 35: ...up 35 Setup test the CAN interfaces 7411 Select the menu item CAN TEST in the menu Actions The menu CAN Test Bus Selection appears Select the requested CAN bus with SELECT and confirm with ENTER The menu CAN Test Test Selection of the selected CAN bus appears Select the requested menu item with SELECT and confirm with ENTER ...

Страница 36: ...ID Cyclically transmit the set CAN package with START The number of the CAN packages transmitted since START appears in Tx Frame Counter Finish the cyclical transmission of the set CAN package with STOP Change to the previous menu with EXIT CAN test receive data 9627 Select the menu item CAN Receive Test in the menu CAN Test Test Selection The menu CAN Test Receive Test appears Start to receive CA...

Страница 37: ...ct the menu item SPLASH SCREEN in the menu Actions The menu Splash Screen appears Define with SELECT from where the future splash screen is to be loaded Select Splash Screen from USB device Load the new splash screen from the USB stick from the directory tmp Select Splash Screen from tmp directory Load the new splash screen from the directory tmp Load Splash Screen tmp pdm360ng splash bmp Load the...

Страница 38: ...ata transmission with ENTER A confirmation message appears in the Message Box After the next reboot of the device the new splash screen appears Change to the previous menu with EXIT Setup load the splash screen from the directory tmp 9636 Select the menu item Select Splash Screen from tmp directory in the menu Splash Screen The menu Splash Screen from tmp appears Select the requested file with SEL...

Страница 39: ...screen from the directory tmp 9637 Stay in the menu Splash Screen Select the menu item Load Splash Screen tmp pdm360ng splash bmp with SELECT Start the data transmission with ENTER A confirmation message appears in the Message Box After the next reboot of the device the new splash screen appears Return to the requested setup menu by pressing EXIT several times ...

Страница 40: ...any function key The key related area is shown bright Change to the previous menu with EXIT Devices with scroll key Change between the two fields Navigation Switch Test with OK or Increment decrement the value displayed in the selected field with Devices with encoder Press the PDM encoder rotary button to change between the two fields Navigation Switch Test Turn the PDM encoder rotary button to in...

Страница 41: ...t the memory 9643 Select the menu item FORMAT STORAGE in the menu Actions The menu Format internal mass storage appears Select the function Format internal mass storage now with SELECT and confirm with ENTER The internal user data area data is formatted A confirmation message appears in the Message Box Change to the previous menu with EXIT ...

Страница 42: ...07 28 Configurations Set device parameters setup 42 Setup backup restore Setup save the system information 43 7412 Select the menu item BACKUP RESTORE in the menu Actions The menu System Backup and Restore appears Select the requested menu item with SELECT and confirm with ENTER ...

Страница 43: ...m Backup and Restore The menu Backup System Information appears Select the requested menu item with SELECT and confirm with ENTER Backup System Information to tmp folder Copy the system information to the internal folder tmp Backup System Information to USB device tmp folder Copy the system information on a connected USB stick to the folder tmp A confirmation message appears in the Message Box Cha...

Страница 44: ...ission connection also possible via the internet if no access to the USB port is possible Info In case of doubt or problems please contact your system administrator Establish an Ethernet connection between the PC and the device The PC and the device must have compatible IP addresses and the same subnet mask Notes in the chapter Setup set the Ethernet interface page 28 Start a file manager on the P...

Страница 45: ...st Ethernet connection 48 Set CoDeSys communication parameters for the Ethernet interface 51 7417 You can find the Ethernet interface as M12 connection 4 on the rear panel Using the Ethernet interface is recommended during the program development because the transmission times are particularly short An Ethernet interface is also needed in the computer Patch cable 7422 Connection of the computer an...

Страница 46: ...fferent Info If the subnet mask 255 255 255 0 254 participants communicating with each other are possible in the network If the subnet mask 255 255 0 0 256x254 65 024 participants communicating with each other are possible in the network In the same physical network different subnet masks of the participants are allowed They form different groups of participants which cannot communicate with group...

Страница 47: ...l Panel Network Connections The window Network Connections shows a list of the installed network components Right click on Local Area Connection Click on Properties The window Local Area Connection Properties appears Select Internet Protocol TCP IP Click on Properties The window Internet Protocol TCP IP Properties appears Activate the option field Use the following IP address In the field IP addre...

Страница 48: ...tivate the Windows command line with Start All Programs Accessories Command prompt After the prompt C enter ping 192 168 082 247 Enter Enter here the actual IP address of the PDM The operating system of the computer tries four times in succession to transmit a 32 byte long test data package to the device If the connection is ok the following message appears four times Reply from 192 168 82 247 byt...

Страница 49: ...rogram such as Telnet or HyperTerminal are available on every Windows installation If this is not so you have to install the program subsequently Start the Windows CD and select the menu item Software Double click on Communications The selection menu appears Select HyperTerminal Adopt settings and install the program Info In case of doubt or problems please contact your system administrator In the...

Страница 50: ... it may help to restart the terminal program and the PDM After login enter the term root followed by Enter After Password also enter the term root in small letters followed by Enter A new message concerning the operating status of the PDM appears Your test was successful The terminal program is no longer needed Enter exit after and press Enter to end the connection in the terminal program In the s...

Страница 51: ...e g PDM_TCP IP Select the entry Tcp Ip Level 2 Route screenshot Adopt new parameters with OK Enter the following communication parameters for the new channel screenshot below Address e g 192 168 82 247 enter here the actual IP address of the device Motorola byteorder yes for all PDMs except for CR107n Motorola byteorder no for all ecomatmobile controllers and CR107n devices Double click to change ...

Страница 52: ...ns Here we show you the example Cyrillic to learn how to add more character sets Install the new font on the PC under Control panel Fonts File Install New Font Reboot the PC With an FTP program copy the new fonts to the PDM directory home fonts All font files must have the file attribute executable This can normally be carried out with the FTP programs Reboot the PDM so that the new fonts are avai...

Страница 53: ...or use in your visualisation On the ecomatmobile DVD Software tools and documentation or after the installation of CoDeSys on your hard disk in the directory Targets ifm Library Fonts ifm_ISO you can find the files ifm_iso_a ttf ifm_iso_z ttf An overview and explanation of the ISO files are available in the file ifm_iso documentation pdf in the same directory For example for ifm_iso_f ttf ...

Страница 54: ...ations Set up programming system 54 5 4 Set up programming system Set up programming system manually 54 Set up programming system via templates 59 ifm demo programs 69 3968 5 4 1 Set up programming system manually Setup the target 55 Activating the PLC configuration 56 CAN declaration 57 3963 ...

Страница 55: ...ssary NOTE The software versions suitable for the selected target must always be used operating system CRnnnn_Vxxyyzz H86 CRnnnn_Vxxyyzz RESX PLC configuration CRnnnn_Vxx CFG device library ifm_CRnnnn_Vxxyyzz LIB and the further files chapter Overview of the files and libraries used page 434 CRnnnn Vxx 00 99 yy 00 99 zz 00 99 device article number target version number release number patch number ...

Страница 56: ...is reached via the tab Resources Double click on PLC Configuration to open the corresponding window Click on the tab Resources in CoDeSys Double click on PLC Configuration in the left column Display of the current PLC configuration following figure Based on the configuration the following is available in the program environment for the user All important system and error flags Depending on the app...

Страница 57: ...iables CAN declaration 10080 In the PLC configuration you now have to declare the first CAN interface s Right click on the name of the PLC configuration CANopen Interface FIX der gewünschten CAN Schnittstelle Click on Append Subelement Even if the device is operated as a CANopen slave Click on CANopen Master Info If the device is operated as a slave the selection CANopen Slave would also be possib...

Страница 58: ... as default If the device is operated on CAN Layer 2 or as a slave via network variables or CAN_RX CAN_TX Check whether the correct baud rate is set for the device baud rate must be identical for all participants If the device is operated as a CANopen master Check all parameter settings Close the window PLC Configuration In the menu File Save as give a sensible name to the project and save it in t...

Страница 59: ...matmobile DVD Software tools and documentation projects with templates have been stored in the program directory of your PC ifm electronic CoDeSys V Projects Template_CDVxxyyzz 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 chapter Set up programming sys...

Страница 60: ...re above Confirm the selection with Open A new CoDeSys project is generated with the following folder structure left Example for CR2500 as CANopen master Another example for CR1051 as CANopen slave via the folder structures in templates section About the ifm templates page 62 Save the new project with file Save as and define suitable directory and project name Configuration of the CAN network in t...

Страница 61: ...le CR2011 EDS The EDS files are in directory C CoDeSys V Library PLCConf The window PLC configuration changes as follows Set CAN parameters PDO mapping and SDOs for the entered slave according to the requirements Note Better deselect Create all SDOs With further slaves proceed as described above Save the project This should be a sufficient description of your project You want to supplement this pr...

Страница 62: ...ls and documentation from version 010500 The templates all have the same structures The selection of this program template for CAN operation already is an important basis for a functioning program Folder structure in general 3978 The POUs are sorted in the following folders Folder Description CAN_OPEN for Controller and PDM CAN operation as master or slave contains the FBs for CANopen I_O_CONFIGUR...

Страница 63: ...nufacturerDeviceName e g CR1051 ManufacturerHardwareVersion e g HW_Ver 1 0 ManufacturerSoftwareVersion e g SW_Ver 1 0 SELECT_NODESTATE for PDM CAN operation as master or slave Converts the value of the node status BYTE into the corresponding text STRING 4 STOPPED 5 OPERATIONAL 127 PRE OPERATIONAL POUs in the folder I_O_CONFIGURATION Description CONF_IO_CRnnnn for Controller CAN operation with laye...

Страница 64: ...s to be copied from a CR1050 to a CR1055 It contains only the keys F1 F3 For the virtual keys F4 F6 variables have to be created Map these self created variables on the global softkeys Work only with the global softkeys in the program Advantage Adaptations are only required in one place SELECT_PAGE for PDM CAN operation with layer 2 or as master or slave Organises the selection of the visualisatio...

Страница 65: ...lable for the following devices BasicDisplay CR0451 PDM CR10nn The visualisations are structured in folders as follows Folder Image no Description contents START_PAGE P00001 Setting display of node ID CAN baud rate status GuardErrorNode PLC cycle time __MAIN_MENUES P00010 Menu screen Display setup ____MAIN_MENUE_1 ______DISPLAY_SETUP ________1_DISPLAY_SETUP1 P65000 Menu screen Software version bri...

Страница 66: ...e a CabinetController CR2500 as CAN open Master to which an I O CabinetModule CR2011 and an I O CompactModule are connected as slaves Example PLC configuration A joystick is connected to the CR2012 which is to trigger a PWM output on the CR2032 How is that achieved in a fast and simple way Save CoDeSys project In CoDeSys use Project Copy to open the project containing the requested function e g CR...

Страница 67: ...ection with OK In our example project the elements selected in the demo project have been added POUs Resources Insert the program CR2012 in the main program PLC_PRG e g The comments of the POUs and global variables usually contain information on how the individual elements have to be configured included or excluded This information has to be followed Adapt input and output variables as well as par...

Страница 68: ...ions Set up programming system 68 After possibly required corrections and addition of missing libraries Error messages after rebuild save the project again Follow this principle to step by step add further functions from other projects and check the results Project Save and Project Rebuild all ...

Страница 69: ... 3995 Demo program Function CR2500Demo_CanTool_xx pro separate for PDM360 PDM360compact PDM360smart and Controller Contains FBs to set and analyse the CAN interface CR2500Demo_ClockFu_xx pro CR2500Demo_ClockKo_xx pro CR2500Demo_ClockSt_xx pro Clock generator for Controller as a function of a value on an analogue input Fu in function block diagram K0 in ladder diagram St in structured text CR2500De...

Страница 70: ... module CR2512 as slave of a Controller CANopen master 8 x PWM output Display of the current current for each channel pair CR2500Demo_CR2513_xx pro I O smart module CR2513 as slave of a Controller CANopen master 4 x digital input 4 x digital output 4 x analogue input 0 10 V CR2500Demo_Interrupt_xx pro Example with SET_INTERRUPT_XMS CR2500Demo_Operating_hours_xx pro Example of an operating hours co...

Страница 71: ...igure P35010 Display of data information Figure P35020 Display of current data record Figure P35030 Display of list of 10 data records CR1051Demo_O2M_1Cam_xx pro Connection of 1 camera O2M100 to the monitor with CAM_O2M Switching between partial screen and full screen Figure 39000 Selection menu Figure 39010 Camera image text box Figure 39020 Camera image as full screen Figure 39030 Visualisation ...

Страница 72: ...data information Figure P35020 Display of current data record Figure P35030 Display of list of 8 data records CR1051Demo_Ringlogging_on_flash _pcmcia_xx pro Writes a CVS data block on the PCMCIA card when F3 is pressed or a CAN message is received on ID 100 The file names can be freely defined When the defined memory range is full the recording of the data starts again POUs used WRITE_CSV_8BYTE pa...

Страница 73: ...he diagnosis It must be checked by means of the data sheet if the device used has the described input and output groups Constants are predefined e g IN_DIGITAL_H in the device libraries ifm_CRnnnn_Vx LIB for the configuration of the inputs and outputs For details Possible operating modes inputs outputs page 416 5 5 1 Configuration of the inputs and outputs default setting 2249 All inputs and outpu...

Страница 74: ...onic switches please note the following NOTE Contacts of Reed relays may be clogged reversibly if connected to the device inputs without series resistor Remedy Install a series resistor for the Reed relay Series resistor max input voltage permissible current in the Reed relay Example 32 V 500 mA 64 Ohm The series resistor must not exceed 5 of the input resistance RE of the device input data sheet ...

Страница 75: ...nisms against interference the digital inputs are internally evaluated via an analogue stage This enables diagnosis of the input signals But in the application software the switching signal is directly available as bit information Spannung Voltage Input Filter Digital Eingang Input UB Figure Block diagram high low side input for negative and positive sensor signals GND Sensor UB GND Sensor UB High...

Страница 76: ...ck the measurement can also be performed ratiometrically 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 NOTE In case of ratiometric measurement the connected sensors should be supplied via the same voltage source as the controller So faulty measurements caused by offset voltage...

Страница 77: ...ny time via the steady analogue value in the system variables ANALOG00 If the analogue input is configured for current measurement the device switches to the safe voltage measuring range 0 32 V DC if the final value 21 7 mA is exceeded and the respective error bit in the flag byte ERROR_CURRENT_Ix is set If the value is again below the limit value the input automatically switches back to the curre...

Страница 78: ... activated additionally Diagnosis of non electronic switches To monitor the input signals of non electronic switches they must be equipped with an additional resistor connection Figure non electronic switches Info Sensors with diagnostic capabilities to NAMUR can be used on these inputs In this case no additional resistor connection is required The FB INPUT page 326 provides the diagnostic message...

Страница 79: ...X0 3 BH PH 47 Terminal number QX0 3 IEC address for a binary output BH PH Hardware version of the output here Binary High side or PWMHigh side The different abbreviations have the following meaning A Analogue input BH Binary input output high side BL Binary input output low side CYL Input period measurement ENC Input encoder signals FRQ Frequency input H bridge Output with H bridge function PWM Pu...

Страница 80: ...ed to the device inputs without series resistor Remedy Install a series resistor for the Reed relay Series resistor max input voltage permissible current in the Reed relay Example 32 V 500 mA 64 Ohm The series resistor must not exceed 5 of the input resistance RE of the device input data sheet Otherwise the signal will not be detected as TRUE Example RE 3 000 Ohm max series resistor 150 Ohm ...

Страница 81: ...54 5 7 1 Add missing libraries 7032 The device data is known to the CoDeSys project the PLC configuration is activated Some libraries are already loaded automatically Depending on the application you have to add some libraries to the project This is done as follows Click on the tab Resources in CoDeSys Double click on Library Manager in the left column The window Library Manager appears listing th...

Страница 82: ...library overview for this device with the key Ins or menu Insert Additional Library Select the necessary libraries in the window which has opened NOTE The software versions suitable for the selected target must always be used PLC configuration CRnnnn_Vxxyyzz CFG and device library ifm_CRnnnn_Vxxyyzz LIB CRnnnn Vxx 00 99 yy 00 99 zz 00 99 device article number target version number release number p...

Страница 83: ...of the first image in capital letters max 8 characters no space Confirm with OK CoDeSys opens the drawing field for this visualisation The field corresponds to the size of the LCD display For handling the visualisation editor CoDeSys online help or CoDeSys programming manual ecomatmobile DVD Software tools and documentation To complete the test program we now create a simple visualisation Select t...

Страница 84: ...s 84 Right click on the rectangle to open the context menu and select Configure The window Regular Element Configuration 0 appears In the field Category select the entry Text Enter a display text in the field Text Content upper screenshot Confirm the entry with OK Save the project with Ins s from time to time ...

Страница 85: ...ogramming PLC_PRG via the tab POUs Only some networks are necessary for an executable program You do not need any special function block to be able to use important device functions All monitor functions you can control via system variables in the PLC configuration System flags page 417 Info You can find all important system variables for the device e g key F1 here under the tab Resources at the t...

Страница 86: ...ommunication Parameters Ethernet interface CoDeSys communication parameters page 51 Serial interface CoDeSys communication parameters not for PDM360NG CR108n CR9042 CAN interface CoDeSys communication parameters Use a suitable cable to connect the PDM to the computer according to the parameter setting In the CoDeSys menu Online Login set up a logic connection to the device The following message ap...

Страница 87: ...page 87 PDM360NG CR108n CR9042 CoDeSys dialogue Element Configuration all devices Library ifm_PDM_INPUT_Vxxyyzz Lib contains function blocks to manage input fields chapter Edit input fields in the visualisation page 396 BasicDisplay CR0451 PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 PDM360smart CR1070 CR1071 User specific functions and POUs all devi...

Страница 88: ...ment SPACE Change the element to the EDIT MODE Confirm the value TAB Jump to the next element UP Increment the value Example edit controls in CR1081 10165 IF Init TRUE THEN Default Mapping MD MD_KEY3_right TAB jump to next element foreward MD_KEY3_left SHIFT_TAB jump to next element backwards MD_KEY3_push SPACE select the element Edit Mapping Edit mode ME ME_KEY3_UP UP Increment value ME_KEY3_DOWN...

Страница 89: ...The versions are numbered consecutively V01 V02 V03 Please see the respective documentation for the new functions of the new software version Note whether special requirements for the hardware version are specified in the documentation If you have a device with an older version and if the conditions for the hardware and your project are ok you can update your device to the new software version 5 1...

Страница 90: ... the reset key within 180 seconds at the end of the update process the key is in a recess behind the lid on the back of the device If however the time elapsed before the reset key was pressed the device returns to the recovery screen step 8 The device can no longer be started Repeat the update process Press the reset key quickly enough What is required Where from Current CoDeSys version on the PC ...

Страница 91: ... To do so terminal 15 and terminal 30 must be connected to plus 6 Display ifm splash screen The reboot process starts 7 Release the PDM keys 8 Display of the ifm recovery screen Display of the IP address subnet mask and gateway address of the device The mode Device Update is selected If another mode is selected press the right upper key to select Device Update Continue here Device update via web b...

Страница 92: ...device appears in the browser The web interface directly changes to Software Recover 13 Click the button Browse 14 The Windows browser opens 15 Open the directory with the update file Double click the update file Vxx yy zz_PDM360NG ifm 16 Click the button send 17 The installation process is running 18 Remove the cover of the reset key on the rear panel of the PDM 19 The installation process is fin...

Страница 93: ...irectory Only ONE update file is allowed in this directory 11 Press the following key to start the update For the device with encoder press the rotary button For the device with scroll key press the key in the middle For the device with keys at the bottom press the left key 12 The installation process is running 13 The installation process is finished after some minutes Display request to press th...

Страница 94: ...PU is used in the device Controller family article no CPU frequency MHz BasicController CR040n 50 CabinetController CR0301 CR0302 20 CabinetController CR0303 40 ClassicController CR0020 CR0505 40 ClassicController CR0032 150 ExtendedController CR0200 40 ExtendedController CR0232 150 SafetyController CR7020 CR7021 CR7200 CR7201 CR7505 CR7506 40 SmartController CR25nn 20 Monitor family article no CP...

Страница 95: ...switched off the screen goes black the status LED flashes red at 5 Hz restart necessary via voltage off on PDM360NG CR108n CR9042 all processes are stopped reset all outputs are switched off the screen goes black the status LED flashes red at 5 Hz restart necessary via voltage off on Depending on the hardware the individual controllers have a different time behaviour Controller Watchdog ms BasicCo...

Страница 96: ... sheet Description Limitation Length of character strings 255 characters Length of path names 255 characters Number of graphic objects per visualisation page 2 000 Number of bitmaps per project Number of character sets per project No indication possible These elements are in the same memory Number of POUs per project 24 576 Specifications for the splash screen chapter Change splash screen of the P...

Страница 97: ...hout online change 8 MBytes Default setting online change not possible Data memory data 1024 MBytes Memory for retain data 32 kBytes Memory in the directory tmp Not defined Memory for bitmap files 80 x 100 pixels each 24 bit colour depth Memory for font files 45 MBytes System requirement 75 MBytes The memory can be extended optionally at the USB interface IMPORTANT The USB memory device is only fo...

Страница 98: ...eSys we differentiate between the following types of units POUs FB function block A FB may have several inputs and several outputs A FB may be called several times within a project For every call you must declare an instance Allowed in a FB call of FB or FUN FUN function A function may have several inputs but only one output The output is of the same data type as the function itself PRG program A ...

Страница 99: ...nd after return will lose their validity Function blocks have two calls one initialising call and the call to do something Therefore that means for a FB call inside a function that there is every time an additional initialising call 6 2 2 Libraries 7425 The CoDeSys projects should contain at least the following libraries chapter Add missing libraries page 81 Example of a maximum installation NOTE ...

Страница 100: ...C program is tested the images already exist Disadvantage The PLC parameters and variables required in the images have not yet been defined B First the PLC program then the visualisation Advantage All parameters and variables are defined in the PLC program before they are referred to in the visualisations Disadvantages The parameters from the images image number key LED etc must be found elsewhere...

Страница 101: ...Pie chart o Only for very restricted use slows down the system very much Visualisation o Possible but too many elements on one page slow down the system Button No problems known Table No problems known Trend curve Not supported Alarm table Not supported Scales o Possible but too many elements on one page slow down the system the following note Pointer instrument Permissible pointer type normal arr...

Страница 102: ... are not very satisfactory e g round scales Solution Integrate the requested elements as an externally generated BMP graphic It is then sufficient to turn an arrow in the visualisation depending on values which could change its colour if limit values are exceeded 6 2 5 Texts 7428 Applies only to the following devices PDM360NG CR108n CR9042 The smallest font size which is clearly visible on the dev...

Страница 103: ...ellipse circle Each edge of the element can be shifted by a specified number of pixels via an INT type variable basic position of the 4 edges zero new value shifts this edge by the specified value Shift direction for value 0 horizontal edge down vertical edge to the right Shift direction for value 0 horizontal edge up vertical edge to the left 6 2 7 Save 7430 Applies only to the following devices ...

Страница 104: ...before you integrate such an external graphics some basics have to be taken into account which will be explained in the following chapters More information is given here Creation and parameter setting of visualisations CoDeSys programming manual ecomatmobile DVD Software tools and documentation ifm manual PDM Handbuch zur Einführung See the Limitations and programming notes page 94 7 1 Recommendat...

Страница 105: ...ns learned contents remain the same Readability Take the environment illumination read distance into account Intuitive handling Operating element function must be obvious User interface must be self explanatory Sensuality Operating elements must be user friendly Clear differentiation from other displays and operating elements Feedback Quick reaction to user activities Cause for a message must be c...

Страница 106: ...y ways before it comes into awareness Thinking The working memory where intellectual manipulation of information takes place has a very small capacity Learning The information stored in the long term memory is often changed in advance e g due to expectations and subsequently e g by subsequent information Remembering The information which is actually present in the long term memory is often not ret...

Страница 107: ... 1 4 Language as an obstacle 7454 In order to produce equipment which satisfies end users worldwide language must be taken into account The operator is not able to effectively carry out his tasks if he cannot understand the instructions on the screen Manufacturers are still trying to solve this problem considering the many different languages in the world A few languages are listed below Chinese c...

Страница 108: ...ion contracted to Unihan is an approach by Unicode and the Universal Character Set according to ISO 10646 to map several character sets of the Chinese Japanese and Korean languages in a single set of unified characters Arabic characters can be encoded by Unicode from Version 5 0 or higher several character sets and ISO 8859 6 ISO 10646 specifies the Universal Multiple Octet Coded Character Set It ...

Страница 109: ...c and can lead to misunderstandings if used incorrectly and even to an image loss of the product as a result of handling faults Examples Colour Meaning in Europe USA Meaning in other cultures Red Drama turmoil blood fight revenge and death love danger nobility China fortune cheerful Russia beautiful Egypt death India life creative Japan anger danger Yellow Caution warning sunlight eternity envy ha...

Страница 110: ...dered at international level Replacing text by images is only sensible and reduces cost if the illustrations are independent of culture i e can be used in ALL intended target countries without adaptations Many things which are self evident for us are not self evident in other cultures The illustration of people can lead to problems What sex must or may a person have What skin colour What age Event...

Страница 111: ... based on flat panels 117 ISO 13407 _ Human centred design processes for interactive systems 117 ISO 20282 _ Ease of operation of everyday products 118 7445 The following list is only a selection and is not complete ISO 7001 _ Graphical symbols Public information symbols 7456 A graphical symbol also called a pictograph represents a concept object event or an activity by illustration Pictograms hav...

Страница 112: ...ty degree to which the software complies with standards or agreements on reliability Usability What level of input does the use of the software require from users and how is it assessed by them Understandability level of input required from the user to understand the concept and its application Learnability level of input required from the user to learn the application e g handling input output Us...

Страница 113: ... of the software to adapt to different environments Installability level of input required to install the software in a defined environment Coexistence ability of the software to function in parallel with another software having similar or identical functions Exchangeability possibility to use this software instead of a another specified software in the environment of that software as well as the ...

Страница 114: ... Part 14 Menu dialogues Part 15 Command dialogues Part 16 Direct manipulation dialogues Part 17 Form filling dialogues Part 110 Dialogue principles replaces part 10 Part 151 Guidance on World Wide Web user interfaces Part 171 Guidance on software accessibility published in October 2008 Part 300 Introduction to electronic visual display requirements Part 302 Terminology for electronic visual displa...

Страница 115: ... describes the following principles for the design and evaluation of an interface between the user and system dialogue design Suitability for the task Suitable functionality minimisation of unnecessary interactions Self descriptiveness Understandability by means of support feedback Suitability for learning User guidance suitable metaphors goal minimum learning time Controllability Dialogue control...

Страница 116: ...s used Unicode is a 16 bit code which represents 216 65536 characters The first goal is a clear and standardised encoding of the characters of all national languages Not all of these 65536 character addresses are used A user defined area enables approx 2000 addresses with user specific characters Another 1408576 characters can be encoded via the combination of two 16 bit codes The hope is to be ab...

Страница 117: ...cumented description of the relevant users their tasks and their environment Specify requirements During this phase the targets are deducted from the existing documentation at a compromise level The division of the system tasks is defined in tasks to be carried out by people tasks to be carried out by technology Produce solutions This can be done following a prototype development or another iterat...

Страница 118: ...roducts 7443 This draft consists of Part 1 Design requirements for context of use and user characteristics The following criteria are described Scope User interface User Psychological and social characteristics Physical and social environmental factors Physical and sensory characteristics Part 2 Test method for walk up and use products This part is a technical specification for the test methods ...

Страница 119: ...ch consists of a raster type arrangement of pixels to which one colour each is assigned The main characteristics of a raster graphics are therefore width and height in pixels image resolution as well as the colour depth Required memory space Required memory space relatively small Depending on the resolution the required memory space is high or very high the files become larger with every additiona...

Страница 120: ... and colour gradient Pixel graphics of modern digital cameras have 5 million and more pixels resolution 5 megapixels A special data compression tries to reduce the required high memory space Unfortunately compression leads to a poorer quality Reduction or enlargement is easy and leads to no quality loss example below Enlargement leads to block graphics or blurry images example below Reducing such ...

Страница 121: ...to the original Problem 2 After scaling there are only 384 000 pixels 7 8 of the original image the other 4 531 200 pixels are no longer available In other words Horizontally only every 3rd pixel is used vertically only every 4th pixel Therefore such a transformed photo can no longer have the quality of the original Important information is lost and the image is distorted Solution Create images in...

Страница 122: ...ee primary colours in different intensities approx 16 6 million colours can be created via the additive colour mixing page 125 To represent this quantity suitable monitors and powerful processors are needed 7 2 3 What colours are shown 7381 The display can represent a colour depth of 6 bits per primary colour i e 64 colour grades Consequently from the total spectrum of 256 addressable colour grade...

Страница 123: ...f the bitmaps before using them in the device Performance limits of the device page 94 Parameter Limit File type Bitmap bmp RLE compressed File name only small letters naming convention 8 3 Image size 800 x 480 pixels Colours 3x 6 bits 2 18 colours 262 144 colours representable Store image as true color with 24 bits Required memory space 256 kByte Table specifications for the start image Change st...

Страница 124: ...e image in an image processing program on your computer For BasicDisplay CR0451 only Transformation to the colour palette will be done during inserting the bitmap into the project by CoDeSys On the device itself there won t happen any transformations image size scaling colour Only save the suitably transformed images in the device visualisation chapter Image size vector graphics pixel graphics pag...

Страница 125: ...for which PDM and what steps must be carried out 126 3113 Here the interested reader finds more details about bitmap graphics 7 4 1 Additive colour mixing 3123 Monitors and many printers make mixed colours from the 3 primary colours red green and blue Photo RGB raster of a monitor considerably enlarged Mixed colours are made by adding the colours in the required mix ratio This method is therefore ...

Страница 126: ... respective primary colour Screenshot RGB colour mixture at Photoshop 100 255dez FFhex 7 4 2 What graphics are suitable for which PDM and what steps must be carried out 7387 Not all bitmaps are suitable for display on the PDM In principle photos should be transformed so that they are optimised when displayed in the given resolution and colour depth Images with a low contrast are not suitable becau...

Страница 127: ... an Ethernet camera 132 9320 Available for the following devices PDM360 CR1051 PDM360NG CR1080 CR1081 CR1082 CR9042 Configure an Ethernet camera image in CoDeSys 9321 1 In CoDeSys create and name a new visualisation object in the tab Visualizations 2 Click the symbol Bitmap in CoDeSys 3 Drag out the contour of the planned camera image on the drawing area 4 The dialogue Open opens Select the file c...

Страница 128: ...uration opens NOTE The terms which are used in the dialogue Bitmap Configuration have another meaning when used for the camera configuration Select the category Bitmap camera bmp must be indicated in the field Bitmap screenshot Confirm the indications for Frame 7 In the category Text enter the IP address of the camera whose images are to be represented example screenshot ...

Страница 129: ...the representation of the camera between RGB555 and 8 bit greyscale Enter a Boolean type variable in the field Change color TRUE greyscale image FALSE RGB555 image set as default Mirror the image of the camera at its horizontal axis Enter a Boolean type variable in the field Conversion basis Example screenshot 9 Rotate the image of the camera In the category Motion absolute enter an INT type varia...

Страница 130: ...element example screenshot Adapt the respective values in the area Position Define the left upper corner of the image in X and Y Recommended image resolution width 320 height 240 Maximum image resolution width 640 height 480 NOTE Only the visible area of the display 800 x 480 pixels can be used for the camera image Positions outside this area in the non visible area are ignored Instead the image i...

Страница 131: ...pe variable input TRUE greyscale image FALSE RGB555 image Variables Conversion basis Boolean type variable input NOT for the analogue camera in the overlay mode TRUE Mirror the image at its horizontal axis FALSE Do not mirror the image Variables Change color Boolean type variable input If a variable is defined represent the analogue camera image in the overlay mode If no variable is defined repres...

Страница 132: ...ge Do not switch on the requested cameras until the new visualisation is displayed Only the visible area of the display 800 x 480 pixels can be used for the camera image Positions outside this area in the non visible area are ignored Instead the image is represented at the last valid position If there was no valid position NO image is represented Indicate the failure of an Ethernet camera 9586 Ind...

Страница 133: ...of the image can be represented up to max 100 of the original image The centre of the image section is identical with the centre of the original image Any scaling of the image is possible The image cannot be scaled Any scaling of the aspect ratio is possible The image representation may be distorted The image is represented in the original aspect ratio Low image repetition rate due to the high cal...

Страница 134: ... CR1080 CR1081 CR9042 Target V01 2011 07 28 Visualisations in the device Operate camera s on the PDM 134 Capture mode 9589 Examples top original image The original image can only be scaled in any manner as full size image also asymmetrically ...

Страница 135: ...1081 CR9042 Target V01 2011 07 28 Visualisations in the device Operate camera s on the PDM 135 Overlay mode 9560 Examples top original image The image cannot be scaled The centre of the image section is identical with the centre of the original image ...

Страница 136: ...ra image in a visualisation Any memory location is allowed 5 The placeholder graphic is inserted into the drawing area Double click the graphic 6 The dialogue Bitmap Configuration opens NOTE The terms which are used in the dialogue Bitmap Configuration have another meaning when used for the camera configuration Select the category Bitmap camera bmp must be indicated in the field Bitmap screenshot ...

Страница 137: ... 07 28 Visualisations in the device Operate camera s on the PDM 137 9 Only allowed in the capture mode Rotate the image of the camera In the category Motion absolute enter an INT type variable in the field Angle Only the values 0 90 180 and 270 are supported example screenshot ...

Страница 138: ...ge is directly controlled via the bitmap In the menu Extras select Elementlist The dialogue Elementlist opens Select the requested element example screenshot Adapt the respective values in the area Position Define the left upper corner of the image in X and Y Recommended image resolution PAL width 360 height 288 Maximum image resolution PAL width 720 height 576 Confirm entries with OK ...

Страница 139: ...iables Change color Boolean type variable input If a variable is defined represent the analogue camera image in the overlay mode If no variable is defined represent the analogue camera image in the capture mode Motion absolute Angle INT type variable input NOT for the analogue camera in the overlay mode Rotate the camera image by 0 90 180 or 270 Other values are not supported Variables Input disab...

Страница 140: ...ues are saved on request in the FRAM memory all ecomatmobile controller BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 PDM360smart CR1070 CR1071 in a special file PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 Network In Resources Global Variables declaration list VAR_GLOBAL Declaration END_VAR Volatile Network retain In Resources Global Variables declarat...

Страница 141: ...quest via a FB Typical applications for retain variables are for example Operating hours which are counted up and retained while the machine is in operation position values of incremental encoders preset values entered in the PDM machine parameters i e all variables whose values must not get lost when the device is switched off All variable types also complex structures e g timers can be declared ...

Страница 142: ...not originate from the local project but from another project Their values cannot be influenced locally The variables are used with read access in the local project and possibly also in several other projects To do so these variables must be imported into the corresponding local project To export or import the global network variables must be combined in lists You can assign an EXP file to every g...

Страница 143: ...port_Proj1 In the properties of this list enter the file ExportProj1 exp Activate Export before compile When this project is compiled ExportProj1 exp is updated The project DemoProj2 contains the global network variable list Global_Variables_Import_Proj1 In the properties of this list enter the file ExportProj1 exp Activate Import before compile When compilation of this project starts the list Glo...

Страница 144: ...resses and subnet mask Step 3 Select first target system and create project page 145 Step 4 Set communication parameters page 147 Step 5 Activate network variable support page 148 Step 6 Integrate libraries page 149 Step 7 Complete and transmit the project global network variables page 150 Step 8 Write projects for more devices page 155 Step 9 Transmit projects page 157 Step 10 Test transmission o...

Страница 145: ...is created in CoDeSys the target file corresponding to the controller must be loaded It is selected in the dialogue window for every hardware and acts as an interface to the hardware for the programming system Graphics target system settings Select a suitable target and confirm with OK Confirm the following window with OK The window New POU appears Setting language of the POU FBD Confirm with OK ...

Страница 146: ...011 07 28 Variable Network variable via UDP 146 The following window appears Add the entries shown on the following screenshot to the program POU PLC_PRG With File Save as save the project in the requested directory Here filename DemoProj1 for the first device in the network ...

Страница 147: ...ication parameters 3625 The same communication parameters must be set for the PC the device controller PDM and the project Open the following dialogue with Online Communication Parameters The following window appears Click New The following window appears Select the entry Tcp Ip Level 2 Route Confirm with OK The following window appears ...

Страница 148: ...eorder YES for the PDM360 and PDM360compact Confirm with OK 8 2 3 Activate network variable support 3630 Click on the tab Resources in CoDeSys Double click on Target Settings The following window appears Click on the tab Network functionality Activate the field Support network variables Names of supported network interfaces UDP window Confirm with OK The data can now be exchanged via global networ...

Страница 149: ...49 8 2 4 Integrate libraries 3633 Menu Window Library Manager Display of the libraries already loaded Menu Insert Additional Library Ins or Key Ins Insert the following libraries SysLibSockets lib 3S library SysLibCallback lib 3S library The library manager should look like this or similar the sequence is not relevant ...

Страница 150: ...data via global network variables write one project each for all three devices These projects are suitable for this purpose mainly because of the contained global variable lists The example shows the project for device 1 Click on the tab Resources in CoDeSys Select click the entry Global Variables Menu Project Object Add screenshot Display of the window Properties Enter the name of the global vari...

Страница 151: ...11 07 28 Variable Network variable via UDP 151 Confirm with OK Enter the variable x1 in the window that appears screenshot Right click on the resource element Global_Variablen_Export_Proj1 Click on Object Properties screenshot The following window appears Click on Add network ...

Страница 152: ...re compile and Read The entered Minimum gap or the Interval depends on the application NOTE In the field Link to file Filename it is expected to indicate an EXP file After Project Rebuild all this external file contains the list of global network variables of this project to be exported but is NOT saved together with the project CoDeSys online help We recommend another method which integrates the ...

Страница 153: ...list Import list COB ID 52 COB ID 53 COB ID 51 Import list Import list Export list COB ID 52 COB ID 53 COB ID 51 Here you see that the COB ID 51 was assigned to the export variables of DemoProj1 in device 1 and that these variables can be found again with the COB ID 51 in DemoProj2 and DemoProj3 in device 2 and device 3 In this example we have used this procedure for the definition of the COB IDs ...

Страница 154: ...lete project In the window Properties of the global variable list click on the button Settings beside Network type The following window appears As broadcast address enter the IP address of device 1 but In the last group replace the value by 255 Confirm with OK Do not forget Menu File Save as indicate directory and filename Confirm with OK ...

Страница 155: ...ale_Variablen_Export_Proj1 51 x1 INT 2 DemoProj2 pro Globale_Variablen_Export_Proj2 52 x2 INT 3 DemoProj3 pro Globale_Variablen_Export_Proj3 53 x3 INT Export lists must now be created for all 3 devices Create import lists for the project DemoProj1 For the project DemoProj1 pro in device 1 we have so far only created the global network variables to be exported We now create two lists of global netw...

Страница 156: ...042 Target V01 2011 07 28 Variable Network variable via UDP 156 Reduce the selection to the requested list Confirm with OK From the menu Project Merge repeat the process with DemoProj3 pro and its export list The resources in DemoProj1 pro are now as follows ...

Страница 157: ...l variable x1 DemoProj2 pro global variable x2 DemoProj3 pro global variable x3 8 2 7 Transmit projects 3654 Check whether all 3 devices together with the PC are available with their corresponding IP addresses in the LAN Transmit the 3 created projects DemoProj1 3 to the corresponding devices Start these projects there 8 2 8 Test transmission of the global network variables 3656 Check the behaviou...

Страница 158: ...OUs to CANopen 242 CAN errors and error handling 313 3043 9 1 General about CAN Topology 159 CAN interfaces 160 Available CAN interfaces and CAN protocols 160 System configuration 162 1164 The CAN bus Controller Area Network belongs to the fieldbuses It is an asynchronous serial bus system which was developed for the networking of control devices in automotives by Bosch in 1983 and presented toget...

Страница 159: ...ugh this processor Consequently no information can be transferred if the central processor fails If an individual control device fails the bus continues to function The linear bus has the advantage that all control devices are in parallel of a central cable Only if this fails the bus no longer functions NOTE The line must be terminated at its two ends using a terminating resistor of 120 to prevent...

Страница 160: ...ctual data sheet you will find on the ifm homepage www ifm com select your country data sheet search article no Informative more interesting CAN protocols Truck Trailer Interface to ISO 11992 ISOBUS to ISO 11783 for agricultural machines NMEA 2000 for maritime applications CANopen truck gateway to CiA 413 conversion between ISO 11992 and SAE J1939 9 1 3 Available CAN interfaces and CAN protocols 6...

Страница 161: ... CANopen SAE J1939 CAN layer 2 CANopen SAE J1939 PCB controller CS0015 CAN layer 2 CANopen SAE J1939 SafetyController CR7021 CR7506 CAN layer 2 CANopen CANopen Safety SAE J1939 CAN layer 2 CANopen Safety SAE J1939 ExtendedSafetyController CR7201 CPU 1 CAN 1 CAN layer 2 CANopen CANopen Safety SAE J1939 CPU 1 CAN 2 CAN layer 2 CANopen Safety SAE J1939 CPU 2 CAN 1 ID 127 CAN layer 2 CANopen SAE J1939...

Страница 162: ...operated in the CANopen mode all controllers in the network must have a unique identifier The actual COB IDs are derived from the module numbers according to the predefined connection set Only one non configured module is allowed to be connected to the network at a time After assignment of the new participant number 1 126 a download or debugging can be carried out and then another device can be co...

Страница 163: ...sumes a line structure of the CAN network Figure CAN network line structure NOTE The line must be terminated at its two ends using a terminating resistor of 120 to prevent corruption of the signal quality The devices of ifm electronic equipped with a CAN interface have no terminating resistors Spurs Ideally no spur should lead to the bus participants node 1 node n because reflections occur dependi...

Страница 164: ...s and generates a difference voltage between the two bus cables The recessive and dominant states are converted into voltages in the bus nodes and detected by the receiver circuits 5 V 3 5 V 2 5 V 1 5 V 0 V U t CAN_H CAN_L rezessiv recessive rezessiv recessive dominant dominant Figure CAN bus level This differential transmission with common return considerably improves the transmission security No...

Страница 165: ...uired transmission rate baud rate length of the spurs To simplify matters the following dependence between bus length and baud rate can be assumed 10 0 50 1000 10000 5 10 20 50 100 200 500 1000 Bus Länge Bus length m Baudrate Baud rate kBit s Figure bus cable length Baud rate kBit s Bus length m Bit length nominal µs 1 000 30 1 800 50 1 25 500 100 2 250 250 4 125 500 8 62 5 1 000 20 20 2 500 50 10...

Страница 166: ...taken into account The following table describes the dependence of the wire cross section referred to the cable length and the number of the connected nodes Cable length m Wire cross section mm 2 at 32 nodes Wire cross section mm 2 at 64 nodes Wire cross section mm 2 at 100 nodes 100 0 25 0 25 0 25 250 0 34 0 50 0 50 500 0 75 0 75 1 00 Depending on the EMC requirements the bus cables can be laid o...

Страница 167: ... Depending on the device the following families of POUs are available CAN POUs on layer 2 RAW CAN page 174 easy functions CAN POUs to SAE J1939 page 207 high quality functions for engine management CAN POUs to CANopen page 242 complex CAN functions CANopen safety POUs optional CAN functions for the safety applications Via these POUs the following units are linked to build a data object the work da...

Страница 168: ...es data sheet Example 11 bits CAN ID base S O F CAN ID base Bit 28 Bit 18 R T R I D E 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 7 F Example 29 bits CAN ID extended S O F CAN ID base Bit 28 Bit 18 S R R I D E CAN ID extended Bit 17 Bit 0 R T R 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 F C 0 0 0 0 Legend SOF Start of frame Edge of recessive to dominant RTR Remote transmission request...

Страница 169: ...e changes too often To reduce the bus load split the messages via network variables or CANx_TRANSMIT to several plc cycles using several events In the controller configuration the values for Com Cycle Period and Sync Window Length should be identical If Com Cycle Period is selected for a slave the slave searches for a Sync object of the master during exactly this period This is why the value for C...

Страница 170: ...to a stack at first will be read at first too For every identifier there is such one buffer as a queue available In fact CAN stacks are also executed during the IEC user cycle for example data is still transmitted cyclically and multi frame messages are still received However they will only be provided to the application program after the IEC user cycle has elapsed INFO CAN stack stack of tasks fo...

Страница 171: ... or and after the IEC task i e filled with data An EXECUTE input is edge triggered The POU is ONLY executed once upon transition of the input from 0 to 1 Via the input CHANNEL the CAN channel is selected If in the lists the addition optional use of the parameter appears for an input parameter the application programmer can leave out the assignment of this input In this case the function works with...

Страница 172: ...s active 014 0E FB is active CANopen configures slaves and sends SDOs 015 0F FB is active CANopen master is started 3210 6310 FB specific return values 6410 12710 FB specific error messages 12810 25510 Global error messages examples 238 EE Error CANopen configuration is too large and cannot be started 239 EF Error CANopen master could not be started 240 F0 Error several modal inputs are active e g...

Страница 173: ...74 Contained in the library ifm_RawCAN_NT_Vxxyyzz LIB CAN POUs to SAE J1939 page 207 Contained in the library ifm_J1939_NT_Vxxyyzz LIB CAN POUs to CANopen page 242 Contained in the library ifm_CANopen_NT_Vxxyyzz LIB The libraries are NOT loaded automatically when creating the project in CoDeSys NOTE The application programmer has to make sure that the received data is processed in time before bein...

Страница 174: ...ity of CAN chips in addition 9 4 1 Notes 8468 FiFo limitations 7555 INFO FiFo First In First Out operation of the stack the data package which was written into a stack at first will be read at first too For every identifier there is such one buffer as a queue available Some RAW CAN POUs enable transmitting and receiving of several messages in one SPS cycle as the messages are temporarily stored in...

Страница 175: ... block is active 014 0E FB is active CANopen configures slaves and sends SDOs 015 0F FB is active CANopen master is started 3210 6310 FB specific return values 6410 12710 FB specific error messages 12810 25510 Global error messages examples 238 EE Error CANopen configuration is too large and cannot be started 239 EF Error CANopen master could not be started 240 F0 Error several modal inputs are ac...

Страница 176: ...get V01 2011 07 28 CAN in the PDM360 CAN FBs on layer 2 RAW CAN 176 9 4 2 FBs for RAW CAN management CAN_ENABLE 177 CAN_RECOVER 179 CAN_STATUS 180 CAN_SETDOWNLOADID 182 7557 Here you will find function blocks for the management of the CAN function on the OSI layer 2 ...

Страница 177: ... to change the baud rate the following procedure is required Maintain the function block on ENABLE FALSE for the duration of one cycle All protocols are reset Re initialisation of the CAN interface and the CAN protocols running on it Any information available for cyclical transmission is lost as well and must be newly created At renewed ENABLE TRUE the new baud rate is adopted Parameters of the in...

Страница 178: ...ts 8530 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 008 08 function block is active 009 09 CAN is not active 242 F2 Error setting is not possible ...

Страница 179: ...oller deletes all buffers including the buffers of the other protocols If CAN_RECOVER is not used ENABLE FALSE In case of a bus off a recovery attempt is automatically made after 1 s After 4 failed recovery attempts in a row the affected CAN interface is deactivated Parameters of the inputs 7514 Parameter Data type Description ENABLE BOOL TRUE No automatic recovery after CAN bus off FALSE Automati...

Страница 180: ...R9042 Symbol in CoDeSys Description 7501 CAN_STATUS provides information on the chosen CAN bus Without hardware initialisation the following flags can be reset to FALSE BUSOFF WARNING_RX WARNING_TX Parameters of the inputs 7502 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending ...

Страница 181: ...OL Warning threshold for receiving is exceeded at the interface WARNING_TX BOOL Warning threshold for transmitting is exceeded at the interface VERSION DWORD version of the CAN stack BUSLOAD BYTE Current bus load in RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function bl...

Страница 182: ...ata exchange when connecting the runtime system and the CoDeSys development environment When the device is started the download ID is set with the default value from the hardware configuration With CAN_DOWNLOADID this value can be set in the PLC program e g using certain inputs The changed ID is also written into the hardware configuration Parameters of the inputs 7519 Parameter Data type Descript...

Страница 183: ...RAW CAN 183 Parameters of the outputs 7520 Parameter Data type Description RESULT BYTE current download ID Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 008 08 function block is active 242 F2 Error setting is not possible ...

Страница 184: ...R9042 Target V01 2011 07 28 CAN in the PDM360 CAN FBs on layer 2 RAW CAN 184 9 4 3 FBs for RAW CAN transmitting messages CAN_TX 185 CAN_TX_ENH 187 CAN_TX_ENH_CYCLIC 189 7610 Here you will find function blocks for transmitting CAN messages on the OSI layer 2 ...

Страница 185: ...is called several times during a cycle the data is also sent several times In case of the simple functions CAN_TX and CAN_RX it is determined by means of the ID whether a standard or an extended frame is to be sent With the enhanced versions this is set via the input EXTENDED Therefore extended frames in the ID area 0 2047 cannot be sent via the easy functions Parameters of the inputs 7524 Paramet...

Страница 186: ...the outputs 7527 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 242 F2 Error setting is not possible 250 FA Error FiFo is full data was lost ...

Страница 187: ...or a 29 bit identifier The additional inputs can be preset so that CAN_TX page 185 is not required If an instance of this FB is called several times during a cycle the data is also sent several times Parameters of the inputs 7634 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n dependin...

Страница 188: ...the outputs 7527 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 242 F2 Error setting is not possible 250 FA Error FiFo is full data was lost ...

Страница 189: ..._NT_Vxxyyzz LIB Available for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7569 CAN_TX_ENH_CYCLIC serves for cyclical transmitting of CAN messages Otherwise the FB corresponds to CAN_TX_ENH page 187 Set the period duration via the parameter PERIOD NOTE If a period is too short this could lead to a high bus load which could af...

Страница 190: ...ame 0 536 870 912 229 Extended optional use of the parameter BOOL TRUE extended frame FALSE normal frame preset for ID 2 048 DataLengthCode optional use of the parameter BYTE length of the data to be sent 0 8 bytes reset 0 bytes DATA ARRAY 0 7 OF BYTE data to be sent 1 8 bytes PERIOD TIME period duration Parameters of the outputs 7510 Parameter Data type Description RESULT BYTE feedback of the fun...

Страница 191: ... 2011 07 28 CAN in the PDM360 CAN FBs on layer 2 RAW CAN 191 9 4 4 FBs for RAW CAN receiving messages CAN_RX 192 CAN_RX_RANGE 194 CAN_RX_RANGE_FIFO 196 CAN_RX_ENH 198 CAN_RX_ENH_FIFO 200 7611 Here you will find function blocks for receiving CAN messages on the OSI layer 2 ...

Страница 192: ... used for receiving a message The input possibilities and the required memory space are low CAN_RX filters for the set identifier If several CAN messages with the same identifier are received in one cycle only the last latest message is available Parameters of the inputs 7589 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not...

Страница 193: ...escription DATA ARRAY 0 7 OF BYTE received data 1 8 bytes RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 005 05 FB is being processed still receiving 009 09 CAN is not active 242 F2 Error setting is not possible ...

Страница 194: ... the set identifier If several CAN messages with the same identifier are received in one cycle only the last latest message is available Parameters of the inputs 7595 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device ID_START DWORD start number of the data object ...

Страница 195: ...tended frame 2 048 536 870 912 229 DATALENGTHCOUNT BYTE number of the data bytes received 0 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 005 05 FB is being processed still re...

Страница 196: ...devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7603 CAN_RX_RANGE_FIFO basically works like CAN_RX_RANGE page 194 In addition CAN_RX_RANGE_FIFO provides a FiFo for the received data Thus several CAN messages can be received in one cycle NOTE No overwriting takes place when the FiFo is full Inbound messages will be lost In this event Use ENABL...

Страница 197: ... BOOL TRUE extended frame FALSE normal frame preset for ID 2 048 Parameters of the outputs 7604 Parameter Data type Description ID DWORD number of the data object identifier normal frame 0 2 047 211 extended frame 2 048 536 870 912 229 DATALENGTHCOUNT BYTE number of the data bytes received 0 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes MORE_DATA_AVAILABLE BOOL TRUE further received data availa...

Страница 198: ...d to CAN_RX page 192 select the frame type 11 or 29 bits define a mask for the evaluation of the CAN ID With the mask several identifiers can be defined as filters Example ID 10016 0001 0000 00002 ID_MASK 1F116 0001 1111 00012 Bit comparison of ID and mask If ID_MASK Bit 0 then CAN ID Bit may be 0 or 1 If ID_MASK Bit 1 then CAN ID Bit must be ID Bit Result The CAN IDs with the following bit patter...

Страница 199: ...nal use of the parameter DWORD filter mask for the identifier if ID_MASK bit 0 CAN ID bit may be 0 or 1 if ID_MASK bit 1 CAN ID bit must be ID bit preset 0 Parameters of the outputs 7613 Parameter Data type Description MATCHED_ID DWORD number of the data object identifier normal frame 0 2 047 211 extended frame 2 048 536 870 912 229 DATALENGTHCOUNT BYTE number of the data bytes received 0 8 DATA A...

Страница 200: ...e for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7616 In addition CAN_RX_ENH_FIFO provides a FiFo for the received data as opposed to CAN_RX_ENH page 198 Thus several CAN messages can be received in one cycle NOTE No overwriting takes place when the FiFo is full Inbound messages will be lost In this event Deactivate and rea...

Страница 201: ...CAN ID bit may be 0 or 1 if ID_MASK bit 1 CAN ID bit must be ID bit preset 0 Parameters of the outputs 7617 Parameter Data type Description MATCHED_ID DWORD number of the data object identifier normal frame 0 2 047 211 extended frame 2 048 536 870 912 229 DATALENGTHCOUNT BYTE number of the data bytes received 0 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes MORE_DATA_AVAILABLE BOOL TRUE further ...

Страница 202: ...e PDM360 CAN FBs on layer 2 RAW CAN 202 9 4 5 FBs for RAW CAN remote access CAN_REMOTE_REQUEST 203 CAN_REMOTE_RESPONSE 205 7623 Here you will find function blocks for transmitting CAN remote messages for providing a CAN message that is to be sent automatically upon arrival of a remote message ...

Страница 203: ...to request a remote message an according requirement is dispatched via CAN_REMOTE_REQUEST and the response of the other device is sent back as result Parameters of the inputs 7628 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device ID DWORD number of the ...

Страница 204: ...E number of the data bytes received 0 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 005 05 FB is being processed still receiving 009 09 CAN is not active 242 F2 Error setting ...

Страница 205: ... the device type It is possible that only a limited number of remote messages can be set up BasicController CR040n BasicDisplay CR0451 max 40 remote messages PDM360NG CR108n CR9042 max 100 remote messages Parameters of the inputs 7634 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n dep...

Страница 206: ... Parameters of the outputs 7636 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 006 06 FB is being processed remote for ID not active 007 07 FB is being processed remote for ID active ...

Страница 207: ...e CAN messages are transferred with a 29 bit identifier Due to the longer identifier numerous messages can be directly assigned to the identifier For writing the protocol this advantage was used and certain messages were combined in ID groups The ID assignment is specified in the standards SAE J1939 and ISO 11992 The protocol of ISO 11992 is based on the protocol of SAE J1939 Standard Application ...

Страница 208: ...E still PF PDU specific PS destination address group extern or proprietary Source address R T R B 1 3 2 1 1 1 8 7 6 5 4 3 1 1 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 1 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 D 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Legend A CAN extended message format B J1939 message format C J19...

Страница 209: ...rom the manufacturer s documentation As in the example of the manufacturer all relevant data has already been prepared it can be directly transferred to the FBs Meaning Designation in the manufacturer s documentation Unit input library function Example value Transmission repetition rate RPT T 10ms Data length LEN 8 PDU format PF 240 PDU specific PS 2 Default priority PRIO 3 Data page PG 0 Source a...

Страница 210: ...20316 PRIO reserved PG PF PS SA DA 0 C F 0 0 2 0 3 As these values are hexadecimal numbers of which individual bits are sometimes needed the numbers must be further broken down SA DA Source Destination Address hexadecimal Source Destination Address decimal 0 3 00 03 0 3 PF PDU format PF hexadecimal PDU format PF decimal F 0 0F 00 16 0 PS PDU specific PS hexadecimal PDU specific PS decimal 0 2 00 0...

Страница 211: ...11 Limitations of the devices SAE J1939 7637 The following limitations of the devices are valid Device Criterion BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 max FiFo transmit 4 messages 4 messages max FiFo receive 4 messages 32 messages max DTCs 64 messages 64 messages max data J1939 1 785 bytes 1 785 bytes ...

Страница 212: ...9042 Target V01 2011 07 28 CAN in the PDM360 CAN units acc to SAE J1939 212 9 5 2 Units for J1939 management J1939_ENABLE 213 J1939_NAME 215 J1939_GETDABYNAME 217 J1939_STATUS 220 7639 Here you find function blocks for management CAN functions with SAE J1939 ...

Страница 213: ...42 For initialisation of the J1939 stack J1939_ENABLE is set to TRUE 1 This FB also causes booting of the soft I Os of the CFG file A different baud rate is only adopted if CAN_ENABLE has not been activated before ACE Address Claiming Enable If an ifm controller communicates with only one engine controller via J1939 set ACE FALSE If however several engine controllers are working on the same bus se...

Страница 214: ...om CFG file otherwise 250 kbit s PreferredAddress optional use of the parameter BYTE Preferred source address Default setting from CFG file otherwise 252 Ace optional use of the parameter BOOL ACE Address Claiming Enable TRUE Address claiming enabled preset control unit is self configuring FALSE No address claiming Parameters of the outputs 8542 Parameter Data type Description RESULT BYTE feedback...

Страница 215: ...file or overwrite the requested data via J1939_NAME The following list shows the composition of the 64 bit NAME information according to SAE J1939 81 Information Data length Description Arbitrary Address Capable 1 bit any desired address available Industry Group 3 bits industry group of the device Vehicle system instance 4 bits instance of the vehicle system Vehicle system 7 bits vehicle system re...

Страница 216: ...preset 65 53510 FFFF16 FunctionInstance optional use of the parameter BYTE instance of the function permissible values 0 3110 preset 25510 FF16 ECUInstance optional use of the parameter BYTE instance of the control device permissible values 0 7 preset 25510 FF16 ManufacturerCode optional use of the parameter WORD manufacturer code must be requested from SAE permissible values 0 204710 211 1 preset...

Страница 217: ...vailable for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7665 Via J1939_GETDABYNAME the target address of one or several nodes can be determined by means of the name information If a certain value is set at the optional inputs the result list will only contain those nodes with this value If no value or a default value is set...

Страница 218: ...onal use of the parameter BYTE vehicle system permissible values 0 12710 preset 25510 FF16 nFunction optional use of the parameter WORD function of the device permissible values 0 25510 preset 65 53510 FFFF16 FunctionInstance optional use of the parameter BYTE instance of the function permissible values 0 3110 preset 25510 FF16 ECUInstance optional use of the parameter BYTE instance of the control...

Страница 219: ...ist of found participants Entries without a found participant are assigned with 255 NUMBER BYTE Number of found bus participants RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 008 08 function block is active 242 F2 Error se...

Страница 220: ...B Available for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7672 Via J1939_STATUS relevant information can be read back to the J1939 stack Parameters of the inputs 7673 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface...

Страница 221: ...ges TIMEOUT BYTE source address of the node which did not provided data for the process image in due time 25510 FF16 all nodes sent the data in due time VERSION DWORD version of the CAN stack RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 Protocol active 002 02 Protocol ina...

Страница 222: ...rget V01 2011 07 28 CAN in the PDM360 CAN units acc to SAE J1939 222 9 5 3 Units for J1939 send J1939_TX 223 J1939_TX_ENH 225 J1939_TX_ENH_MULTI 227 J1939_TX_ENH_CYCLIC 229 J1939_DM1TX 231 7685 Here you find function blocks for transmit CAN functions with SAE J1939 ...

Страница 223: ...in CoDeSys Description 7689 J1939_TX is the easiest method for transmitting single frame messages Parameters of the inputs 7690 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device DA BYTE DA Destination Address if PGN 61139 parameter is ignored preset 24910 F916 PGN...

Страница 224: ...the outputs 7693 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 242 F2 Error setting is not possible 250 FA Error FiFo is full data was lost ...

Страница 225: ...ty data length Multi frame messages J1939_TX_ENH_MULTI page 227 Parameters of the inputs 7702 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device DA BYTE DA Destination Address if PGN 61139 parameter is ignored preset 24910 F916 Prio optional use of the parameter BY...

Страница 226: ...the outputs 7969 Parameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 242 F2 Error setting is not possible 250 FA Error FiFo is full data was lost ...

Страница 227: ...B Contained in the library ifm_J1939_NT_Vxxyyzz LIB Available for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7705 The transmission of multi frame messages is carried out via J1939_TX_ENH_MULTI The FB corresponds to J1939_TX_ENH page 225 In addition it can be determined whether the transmission shall be executed as BAM Broad...

Страница 228: ...0 0003 FFFF16 0 262 14310 Len optional use of the parameter BYTE number of the bytes to be transmitted permissible values 0 8 preset 8 DATA ARRAY 0 1784 OF BYTE data to be sent 1 1785 bytes Bam optional use of the parameter BOOL BAM Broadcast Announce Message message to all participants TRUE multi frame transmission as BAM message to all participants FALSE preset automatic message only to target a...

Страница 229: ..._NT_Vxxyyzz LIB Available for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7718 J1939_TX_ENH_CYCLIC serves for cyclic transmitting of CAN messages Otherwise the FB corresponds to J1939_TX_ENH page 225 Set the period duration via the parameter PERIOD NOTE If a period is too short this could lead to a high bus load which could ...

Страница 230: ...se of the parameter BYTE message priority permissible values 0 7 preset 6 PGN DWORD PGN Parameter Group Number permissible values 0000 0000 0003 FFFF16 0 262 14310 Len optional use of the parameter BYTE number of the bytes to be transmitted permissible values 0 8 preset 8 DATA ARRAY 0 7 OF BYTE data to be sent 1 8 bytes PERIOD TIME period duration Parameters of the outputs 7720 Parameter Data type...

Страница 231: ...t an active error message to the CAN stack This message is stored in the hardware configuration The message is marked active and transmitted once per second as DM1 If the error has already occurred the event counter is incremented NOTE The event counter is managed by the CAN stack A disjunction of all bits of the trouble codes is executed As soon as a bit is set in one of the trouble codes it is e...

Страница 232: ...the hardware configuration Transmitted as DM2 when requested REDSTOPLAMP BOOL red stop lamp TRUE OFF FALSE ON AMBERWARNINGLAMP BOOL Amber warning lamp TRUE OUT FALSE ON PROTECTLAMP BOOL protect lamp TRUE OFF FALSE ON SPN WORD Suspect Parameter Number FMI BYTE Failure Mode Indicator permissible values 00 1F16 0 3110 SPN_CM BOOL conversion method preset FALSE Parameters of the outputs 7750 Parameter...

Страница 233: ...81 CR9042 Target V01 2011 07 28 CAN in the PDM360 CAN units acc to SAE J1939 233 9 5 4 Units for J1939 receive J1939_RX 234 J1939_RX_FIFO 236 J1939_RX_MULTI 238 J1939_DM1RX 240 7722 Here you find function blocks for receive CAN functions with SAE J1939 ...

Страница 234: ...DM360NG CR108n CR9042 Symbol in CoDeSys Description 7725 J1939_RX is the easiest method for receiving single frame messages The message read last on the CAN bus is returned Parameters of the inputs 7726 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device PGN DWORD P...

Страница 235: ...O BYTE message priority 0 7 LEN WORD number of the bytes received 0 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 005 05 FB is active no data received yet 009 09 CAN is not ac...

Страница 236: ... BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7733 J1939_RX_FIFO enables receipt of all specified messages and their successive reading from a FiFo Parameters of the inputs 7734 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device PGN DWOR...

Страница 237: ... 8 DATA ARRAY 0 7 OF BYTE received data 1 8 bytes MORE_DATA_AVAILABLE BOOL TRUE further received data available in the FiFo FALSE no further data available in the FiFo RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 005 05 F...

Страница 238: ...sicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7741 J1939_RX_MULTI enables receipt of multi frame messages Parameters of the inputs 7743 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device PGN DWORD PGN Param...

Страница 239: ...riority 0 7 LEN WORD number of the bytes received permissible values 0000 0000 0000 06F916 0 1 78510 DATA ARRAY 0 1784 OF BYTE data to be sent 1 1785 bytes RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 005 05 FB is active ...

Страница 240: ...2 Symbol in CoDeSys Description 7761 J1939_RX_DM1 enables receipt of diagnostic messages DM1 or DM2 from other ECUs Parameters of the inputs 7762 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active CHANNEL BYTE CAN interface 1 n depending on the device DA BYTE DA Destination Address of the ECU from where the DTCs are to...

Страница 241: ... TRUE OFF FALSE ON NUMBER BYTE number of the bytes received 0 8 SPN WORD Suspect Parameter Number FMI BYTE Failure Mode Indicator permissible values 00 1F16 0 3110 SPN_CM BOOL conversion method preset FALSE OC BYTE occurrence count RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 00...

Страница 242: ...parate protocol on interface 2 or using the protocol to SAE J1939 or ISO 11992 is possible at any time The following devices can be used on all CAN interfaces with all protocols BasicController CR040n BasicDisplay CR0451 Controller CRnn32 PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 The CANopen network describes a standardised protocol for distribute...

Страница 243: ...the PLC is operated as master or as slave Only a few POUs are exclusively operated in slave mode SYNC functionality 7772 Regarding the SYNC functionality as slave the CAN stacks are asynchronous to the IEC application This means that the last valid data of the process image is transmitted at SYNC Extended CAN IDs 7775 CANopen does not provide any extended IDs Limitations of the devices CANopen 777...

Страница 244: ...erms and implementation 1858 According to the CANopen specification there are no masters and slaves in a CAN network Instead of this there is an NMT master NMT network management a configuration master etc according to CANopen It is always assumed that all participants of a CAN network have equal rights Implementation assumes that a CAN network serves as periphery of a CoDeSys programmable control...

Страница 245: ... control message object with error messages CAN ID The CAN Identifier defines CAN messages in the complete network The CAN ID is the main part of the arbitration field of a CAN data frame The CAN ID value determines implicity the priority for the bus arbitration Download ID The download ID indicates the node ID for service communication via SDO for the program download and for debugging Node ID Th...

Страница 246: ...ported by the ifm CANopen library Transmitting PDOs master transmits to slaves slave node device Transmitting event controlled i e in case of a change time controlled RepeatTimer or as synchronous PDOs i e always when a SYNC was transmitted by the master An external SYNC source can also be used to initiate transmission of synchronous PDOs Receiving PDOs master receives from slave Depending on the ...

Страница 247: ... is assumed that you have already installed CoDeSys on your processor and the Target and EDS files have also been correctly installed or copied A more detailed description for setting and using the dialogue controller and CANopen configuration is given in the CoDeSys manual under Resources PLC Configuration or in the Online help After creation of a new project chapter Setup the target page 55 the ...

Страница 248: ... slaves by ifm electronic chapter Set up programming system via templates page 59 For the EDS files of other manufacturers nodes contact the corresponding manufacturer CANopen master Tab CAN parameters 7584 The most important parameters for the master can be set in this dialogue window If necessary the contents of the master EDS file can be viewed via the button EDS This button is only indicated i...

Страница 249: ...ue in the PLC configuration Insert Append subelement once more A list of the CANopen device descriptions EDS files stored in the directory PLC_CONF is at your disposal By selecting the corresponding device it is directly added to the tree of the controller configuration CANopen slave Tab CAN parameters 1968 CAN parameters Node ID 10036 The node ID is used to clearly identify the CAN module and cor...

Страница 250: ...e In case of a missing response the node is ignored and the master goes to the normal operating state If the slave is connected to the network and detected at a later point in time it is automatically started To do so you must have selected the option Automatic startup in the CAN parameters of the master CAN parameters No initialization 10041 If this option is activated the master immediately take...

Страница 251: ...and Send PDO Mapping in the configuration dialogue of a CAN module the module mapping assignment between local object directory and PDOs from to the CANopen slave described in the EDS file can be changed if supported by the CAN module All mappable objects of the EDS file are available on the left and can be added to or removed from the PDOs Process Data Objects on the right The StandardDataTypes c...

Страница 252: ...onous manufacturer specific The PDO is transmitted on event i e when the value is changed The device manufacturer defines which data is transferred in this way a synchronous RTR only These services are not implemented Number of SYNCs Depending on the transmission type this field can be edited to enter the number of synchronisation messages definition in the CAN parameter dialogue of Com Cycle Peri...

Страница 253: ...rk diagnostic status and EMCY functions are described For this the libraryifm_CANopen_NT_Vxxyyzz LIB is accessed Services of the CANopen master library Reset of all configured slaves on the bus at the system start 8020 To reset the slaves the NMT command Reset Remote Node is used as standard explicitly for every slave separately NMT stands for Network Management according to CANopen The individual...

Страница 254: ...y Start All Remote Nodes Start all nodes Call FB CANOPEN_NMTSERVICES page 288 NODE 0 NMTSERVICE 2 Cyclical transmission of the SYNC message 8025 This value can only be set during the configuration Nodeguarding with lifetime monitoring 8026 Setting of nodeguarding with lifetime monitoring for every slave possible The error status can be monitored via CANOPEN_GETGUARDHBERRLIST page 303 We recommend ...

Страница 255: ...to the polling for object 100016 with a type other than the configured one in the lower 16 bits it is configured but marked as a wrong type All SDOs are repeated as long as a response of the slave was seen within the monitoring time With the flag CFGTIMEOUT of the FB CANOPEN_SETSTATE you can set after which time the master breaks the initialisation Via CANOPEN_GETSTATE page 294 you can read the st...

Страница 256: ...ead via the output MASTERSTATE of CANOPEN_GETSTATE page 294 Network state of the master next chapter Whenever a slave does not respond to an SDO request upload or download the request is repeated The master leaves state 3 as described above but not before all SDOs have been transmitted successfully or TIMEOUT setted in CANOPEN_NMTSERVICES page 288 is up Via output NMTSTATUS of CANOPEN_NMTSERVICES ...

Страница 257: ...smitted to the slaves one after the other The Master sends to the slave a SDO read request index 100016 The generated SDOs are compressed into a SDO array The slave knows it s first SDO and the number of it s SDOs 05 5 After transmission of all SDOs to the slaves the master goes to state 5 and remains in this state State 5 is the normal operating state for the master To read the node state out of ...

Страница 258: ...present but reacted to the polling for object 100016 with a type in the lower 16 bits other than expected by the configurator 05 5 state OPERATIONAL State 5 is the normal operating state of the slave Normal Operation If the master was configured to Automatic startup the slave starts in state 4 i e a start node NMT message is generated and the slave goes automatically to state 5 If the flag GLOBAL_...

Страница 259: ... Node received the boot up message 04 4 PREPARED Node is configured via SDOs 05 5 OPERATIONAL Node participates in the normal exchange of data 7F 127 PRE OPERATIONAL Node sends no data but can be configred by the master If nodeguarding active the most significant status bit toggles between the messages Read the node status from the function block Function block used Node status is found here CANx_...

Страница 260: ... transmitted at too short intervals overload the receive buffer of such nodes A help for this is to reduce the number of NMT messages in quick succession To do so call FB CANOPEN_SETSTATE page 292 GLOBALSTART TRUE with Automatic startup The CANopen master library uses the command Start All Nodes instead of starting all nodes individually using the command Start Node GLOBALSTART is executed only on...

Страница 261: ... CANOPEN_NMTSERVICES page 288 NODE 0 NMTSERVICE 3 This resets all nodes once at the same time Access to the status of the CANopen master 8038 You should poll the status of the master so that the application code is not processed before the IO network is ready The following code fragment example shows one option Variable declaration VAR FB_MasterStatus CANOPEN_GETSTATE END_VAR program code If FB_Ma...

Страница 262: ...ow CAN parameters Even if the object directory is not available the master can be used without restrictions The object directory is accessed by the application via function blocks CANOPEN_GETODCHANGEDFLAG page 307 CANOPEN_READOBJECTDICT page 309 CANOPEN_WRITEOBJECTDICT page 311 On the platform CoDeSys has no editor for this object directory The EDS file only determines the objects used to create t...

Страница 263: ...y contains all objects which describe the CANopen slave and in addition the objects defined by the parameter manager In the parameter manager only the list types parameters and variables can be used for the CANopen slave The library manages the access to the object directory i e it acts as SDO server on the bus The library monitors nodeguarding or the heartbeat consumer time always only of one pro...

Страница 264: ...omatically added to the library manager Tab Base settings 1981 Base settings Bus identifier 10049 Parameter is currently not used Base settings Name of updatetask 10050 Name of the task where the CANopen slave is called Base settings Generate EDS file 10051 If an EDS file is to be generated from the settings to be able to add the CANopen slave to any master configuration the option Generate EDS fi...

Страница 265: ...uctName TestHeartbeatODsettings_Device ProductNumber 0x33535F44 ProductVersion 1 ProductRevision 1 OrderCode xxxx yyyy zzzz LMT_ManufacturerName 3S GmbH LMT_ProductName 3S_Dev BaudRate_10 1 BaudRate_20 1 BaudRate_50 1 BaudRate_100 1 BaudRate_125 1 BaudRate_250 1 BaudRate_500 1 BaudRate_800 1 BaudRate_1000 1 SimpleBootUpMaster 1 SimpleBootUpSlave 0 ExtendedBootUpMaster 1 ExtendedBootUpSlave 0 1018s...

Страница 266: ...ng parameters All 8 possible sub indices of the mapping objects 16xx16 or 1Axx16 are present but possibly not considered in the sub index 0 NOTE Bit mapping is not supported by the library Tab Default PDO mapping 1983 In this tab the assignment between local object directory OD editor and PDOs transmitted received by the CANopen slave can be defined Such an assignment is called mapping In the obje...

Страница 267: ...e entered by the master This signals the absence of the SYNC message So you have to create a variable list in the object directory parameter manager and link an index sub index to the variable PLC_PRG a To do so add a line to the variable list a click on the right mouse button opens the context menu and enter a variable name any name as well as the index and sub index The only allowed access right...

Страница 268: ...d To obtain a clear structure of the identifiers used you should add the correct number of the receive and transmit PDOs and assign them the variable bytes from the list Changing the standard mapping by the master configuration 1984 You can change the default PDO mapping in the CANopen slave configuration within certain limits by the master The rule applies that the CANopen slave cannot recreate e...

Страница 269: ... CANopen slave which cannot be mapped to the contents of a variable via the parameter manager These entries are available here CANOPEN_READOBJECTDICT page 309 CANOPEN_WRITEOBJECTDICT page 311 The unit s you find in the library ifm_CANopen_NT_Vxxyyzz LIB Change the PDO properties at runtime 1988 If the properties of a PDO are to be changed at runtime this is done by another node via SDO write acces...

Страница 270: ...UDP The variable values are automatically exchanged on the basis of broadcast messages In UDP they are implemented as broadcast messages in CAN as PDOs These services are not confirmed by the protocol i e 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 Object directory The object directory is ...

Страница 271: ...library SysLibCallback lib CoDeSys automatically generates the required initialisation code and the call of the network blocks at the start and end of the cycle Settings in the target settings 1994 Select the dialogue box Target settings Select the tab Network functionality Activate the check box Support network variables Enter the name of the requested network here CAN in Names of supported netwo...

Страница 272: ...ist In this list the variables to be exchanged with other controllers are defined Open the dialogue with the menu point Object Properties The window Properties appears If you want to define the network properties Click the button Add network If you have configured several network connections you can also configure here several connections per variable list The window Properties extends as follows ...

Страница 273: ...ts of different projects Variable lists with identical basic identifier are exchanged Ensure that the definitions of the variable lists with the same basic identifier match in the different projects NOTE In CAN networks the basic identifier is directly used as COB ID of the CAN messages It is not checked whether the identifier is also used in the remaining CAN configuration To ensure a correct exc...

Страница 274: ... one for writing To get the same data structure for the communication between two participants you should copy the variable list from one controller to the other In a network the same variable list should only be exchanged between two participants Global variable list Cyclic transmission 10062 Only valid if write is activated The values are transmitted in the specified interval irrespective of whe...

Страница 275: ...rt CR1070 CR1071 Only one CAN interface is available enter value 0 CANopen master Transmit and receive lists are processed directly You only have to make the settings described above CANopen slave Transmit lists are processed directly For receive lists you must additionally map the identifier area in the object directory to receive PDOs It is sufficient to create only two receive PDOs and to assig...

Страница 276: ...01 2011 07 28 CAN in the PDM360 CAN POUs to CANopen 276 9 6 2 ifm CANopen SDO units CANOPEN_ENABLE 277 CANOPEN_SDOREAD 279 CANOPEN_SDOREADMULTI 281 CANOPEN_SDOWRITE 283 CANOPEN_SDOWRITEMULTI 285 7783 ifm here offers to the application programmer a set of efficient units ...

Страница 277: ...odes also have to be re initialised Without CANOPEN_ENABLE the CANopen master is started automatically as far as this has been selected in the configuration The configured baud rate is only adopted if CAN_ENABLE page 177 has not been activated before Parameters of the inputs 7788 Parameter Data type Description ENABLE BOOL FALSE TRUE edge The CANopen master starts according to the configuration se...

Страница 278: ...ible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 014 0E FB is active CANopen configures slaves and sends SDOs 015 0F FB is active CANopen master is started 238 EE Error CANopen configuration is too large and cannot be started 239 EF Error CANopen master could not be started...

Страница 279: ... Data Object A considerable amount of memory space can be saved due to the limitation of the data volume to max 4 bytes of user data as this FB only needs to reserve 4 bytes as buffer storage and does not create a large data array itself Parameters of the inputs 7794 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is ...

Страница 280: ... value RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 005 05 FB is active no data received yet 032 20 SDO transmission aborted by client or server SDO abort code 8016 033 21 TIMEOUT elapsed 242 F2 Error setting is not possi...

Страница 281: ...he SDO is calculated from the transmitted node ID according to CANopen convention Parameters of the inputs 7809 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device NODE BYTE Node ID ID of the node 1 127 INFO The COB ID of the SDO is calculated from the no...

Страница 282: ...mory for user data of the SDO data transmission RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 005 05 FB is active no data received yet 032 20 SDO transmission aborted by client or server SDO abort code 8016 033 21 TIMEOUT ...

Страница 283: ...51 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7826 CANOPEN_SDOWRITE is an easy function block for editing Expedited SDOs i e SDOs with max 4 bytes user data This type usually represents the bigger part of the SDO communication INFO Expedited SDO expedited service data object A considerable amount of memory space can be saved due to the limitation of the data volume to max 4 bytes of user...

Страница 284: ...to be transmitted permissible values 01 0416 1 410 DATA ARRAY 0 3 OF BYTE data area 1 4 bytes Timeout optional use of the parameter TIME waiting time of the FB for the response when the time has elapsed the FB stops waiting value 0 use value from the configuration preset 10 ms Parameters of the outputs 7829 Parameter Data type Description RESULT BYTE feedback of the function block possible message...

Страница 285: ... to CANopen convention Parameters of the inputs 7835 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device NODE BYTE ID of the node permissible values 01 7F16 1 12710 IDX WORD index in object directory SUBIDX BYTE subindex in the object directory LEN DWORD ...

Страница 286: ... RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 008 08 function block is active 032 20 SDO transmission aborted by client or server SDO abort code 8016 033 21 TIMEOUT elapsed 242 F2 Error setting is not possible ...

Страница 287: ... not allowed the command is not sent but an error message is provided Graphic state transitions under CANopen Permitted transitions 1 State is automatically reached at power on 2 Internal initialisation completed node automatically goes to PRE OPERATIONAL 3 NMT service Start Remote Node Indication 4 7 NMT service Enter PRE OPERATIONAL Indication 5 8 NMT service Stop Remote Node Indication 6 NMT se...

Страница 288: ...ition to CANopen State diagram page 287 should not be permitted the command is not executed Parameters of the inputs 7847 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device NODEID BYTE node ID ID of the node 0 12710 NODEID 0 command is valid for all node...

Страница 289: ...ues for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 function block is active 035 23 at least 1 SDO of the configuration was not successful 036 24 node was already initialised 037 25 when initialisation was requested the node was not in the PRE OPERATIONAL mode 043 2B master slave is not initialised 241 F1 Error...

Страница 290: ...isplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7853 Only use the POU if the device is operated as CANopen slave With CANOPEN_GETNMTSTATESLAVE only the operating state according to CANopen and an error message are reported to the application if an invalid state transition has been requested Parameters of the inputs 7854 Parameter Data type Description EXECUTE BOOL FALSE TRUE edg...

Страница 291: ...STATE BYTE Network operating status of the node 0 INIT 1 OPERATIONAL 2 PRE OPERATIONAL 3 STOPPED RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 FB is active not yet processed 242 F2 Error setting is not possible ...

Страница 292: ...88 At the same time admissibility checks are carried out For reasons of consistency no inputs are provided for this purpose Parameters of the inputs 7861 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device NODE BYTE node ID ID of the node 0 127 Controller...

Страница 293: ... TIME Set configuration timeout for a node value 0 preset no action retain configuration data value 0 overwrite data from the configuration with the new value InitNoSdos optional use of the parameter BOOL TRUE No configured SDOs are sent to the node specified in NODE during initialisation FALSE preset The configured SDOs are sent to the node specified in NODE during initialisation Parameters of th...

Страница 294: ...arameters of the inputs 7868 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device NODE BYTE Node ID ID of the node 0 127 Controller as CANopen master value 0 Only the status information of the controller itself is returned at the outputs The outputs with i...

Страница 295: ...6 OK 0110 0116 guarding or heartbeat error on node 12810 8016 bus off Controller operated as slave 0010 0016 OK 0110 0116 guarding or heartbeat error 12810 8016 bus off Node state internal node state of a slave seen from the master s perspective The input NODEID identifies the node 110 FF16 reset to ResetNode 110 0116 waiting for BOOTUP 210 0216 after receiving BOOTUP message 310 0316 not yet conf...

Страница 296: ...2011 07 28 CAN in the PDM360 CAN POUs to CANopen 296 Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 FB execution completed without error data is valid 008 08 FB is active not yet processed 242 F2 Error setting is not possible ...

Страница 297: ...N_SETSYNCSTATE the SYNC functionality is switched on and off Parameters of the inputs 7886 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device SYNC BOOL status of the SYNC functionality TRUE SYNC is activated In the master mode SYNC telegrams are generate...

Страница 298: ...ameter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 function block not yet executed 038 26 SYNC could not be activated 242 F2 Error setting is not possible ...

Страница 299: ... the setting of the SYNC functionality active not active the error state of the SYNC functionality SyncError If the PLC CAN runs as CANopen slave it is signalled via this FB whether SYNC signals are absent or appear regularly Synchronous PDOS etc are handled in the CAN stack CANOPEN_GETSYNCSTATE however provides the error state so that the application program can react accordingly Parameters of th...

Страница 300: ...onfiguration and synchronous PDOs are transmitted and received In the slave mode SYNC telegrams are received and accordingly processed FALSE SYNC is not active SYNCERROR BYTE sync error SYNC error message 0 no error 0 SYNC error slave mode RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not a...

Страница 301: ...ffer flags The flags can be reset via the optional inputs The function block returns the state of the overflow flags Parameters of the inputs 7893 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device ResetRXFlags optional use of the parameter BOOL TRUE Fla...

Страница 302: ...E Level in the receive buffer is uncritical TXOVFL BOOL Condition of the TX overflow flag TRUE Overflow in the transmit buffer FALSE No overflow in transmit buffer TXWARN BOOL Condition of the TX overflow warning flag TRUE Level in the transmit buffer is critical FALSE Level in the transmit buffer is uncritical RESULT BYTE feedback of the function block possible messages following table Possibly v...

Страница 303: ...CoDeSys Description 7898 CANOPEN_GETGUARDHBERRLIST lists all nodes in an array for which the master has detected an error guarding error heartbeat error Parameters of the inputs 7899 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device ResetList optional u...

Страница 304: ...Y 0 MAXGUARDERROR OF BYTE Starting from index 0 the node IDs with a heartbeat or guarding error are entered The most recent entry is in index 0 MAXGUARDERROR depends on device chapter Performance limits of the devices CANopen page 243 RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active...

Страница 305: ...TGUARDANDHBSTATESLAVE reports the following states to the controller in slave operation monitoring of node guarding monitoring of heartbeat The controller can either be the heartbeat producer or the heartbeat consumer Parameters of the inputs 7905 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BY...

Страница 306: ...016 inactive 0110 0116 active CONS_HBSTATE BYTE Controller as heartbeat consumer 0010 0016 no error 0110 0116 timeout configuration 12710 7F16 no heartbeat message received yet CONS_HBCOBID BYTE COB ID of the heartbeat message the consumer heartbeat of the controller is reacting to configuration RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT...

Страница 307: ...es BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7928 CANOPEN_GETODCHANGEDFLAG reports any change of value for a particular object directory entry Parameters of the inputs 7930 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n ...

Страница 308: ... Parameter Data type Description DATA DWORD parameter value RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 FB is active not yet processed 242 F2 Error setting is not possible ...

Страница 309: ...n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7935 CANOPEN_READOBJECTDICT reads configuration data from the object directory of the controller for use in the application program Parameters of the inputs 7936 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN inte...

Страница 310: ...Description DATA DWORD parameter value RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 function block not yet executed 040 28 object directory entry is invalid 242 F2 Error setting is not possible ...

Страница 311: ...escription 7942 CANOPEN_WRITEOBJECTDICT writes configuration data to the object directory of the controller NOTICE This could lead to falsification of important system settings e g guarding times heartbeat times Carefully verify input parameters Parameters of the inputs 7943 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already sta...

Страница 312: ...ter Data type Description RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 function block not yet executed 040 28 object directory entry is invalid 242 F2 Error setting is not possible ...

Страница 313: ...open device every occurrence of an error is indicated via a special message which details the error If an error or its cause disappears after a certain time this event is also indicated via the EMCY message The errors occurred last are stored in the object directory object 100316 and can be read via CANOPEN_SDOREAD page 279 In addition the current error situation is reflected in the error register...

Страница 314: ...a new error occurs its EMCY error code is always stored in the sub index 116 All other older errors are moved back one position in the error memory i e the sub index is incremented by 1 If all supported sub indices are used the oldest error is deleted The sub index 016 is increased to the number of the stored errors After all errors have been rectified the value 0 is written to the error field of ...

Страница 315: ... Voltage inside the device 33xx Output voltage 40xx Temperature 41xx Ambient temperature 42xx Device temperature 50xx Device hardware 60xx Device software 61xx Internal software 62xx User software 63xx Data set 70xx Additional modules 80xx Monitoring 81xx Communication 8110 CAN overrun objects lost 8120 CAN in error passiv mode 8130 Life guard error or heartbeat error 8140 Recovered from bus off 8...

Страница 316: ...81 10 00 00 00 00 Error Code FF0016 Error register 8116 1000 00012 thus it consists of the following errors generic error manufacturer specific Concerned channel 001016 0000 0000 0001 00002 wire break channel 2 Manufacturer specific information 8548 A device manufacturer can indicate additional error information The format can be freely selected Example In a device two errors occur and are signall...

Страница 317: ...Nopen EMCY codes CR108n 8414 All indications hex for the 1st CAN interface EMCY code object 100316 Object 100116 Manufacturer specific information Byte 0 1 2 3 4 5 6 7 Description 00 80 11 CAN1 monitoring SYNC error only slave 10 81 11 CAN1 receive buffer overrun 11 81 11 CAN1 transmit buffer overrun 30 81 11 CAN1 guard heartbeat error only slave ...

Страница 318: ... PDM360NG CR1080 CR1081 CR9042 Target V01 2011 07 28 CAN in the PDM360 CAN errors and error handling 318 9 7 3 CANopen POUs for error handling CANOPEN_SENDEMCYMESSAGE 319 CANOPEN_GETERRORREGISTER 321 CANOPEN_GETEMCYMESSAGES 323 8522 ...

Страница 319: ...block FB Contained in the library ifm_CANopen_NT_Vxxyyzz LIB Available for the following devices BasicController CR040n BasicDisplay CR0451 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 7910 CANOPEN_SENDEMCYMESSAGE sends an EMCY message The message is assembled from the according parameters and entered in register 100316 The COB ID for the emergency message is determined from the configurat...

Страница 320: ... OF BYTE MSEF Manufacturer Specific Error Code additional error code which is defined by the manufacturer Value comes from the application Write1003 optional use of the parameter BOOL TRUE Enter this EMCY message in object 100316 FALSE this function is not executed preset SendSysStatus optional use of the parameter BOOL Send system status TRUE The system status is checked and in case of an error s...

Страница 321: ... error registers 100116 and 100316 from the controller Parameters of the inputs 7918 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed once otherwise POU not active A POU already started is processed CHANNEL BYTE CAN interface 1 n depending on the device Reset_1001 optional use of the parameter BOOL TRUE The error register 100116 of the controller is reset FALSE this fun...

Страница 322: ... MAXERR OF DWORD Content of the error register 100316 Index 0 number of stored errors Index 1 MAXERR stored errors The most recent error is in index 1 preset MAXERR 5 RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution completed without error 008 08 FB i...

Страница 323: ...ed by the controller from other nodes in the network since the last deletion of messages The list can be reset by setting the according input A maximum of MAXEMCYMSGS messages is stored Each message contains information from which the node it was sent The most recent message is in index 0 Parameters of the inputs 7924 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge POU is executed onc...

Страница 324: ...EMCYMSGS OF T_EMCY emergency messages structure of T_EMCY NODEID ID of the node from which the message came EEC Emergency error code ER Error register MSEF Manufacturer specific error code MAXEMCYMSG 10 RESULT BYTE feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block execution...

Страница 325: ...unctions Processing input values 325 Adapting analogue values 329 1590 In this chapter you will find FBs which allow you to read and process the signals of the inputs and outputs 10 1 Processing input values INPUT 326 TOGGLE 328 1602 In this chapter we show you FBs which allow you to read and process the analogue or digital signals at the device input ...

Страница 326: ...rovides the current state at the selected channel The measurement and the output value results from the operating mode indicated via MODE digital input lowside digital input highside analogue input 0 20 mA analogue input 0 10 V analogue input 0 32 V analogue input ratiometric measurement 0 32 V analogue input resistance measurement The analogue values are provided as standardised values Parameters...

Страница 327: ...rs of the outputs 9677 Parameter Data type Description VALUE WORD vurrent value or status of the input channel RESULT INT feedback of the function block possible messages following table Possibly values for RESULT Value dec hex Description 000 00 function block is not active 001 01 function block is aktive 242 F2 Error setting is not possible ...

Страница 328: ...PDM360smart CR1070 CR1071 Symbol in CoDeSys Description 3304 TOGGLE enables simple setting and resetting of a Boolean variable With this FB a Boolean variable can be set and reset without much programming It is useful to control the input IN via an edge signal e g via R_TRIG or F_TRIG The first edge sets the output OUT The next edge on the input IN resets the output Parameters of the inputs 3305 P...

Страница 329: ...042 Target V01 2011 07 28 Input output functions Adapting analogue values 329 10 2 Adapting analogue values NORM_DINT 330 NORM_REAL 332 1603 If the values of analogue inputs or the results of analogue functions must be adapted the following FBs will help you ...

Страница 330: ...ype DINT which is within the limits of XH and XL to an output value within the limits of YH and YL This FB is for example used to generate 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 Outside this value range the output X_OUT_OF_RANGE is set Due to rounding errors the normalised ...

Страница 331: ...CR1081 CR9042 Target V01 2011 07 28 Input output functions Adapting analogue values 331 Parameters of the outputs 3309 Parameter Data type Description Y DINT normalised value X_OUT_OF_RANGE BOOL input value X is outside the defined value range XL XH ...

Страница 332: ...ype REAL which is within the limits of XH and XL to an output value within the limits of YH and YL This FB is for example used to generate 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 Outside this value range the output X_OUT_OF_RANGE is set Due to rounding errors the normalised ...

Страница 333: ...CR1081 CR9042 Target V01 2011 07 28 Input output functions Adapting analogue values 333 Parameters of the outputs 3312 Parameter Data type Description Y REAL normalised value X_OUT_OF_RANGE BOOL input value X is outside the defined value range XL XH ...

Страница 334: ...ging the data Saving reading and converting data in the memory 334 Data access and data check 339 File managing 342 8606 Here we show you functions how to read or manage data in the device 11 1 Saving reading and converting data in the memory USB_STORAGE_HANDLER 335 COPY_PDM_TO_USB 337 COPY_USB_TO_PDM 338 1595 PDM file functions chapter File functions page 342 ...

Страница 335: ...ription 10092 USB_STORAGE_HANDLER is the main program for handling USB memory devices The POU can manage up to 16 USB memory devices Parameters of the inputs 10093 Parameter Data type Description REMOVE BOOL FALSE TRUE edge prepares the active USB device for removal FALSE this function is not executed SCROLL_UP BOOL FALSE TRUE edge switches to the USB device with the next higher index FALSE this f...

Страница 336: ... the active USB device 1 16 NUMBER_USB_DEVICES WORD Number of all connected USB devices SELECTED_DEVICE WORD Index of the selected USB device REMOVE_RESULT INT Result of the command remove USB device following table USB_INSERTED BOOL TRUE 1 USB device connected FALSE no USB device connected Possible results for REMOVE_RESULT Value dec hex Description 001 01 FB execution was finished without error ...

Страница 337: ...1 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active COPY BOOL TRUE rising edge of the press of a key starts the copy process FALSE this function is not executed USB_PATH STRING 80 USB path is provided by USB_STORAGE_HANDLER page 335 LOCAL_PATH STRING 80 Path in the PDM memory Typical home or data LOCAL_FILE STRING 80 ...

Страница 338: ...Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active COPY BOOL TRUE rising edge of the press of a key starts the copy process FALSE this function is not executed USB_PATH STRING 80 USB path is provided by USB_STORAGE_HANDLER page 335 LOCAL_PATH STRING 80 Path in the PDM memory Typical home or data USB_FILE STRING 80 File...

Страница 339: ... CR1080 CR1081 CR9042 Target V01 2011 07 28 Managing the data Data access and data check 339 11 2 Data access and data check VERSION 340 SYSTEM_ASYNCH 341 1598 The FBs described in this chapter control the data access and enable a data check ...

Страница 340: ...access and data check 340 11 2 1 VERSION 9688 Unit type program PRG Contained in the library ifm_PDMng_UTIL_Vxxyyzz LIB Available for the following devices PDM360NG CR108n CR9042 Symbol in CoDeSys Description 9698 The program VERSION indicates the version and history of the library in the comment of the POU ...

Страница 341: ... asynchronously in the background The function block must be executed EXECUTE TRUE until the FB output DONE TRUE NOTE Good Linux knowledge is required to use the POU Monitor the POU using timeout functions Parameters of the inputs 9701 Parameter Data type Description EXECUTE BOOL FALSE TRUE edge command execution starts COMMAND STRING 255 Linux command line Parameters of the outputs 9702 Parameter...

Страница 342: ...PDM is based on the Linux operating system various and powerful file functions are available to save and process data and parameters Similar to a PC files can be written to the different drives PCMCIA memory card or RAM or flash disk and read from them It is also possible to create and read datasets in CSV format This data can then be processed e g in MS Excel The file functions of the PDM can be ...

Страница 343: ..._SINGLE_PARAMETER page 363 WRITE_SINGLE_PARAMETER page 364 Functions for alarm management READ_ALARM page 366 STORE_ALARM page 368 Help_Functions Functions for arrays ARRAY_TO_WORD page 372 ARRAY_TO_DWORD page 373 WORD_TO_ARRAY page 374 DWORD_TO_ARRAY page 375 BYTE_ARRAY_TO_CSV page 376 BYTE_ARRAY_TO_STRING page 377 READBUFFER_TO_STRING page 378 More functions PDM_FILE_VERSION page 380 DUMP_FILESY...

Страница 344: ...ement DELETE_FILE Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 OPEN_PCMCIA Available for the following devices PDM360 CR1050 CR1051 CR1060 OPEN_PCMCIA_VFAT Available for the following devices PDM360 CR1050 CR1051 CR1060 SYNC Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053...

Страница 345: ...R1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3495 DELETE_FILE deletes the specified file from the internal flash memory or from the external PCMCIA card Parameters of the inputs 3496 Parameter Data type Description DEL BOOL edge FALSE TRUE unit is executed only for 1 cycle FALSE unit is not executed FILENAME STRING 80 path and f...

Страница 346: ...able storage device into its file system to read and edit the contents This is done automatically by the system with the command dev hda1 on pcmcia type msdos rw N Parameters of the inputs 3498 Parameter Data type Description INIT BOOL TRUE in the 1st cycle unit is executed FALSE during further processing of the program Parameters of the outputs 3499 Parameter Data type Description PCMCIA_STATE ST...

Страница 347: ...ly inserted removable storage device into its file system to read and edit the contents This is done with the following function via a command dev hda1 on pcmcia type vfat rw N Parameters of the inputs 3498 Parameter Data type Description INIT BOOL TRUE in the 1st cycle unit is executed FALSE during further processing of the program Parameters of the outputs 3499 Parameter Data type Description PC...

Страница 348: ...R1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3504 SYNC synchronises the flash memory or the PCMCIA memory with the RAM memory NOTE This FB should be used from time to time and as the last FB call before the PDM is shut down Parameters of the inputs 3505 Parameter Data type Description ENABLE BOOL TRUE rising edge unit is executed for only 1 c...

Страница 349: ...ta File managing 349 File functions for text files READ_TEXTFILE 350 READ_TEXTLINE 351 3429 Text files can be processed using the following FBs READ_TEXTFILE READ_TEXTLINE Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 ...

Страница 350: ...are allowed for the file If more characters are needed the contents should be distributed over several files For large text files with many lines you had better use READ_TEXTLINE page 351 The experienced programmer can change the number of characters and lines if needed Proceed with care and check the cycle time of the device Parameters of the inputs 3507 Parameter Data type Description READ BOOL ...

Страница 351: ...ect access to a specified text line in the file Even large text files with many lines can be read quickly The system load is low You had better use READ_TEXTFILE page 350 for small text files All lines in this file must be precisely 39 characters long and completed with CR Fill unneeded positions of the line with _ or blanks Examples Alarm text 1___________________________ Out of order Parameters ...

Страница 352: ... Parameter Data type Description EOF BOOL TRUE file end reached FALSE file end not yet reached TEXT_OUT STRING 39 line read from the text file FILE_HANDLER DWORD file description value 1 error FILE_SIZE DWORD file size bytes NoOfSigns DWORD number of read characters FILE_MISSING BOOL file not found wrong filename wrong path file not saved in the PDM ...

Страница 353: ...ne feed This results in a table matrix array which can be further processed in a spreadsheet program e g MS Excel StarCalc Example Date Time a p Error 20080812 845 am 17 20080812 256 pm 3 20080813 923 am 12 The above data of the CSV file results in the following table Date Time a p Error 2008 08 12 08 45 am 17 2008 08 12 02 56 pm 3 2008 08 13 09 23 am 12 The library provides the following FBs for ...

Страница 354: ... READ_CSV_8BYTE reads a byte matrix in CSV format from a specified file The file must have been written with WRITE_CSV_8BYTE page 356 Every dataset every line must consist of 8 bytes The FB provides the selected dataset and the corresponding time stamp Parameters of the inputs 3513 Parameter Data type Description FILENAME STRING 80 path and name of the CSV file e g home project data csv READ_EVENT...

Страница 355: ...rs of the outputs 3514 Parameter Data type Description EOF BOOL TRUE file end reached FASLE file end not yet reached TEXT_READ STRING 53 dataset red from the file consisting of time stamp Byte1 Byte2 Byte8 BYTEARRAY ARRAY 1 8 OF BYTE dataset read from the file as matrix of 8 bytes TIMESTAMP STRING 80 time stamp of read dataset ...

Страница 356: ...y saving process the pointer is automatically incremented by 1 File structure in linear mode vs ring mode 2 different methods can be used to write to the memory a In the ring mode The data is written to the memory up to a file limit indicated in MAX_POS number of datasets The write operation then restarts automatically at the first memory location The previous datasets are overwritten The storage ...

Страница 357: ...a csv DATA ARRAY 1 8 OF BYTE dataset of 8 bytes RINGMODE BOOL TRUE ring mode FALSE linear mode MAX POS DWORD max number of the dataset of the line to be written RESET BOOL delete file and dataset pointer CFG_FILENAME STRING 80 for ring mode contains the last dataset pointer path and name of the pointer file e g home project pointer csv Parameters of the outputs 3517 Parameter Data type Description...

Страница 358: ...ER_WORD 359 WRITE_PARAMETER_WORD 361 READ_SINGLE_PARAMETER 363 WRITE_SINGLE_PARAMETER 364 3431 For parameter files the library provides the following FBs READ_PARAMETER_WORD WRITE_PARAMETER_WORD READ_SINGLE_PARAMETER WRITE_SINGLE_PARAMETER Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 ...

Страница 359: ...ct CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3518 READ_PARAMETER_WORD reads datasets of type WORD from the indicated text file Saving the data in the text file must be right aligned e g Value To be saved as 1 00001 123 00123 12345 12345 Parameters of the inputs 3519 Parameter Data type Description READ BOOL edge FALSE TRUE dataset is read only for 1 cycle FAL...

Страница 360: ...iption EOF BOOL TRUE file end reached FALSE file end not yet reached TEXT_READ STRING 6 line read from the text file FILE_HANDLER DWORD file description value 1 error PARAMETER WORD parameter read from the text file FILESIZE DWORD file size bytes NoOfParameter DWORD number of read parameter FILE_MISSING BOOL file not found wrong filename wrong path file not saved in the PDM ...

Страница 361: ...on t use it for older projects Contained in the library ifm_PDM_FILE_Vxxyyzz LIB Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3521 WRITE_PARAMETER_WORD writes datasets of type WORD to the indicated text file Saving the data in the text file is right aligned e g Value Saved as 1 00001 1...

Страница 362: ...g further processing of the program FILENAME STRING 80 path and name of the file e g home project para txt FILEPOS WORD number 0 n of the dataset of the line to be written VALUE WORD value to be written to the dataset Parameters of the outputs 3523 Parameter Data type Description TEXT_WRITE STRING 6 parameter written as dataset FILE_HANDLER DWORD file description value 1 error FILESIZE DWORD file ...

Страница 363: ...ndicated text file The file consists of only this one dataset Saving the value in the text file must be right aligned e g Value To be saved as 1 00001 123 00123 12345 12345 Parameters of the inputs 3525 Parameter Data type Description READ BOOL edge FALSE TRUE dataset is read only for 1 cycle FALSE during further processing of the program FILENAME STRING 80 path and name of the file e g home proje...

Страница 364: ...ites a dataset of type WORD to the indicated text file The file consists of only this one dataset Saving the value as dataset in the text file must be right aligned e g Value Saved as 1 00001 123 00123 12345 12345 Parameters of the inputs 3528 Parameter Data type Description WRITE BOOL edge FALSE TRUE dataset is written only for 1 cycle FALSE during further processing of the program FILENAME STRIN...

Страница 365: ...he data File managing 365 File functions for alarm management READ_ALARM 366 STORE_ALARM 368 3432 The library provides the following functions READ_ALARM STORE_ALARM Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 ...

Страница 366: ...scription 3530 READ_ALARM reads alarm messages from a CSV file STORE_ALARM page 368 Structure of the alarm messages 3616 Structure of the alarm message in the CSV dataset Name Data type Description Timestamp Byte More details about alarm Byte 0 Alarm code Byte 1 Alarm code also index in the ALARMSTATE matrix Alarmstate Bool State of the alarm message TRUE alarm is activated FALSE alarm is deactiva...

Страница 367: ...csv FILE_POS WORD number of dataset to be read in the alarm history READ BOOL edge FALSE TRUE dataset is read only for 1 cycle FALSE during further processing of the program Parameters of the outputs 3532 Parameter Data type Description EOF BOOL TRUE file end reached FALSE file end not yet reached HISTORY_csv_READ STRING 80 dataset red from the file consisting of time stamp alarm code LSB MSB alar...

Страница 368: ...rites alarm messages together with a time stamp to a CSV file 255 different alarms per alarm file can be managed Therefore you should create two arrays of the length 255 The first array contains the alarm messages in plain language Index Text STRING 1 Excess temperature 2 Oil pressure too high 3 Overspeed 255 Short circuit valve 5 In the second array the alarm state of the individual alarms is sav...

Страница 369: ...The data is written to the memory up to a file limit indicated in MAX_POS number of datasets The write operation then restarts automatically at the first memory location The previous datasets are overwritten The storage operation continues uninterrupted b In the linear mode The data is written to the memory up to a file limit indicated in MAX_POS number of datasets This ends the write operation au...

Страница 370: ...ARRAY 1 255 OF BOOL contains the state of all defined alarm messages TRUE alarm is activated FALSE alarm is deactivated ALARMADDITION BYTE more details about alarm ALARMVALUE DWORD alarm value value of the parameter which triggered the current alarm message RINGMODE BOOL TRUE save in the ring mode FALSE save in the linear mode MAX_POS DWORD max number of datasets RESET BOOL delete file contents al...

Страница 371: ...ARRAY 374 DWORD_TO_ARRAY 375 BYTE_ARRAY_TO_CSV 376 BYTE_ARRAY_TO_STRING 377 READBUFFER_TO_STRING 378 3433 The library provides the following FBs ARRAY_TO_WORD ARRAY_TO_DWORD WORD_TO_ARRAY DWORD_TO_ARRAY BYTE_ARRAY_TO_CSV BYTE_ARRAY_TO_STRING READBUFFER_TO_STRING Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 ...

Страница 372: ...ompact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3536 ARRAY_TO_WORD is a help function for other units The FB combines the contents of 2 bytes into a word as follows Word WORD Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Byte BYTE 1 BYTE 0 Parameters of the inputs 3537 Parameter Data type Description BYTE_0 BYTE LSB in output word BYTE_1 BYTE HSB in output word ...

Страница 373: ... 3539 ARRAY_TO_DWORD is a help function for other units The FB combines the contents of 4 bytes into a double word as follows Word DWORD Bit 30 31 28 29 26 27 24 25 22 23 20 21 18 19 16 17 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 1 Byte BYTE 3 BYTE 2 BYTE 1 BYTE 0 Parameters of the inputs 3540 Parameter Data type Description BYTE_0 BYTE LSB in the low output word BYTE_1 BYTE HSB in the low output word ...

Страница 374: ...0compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3542 WORD_TO_ARRAY is a help function for other units The FB splits an input word into 2 separate bytes as follows Word WORD Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Byte BYTE 1 BYTE 0 Parameters of the inputs 3543 Parameter Data type Description WORD_IN WORD input word Parameters of the outputs 3544 Paramet...

Страница 375: ...ption 3545 DWORD_TO_ARRAY is a help function for other units The FB splits up the contents of a double word into 4 bytes as follows Word DWORD Bit 30 31 28 29 26 27 24 25 22 23 20 21 18 19 16 17 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 1 Byte BYTE 3 BYTE 2 BYTE 1 BYTE 0 Parameters of the inputs 3546 Parameter Data type Description DWORD_OUT DWORD input double word Parameters of the outputs 3547 Paramet...

Страница 376: ...ombines the contents of 8 bytes into a string as follows H Byte7 L Byte7 H Byte6 L Byte6 H Byte5 L Byte5 H Byte4 L Byte4 H Byte3 L Byte3 H Byte2 L Byte2 H Byte1 L Byte1 H Byte0 L Byte0 H Byte high byte L Byte low byte Parameters of the inputs 3549 Parameter Data type Description DATA ARRAY 1 8 OF BYTE matrix of 1 8 bytes Parameters of the outputs 3550 Parameter Data type Description CSV_OUT STRING...

Страница 377: ... CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3551 BYTE_ARRAY_TO_STRING is a help function for other units The FB combines the contents of up to 65 bytes into a string as follows Byte65 Byte64 Byte63 Byte1 Byte0 Parameters of the inputs 3552 Parameter Data type Description BYTE_IN ARRAY 1 65 OF BYTE matrix of 1 65 bytes Parameters of the outputs 3553 Parameter D...

Страница 378: ... Symbol in CoDeSys Description 3554 READBUFFER_TO_STRING is a help function for other units The FB combines the contents of a file max 500 bytes into a number of strings Parameters of the inputs 3555 Parameter Data type Description BYTEARRAY ARRAY 1 500 OF BYTE matrix of 1 500 bytes as read contents of a file read buffer Parameters of the outputs 3556 Parameter Data type Description TEXT_LINE ARRA...

Страница 379: ...naging 379 More help functions PDM_FILE_VERSION 380 DUMP_FILESYSTEM 381 LOG_TIMESTAMP 382 3455 The library provides the following FBs PDM_FILE_VERSION DUMP_FILESYSTEM LOG_TIMESTAMP Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR1082 CR9042 ...

Страница 380: ... library ifm_PDM_FILE_Vxxyyzz LIB Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3557 PDM_FILE_VERSION is a help function This FB provides the version of this library Parameters of the outputs 3558 Parameter Data type Description VERSION STRING 80 version of the file system ...

Страница 381: ...ymbol in CoDeSys Description 3559 DUMP_FILESYSTEM is a help function for other units This FB provides information about the file system according to the Linux command df Parameters of the inputs 3560 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active READ_DF BOOL edge FALSE TRUE data is read for 1 cycle FALSE during fu...

Страница 382: ...ompact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3562 LOG_TIMESTAMP is a help function for other units This FB converts CurTimeEx in into a CSV compatible format Parameters of the inputs 3563 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active Parameters of the outputs 3564 Paramet...

Страница 383: ...alisation Program LED buzzer 383 Manage visualisation 387 Edit input fields in the visualisation 396 8615 Here we show the following functions LED control Buzzer control Management of the visualisation 12 1 Program LED buzzer BUZZER_CLICK 384 BUZZER_ON 385 KEY_CLICK 386 8650 Here we show you functions to program the LED and the buzzer in this device ...

Страница 384: ...the device generates a click signal as soon as the function is called Adjustable features click repetition time in ms tone pitch in Hz Parameters of the inputs 9655 Parameter Data type Description FREQUENCY WORD Tone pitch in Hz Permissible values 500 5000 Hz DURATION TIME Click repetition time in ms Permissible values 1 10 ms Parameters of the outputs 9656 Parameter Data type Description BUZZER_C...

Страница 385: ...is determined by the duration of the ENABLE signal The tone pitch results from the parameter FREQUENCY Parameters of the inputs 9655 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active FREQUENCY WORD Tone pitch in Hz Permissible values 500 5000 Hz Parameters of the outputs 9664 Parameter Data type Description RESULT INT...

Страница 386: ... the parameter FREQUENCY The click repetition time results from the parameter DURATION Parameters of the inputs 9670 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not active FREQUENCY WORD Tone pitch in Hz Permissible values 500 5000 Hz DURATION TIME Click repetition time in ms Permissible values 1 10 ms Parameters of the ou...

Страница 387: ...PDM360NG CR1080 CR1081 CR9042 Target V01 2011 07 28 LED buzzer visualisation Manage visualisation 387 12 2 Manage visualisation SET_BOOTUP_BACKLIGHT 388 Library Instrumente 389 8617 Here we show you function to manage visualisations ...

Страница 388: ...TUP_BACKLIGHT the brightness of the display can be set NOTICE When functions are called too frequently FUN the Flash memory may be destroyed Call functions only if absolutely necessary Parameters of the inputs 9684 Parameter Data type Description BACKLIGHT BYTE Display brightness 0 100 Parameters of the outputs 9686 Parameter Data type Description SET_BOOTUP_BACKLIGHT INT Return value of the funct...

Страница 389: ... Instrumente_x LIB provides a number of ready to use visualisation elements You can directly integrate them in your visualisation pages via Insert Visualization The visualisation elements are designed so that the active elements can be animated via placeholders To do so the placeholders are directly linked to a variable from the application program More information is given in the CoDeSys online h...

Страница 390: ...sualisation Manage visualisation 390 SCALE_METER page 394 shows input values as a circular scale of a meter METER_NO 1 METER_NO 2 METER_NO 3 METER_NO 4 Visu Meter1 Visu Meter2 Visu Meter3 Visu Meter4 In addition the library provides neutral scales as visualisation 2 Visu ClockFace1 Visu ClockFace2 ...

Страница 391: ...devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 PDM360smart CR1070 CR1071 Symbol in CoDeSys Description 3378 CONTROL_ANALOGCLOCK indicates the current time on the dial of an analogue clock Parameters of the inputs 3379 Parameter Data type Description ENABLE BOOL TRUE unit is executed FALSE unit is not executed POU inputs and outputs are not acti...

Страница 392: ...r the following devices PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 PDM360smart CR1070 CR1071 Symbol in CoDeSys Description 3381 SCALE_LED_GRAF shows input values as a 10 digit value dependent row of LEDs e g one of the 3 visualisations from this library Visu Bargraf_LED10_H Visu Bargraf_LED10_H2 Visu Bargraf_LED10_V The FB represents an input value...

Страница 393: ... BYTE colour change point for MODE 9 or 10 value range 0 10 Operating mode of the row of LEDs 3383 All variables of this program are stored in the global variables of the library Mode Row of LEDs Description 1 Red individual segment in a row of LEDs lighting green 2 Green individual segment in a row of LEDs lighting red 3 Red individual segment 4 Green individual segment 5 Red row of segments in a...

Страница 394: ... CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 PDM360smart CR1070 CR1071 Symbol in CoDeSys Description 3384 SCALE_METER shows input values as a circular scale of a meter METER_NO 1 METER_NO 2 METER_NO 3 METER_NO 4 Visu Meter1 Visu Meter2 Visu Meter3 Visu Meter4 The FB represents an input value in relation to a defined value range In the visualisation Meter1 s is used as a placeholder for the ...

Страница 395: ...nputs and outputs are not active METER_NO BYTE 1 meter1 270 scale with definable values and unit 2 meter2 270 scale 3 meter3 tank display 4 meter4 temperature display X INT input value XH INT upper limit of the value range XL INT lower limit of the value range UNIT STRING 6 for METER_NO 1 unit of measurement in the scale text STARTCOLUM INT start value of the scale e g 10 scale starts at 10 STEP I...

Страница 396: ...zzer visualisation Edit input fields in the visualisation 396 12 3 Edit input fields in the visualisation INPUT_INT 397 INPUT_DINT 402 INPUT_REAL 405 INIT_VAR_RETAIN_INT 408 INIT_VAR_RETAIN_DINT 410 INIT_VAR_RETAIN_REAL 412 10088 Here we show functions to edit input fields in visualisations ...

Страница 397: ...1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3328 INPUT_INT supports up to 6 input fields which can be assigned to 6 different objects in the visualisation The input objects are parameterised with the internal variables FIELD1 FIELD6 COLOR_FIELD1 COLOR_FIELD6 and VALUE_FIELD1 VALUE_FIELD6 The FB is an alternative to the input function integrat...

Страница 398: ...RUE increments the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 DECREMENT BOOL edge FALSE TRUE decrements the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 ENTER BOOL 1st edge FALSE TRUE activates input mode for the input field changes field colour only color device cursor flashes 2nd edge FALSE TRUE resets input mode for the input field writes edited values to...

Страница 399: ...rs 3331 Name Data type Description FIELD1 INT INT FIELD6 INT Sets the focus for the selected input field Any visualisation object can be used as a focus The variable FIELDx must be assigned to this object in the visualisation If the input is active FIELDx is pulsed COLOR_FIELD1 INT INT COLOR_FIELD6 INT Sets the alarm colour of the input object only PDM color The variable must be assigned in the vi...

Страница 400: ...ds in the visualisation 400 Example INPUT_INT with 3 input elements 3332 Integrate the requested function block into the application program and link the inputs and outputs to the parameters and variables Create the requested visualisation page In the example the three right elements are intended for the input of the values ...

Страница 401: ...own for the selected input object FIELDn TRUE alarm colour frame black For the other objects it is not visible Select the internal variable VALUE_FIELD_n as text output variable When the application is running the selected input field is indicated by the frame If on the FB input ENTER is pressed for the first time the frame flashes and the input value can be edited If is pressed again the value is...

Страница 402: ...1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3333 INPUT_DINT supports up to 6 input fields which can be assigned to 6 different objects in the visualisation The input objects are parameterised with the internal variables FIELD1 FIELD6 COLOR_FIELD1 COLOR_FIELD6 and VALUE_FIELD1 VALUE_FIELD6 The FB is an alternative to the input function integra...

Страница 403: ...UE Increments the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 DECREMENT BOOL edge FALSE TRUE Decrements the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 ENTER BOOL 1st edge FALSE TRUE activates input mode for the input field changes field colour only color device cursor flashes 2nd edge FALSE TRUE resets input mode for the input field writes edited values to ...

Страница 404: ...3336 Name Data type Description FIELD1 DINT DINT FIELD6 DINT Sets the focus for the selected input field Any visualisation object can be used as a focus The variable FIELDx must be assigned to this object in the visualisation If the input is active FIELDx is pulsed COLOR_FIELD1 DINT DINT COLOR_FIELD6 DINT Sets the alarm colour of the input object only PDM color The variable must be assigned in the...

Страница 405: ...1060 PDM360compact CR1052 CR1053 CR1055 CR1056 PDM360NG CR108n CR9042 Symbol in CoDeSys Description 3337 INPUT_REAL supports up to 6 input fields which can be assigned to 6 different objects in the visualisation The input objects are parameterised with the internal variables FIELD1 FIELD6 COLOR_FIELD1 COLOR_FIELD6 and VALUE_FIELD1 VALUE_FIELD6 The FB is an alternative to the input function integra...

Страница 406: ...UE increments the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 DECREMENT BOOL edge FALSE TRUE decrements the input value by the value in INCREMENT_VALUE or INCREMENT_VALUE2 ENTER BOOL 1st edge FALSE TRUE activates input mode for the input field changes field colour only color device cursor flashes 2nd edge FALSE TRUE resets input mode for the input field writes edited values to ...

Страница 407: ...3340 Name Data type Description FIELD1 REAL REAL FIELD6 REAL Sets the focus for the selected input field Any visualisation object can be used as a focus The variable FIELDx must be assigned to this object in the visualisation If the input is active FIELDx is pulsed COLOR_FIELD1 REAL REAL COLOR_FIELD6 REAL Sets the alarm colour of the input object only PDM color The variable must be assigned in the...

Страница 408: ... INIT_VAR_RETAIN_INT initialises the array of INPUT_INT page 397 indicated on the input INIT_VALUE with remanent input values If input values are to be saved permanently the values must be initialised after switching on the display otherwise they are overwritten in the first cycle The FB initialises the array INIT_VALUE of INPUT_INT with the remanent input values The POU compares the values of VAL...

Страница 409: ...arameters of the inputs 3342 Parameter Data type Description VALUE1 INT INT VALUE6 INT The variables VALUE_FIELDx of INPUT_INT page 397 declared as retain must be indicated on this input INIT_VALUE ARRAY 1 6 OF INT If the contents of VALUE1 VALUE6 0 the elements of the array INIT_VALUE are written to VALUE1 VALUE6 Parameters of the outputs 3343 Parameter Data type Description INIT_VALUE ARRAY 1 6 ...

Страница 410: ...4 INIT_VAR_RETAIN_DINT initialises the array of INPUT_DINT page 402 indicated on the input INIT_VALUE with remanent input values If input values are to be saved permanently the values must be initialised after switching on the display otherwise they are overwritten in the first cycle The FB initialises the array INIT_VALUE of INPUT_DINT with remanent input values The POU compares the values of VAL...

Страница 411: ...meters of the inputs 3345 Parameter Data type Description VALUE1 DINT DINT VALUE6 DINT The variables VALUE_FIELDx of INPUT_DINT page 402 declared as retain must be indicated on this input INIT_VALUE ARRAY 1 6 OF DINT If the contents of VALUE1 VALUE6 0 the elements of the array INIT_VALUE are written to VALUE1 VALUE6 Parameters of the outputs 3346 Parameter Data type Description INIT_VALUE ARRAY 1 ...

Страница 412: ... INIT_VAR_RETAIN_REAL initialises the array of INPUT_REAL page 405 indicated on the input INIT_VALUE with remanent input values If input values are to be saved permanently the values must be initialised after switching on the display otherwise they are overwritten in the first cycle The FB initialises the array INIT_VALUE of INPUT_INT with the remanent input values The POU compares the values of V...

Страница 413: ...meters of the inputs 3348 Parameter Data type Description VALUE1 REAL REAL VALUE6 REAL The variables VALUE_FIELDx of INPUT_REAL page 405 declared as retain must be indicated on this input INIT_VALUE ARRAY 1 6 OF REAL If the contents of VALUE1 VALUE6 0 the elements of the array INIT_VALUE are written to VALUE1 VALUE6 Parameters of the outputs 3349 Parameter Data type Description INIT_VALUE ARRAY 1 ...

Страница 414: ...he setup menu from soft reset booting stops with a blank screen Rare software error Hard reset via power OFF ON Very long times to change from one image to the other a Too many graphical elements in the image b Too many different character sets fonts c Too many units which are a load for the system d Units called too often e Too many REAL variables in the image Adhere to the recommended limitation...

Страница 415: ...ignment of the inputs 9734 Abbreviations chapter Wiring page 79 Operating modes of the inputs and outputs chapter Operating modes page 416 Info The other values IN_VOLTAGE10 etc can only be set in the analogue input operating mode IEC address Name I O variable Configuration with variable Default value Possible operating modes IB140 IN00 BL BH A U I Address assignment of the outputs 9735 Abbreviati...

Страница 416: ...ion combinations where permissible are created by adding the configuration values this configuration value is default Config value Config value Inputs Operating mode of the inputs hex dec Outputs Operating mode of the outputs hex dec IN_NOMODE 0 0 IN_DIGITAL_H plus 1 1 OUT_DIGITAL_H plus IN_DIGITAL_L minus 2 2 IN_CURRENT 4 4 IN VOLTAGE10 8 8 IN_VOLTAGE30 10 16 IN_RATIO 20 32 IN_DIAGNOSTIC 40 64 IN...

Страница 417: ...f the last CAN transmission 0 no error 0 CAN specification LEC CANx_WARNING BOOL CAN interface x Warning threshold reached 96 BACKLIGHT BYTE Display brightness 0 100 CLAMP_15_SWITCHING_THRESHOLD WORD Switching threshold for terminal 15 CLAMP_15_VOLTAGE BOOL Voltage applied to terminal 15 ERROR_POWER BOOL Voltage error SUPPLY_VOLTAGE 10000 mV or 32000 mV ERROR_TEMPERATUR BOOL Temperature error 25 C...

Страница 418: ..._UP BOOL Scroll key key in the group of keys x pressed KEYx_DOWN BOOL Scroll key key in the group of keys x pressed RT_KEYx_LEFT BOOL Pulse key LEFT in the group of keys x pressed encoder direction of rotation counter clockwise scroll key key pressed RT_KEYx_RIGHT BOOL Pulse key RIGHT in the group of keys x pressed encoder direction of rotation clockwise scroll key key pressed RT_KEYx_PUSH BOOL Pu...

Страница 419: ...roll key in the group of keys x is pressed AR_KEYx_PUSH BOOL Key signal repetition when key PUSH in the group of keys x is pressed encoder rotary button pressed scroll key key in the middle pressed AR_KEYx_UP BOOL Key signal repetition when key of the scroll key in the group of keys x is pressed AR_KEYx_DOWN BOOL Key signal repetition when key of the scroll key in the group of keys x is pressed ...

Страница 420: ...he scroll key in the group of keys x set as default MD_KEYx_DOWN STRING 31 Assignment of key of the scroll key in group of keys x set as default ME_KEYx_y STRING 31 Assignment of key y in the group of keys x edit mode ME_KEYx_LEFT STRING 31 Assignment of key LEFT in the group of keys x edit mode encoder direction of rotation counter clockwise scroll key key ME_KEYx_RIGHT STRING 31 Assignment of ke...

Страница 421: ...ct message object with service data emergency message object with emergency data time message object with time data or error control message object with error messages CAN ID The CAN Identifier defines CAN messages in the complete network The CAN ID is the main part of the arbitration field of a CAN data frame The CAN ID value determines implicity the priority for the bus arbitration Download ID T...

Страница 422: ...alue hex Data type Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8 12 BYTE 1 2 1234 WORD 3 4 1 2 12345678 DWORD 7 8 5 6 3 4 1 2 Structure of the COB ID 9972 The first part of a message is the COB ID Structure of the 11 bit COB ID Nibble 0 Nibble 1 Nibble 2 11 10 9 8 7 6 5 4 3 2 1 0 3 2 1 0 6 5 4 3 2 1 0 function code node ID The COB ID consists of the function code page 423 and the node ID...

Страница 423: ...Related parameter objects hex NMT 0 000 SYNC 1 080 1005 1006 1007 1028 TIME 2 100 1012 1013 Point to point messages Communication object Function code hex COB ID hex Related parameter objects hex EMERGENCY 1 080 node ID 1014 1015 TPDO1 TX 3 180 node ID 1800 RPDO1 RX 4 20016 node ID 1400 TPDO2 TX 5 280 node ID 1801 RPDO2 RX 6 30016 node ID 1401 TPDO3 TX 7 380 node ID 1802 RPDO3 RX 8 400 node ID 140...

Страница 424: ...Message Data length Description 21 33 request more than 4 bytes send data to slave 22 34 request 1 4 bytes send data to slave 23 35 request 4 bytes send data to slave 27 39 request 3 bytes send data to slave 2B 43 request 2 bytes send data to slave 2F 47 request 1 byte send data to slave 40 64 request request data from slave 42 66 response 1 4 bytes send data from slave to master 43 67 response 4 ...

Страница 425: ...ncompatibility reason 0604 0047 general internal incompatibility in the device 0606 0000 access failed due to an hardware error 0607 0010 data type does not match length of service parameter does not match 0607 0012 data type does not match length of service parameter too high 0607 0013 data type does not match length of service parameter too low 0609 0011 sub index does not exist 0609 0030 value ...

Страница 426: ...ables 426 13 4 3 Bootup messsage 9961 After booting the CAN participate sends the boot up message once hex dec 70016 node ID 1 79210 node ID The participant is now capable of communicating in the CAN network Structure The node ID of the participant is 7D16 12510 The boot up message is 77D16 1 91710 ...

Страница 427: ... 0210 node ID stop_remode_node stop CAN participate 00 8016 12810 node ID enter_pre operational switch to pre operational 00 8116 12910 node ID reset node reset CAN participate 00 8216 13010 node ID reset communication reset CAN communication NMT state 9963 The status byte informs about the state of the CAN participant Graphics state transitions under CANopen Permitted transitions 1 State is autom...

Страница 428: ...s its slaves To do so all SDOs generated by the configurator are transmitted to the slaves one after the other The Master sends to the slave a SDO read request index 100016 The generated SDOs are compressed into a SDO array The slave knows it s first SDO and the number of it s SDOs 05 5 After transmission of all SDOs to the slaves the master goes to state 5 and remains in this state State 5 is the...

Страница 429: ...ut reacted to the polling for object 100016 with a type in the lower 16 bits other than expected by the configurator 05 5 state OPERATIONAL State 5 is the normal operating state of the slave Normal Operation If the master was configured to Automatic startup the slave starts in state 4 i e a start node NMT message is generated and the slave goes automatically to state 5 If the flag GLOBAL_START was...

Страница 430: ...eived the boot up message 04 4 PREPARED Node is configured via SDOs 05 5 OPERATIONAL Node participates in the normal exchange of data 7F 127 PRE OPERATIONAL Node sends no data but can be configred by the master If nodeguarding active the most significant status bit toggles between the messages Read the node status from the function block Function block used Node status is found here CANx_MASTER_ST...

Страница 431: ...ssages 431 Overview CANopen error codes 432 Object 0x1001 error register 433 9967 Emergency messages 9973 Device errors in the slave or problems in the CAN bus trigger emergency messages COB ID DLC Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 8016 node ID error code object 100116 device specific NOTE Please note the reversed byte order ...

Страница 432: ...the device 33xx Output voltage 40xx Temperature 41xx Ambient temperature 42xx Device temperature 50xx Device hardware 60xx Device software 61xx Internal software 62xx User software 63xx Data set 70xx Additional modules 80xx Monitoring 81xx Communication 8110 CAN overrun objects lost 8120 CAN in error passiv mode 8130 Life guard error or heartbeat error 8140 Recovered from bus off 8150 Transmit COB...

Страница 433: ...re 4 communication error 5 device profile specific 6 reserved always 0 7 manufacturer specific For an error message more than one bit in the error register can be set at the same time Example CR2033 message wire break at channel 2 installation manual of the device COB ID DLC Byte 0 Byte 1 Byte Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 8016 node ID 00 FF 81 10 00 00 00 00 Error Code FF0016 Error register ...

Страница 434: ...ded others must be inserted or loaded by the programmer 13 5 1 Installation of the files and libraries 2721 Factory setting the device contains only the boot loader Load the operating system H86 or RESX Create the project PRO in the PC enter the target TRG Additionally depending on device and target Define the PLC configuration CFG CoDeSys integrates the files belonging to the target into the proj...

Страница 435: ...rrors_CRnnnn INI CoDeSys error file CoDeSys needs the file for starting the project per device only 1 device specific file inlcudes device specific error messages from CoDeSys CoDeSys V Targets ifm ifm_CRnnnn_Vxx TRG Target file per device only 1 device specific file inlcudes hardware description for CoDeSys e g memory file locations CoDeSys V Targets ifm ifm_ _Vxxyyzz LIB General libraries per de...

Страница 436: ...les chapter Overview of the files and libraries used page 434 CRnnnn Vxx 00 99 yy 00 99 zz 00 99 device article number target version number release number patch number The basic file name e g CR0032 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 IMPORTANT...

Страница 437: ...an only be used under certain conditions or the functionality has not yet been tested Files for the operating system runtime system 2714 File name Function Available for ifm_CRnnnn_Vxxyyzz H86 ifm_CRnnnn_Vxxyyzz RESX operating system runtime system all ecomatmobile controllers BasicDisplay CR0451 PDM CR10nn ifm_Browser_CRnnnn INI CoDeSys browser commands all ecomatmobile controllers PDM CR10nn ifm...

Страница 438: ...lave 2718 These libraries are based on the CoDeSys libraries 3S CANopen POUs and make them available to the user in a simple way File name Function Available for ifm_CRnnnn_CANopenMaster_Vxxyyzz LIB CANopen master emergency and status handler all ecomatmobile controllers PDM CR10nn ifm_CRnnnn_CANopenSlave_Vxxyyzz LIB CANopen slave emergency and status handler all ecomatmobile controllers PDM CR10n...

Страница 439: ...ptTable LIB 3S_CANopenManagerOptTableEx LIB all ecomatmobile controllers PDM360smart CR1070 CR1071 3S_CANopenManager LIB CANopen network manager PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 3S_CANopenMasterOptTable LIB 3S_CANopenMasterOptTableEx LIB all ecomatmobile controllers PDM360smart CR1070 CR1071 3S_CANopenMaster LIB CANopen master PDM360 CR1050 CR1051 CR1060 PDM360...

Страница 440: ...cController CR0020 CR0505 ExtendedController CR0200 SafetyController CR7020 CR7200 CR7505 SmartController CR2500 PDM360smart CR1070 CR1071 ifm_J1939_x_Vxxyyzz LIB J1939 communication POUs from target V05 CabinetController CR0303 ClassicController CR0020 CR0505 ExtendedController CR0200 SafetyController CR7020 CR7021 CR7200 CR7201 CR7505 CR7506 SmartController CR2500 PDM360smart CR1070 CR1071 ifm_C...

Страница 441: ...CR7201 CR7505 CR7506 SmartController CR25nn ifm_Hydraulic_32bit_Vxxyyzz LIB hydraulic POUs for R360 controllers ClassicController CR0032 ExtendedController CR0232 ifm_Hydraulic_CR0303_Vxxyyzz LIB hydraulic POUs for R360 controllers CabinetController CR0303 ifm_SafetyIO_Vxxyyzz LIB safety POUs SafetyController CR7nnn ifm_PDM_UTIL_Vxxyyzz LIB auxiliary functions PDM PDM360 CR1050 CR1051 CR1060 PDM36...

Страница 442: ...files and libraries used 442 File name Function Available for Symbols_x LIB predefined symbols PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 Segment_x LIB predefined 7 segment displays PDM360 CR1050 CR1051 CR1060 PDM360compact CR1052 CR1053 CR1055 CR1056 Further libraries on request ...

Страница 443: ...used for telex machines 1 MBd 1024 x 1024 Bd 1 048 576 Bd 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 larger data volumes It is available in different variants e g CANopen or CAN in Automation CiA CAN stack CAN stack stack of tasks for CAN data communication Category CAT Classification of ...

Страница 444: ...ge http www 3s software com CRC CRC Cyclic Redundancy Check CRC is a method of information technology to determine a test value for data to detect faults during the transmission or duplication of data Prior to the transmission of a block of data a CRC value is calculated After the end of the transaction the CRC value is calculated again at the target location Then these two test values are compare...

Страница 445: ...related system 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 Diversity In technology diversity is a s...

Страница 446: ...rference Ethernet Ethernet is a widely used manufacturer independent technology which enables data transmission in the network at a speed of 10 or 100 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 eq...

Страница 447: ...e buffer as a queue available Firmware System software basic program in the device virtually the operating system The firmware establishes the connection between the hardware of the device and the user software This software is provided by the manufacturer of the controller as a part of the system and cannot be changed by the user First fault occurrence time Time until the first failure of a safet...

Страница 448: ...trol system which depends on the correct functioning of the electric or electronic safety related system safety related systems of other technologies and external devices for risk reduction H Harm Physical injury or damage to health Hazard Hazard is the potential source of harm A distinction is made between the source of the hazard e g mechanical hazard electrical hazard or the nature of the poten...

Страница 449: ... 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 L LED LED Light Emitting Diode Light emitting diode also called luminescent ...

Страница 450: ...en 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 MTBF Mean Time Between Failures MTBF Is the expected value of the operating time between two consecutive failures of items that are maintained NOTE For items that are NOT maintaine...

Страница 451: ...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 PD...

Страница 452: ...rential part The D controller doesn t react on the control deviation but only on their speed of change PL Performance Level According to ISO 13849 1 a specification PL a e of safety related parts of control systems to perform a safety function under foreseeable conditions PLC configuration Part of the CoDeSys user interface The programmer tells the programming system which hardware is to be progra...

Страница 453: ...testability Functions are represented in a comprehensible manner for the operator on the screen navigation readability of a subsequent print of the document Use symbolic variables no IEC addresses Use meaningful variable names and comments Use easy functions no indirect addressing no variable fields Defensive programming Easy extension or adaptation of the program possible Protective measure Measu...

Страница 454: ...of a controller however is volatile and normally lost in case of power failure Reset manual The manual reset is an internal function within the SRP CS used to restore manually one or more safety functions before re starting a machine Residual risk Risk remaining after protective measures have been taken The residual risk has to be clearly warned against in operating instructions and on the machine...

Страница 455: ...uch a machine therefore has to safely prevent a failure of the safety function reliably detect a failure of the safety function in time bring the machine into a safe state in time in the event of a failure of the safety function Safety standard types The safety standards in the field of machines are structured as below Type A standards basic safety standards giving basic concepts principles for de...

Страница 456: ...el Slave Passive participant on the bus only replies on request of the master Slaves have a clearly defined and unique address in the bus SRDO Safe data is exchanged via SRDOs Safety Related Data Objects An SRDO always consists of two CAN messages with different identifiers message 1 contains the original user data message 2 contains the same data which are inverted bit by bit SRP CS Safety Relate...

Страница 457: ...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 These services are not confirmed by the p...

Страница 458: ... user cycle 170 CAN in the PDM360 158 CAN interfaces 160 CAN parameters Communication cycle 251 Create all SDOs 250 Emergency telegram 250 No initialization 250 Node ID 249 Node reset 250 Nodeguarding heartbeat settings 250 Optional device 250 Write DCF 250 CAN POUs to CANopen 242 CAN stack 443 CAN test data transmission 36 receive data 36 CAN units acc to SAE J1939 207 CAN_ENABLE 177 CAN_RECOVER ...

Страница 459: ...RAY 375 ECU 446 Edit input fields in the visualisation 396 EDS file 446 Embedded software 446 EMCY 446 EMCY error code 314 Emergency messages 431 EMV 446 Ethernet 446 EUC 446 Example detailed message documentation 209 edit controls in CR1081 88 INPUT_INT with 3 input elements 400 list of variables 267 reducing a pixel image 121 short message documentation 210 Example of an object directory 265 Exc...

Страница 460: ...of human system interaction 114 ISO 9241 11 _ Guidance on usability 115 ISO 9241 110 _ Dialogue principles 115 J1939_DM1RX 240 J1939_DM1TX 231 J1939_ENABLE 213 J1939_GETDABYNAME 217 J1939_NAME 215 J1939_RX 234 J1939_RX_FIFO 236 J1939_RX_MULTI 238 J1939_STATUS 220 J1939_TX 223 J1939_TX_ENH 225 J1939_TX_ENH_CYCLIC 229 J1939_TX_ENH_MULTI 227 Key assignment in the setup mode 89 Key LEDs programmable 1...

Страница 461: ...tions for user interfaces 104 Rectify faults and errors 414 Redundant 454 Remanent 454 Resample scale image 124 Reset all nodes of the network via CAN telegram 261 Reset of all configured slaves on the bus at the system start253 Reset manual 454 Residual risk 454 Retain variable 141 Risk 454 Risk analysis 454 Risk assessment 454 Risk evaluation 454 ro 454 RTC 455 rw 455 SAE J1939 455 Safety functi...

Страница 462: ...Default PDO mapping 266 Tab Receive PDO Mapping and Send PDO Mapping 251 Tab Service Data Objects 252 Target 457 Target file 437 TCP 457 Technical about CANopen 242 Template 457 Test Ethernet connection 48 Test Ethernet via HyperTerminal 49 Test Ethernet via PING function 48 Test rate rt 457 Test transmission of the global network variables 157 Texts 102 The object directory of the CANopen master ...

Страница 463: ... 93192 Noisy le Grand Cedex Tél 33 0820 22 30 01 ifm electronic oy 00440 Helsinki Tel 358 75 329 5000 ifm electronic Ltd Hampton Middlesex TW12 2HD Tel 44 208 213 0000 ifm electronic Monoprosopi E P E 15125 Amaroussio Tel 30 210 6180090 ifm electronic kft 9028 Györ Tel 36 96 518 397 ifm electronic s a 20041 Agrate Brianza MI Tel 39 039 68 99 982 Astragal Ltd Azur 58001 Tel 972 3 559 1660 ifm elect...

Отзывы: