Home

Modicon M340 with Unity Pro CANopen User manual

image

Contents

1. BMX P34 2010 STB Terminal block Terminal block SUB D9 Male SUB D9 Male Te 2131405 Te 2131405 ecoee ecoee Re JO E JO BMX P34 2010 Lexium 05 Terminal block Terminal block SUB D9 Male Q 03 ove 600800 21 22 23 AA IN BMX P34 2010 terminal block description Pin Symbol Description number 1 Reserved 2 CAN_L CAN_L bus line Low 3 CAN_GND CAN ground 4 Reserved 5 Reserved Optional CAN protection 6 GND Optional ground 7 _ CAN_H bus line High 8 Reserved 9 Reserved CAN external positive supply optionnal STB terminal block description Pin Symbol Description number 1 Reserved 2 CAN_L CAN_L bus line Low 3 CAN_GND CAN ground 4 Reserved 5 CAN_SHLD Optional CAN protection 190 35013944 00 November 2006 Starting the application Pin Symbol Description number 6 GND Optional ground 7 CAN_H CAN_H bus line High 8 Reserved 9 Reserved Lexium 05 terminal block description Pin Symbol Description number 21 GND CAN ground 22 CAN L CAN L bus line Low 23 CAN H CAN bus line High 35013944 00 November 2006 191 Starting the application
2. 61 How to Delete Move Duplicate a Bus Device 63 View CANopen bus in the Project 66 Device configuration 67 Ata Glance oo artery ett eo Le Bae Rte Rn RD LIN P ae ha 67 Slave functloris aoi Er cee estan ene M Peu eee d send 68 Configuration using 70 Configuration using an external tool Configuration software 76 Configuration using an external tool Manual configuration 80 Master configuration 82 Ata Glance iesu eR M x due deck EU E de ae E 82 How to access the CANopen master configuration screen 83 CANopen master configuration screen 86 Description of master configuration 5 88 Programming 91 Glance iss ne oe Boe de re ae ead ee x REC HI RA Cru 91 Objects concerning the CANopen Master 93 Ata Glanee tat TRE ER ad 93 Implicit Exchange Language Objects 94 Explicit Exchange Language Objects 105 Objects concerning the 107 Ata glance er as ERA Rud a Ae Ree RE NU AS 107
3. Slave in Stop The table below shows the words 1Wr m c 43 IWr m c 46 state Standard symbol Type Access Description Address SLAVE_STOPPED_1_16 INT R Stopped slaves from 1 to 16 Wr m c 43 SLAVE_STOPPED_17_32 INT R Stopped slaves from 17 to 32 Wr m c 44 SLAVE STOPPED 33 48 INT R Stopped slaves from 33 to 48 9oIWr m c 45 SLAVE STOPPED 49 64 INT R Stopped slaves from 49 to 63 IWr m c 46 35013944 00 November 2006 103 Programming Pre operational The table below shows the words 1Wr m c 51 IWr m c 54 slaves Standard symbol Type Access Description Address SLAVE PREOP 1 16 INT R Pre operational slaves from 1 to 16 9eIWr m c 51 SLAVE PREOP 17 32 INT R Pre operational slaves from 17 to 32 96IWr m c 52 SLAVE PREOP 33 48 INT R Pre operational slaves from 33 to 48 9eIWr m c 53 SLAVE PREOP 49 64 INT R Pre operational slaves from 49 to 63 9eIWr m c 54 Master cycletime The table below shows the meaning of status words relative to the time cycle of the master Addresses Description Meaning SIWr m c 59 Minimum master cycle time Minimum value of the CANopen master cycle time in ms SIWr m c 60 Current master cycle time Current value of the CANopen master cycle time in ms SIWr m c 61 Maximum master cycle time Maximum value of the CANopen master cycle time in ms Reset The table b
4. 35013944 00 November 2006 155 Application using Unity Pro 11 2 Developping the application At a glance Subject of this This section gives a step by step description of how to create the application using section Unity Pro What s in this This section contains the following topics Section Topic Page Creating the project 157 Configuration of the CANopen Bus 158 Configuration of the CANopen Master 162 Configuration of the equipments 164 Declaration of variables 168 Creating the program in SFC for managing the move sequence 172 Creating a Program in LD for Application Execution 176 Creating a Program in LD for the operator screen animation 178 Creating a program in ST for the Lexium configuration 179 Creating an Animation Table 182 Creating the Operator Screen 184 156 35013944 00 November 2006 Application using Unity Pro Creating the project At a glance Procedure for creating a project Developing an application using Unity Pro involves creating a project associated with a PLC Note For more information see Unity Pro online help click on then Unity then Unity Pro then Operate modes and Project configuration The table below shows the procedure for creating the project using Unity Pro Etape Action 1 Launch the Unity Pro
5. 30 35013944 00 November 2006 CANopen on BMX P34 processors Installation At a Glance BMX P34 2010 2030processors equipped with a CANopen port are mounted on BMX XBP racks fed by BMX CPS modules CANopen The CANopen processor port is equipped with a SUB D9 connection colored in connectors magenta or violet The following figure represents the CANopen connector for modules male and cables female Male connector Female connector Pin Signal Description 1 Reserved 2 CAN_L CAN_L bus line Low 3 CAN_GND CAN mass 4 Reserved 5 Reserved CAN optional protection 6 GND Optional mass 7 CAN_H CAN_H bus line High 8 gt Reserved 9 Reserved CAN External Power Supply Dedicated to the optocouplers power and transmitters receivers Optional Note CAN SHLD and CAN V are not installed on the Modicon M340 range processors These are reserved connections 35013944 00 November 2006 31 CANopen on BMX P34 processors Visual diagnostics of CANopen processors At a Glance BMX P34 processors form the Modicon M340 range are equipped with several Module Status visualization LEDs BMX P34 2010 2030 processors equipped with a CANopen port have 2 LEDs on their facade which indicate the bus status e agreen LED CAN RUN e ared LED CAN ERR In normal operation the CAN ERR LED is off and t
6. 35013944 00 November 2006 119 CANopen Debugging Description of the debug screen for standard devices The following table shows the various parts of the debugging screen and their functions Number Element Function 1 Tabs The tab in the foreground indicates the type of screen displayed In this case the debug screen Module area Contains the abbreviated title of the module Two LEDs are found in the same area agreen LED indicating that the device is operational ON OFF ared LED indicating an emergency ON OFF Channel area This area allows you to select the communication channel to be debugged By clicking on the device you display the tabs e Description gives the characteristics of the built in CANopen port Inputs outputs objects allows pre symbolizing of the input output objects e CANopen allows read write of SDO e Defaults accessible in online mode only By clicking on the channel you display the tabs e PDO enables you to configure the PDOs e Configuration enables you to declare and configure the CANopen master Debug accessible in online mode only e Error control accessible in online mode only This area also has an LED indicating the channel status General parameters area Recalls the function associated with the channel Parameters in progress area This area displays the information of an inputs outputs datum for
7. 1 Erroa f Transmit 961 7 PDO Tr Ty Inhibi Even Symbol Topo Addr 96M CO Index El Wea Variables Dipgital8 IW 3 2 0 0 MW184 6000 01 Display only umapped variables Digital 8 IW 3 2 0 0 MW185 6000 02 gt gt rameter Name ind Island Diagnostics 4000 00 Island Diagnostics 4001 00 Configured Nodes 1 4002 01 Configured Nodes 3 4002 02 Configured Nodes 4 4002 03 Configured Nodes 4002 04 Configured Nodes 8 4002 05 Configured Nodes 9 4002 06 Receive Q Configured Nodes T 4002 07 5 Configured Nodes 1 4002 08 PDO Tr Ty Inhibi Even Symbol Topo Adar M CO Index Optional Nodes 1 400301 E lex Optionnal Nodes 3 4003 02 a Digital8 6QW3 20 0 MW559 6200 01 Optional Nodes 4 4003 03 Optionnal Nodes 6 4003 04 Optionnal Nodes 8 4003 05 Optionnal Nodes 9 4003 06 Optionnal Nodes 1 4003 07 Optionnal Nodes 1 4003 08 Nodes with Error 16 4004 01 Nodes with Error 32 4004 02 Nodes with Error 48 4004 03 Nodes with Error 64 4004 04 LN gt Click on the Error control tab and set the Node Heartbeat producer time to 300ms Click on the w button in the toolbar to validate the co
8. 1 164 Declaration of 168 Creating the program in SFC for managing the move sequence 172 Creating a Program in LD for Application 176 Creating a Program in LD for the operator screen animation 178 Creating a program in ST for the Lexium configuration 179 Creating an Animation Table 182 Creating the Operator 5 184 35013944 00 November 2006 5 Chapter 12 Appendices Appendix A Appendix B Appendix C Appendix D Glossary Index Starting the Application 187 Execution of Application in Standard 187 Shee wx Ex ecc sra de ER x RR RC E ge ec mur m mah E wih 195 Ata glane ereer csse pug ua EY Ive ER ue e ies 195 CANopen Master local object dictionary entry 197 Ata glances o ais alate Hs eon eee ish a gee IURE RACINE ee ENIM EUR 197 Object Dictionary entries according Profile 05301 198 Object Dictionary entries according Profile 05302 203 Midrange Manufacturer Specific Object Dictionary Entries 205 Relation between PDOs and STB variables 213 STB island configuration 213 Example o
9. 28 35013944 00 November 2006 Hardware implementation of BMX processors P34 2 At a Glance Aim of this This chapter presents BMX P34 processors equipped with a CANopen port as well Chapter as their implementation What s in this This chapter contains the following topics 2 Chapter Topic Page Description of processors BMX P34 2010 2030 30 Installation 31 Visual diagnostics of CANopen processors 32 35013944 00 November 2006 29 CANopen on BMX P34 processors Description of processors BMX P34 2010 2030 At a Glance Each PLC station is equipped with a BMX P34 processor There are two processors in the Modicon M340 range that have a CANopen port e The BMX P34 2010 which also has a USB port and serial port e The BMX P34 2030 which also has a USB port and Ethernet port BMX P34 processors are simple format and have a slot for a SD Card memory card The following figures present the forward faces of BMX P34 2010 2030 BMX P34 2010 BMX P34 2030 Number Designation Display panel USB Port SD Card slot SerialPort Ethernet Port CANopen Port wo mp These processors are bus masters they cannot function as slaves They are linked by SUB D 9 connector points and allow the connection of slave devices which support the CANopen protocol Note There is only BMX P34 master by bus
10. DCF for TwidoSoft CoDeSys etc Address Type v O EDS for SyCon etc Topological Adress Connection Point GSD for SyCon etc Rack Slot SCY for PL7 TXT for Concept r Memory Address 4 Input XSY for Unity Pro Output Help Cancel 6 Click OK to confirm Once the file is exported launch Unity Pro and open the project in which the island will be used 8 Add a STB device to the Bus Editor see How to Add a Device on the Bus p 61 9 Right click on the STB device then click on Open the module 10 In the PDO tab click the button Import DCF 11 Confirm by clicking OK The PDOs are configured automatically 35013944 00 November 2006 77 CANopen Configuration Powersuite Software UNILINK Software Note The modification of the topology of an island requires recommencing this procedure For more information about the STB configuration please refer to the STB user manual The PowerSuite software development is a tool meant to implement the following Altivar speed drives It should be used to configure an ATV31 61 71 Uora Lexium 05 device Powersuite 2 Various functions are integrated for being used on implementing phases such as e configurations preparations e setting to work e maintenance The configuration is direct
11. Application using Unity Pro Creating a program in ST for the Lexium configuration At a glance This section executes the different steps of the Lexium configuration This section is only active when the step Lexium_Configuration is reached in the grafcet see Illustration of the Move_Sequence section p 174 Programming The programming structure is as follow structure Step Step description number 0 Starting command of the Lexium 10 If the Lexium is in Run State then it switch in Homing mode using a WRITE VAR function 20 If the result of WRITE VAR is conclusive then go to step 30 30 Homing method definition using a WRITE VAR function For more information about the reference movement method please refer to the Lexium user manual 40 If the result of WRITE VAR is conclusive then go to step 50 50 Starting of the Homing method 60 The Homing is done 70 The Lexium switches in Positionning Mode using a WRITE VAR function 80 If the result of WRITE VAR is conclusive then the Lexium configuration is done Note For a correct variable declaration click on Tools Project Settings Language extension then check Directly represented array variables and Allow dynamic arrays Data types jv Allow usage of EBOOL edge J Allow INT DINT place of ANY Allow bit extraction of INT amp WORD Directly represented array variables E Allow dynamic arrays ANY
12. Producer Heartbeat Time an Hearbeat event is created and the device is in default If a M340 Master PLC is used on the CANopen bus all the nodes using the Heartbeat control mode are producers The master surveys the transmission and the reception of the messages and it s the only receiver of the Heartbeat messages sent by the nodes The Master can send Heartbeat messages to the slaves The Master Heartbeat producer time is set at 300 ms and is not modifiable 74 35013944 00 November 2006 CANopen Configuration e Node guarding Node Guarding is the monitoring of network nodes The NMT Network Management master sends an RTR Remote Transmission Request at regular intervals this period is called Guard Time and the concerned node must answer in a given time lapse the Node Life Time equals the Guard Time multiplied by the Life Time Factor The Life Time value is set at 2 and is not modifiable Note Some devices only support Heartbeat or Node Guarding For devices which support Heartbeat and Node Guarding the only choice in Unity Pro is the Heartbeat mechanism 35013944 00 November 2006 75 CANopen Configuration Configuration using an external tool Configuration software At a Glance To configure a STB NCO 2212 a Lexium 05 15 an IcLA a Tesys U or an ATV61 71 device it is necessary to use an external tool Advantys Configuration Software for the STB Powersuite 2 Software for
13. 84 35013944 00 November 2006 CANopen Configuration Step Action 3 The master configuration screen appears 0 0 CANopen CANopen comm head E CANopen communication module 3 CANopen comm head H Config E Channel2 Inputs Outputs 4 No of words MW zl Maintain Reset Index of 1st MW 0 zl e No of words MW Nb of bits 95M 2 E Index of lst SMW 32 i Index of first M 0 z Y Nb of bits M 32 4 Index of first M 32 Bus parameters Funchone Transmission speed 250 v kBaud SYNC message COB ID 128 CANopen v ask MAST v SYNC message period 100 ms 35013944 00 November 2006 85 CANopen Configuration CANopen master configuration screen At a Glance This screen is used to declare and configure the master of the CANopen network from a Modicon M340 PLC station Illustration The configuration screen of the master is as follows 1 0 0 CANopen CANopen comm head 2 CANopen communication module CANopen comm head Config A B Channel 2 r Inputs Outputs 34 No of words MW 32 Maintain Reset Index of 151 0 3 No of words MW 32
14. Advantys STB The table below shows the procedure for configuring the Lexium 05 configuration Step Action 1 Shut down the STB 2 Using the rotary switches located on the front of the CANopen NIM configure the baud rate The rotary switches are positionned as followed 5 500 kbits s Not Used 1 1 1 TENS 0 4 Baud 2 3 4 5 6 9587 ONES Start up then shut down the STB Using the rotary switches configure the address of the STB For example is the node number of the equiment is 54 the rotary switches are positionned as followed 9587 ONES Start up the STB and press the reset button located on the STB NCO module during for 5 seconds The STB is configured automatically 192 35013944 00 November 2006 Starting the application Lexium configuration The table below shows the procedure for configuring the Lexium 05 Step Action 1 Start up the Lexium 05 RDY is displayed on ther interface 2 Press Enter 3 Press the down arrow key until COM is displayed Then press Enter 4 Press the down arrow key until CoAD CANopen Address is displayed Then press Enter 5 Using the arrow keys configure the node number Then press Esc Press the down arrow key until CoBD CANopen Baud Rate is displayed Then press Enter Using the arrow keys configure the baud rate 500 Then pre
15. gt Client Tx Unsigned32 580H Node ID 1280 1 Client SDO RECORD 0 Number of entries Unsigned8 COB ID Client gt Server Rx Unsigned32 2 COB ID Server gt Client Tx Unsigned32 3 Node ID of the Server SDO Unsigned8 1281 2 Client SDO RECORD 0 Number of entries Unsigned8 1 COB ID Client gt Server Rx Unsigned32 2 COB ID Server gt Client Tx Unsigned32 3 Node ID of the Server SDO Unsigned8 1282 3 Client SDO RECORD 0 Number of entries Unsigned8 1 COB ID Client gt Server Rx Unsigned32 2 COB ID Server gt Client Tx Unsigned32 3 Node ID of the Server SDO Unsigned8 1400 1 Receive PDO RECORD 0 Largest sub index supported Unsigned8 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Unsigned16 4 Unsigned8 5 Event timer Unsigned16 1401 2 Receive PDO RECORD 0 Largest sub index supported Unsigned8 1 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Unsigned16 4 Unsigned8 5 Event timer Unsigned16 14FF 256 Receive PDO RECORD 0 Largest sub index supported Unsigned8 35013944 00 November 2006 199 CANopen Master object dictionary Index Sub Description Object type Data type Comments Hex index 1 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Unsigned16 4 Unsigned8 5 Event timer Unsigned16 1600 1 Receive PDO Mapping 0 Number of mapped application Uns
16. 255 0 100 163281 Status lexium 963 100 MW16 6041 EAE UT i Posil lexium ID 3 1 0 0 0 MW8 6064 a 3008 01 4 0 3 25 0 10 2 act 3009 01 288 Status lexium IW 3 1 0 0 MW16 6041 ANA2 act 3009 05 f lexium ID 3 1 0 0 0 MW10 606C PLCopenR x1 3018 05 PDO4 254 0 0 PLCopenRx2 301B 06 oe s PLCopenTx1 301B 07 PLCopenT x2 301B 08 Receive Q J OGactivate 301B 09 PDO Tr Ty Inhibi Even Symbol Topo Addr M CO Index EN A ea CUR target 3020 04 Contr lexium QW 3 1 0 0 MW425 6040 SPEEDn target 3021 04 PDO 2 255 16 381 PTPp_abs 3023 01 Contr lexium QW 3 1 0 0 MW425 6040 3023 03 p_targe 05 E m lexium QD 3 1 0 0 MW414 607A orbs react p e B GEARdenom d g Contr lexium QW 3 1 0 0 MW425 6040 GEARnum 302604 aT m lexium QD 3 1 0 0 MW418 60FF Controlword 6040 00 C Target StatusWord 6041 00 PDO 4 254 2 position actual valu 6063 00 4 e Transmit PDOs information transmitted by the Slave to the Master e Receive PDOs information received by the Slave from the Master e Variables variables that can be mapped to the PDOs To assign a variable to a PDO drag and drop the variable into the desired PDO No varia
17. 32 Index of first M 32 2 The fallback mode maintain reset allows to define the behaviour of the device when the CPU is in STOP or in HALT e Maintain maintain of outputs values are kept e Reset reset of outputs values are set to O To configure the outputs it is necessary to indicate as for the inputs the word and bits table that will contain the values of the bus slave outputs a number of words 96MW from 1 to 32 464 the address of the first word from 0 to 32 463 the number of bits 76M from 1 to 32 634 the address of the first bit from 0 to 32 633 Note The word tables and bit tables are found in the PLC internal memory Any crossover between two areas of each table is prohibited The bits area for the inputs cannot overlap the bits area for the outputs The words area for the inputs cannot overlap the words area for the outputs UNEXPECTED BEHAVIOUR OF APPLICATION Take every precaution at the installation to have the outputs position safe in case of CANopen bus stopping When the CANopen bus stops the behaviour is specific to the equipements connected See the user manual of those equipments Failure to follow this instruction will result in death or serious injury 35013944 00 November 2006 89 CANopen Configuration Bus parameters The figure below illustrates the bus parameters configuration area Bus parameters Transmission spee
18. 40 IF NOT MW251 0 Test WRIT MW250 New_Setpoin Lexium_Conf END_IF D_IF 50 Trigger h New_Setpoint Lexium Config S 60 Homing do IF Target Reac New Setpoint Lexium Config END IF 70 Operating index subindex SMW450 1 SMW352 5 SMW353 1 WRITE VAR ADD SMW350 4 De Lexium Config S 80 Test WRIT IF NOT MW351 0 MW350 IF Configurati END IF END IF D_CAS m tep 40 E_VAR function result 0 THEN test activity bit THEN correct exchange 2 0 ig_Step 50 oming 1 tep 60 ne hed AND Homing_Done THEN 0 Step 70 mode Positionnig 16 00006060 finition of Positionning method Time out 500ms Length 1 byte 0 0 2 55 SDO index subindex O0 MW450 1 tep 80 VAR function result 0 THI THI EN test activity bit EN correct exchange 1 on 35013944 00 November 2006 181 Application using Unity Pro Creating an Animation Table At a glance Procedure for Creating an Animation Table An animation table is used to monitor the values of variables and modify and or force these values Only those variables declared in Variables amp FB instances can be added to the animation table Note For more information consult the
19. Loading test of CANopen firmware in process CAN ERR Bus stopped Initialization Simple at Invalid No error The CANopen red The CAN process least one of the configuration component controller has error counters cannot start status BUS has attained or OFF over or exceeded the alert level Double Monitoring fault Nodeguarding or Heartbeat 34 35013944 00 November 2006 Presentation of CANopen devices At a Glance Subject of this This section presents the different CANopen devices Section What s in this This chapter contains the following topics 2 Chapter Topic Page CANopen Devices 36 CANopen motion command devices 37 CANopen Input Output devices 40 Other devices 43 35013944 00 November 2006 35 CANopen slaves CANopen Devices At a Glance Motion command devices Input output devices Other devices The devices that you can connect to a CANopen bus and that can be configured in Unity Pro V3 0 are grouped according to their functions e motion command devices e input output devices e other devices Note Only devices of the hardware catalog can be used with Unity Pro Motion command devices enable you to control motors These devices are Altivar Lexium IcLA e Osicoder The Input Output modules function as remote modules These devices are Tego Power devices Advantys FTB A
20. unique digital signal The basic principle of an absolute rotary encoder is the optical sampling of a transparent code disc which is fixed with the driving shaft The following figure gives an example of an Osicoder device 35013944 00 November 2006 39 CANopen slaves CANopen Input Output devices At a glance Tego Power devices The Input Output modules function as remote modules These devices are Tego Power devices Advantys FTB Advantys OTB Preventa devices Tego Power is a modular system which standardizes and simplifies the implemen tation of motor starters with its pre wired control and power circuits In addition this system enables the motor starter to be customized at a later date reduces maintenance time and optimizes panel space by reducing the number of terminals and intermediate interfaces and also the amount of ducting The following figure gives an example of a Tego Power device 40 35013944 00 November 2006 CANopen slaves Advantys FTB The Advantys FTB dispatcher is composed of several input outputs that allow devices captors and activators to be connected Note For FTB 1CN16CMO operating is guaranteed from the minimum firmware version V1 1 The following figure gives an example of an Advantys FTB device Advantys OTB An Advantys OTB device enables you to constitute discrete input output islands devices max 132 channels in boundaries or
21. 1 0 0 0 16 MW16 GEARnum 3026 04 QD 3 1 0 0 0 10 MW10 Controlword 6040 00 Statusword 6041 00 position actual valu 6063 00 a 2 There is an equivalence between topologic addresses and internal variables For example in the figure above the topologic address 1WN3 1N0 0 0 16 is equivalent to amp 1 6 for the PDO 1 A PDO can be enabled or disabled According with the EDS file some PDOs are already mapped 108 35013944 00 November 2006 Programming A double click on the transmission type column displays the following window PDO 4 r Transmission type Synchronous acyclic 0 Synchronous cyclic 1 240 fo 3 x Sync period Asynchronous Manuf Event 254 Asynchronous Profile Event 255 r Properties Inhibit time 0 65535 21 10015 Event timer 0 65535 0 H ms This window allows to configure e the transmission type e synchronous acyclic a transmission type of 0 means that the message shall be transmitted synchronously with the SYNC message but not periodically according with the value e synchronous cyclic a value between 1 and 240 means that the PDO is transmitted synchronously and cyclically the transmission type value indicating the number of SYNC messages between two PDO transmissions e asynchronous PDO the transmission type 254 means that the PDO is transmitted asynchronous It is fully depending on the implemen
22. ARRAY XXX Directly represented array variables 35013944 00 November 2006 179 Application using Unity Pro ST Program The example is programmed in ST structured litteral language The dedicated section is under the same master task MAST CASE exium_Config_Step OF 0 Lexium is in Ready to switch on position IF Lexium statusword 0 THEN Lexium controlword Lexium operation enable Lexium Config Step 10 END IF 10 Lexium is in Run position IF Lexium statusword 2 THEN Operating mode Homing index subindex 16400006060 CANopen parameter address SMW200 6 SMW162 5 Definition of the Lexium Function Homing Time out 500ms SMW163 1 Length 1 byte WRITE VAR ADDM 0 0 2 55 SDO index subindex 0 MW200 1 W160 4 oe Lexium Config Step 20 END IF 20 Test WRITE VAR function result IF NOT MW160 0 THEN test activity bit IF MW161 20 THEN correct exchange Lexium Config Step 30 END IF 1 z D IF 30 Homing method set dimensions index subindex 164 00006098 MW150 235 SMW252 5 SMW253 1 Definition of Homing method Time out 500ms Length 1 byte WRITE VAR ADDM 0 0 2 55 SDO index subindex 0 MW150 1 MW250 4 180 35013944 00 November 2006 Application using Unity Pro Lexium Config S
23. Island Diagnostics 4000 00 Island Diagnostics 1 4001 00 Configured Nodes 1 4002 01 Configured Nodes 3 4002 02 Configured Nodes 4 4002 03 Configured Nodes 6 4002 04 Configured Nodes 8 4002 05 Configured Nodes 9 4002 06 Receive Q Configured Nodes 1 4002 07 7 Configured Nodes 1 4002 08 Tr Inhibi Even Symbol Topo Addr CO Index Optional Nodes 1 400301 Optionnal Nodes 3 4003 02 QW 3 2 0 0 MW559 6200 01 Optionnal Nodes 4 4003 03 Optionnal Nodes 6 4003 04 Optionnal Nodes 8 4003 05 Optionnal Nodes 9 4003 06 Optionnal Nodes 1 4003 07 Optionnal Nodes 1 4003 08 Nodes with Error 16 4004 01 Nodes with Error 32 4004 02 Nodes with Error 48 4004 03 Nodes with Error 64 4004 04 4 5 On the right side of the window there s the list of STB mapped or unmapped variables The indexes are the same as Advantys Configuration Software Variables can be found quickly and easily Drag and drop the variables to the right PDO to configure the STB island 35013944 00 November 2006 215 Relation between PDOs and STB variables 216 35013944 00 November 2006 Example of SDOs access At a glance Subject of this chapter What s in this Chapter This chapter present some examples for SDOs access using e The functions READ_VAR and WRITE_VAR e The request Modbus FC43 0xD This cha
24. Unity Pro online help click then Unity then Unity Pro then Operate modes then Debugging and adjustment then Viewing and adjusting variables and Animation tables The table below shows the procedure for creating an animation table Step Action 1 In the Project browser right click on Animation tables then click on New Animation Table The edit window opens 2 Click on first cell in the Name column then on the button and add the variables you require 182 35013944 00 November 2006 Application using Unity Pro Animation Table Created for the Application The following screen shows the animation table used by the application Table r1 Modify Force 4 X HH Name Value Type ww Comment Ed amp Mobile at position B BOOL Mobile at position C BOOL amp Mobile at Start Position BOOL 4 Run BOOL Stop BOOL New Setpoint BOOL Target Reached BOOL 4 Lexium Target position Lexium Position actual value DINT Lexium controlword INT 1 7 4 Lexium Statusword INT BusMaster COMM STS INT t BusMaster CAN STS INT t BusMasterEVT STS INT For more information about the creation of the Lexium and the BusMaster objects see Declaration of I O objects p 166 Note The animation table is dynamic only in online mode display of variable
25. all the channels It is divided into 3 columns e the Parameter column displays the inputs outputs objects the unmarked objects on which the inputs outputs datum is mapped the Label column shows the name of the inputs outputs datum e the Value column shows the value of the inputs outputs datum Note For standard device the values are displayed in the following formats e decimal default e hexadecimal e binary To select the format right click on a value in the debug screen then choose the display mode For devices with boolean vision FTB the value can be forced 120 35013944 00 November 2006 CANopen Debugging Note In the Value column when a variable appears in red it shows that it s out of range The range of the variable can be seen by clicking on it The range is display in the status bar 35013944 00 November 2006 121 CANopen Debugging 122 35013944 00 November 2006 Diagnostics At a Glance Aim of this This section introduces the diagnostic means of the CANopen bus Chapter What s in this This chapter contains the following topics 2 Chapter Topic Page How to perform a diagnostic 124 Master Diagnostics 125 Slave diagnostics 126 35013944 00 November 2006 123 Diagnostics How to perform a diagnostic At a Glance Procedure How to check IW0 y 2 You can start by usi
26. desired then click on Paste Result the New Device screen appears New Device Help Topologic address 5 62 E Cancel Node identification 5 Enter the number of the destination connection point Confirm the new connection point by pressing OK 35013944 00 November 2006 65 CANopen Configuration View CANopen bus in the Project browser At a Glance The CANopen bus is shown is the configuration directory in the project browser The number of the bus is calculated automatically by Unity Pro Note The value of the bus number cannot be modified The following illustration shows the CANopen bus and slaves in the project browser Project Browser fa Structural View Station B 3 k E 0 PLC Bus 0 0800 perz CANopen lerrr SerialPort karea 1 BMX AMI 0410 EEEN 2 BMX EHC 0200 t 3 DDI 1603 l 0 BMX P34 2010 D Number of CANopen bus not modifiable f T CANopen El se 1 drop Ap o 0 0 ATV31 V1 1 E O 2 CANopen drop i 0 0 Lexiumos Slave address Slave address bnt 7j Derived Data Types HIN 7j Derived FB Types E 7 Variables amp FB instances Er Sane 7 Communication 42 Movement 66 35013944 00 Novem
27. from PDO exchanges IMAGE on the CANopen bus This section is managed by the CANopen stack The inputs are copied in the user application memory at the start of each task cycle and the outputs at the end of each task cycle R REAL Real number 35013944 00 November 2006 233 Glossary RPDO Received PDO S SDO Service Data Object peer to peer communication with access to Dictionary Object of a CANopen bus element SSDO SDO Server STB Small Terminal Block SYNC Synchronisation Object T TPDO PDO Transmission U UDINT Unsigned double integer Unsigned double integer UINT Unsigned integer Unsigned integer 234 35013944 00 November 2006 Index Bus configuration 88 Presentation 11 CANopen Device Add 61 Deletion 63 Duplicate 63 Move 63 CANopen Devices 36 CANopen master configuration screen 86 CANopen Principles 14 Communication Configuration 53 Debugging 115 Configuration Access to the bus configuration screen 57 Access to the master configuration screen 83 Bus configuration 56 Bus editor 59 CANopen slave inputs 88 CANopen slave outputs 88 Device configuration 67 External tool 76 80 General points 55 Master configuration 82 Conformity Class 26 D Debug screen Access 116 Debugging screen of the CANopen master 117 Description of processors BMX P34 2010 2030 30 Diagnostics 123 Master Diagnostics 125 Slave diagnostics 126 E Em
28. functions The explicit exchange of message on a CANopen bus is done by read write protocol SDO There are 3 ways of accessing SDO e using communication functions READ VAR and WRITE VAR e using the Unity Pro debugging screen e using the request ModBus FC43 0xD A DANGER RISK OF DOWNGRADED OPERATIONS To modify a variable check the command SDO in the documentation of the corresponding CANopen device Failure to follow this instruction will result in death or serious injury It is possible to access SDOs using the communication functions READ_VAR and WRITE_VAR Note It is possible to send up to 16 READ_VAR WRITE_VARs simultaneously Only one SDO is exchanged at the same time on the bus It is necessary to await the end of the preceding exchange to begin a new exchange The end of exchange polling is carried out at each task cycle so there is one SDO exchange for each task cycle For more information about the use of the communication function see Communication functions exemple p 218 112 35013944 00 November 2006 Programming Unity Pro SDO objects allow the access to the variables In online mode the CANopen screen see Slave diagnostics p 126 allows access to the various device objects in read write mode The CANopen screen is brought up in the following manner IcIAN065 based on profile D 301V4 01 and DSP402V2 0 BLICLAN65 0100E eds 1 l Descriptio
29. i Homing_Done BOOL E index subindex DINT 1 4 Lexum Enable INT 55 4 4 Lexium operation enable INT 15 1 Mobile at Position A BOOL W 3 2 0 0 0 167 7 Mobile at Position B BOOL W 3 2 0 0 0 167 6 Mobile at Position C BOOL 961W3 210 0 0 167 5 4 Mobile at Start Position BOOL 961W3 210 0 0 167 4 49 Mobile In Progress BOOL New SetPoint BOOL QW 3 1 0 0 0 25 4 2 Operation Done BOOL L 49 Position A DINT 1000 Position B DINT 2000 Position C DINT 4000 1 Run BOOL Sequence Number INT Start Configuration EBOOL Stop BOOL Target Reached BOOL IW 3 1 0 0 0 16 10 t Description of e The first four Boolean variables are assigned to the four discrete inputs of the variables STB DDI 3420 module assignment e New Setpoint is assigned to the Lexium 05 control bit A positive transition of this bit triggers a new positioning e Target Reached is assigned to the Lexium 05 status bit which is set to 1 when the target is reached 188 35013944 00 November 2006 Starting the application CANopen bus The CANopen bus is connected as follow wiring BMX P34 2010 AdvantysSTB L Note The Lexium 05 is at the end of the CANopen Bus Set the Terminating resistor CAN switch to 1 35013944 00 November 2006 189 Starting the application The assignment of the pins connectors is as follow
30. messages via the high priority queue Bit 8 1 Indicates the task cycle is faster than the CANopen master cycle outputs can be overwritten To avoid overwrite you are advised to have a longer task cycle time that the CANopen cycle The cycle values are available in the words SIWr m c 59 IWr m c 61 96 35013944 00 November 2006 Programming Addresses Description Bit meaning IWr m c 1 Status of CANopen Master 0x00 INIT The CANopen master is not initialized This corresponds to the INITIALISATION status of the CANopen module In this state the CANopen master cannot communicate with the network 0x40 RESET The CANopen master is configures as master during NMT startup The object dictionary of CANopen master can be configured by SDOs via the CAN bus and the interface of the SDO command The application has access rights to read write to the object dictionary via the SDO command The initialization of network manager has not yet started 20x60 NET INIT Starting according to CIA DSP 302 The CANopen master is checking the allocation of slaves 20x61 NET RESET The network is reinitialized by the command Reset communication all nodes 20x62 NET WAIT The CANopen master is waiting for the modules to be able to run the command Reset communication 0x64 BOOT CONF The CANopen master is running the individual initialization of modules according to CIA DSP 302 0x8x CLEAR Th
31. number of connections and the type of cable used limit the length of a segment without a repeater Resistance Node 16 Node 32 Node 64 Large section 33 575m 530m 460 m cable AWG 18 AWG cable 22 70 O km 270m 250m 215m Small section 93 Q km 205m 185m 160m cable 88 215m 200 170 AWG 24 AWG cable 26 157 Q km 120m 110m 95m 24 35013944 00 November 2006 Overview of CANopen communication Drop lengths Length limitations concerning stubs have to be taken into account and are fixed by the following parameters Baud rate 1 Mbit s 500 Kbit s 250 Kbit s 125 Kbit s 50 Kbit s 20 Kbit s L max 1 0 3m 5m 5m 5m 60m 150m XL max local 0 6 10 10m 10m 120m 300 m star 2 Minimum 6m 6m 6m 72m 180 m Interval 0 6xXL local 3 XL max 1 5m 30 m 60 m 120 m 300 m 750 m on all bus 1 Lmax Maximum length for one stub 2 local star Maximum cumulative length of stubs in the same point when using a multi port TAP creating a local star 3 Minimum interval Minimum distance between two TAP Value for a maximum length of derivation in the same point Could be computed case by case for each derivation minimum interval between two derivations is 60 of the cumulative length of derivations at the same point 4 ZLmax on all bus Maximum cumulative length of stubs on all the bus For more details consult t
32. the bit is equal to 1 the slave is configured and can be started The node number corresponds to the number of the bit 1 Slaves with The table below shows the words IWr m c 19 IWr m c 22 configuration faults Standard symbol Type Access Description Address SLAVE FLT 1 16 INT R Slaves with configuration faults from 1 to 16 96IWr m c 19 SLAVE FLT 17 32 INT R Slaves with configuration faults from 17 to 32 96IWr m c 20 SLAVE FLT 33 48 INT R Slaves with configuration faults from 33 to 48 IWr m c 21 SLAVE_FLT_49 64 INT R Slaves with configuration faults from 49 to 63 IWr m c 22 If the bit is equal to 0 the assigned slave corresponds to the configuration If the bit is equal to 1 the assigned slave does not correspond to the configuration The node number corresponds to the number of the bit 1 35013944 00 November 2006 99 Programming Faulty slaves The table below shows the words IWr m c 27 IWr m c 30 Standard symbol Type Access Description Address SLAVE EMCY 1 16 INT R Faulty slaves from 1 to 16 9eIWr m c 27 SLAVE EMCY 17 32 INT R Faulty slaves from 17 to 32 9 6IWr m c 28 SLAVE EMCY 33 48 INT R Faulty slaves from 33 to 48 IWr m c 29 SLAVE_EMCY_49 64 INT R Faulty slaves from 49 to 63 IWr m c 30 If the bit is equal to 0 the slave is error free If the bit is equal to 1 the slave has an error The node number corresponds to the nu
33. type Data type Comments Hex index 4205 Additional Master Information RECORD 0 Number of entries Unsigned8 ro 1 Coupler CPU type Unsigned8 rw 2 CAN baudrate table index Unsigned8 ro 3 Highest used Node ID Unsigned8 ro 4 Number of used RxPDOs Unsigned16 ro 5 Number of used TxPDOs Unsigned16 ro 6 Number of mapped objects PI input Unsigned16 ro 7 Number of mapped objects PI output Unsigned16 ro 8 Covered bytes by the concise DCF Unsigned8 ro 9 Byte size of the concise DCF buffer Unsigned16 ro 10 Configuration signature Unsigned16 rw 11 Control Unsigned16 rw Access type ro read only rw read write 210 35013944 00 November 2006 CANopen Master object dictionary Additional Slave The table below presents the Object Entry 4250 Additional Slave Assignment Assignment Index Sub Description Object type Data type Comments Hex index 4250 Additional Slave Assignment ARRAY 0 Number of entries Unsigned8 1 Boot behaviour for Node ID 1 Unsigned8 127 Boot behaviour for Node ID 127 Unsigned8 Bit 0 0 Bootup according DS 302 Bit 1 2 1 Bootup do not overwrite config parameter 35013944 00 November 2006 211 CANopen Master object dictionary 212 35013944 00 November 2006 Relation between PDOs and STB variables B STB island configuration At a glance Using the COBid it S possible to established a link between PDOs and STB variables STB is
34. zl 3 Nb ofbis 4M 7 St 2 2 ndex of 15 Index of first M Nb of bits M 32 Index of first M 32 E Bus parameters Function Transmission speed 250 v kBaud CANopen SYNC message COB ID 128 4 3 SYNC message period 100 ms ask MAST v 5 86 35013944 00 November 2006 CANopen Configuration Elements and functions The table below describes the different areas which make up the master configuration screen Read Number Function 1 Tab The tab in the foreground indicates the type of screen displayed In this case it is the configuration screen Module This area is made up of the abbreviated heading of the processor equipped with a CANopen port Channel This zone allows you to select the communication channel to be configured By clicking on the device you display the tabs e Description gives the characteristics of the built in CANopen port e Inputs outputs objects allows pre symbolizing of the input output objects By clicking on a channel you display the tabs Config enables you to declare and configure the CANopen master e Debug accessible in online mode only e Fault accessible in online mode only General parameters This field enables you to choose the communication function non modifiable e associate the CANopen bus to an application task e MAST which is the master task e FAST which is the rapid task T
35. 01 Dictionary entries Index Sub Description Object type Data type Comments Hex index 1000 Device Type VAR Unsigned32 0x000F 0191 1001 Error Register VAR Unsigned8 1005 COB ID SYNC VAR Unsigned32 1006 Communication Cycle Period VAR Unsigned32 1007 Synchronous Window Length VAR Unsigned32 1008 Manufacturer Device Name VAR String BMX CPU 20x0 1009 Manufacturer Hardware Version VAR String MIDRANGE BASIC 100A Manufacturer Sofware Version VAR String COMM FW 01 xx 1012 COB ID Time Stamp Message VAR Unsigned32 1016 Consumer Heartbeat Time ARRAY 0 Number of entries 64 Unsigned8 1 Consumer Heartbeat Time Unsigned32 Unsigned32 64 Unsigned32 1017 Producer Heartbeat Time VAR Unsigned16 1018 Identity Object RECORD 0 Number of entries Unsigned8 4 1 Vendor ID Unsigned32 0x0600 005A 2 Product Code Unsigned32 0x3300 FFFF 3 Revision Number Unsigned32 Oxyyyy xxxx 4 Serial Number Unsigned32 0x0 Unsigned32 1020 Verify Configuration ARRAY 0 Number of entries 2 Unsigned8 1 Configuration date Unsigned32 2 Contiguration time Unsigned32 1200 1 Server SDO RECORD 0 Number of entries Unsigned8 198 35013944 00 November 2006 CANopen Master object dictionary Index Sub Description Object type Data type Comments Hex index 1 COB ID Client gt Server Rx Unsigned32 600H Node ID 2 COB ID Server
36. 13 14 15 Unsigned32 206 35013944 00 November 2006 CANopen Master object dictionary Nd_asf The table below presents the Object Entry 4103 Nd_asf Index Sub Description Object type Data type Comments Hex index 4103 Nd_asf ARRAY 0 Number of entries Unsigned 1 Nd_asf 0 1 2 3 Unsigned32 2 Nd_asf 4 5 6 7 Unsigned32 3 Nd_asf 8 9 10 11 Unsigned32 4 Nd_asf 12 13 14 15 Unsigned32 Nd_oper The table below presents the Object Entry 4104 Nd_oper Index Sub Description Object type Data type Comments Hex index 4104 Nd_oper ARRAY 0 Number of entries Unsigned8 Nd oper 0 1 2 3 Unsigned32 2 Nd oper 4 5 6 7 Unsigned32 3 Nd oper 8 9 10 11 Unsigned32 4 Nd oper 12 13 14 15 Unsigned32 Nd stop The table below presents the Object Entry 4105 Nd stop Index Sub Description Object type Data type Comments Hex index 4105 Nd_stop ARRAY 0 Number of entries Unsigned8 1 Nd stop 0 1 2 3 Unsigned32 2 Nd stop 4 5 6 7 Unsigned32 3 Nd stop 8 9 10 11 Unsigned32 4 Nd stop 12 13 14 15 Unsigned32 35013944 00 November 2006 207 CANopen Master object dictionary Nd_preop The table below presents the Object Entry 4106 Nd_preop Index
37. 192218321 1521183211832318321 153081632110852316924 2132 SY 2 2 2 LI This window represents an I O image overwiev while offline The variable indexes are the same as for Unity Pro Software It allows to find the content of PDO quickly and easily 5 When the configuration is over click on File Export to export the island in DCF format which will be imported in Unity Pro 214 35013944 00 November 2006 Relation between PDOs and STB variables Configuration The procedure to configure a STB island using Unity Pro Software is as follow using Unity Pro Software Step Action 1 In the Project browser double click on Configuration then 3 CANopen 2 In the CANopen window double click on the Advantys STB representation The STB configuration window opens 3 In Function zone select Autoconf Function Autoconf Y 4 Click on the PDO tab to see the PDO configuration the variables and their topological addresses H Errorcontrol Config PDO Tr Ty Inhibi Even Symbol Topo Addr 9M CO Index 34M Variables 3 Digital 8 IW 3 2 0 0 MW 184 6000 01 Display only umapped variables Digital 8 IW 3 2 0 0 MW185 6000 02 TParameter Name ind
38. 2006 203 CANopen Master object dictionary Index Sub Description Object type Data type Comments Hex index 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F85 Vendor Identification ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F86 Product Code ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F87 Revision Number ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 204 35013944 00 November 2006 CANopen Master object dictionary Midrange Manufacturer Specific Object Dictionary Entries Project Data The table below presents the Object Entry 2010 Project Data Index Sub Description Object type Data type Comments Hex index 2010 Project Data RECORD 0 Number of entries Unsigned 1 Current byte length Unsigned16 Read only access Updated by the Master Manager 2 Project data domain DOMAIN CANopen Master The table below presents the Object Entry 2100 CANopen Master Timing Control Timing Control Index Sub Description Object type Data type Comments Hex index 2100 CANopen Master Timing Control ARRAY 0 Number of entries Unsigned 1 Max number of TPDOs to tr
39. 21 A module is using the node number of CANopen Master The CANopen master is a fatal error Bit2 1 An obligatory module is faulty with network monitoring Heartbeat or Nodeguarding The consequences of this fault depend on the configuration of the NMT Startup object This bit is significant if the NMT Startup object does not generate a bus reset Bit 3 1 Identity error or error from the object dictionary DCF of an obligatory object The CANopen Master is in fatal error status Bit4 1 Identity error of an optional module The concerned module is in Stop state Bit 5z1 Failure during the creation of the process image and the configuration of PDOs during the self configuration phase The CANopen Master is in fatal error status Bit6 1 Network monitor fault during the auto configuration phase Detection of a late device connection Bit7 1 This bit is still at 1 if a bit in the list of bits changes status Bit 8 1 At the beginning of the starting procedure the CANopen master checks every slave This bit is set at 1 if the Master doesn t support certain functions of the device example bits 4 to 6 of the object 1F81h Bit9 1 The CANopen Master has received an RPDO with too little data The CANopen master has a fatal error Bit10 1 Signals a fault during the configuration of a device For example object is not supported by the device The CANopen master has a fatal error Bit11 1 This bit indicates an overfl
40. 35013944 00 Modicon M340 with Unity Pro CANopen User manual November 2006 eng a brand of 35013944 00 November 2006 Table of Contents Safety Information 7 About the Book xii cio sieves veered RES 9 Part Overview of CANopen communication 11 Ata Glance ER YR P ER CERE RR eg 11 Chapter 1 Overview of CANopen communication 13 HER tated inate S Geta 13 Principles eto wore ds Se eae at ar eae d WERFEN Y 14 CAN Ata CARCER ECCO R S ROT a 16 General architecture of the CANopen field bus 19 Topology ee eR E RT SV eer E IVA nd E 21 Length limitations of the CANopen network 24 Conformity Class lssseseseeeeee tenet eee 26 Part 1 Hardware implementation of CANopen 27 Atl Glan E taste ceed pois ate o Hated ee he Baek 27 Chapter 2 Hardware implementation of BMX processors P34 29 Ata Glance secco bett sera ire rere Re eed 29 Description of processors BMX P34 2010 2030 30 Installation ole pena tede tre te ee p ty e pee idees 31 Visual diagnostics of CANopen processors 32 Chapter 3 Presentation of CANopen devices 35 Ata Glance
41. 3944 00 November 2006 81 CANopen Configuration 5 4 Master configuration At a Glance Subject of this Section What s in this Section This section presents the master configuration This section contains the following topics Topic Page How to access the CANopen master configuration screen 83 CANopen master configuration screen 86 Description of master configuration screen 88 82 35013944 00 November 2006 CANopen Configuration How to access the CANopen master configuration screen At a Glance This describes how to access the configuration screen of the master for a Modicon M340 PLC with a built in CANopen link 35013944 00 November 2006 83 CANopen Configuration Procedure To access the master execute the following actions Step Action 1 From the project navigator deploy the Configuration directory Result the following screen appears 1 5 Station E r 50 Bp 0 PLC Bus A aa 3 CANopen I Derived Data Types MEM Derived FB Types PR 43 Variables amp FB instances P 43 Communication gl Program EUM 7j Animation Tables 3 Operator Screens Fl rw Documentation 2 Double click on the PLC Bus subdirectory Result the following screen appears mE Bus J 0 BMx P34 2010 01 00 CPS P34 2000 2010 CANopen Port Double click on the processor s CANopen port
42. 5 Target s E PTPp relpact 3023 06 SW 31 255 GEARdenom 302603 J L Contr lexium 3 55 0 6040 GEARnum 1302604 poc lexium 0 3 55 0 60FF Controlword 6040 00 x ME s Statusword 6041 00 position actual valu 6063 00 gt 5 Click on the Error control tab and set the Node Heartbeat producer time to 300ms Click on the button in the toolbarto validate the configuration 7 Close the window 164 35013944 00 November 2006 Application using Unity Pro Configuration of table below shows the procedure to load the configuration defined with the the STB Advantys Configuration software Step Action 1 In the Project browser double click on Configuration then 3 CANopen 2 In the CANopen window double click on the Advantys STB representation The STB NCO2212 configuration window opens 3 In Function zone select Autoconf Function Autoconf v In this example we use the Autoconf function because autoconfigurable modules are inserted on the STB island see Advantys STB configuration p 192 4 Click on the PDO tab to see the PDO configuration the variables and their topological addresses Click on the right button of the horizontal scroll bar to see the Import DCF button 5 Click on Import DCF button to load the DCF configuration file generated with the Advantys Configuration Software H
43. 550 0 0 0 Lexium paramz7 feat 6 ID 3 55 0 0 0 8 Lexium p_actRAM 7 ID 3 55 0 0 0 10 Lexium position a Comment 8 AID 5500 00 12 _ Lexium position i oe 1 exium ac JO object 1 3 86 Channel KACH 12 IW 3 5510 0 0 18 Lexium ac 13 Messe Lexium Cap1C ou Configuration AKW _ 14 IW 3 55 0 0 0 20_ Lexium Cap2C ou System MW 15 90 W13 5500 0 0 21 Lexium actionsta meh 16 901W13 5510 0 0 22 Lexium Statuswd Status MW merai aps 20 0 1 7 Lexum param 5 exium param AMW F MD ME 0D 930004 Lexium param35 Command AMW 20 D 3 55 0 0 0 6 Lexium param Impliits 791 HID HIF ERR CAQ F 96QW F796QD 23 QD 3 55 0 0 0 12 Lexium G EAR nu 24 QD 3 55 0 0 0 14 Lexium Target P Update 25 QD 3 55 0 0 0 16 Lexium Profile Ve 26 QD 3 eno 0 0 18 Lexium Target Ve Update grid 27 QW 3 55 0 0 0 20 Lexium Param 6 28 QW 3 55 0 0 0 21 Lexium OGactivd 29 QW 3 55 0 0 0 22 Lexium CUR T ta Filter on usage 30 QW 3 2 0 0 23 Lexium SPEEDn 2t 0 0 0 24 Lexium param35 32 OWS 550 0 0 25 Lexium Control 166 35013944 00 November 2006 Application using Unity Pro Note Repeat the same procedure to create a CANopen I O object named BusMaster CH0 0 2 In the PLC bus window double click on the CANopen port then click on CANope
44. 6 Mobile in progress light indicator Mobile_in_Progress 7 Stop button Stop 35013944 00 November 2006 185 Application using Unity Pro Procedure for Creating an Operator Screen Note To animate objects in online mode you must click on a By clicking on this button you can validate what is written The table below shows the procedure for creating the Start button Step Action 1 In the Project browser right click on Operator screens and click on New Screen The operator screen editor appears 2 Click on the and position the new button on the operator screen Double click on the button and in the Control tab select the Run variable by clicking the button E and confirm with OK Then enter the button name in the text zone The table below shows the procedure for inserting and animating indicator light Step Action 1 In the Tools menu select Operator screens Library Double click on Display unit then Indicator light Select the dynamic green light from the runtime screen and Copy Ctrl C then Paste Ctrl V it into the drawing in the operator screen editor The light is now in your operator screen Select your light then click on Press enter and the object properties window opens Select the Animation tab and enter the concerned variable by clicking on E in the place of sMW1 0 I Click on and enter the same variable
45. 8 4115 Protocol error count Code 82xxH VAR Unsigned8 4116 External error count Code 90xxH VAR Unsigned8 4117 Device specific Code FFxxH VAR Unsigned8 Emergency The table below presents the Object Entry 4118 Emergency History History Index Sub Description Object type Data type Comments Hex index 4118 Emergency History ARRAY 0 Number of entries Unsigned8 1 Emergency history of node number 1 Domain 127 Emergency history of node number 127 Domain input Process Image The table below presents the Object Entry 4200 Input Process Image Index Sub Description Object type Data type Comments Hex index 4200 Input Process Image RECORD 0 Number of entries Unsigned8 1 Current byte length Unsigned16 Read only access Updated by the Master Manager 35013944 00 November 2006 209 CANopen Master object dictionary Output Process The table below presents the Object Entry 4201 Output Process Image Image Index Sub Description Object type Data type Comments Hex index 4201 Output Process Image RECORD 0 Number of entries Unsigned8 1 Current byte length Unsigned16 Read only access Updated by the Master Manager Additional The table below presents the Object Entry 4205 Additional Master Information Master Information Index Sub Description Object
46. CANopen bus can evolve in modifying for example the cable length by connecting to additional devices or tap cases The following rules must be respected during the design of the CANopen bus determine the distance between the nodes furthest from the bus verify the length of each segment and the number of nodes connected to it verify the length and the density of taps verify that all segments have a line termination at each extremity 35013944 00 November 2006 15 Overview of CANopen communication CAN At a Glance At a Glance CANopen protocol Physical layer CANopen is a standard Field Bus protocol for industrial monitoring systems It is particularly adapted to Real Time PLCs because it s an efficient low cost solution designed for embedded industrial applications The CANopen protocol was designed from a subset of CAL By profile definition it s even more specifically adapted to the use in standard industrial components CANopen is a standard o f the CiA CAN in Automation Association and that quickly became known as soon as it was put on the market In Europe CANopen is now recognized as the standard reference for industrial systems based on the CAN concept CAN uses a Bus line with two wires controlled in a differential manner common return A CAN signal is the difference between the tension levels of CAN high and CAN low See following figure The following figure shows the components of th
47. CANopen equipment It is theoretically possible to connect up to 63 devices on the same segment Despite this the topology limitations described above mean that in practice the limit is often inferior To increase the number of devices on the bus whilst conserving the same flow rate it is possible to switch the different segments with a bridge In all cases an M340 CANopen master cannot handle more than 63 slave devices 35013944 00 November 2006 23 Overview of CANopen communication Length limitations of the CANopen network Introduction Bus length Segment lengths The CANopen network allows you to connect up to 63 devices and a master to the bus Bus lengths segments and taps are limited and detailed in the tables below The data flow rate chosen for the bus determines the maximum length of the network in its totality Baud rate Maximum length 1 Mbit s 4m 500 Kbit s 100m 250 Kbit s 250m 125 Kbit s 500m 50 Kbit s 1000 m 20 Kbit s 2500 m Note The bus length must also consider the use of repeaters that add a propagation delay for information on the bus As repeaters add a propagation delay in the bus this delay reduces the maximum network length of the bus A propagation delay of 5ns is equal to a length reduction of 1m A repeater wtih e g 150ns delay reduces the bus length therefore by 30m Independantly from the data flow rate the
48. Confirm with apply and OK 186 35013944 00 November 2006 Starting the Application 12 Execution of Application in Standard Mode At a glance To work in standard mode you need to associate defined variables to PDO addresses of the equipment declared on CANopen Bus Note For more information on addressing see Unity Pro online help click on then Unity then Unity Pro then Languages reference then Data description and Data instances Assignment of The table below shows the procedure for direct addressing of variables variables Step Action 1 In the Project browser and in Variables amp FB instances double click on Elementary variables 2 In the Address column enter the address associated with the variable in the form Bus Node Rack Module Channel Data New_SetPoint BOOL QW 3 1 0 0 0 25 4 3 Repeat the same procedure for all located variables 35013944 00 November 2006 187 Starting the application Illustration of The following screen shows the application variables assignment assigned E Data Editor variables Variables DDT types Function blocks DFB types Filter SF Name V EDT DDT 10DDT Name Type Address Value Comment gt 7 9 TIME tBs Configuration Done BOOL
49. Exchanges using 108 Exchanges using 5 112 Debugging communication on the CANopen bus 115 Ata Glance esr are Hated ats 115 How to Access the Debug Screens of Remote Devices 116 Debugging screen of the CANopen 117 Slave debug 5 lt 119 35013944 00 November 2006 Chapter8 123 AtasGlanCe PEU 123 How to perform a 5 124 Master Diagnostics 2 0 0 5 ete RE Rue D RI RETE 125 Slave diagnostics 126 Chapter9 Language 129 Ata GlanGess xe ewe b vare RH Edu Lupe KDE aes 129 9 1 Language objects and IODDT for CANopen communication 131 Ata v3 re pe ee RR IRA EA REA ER eel 131 Introduction to the Language Objects for CANopen Communication 132 Implicit exchange language objects associated with the application specific function DN IM ere 133 Explicit Exchange Language Objects Associated with the Application Specific FUnCHorn 4 Sen Bh cee a sanis cuiu RASSE tate ae 134 Management of Exchanges and
50. IUMO5 MFB EDS 0 r Lexium15 HP LEXIUM 15 HP servodrive Lexium 15 MP HP eds r Lexium15 LEXIUM 15 MP servodrive Lexium 15 MP HP eds v Drop end communicator 3 Enter the number of the connection point corresponding to the address By default the Unity Pro software offers the first free consecutive address 4 In the Communicator field select the element type enabling communication on the CANopen bus For modules with built in communicators this window does not appear 35013944 00 November 2006 61 CANopen Configuration Step Action 5 Validate with Ok Result the module is declared Bus 3 CANopen comm head 01 00 Connections configured 1 62 35013944 00 November 2006 CANopen Configuration How to Delete Move Duplicate a Bus Device Procedure for This operation is used to delete via the software a device connected to the Deleting a Device CANopen bus Step Action 1 Access the CANopen configuration screen 2 Right click on the connection point of the device to be deleted then click on Delete the drop 35013944 00 November 2006 63 CANopen Configuration Procedure for Moving a device does not involve a physical move on the bus but rather a change Moving a Device in the device address logic A movement t
51. Module area This area includes the devices that are connected to the bus Available connection points are indicated by an empty white square 60 35013944 00 November 2006 CANopen Configuration How to Add a Device on the Bus Procedure This operation is used to add via the software a device connected to the CANopen bus Step Action 1 Access the CANopen see How to access the CANopen bus configuration screen p 57 configuration screen 2 Double click on the place where the module should be connected Result the New Device screen appears New Device Topologic address 1 63 1 Node identification 1 7 ance Reference Description A Help l CANopen drop Other Movement C IESU Altivar 31 CANopen Slave DSP 402 TEATV3111E eds Se lees ATV3l V1 2 Altivar 31 CANopen Slave DSP402 TEATV3112E eds ATV3IT VI 3 Altivar 31 CANopen Slave DSP402 TEATV3IL2E eds AVOL V11 ATV61 TEATVGLIIE eds 00 1 AVI 1 ATV71 7 t IclA_IFA IclA IFA CANopen IclA IFA eds r IclA_IFE IcIA IFE CANopen IclA IFE eds cA IFS IclA IFS CANopen IclA IFS eds 077 IclA_N065 IcIAN065 based on profile DS301V4 01 and DSP 40212 r Lexium05 DCX170 CANopen TEDCX170 0100E eds o t7 Lexium05 MFB LXM05A PLCopen LEX
52. November 2006 Actions and transitions Actions At a glance Init step The next tasks written in LD and ST are used in different steps of the grafcet Note To use the following actions in Tools Project Setting Languages extension select Allow dynamic arrays and Directly represented array variables options The action associated to the Init step is as follows Run Stop IM Initialization of variables when the start command is ordered COMPARE OPERATE BusMaster COMM STS 0 Homing done 0 Test of the communication OPERATE status Configuration done 0 Start_configuration Sequence_number 0 35013944 00 November 2006 229 Actions and transitions Move_to_Next_P osition step Return_to_Start_ Point step Disable_Lexium Two actions are associated to the Move_to_Next_Position step The first action is as follows Definition of the target position CASE Sequence number OF 1 Lexium Target Position Position B 2 Lexium Target Position Position A 3 Lexium Target Position Position C END CASE IF Sequence number 4 AND NOT Stop TH z Start the new positionning New SetPoint 1 Ready for 0 END IF The second action is as follows Incrementation before new move sta
53. PL7 Slot TXT for Concept Memory Address Input O XSY for Unity Pro Output Help Cancel 4 Click on OK 5 Launch Unity Pro and open a project where an STB island will be used 6 Add the STB equipment in the bus editor 7 Right click on the STB equipment then click on Open the module 8 In the PDO tab click on the Import DCF button see Configuration of the STB p 165 9 Click on OK to validate 35013944 00 November 2006 161 Application using Unity Pro Configuration of the CANopen Master At a glance Developing a CANopen application involves choosing the right CANopen Master PLC configuration 162 35013944 00 November 2006 Application using Unity Pro CANopen Master The table below show the procedure for configuring the CANopen Master PLC PLC configuration Step Action 1 In the Project browser double click on Configuration then on 0 BMS XBP 0800 then on 0 BMX P34 2010 Double click on CANopen to access to the CANopen Comm Head window 2 In the input and output configuration zones enter the index of the 1st word MW and the needed number of words 3 In the Bus Parameter zone select the application transmission speed In this example select 500 kBauds 0 0 CANopen CANopen comm head Communicator head CANopen ifi CANopen comm head H Config 1 18 Channel 2 CANope
54. PLC bus mA En 3 CANopen lesu 47 Derived Data Types Derived FB Types 3 Variables amp FB instances 3 Communication WEN Animation Tables PER Operator Screens iesus eu Documentation To open the CANopen bus screen select one of the following methods e double click on the CANopen directory e select the CANopen sub directory and select Open in the contextual menu Result the CANopen window appears CANopen Bus 3 CANopen comm head 01 00 y 58 35013944 00 November 2006 CANopen Configuration CANopen bus editor At a Glance This screen is used to declare devices which are connected to the bus Illustration The CANopen bus editor looks like this 1 CANopen 15 3 CANopen comm head 01 00 Connections configured 2 gt LEXIUMQ05 bal 77 35013944 00 November 2006 59 CANopen Configuration Elements and functions This table describes the different areas that make up the configuration screen Number Element Function 1 Bus Bus number Connections Indicates the number of connection points configured configured 2 Logical address This area includes the addresses of the devices connected area to the bus 3
55. Reports with Explicit Objects 136 9 2 CANopen configuration language 138 Language objects associated with 138 9 3 Emergency objects eel nne 140 Emergency objects 140 Part IV Quick start example of CANopen implementation 145 At amp glance a Se SERES RI Seog Mie won a hE as 145 Chapter 10 Description of the 147 Overview of the 147 Chapter 11 Installing the application using Unity Pro 151 Ata glance s Ried her tient eee See 151 11 1 Presentation of the solution used 1 20 ee ee 153 Atg glance esu une ades Seek AIEO MEER UE EO eee ne Beck 153 Technological choices used 154 The different steps in the process using Unity Pro 155 11 2 Developping the application 156 Ata dlatiCe s iced eser o ahaa ee dns ak dale Mr ade C EUR E A PR od 156 Creating the 157 Configuration of the CANopen 158 Configuration of the CANopen Master 162 Configuration of the
56. Sub Description Object type Data type Comments Hex index 4106 Nd_preop ARRAY 0 Number of entries Unsigned8 1 Nd preop 0 1 2 3 Unsigned32 2 Nd preop 4 5 6 7 Unsigned32 3 Nd preop 8 9 10 11 Unsigned32 4 Nd_preop 12 13 14 15 Unsigned32 Nd_err The table below presents the Object Entry 4107 Nd_err Index Sub Description Object type Data type Comments Hex index 4107 Nd_err ARRAY 0 Number of entries Unsigned8 1 Nd err 0 1 2 3 Unsigned32 2 Nd_err 4 5 6 7 Unsigned32 3 Nd_err 8 9 10 11 Unsigned32 4 Nd err 12 13 14 15 Unsigned32 Node Error The table below presents the Object Entry 4110 Node Error Count Count Index Sub Description Object type Data type Comments Hex index 4110 Node Error Count ARRAY 0 Number of entries Unsigned8 1 Number of the received emergency Unsigned8 messages of node number 1 127 Number of the received emergency Unsigned8 messages of node number 127 208 35013944 00 November 2006 CANopen Master object dictionary Error Code The table below presents the Object Entries 4111 to 4117 Error Code Specific Error Specific Error Counters Counters Index Sub Description Object type Data type Comments Hex index 4111 Generic_error_count Code 10xxH VAR Unsigned8 4112 Device hardware error count Code 50xxH VAR Unsigned8 4113 Device software error count Code 60xxH VAR Unsigned8 4114 Communication error count Code 81xxH VAR Unsigned
57. Unsigned16 1801 2 Transmit PDO RECORD 0 Largest sub index supported Unsigned8 1 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Inhibit time Unsigned16 4 Reserved Unsigned8 5 Event timer Unsigned16 18FF 256 Transmit PDO RECORD 0 Largest sub index supported Unsigned8 1 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Inhibit time Unsigned16 4 Reserved Unsigned8 5 Event timer Unsigned16 1A00 1 Transmit PDO Mapping 0 Number of mapped application Unsigned Depends on PDO objects in PDO mapping of the application 1 PDO mapping for the 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 8 PDO mapping for the 8 Application Unsigned32 object 35013944 00 November 2006 201 CANopen Master object dictionary Index Sub Description Object type Data type Comments Hex index 1A01 2 Transmit PDO Mapping 0 Number of mapped application Unsigned8 Depends on PDO objects in PDO mapping of the application 1 PDO mapping for the 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 8 PDO mapping forthe 8 Application Unsigned32 object 1AFF 256 Transmit PDO Mapping 0 Number of mapped application Unsigned8 Depends on PDO objects in PDO mapp
58. When data is exchanged between the PCL memory and the module the module may require several task cycles to acknowledge this information All IODDTs use two words to manage exchanges e EXCH_STS MWr m c 0 exchange in progress e EXCH RPT SMWr m c 1 report Illustration The illustration below shows the different significant bits for managing exchanges Reconfiguration bit 15 Adjustment bit 2 Command bit 1 Status bit 0 EXCH MWr m c 1 EXCH STS MWr m c 0 Status parameters READ STS Description of The rank 0 bits of the words EXCH_STS MWr m c 0 and EXCH RPT Significant Bits SMWr m c 1 are associated with the status parameters e The STS IN PROGR bit MWr m c 0 0 indicates whether a read request for the status words is in progress e The STS ERR bit MWr m c 1 0 specifies whether a read request for the status words is accepted by the module channel 136 35013944 00 November 2006 Language objects Execution Indicators for an Explicit Exchange EXCH_STS Explicit Exchange Report EXCH_RPT The table below shows the 1 EXCH STS MWr m c 0 explicit exchange control bits Standard symbol Type Access Meaning Address STS IN PROGR BOOL R Reading of channel status words in progress MWr m c 0 0 Note If the module is not pre
59. ains the index Example if you use the double word subindex index e the 16 most significant bits contain the subindex e the 16 least significant bits contain the index EMIS Table of words containing the SDO datum to send MWw200 2 The recept buffer of the WRITE VAR function must be greater than the SDO The length of a SDO is indicated in device documentation GEST Table of words with 4 inputs MW210 4 35013944 00 November 2006 221 Example of SDOs access Parameter The following table outlines the various parameters for the READ_VAR function Description of the READ_VAR Function Parameter Description ADDM r m c node Address of the destination entity of the exchange the processor rack number m processor slot in the rack 0 c channel only use the channel 2 for CANopen e node identifier of the destination device on the bus SDO SDO object type subindex index Double word or immediate value identifying the CANopen SDO index or subindex The most significant word making up the double word contains the sub index and the least significant word contains the index Example if you use the double word subindex index e the 16 most significant bits contain the subindex the 16 least significant bits contain the index GEST Table of words with 4 inputs MW210 4 RECP Table of words with at least one input to receive the SDO d
60. analog max 48 channels IP20 and to connect them close to the active captors The following figure gives an example of an Advantys OTB device P Y Note Only OTBs from a version later than or equal to v2 0 are supported OTBs from an inferior version provoke an error when configuring CANopen bus 35013944 00 November 2006 41 CANopen slaves Preventa devices Preventa devices are electronic safety controllers for monitoring safety functions The following figure gives an example of a Preventa device La 42 35013944 00 November 2006 CANopen slaves Other devices At a Glance STB Island These devices are e STB Island e Tesys U An Advantys STB island is composed of several input output modules The modular elements of the island are connected by a CANopen local bus using a network interface module NIM STB modules can only be used in an STB island The following figure gives an example of an island PDT 3100 DDI 3230 Description Number Designation 1 Network Interface Module 2 Power supply Distribution Module 3 Distributed input output modules These modules can be digital input output modules e analog input output modules special purposes 4 Termination plate of island bus 35013944 00 November 2006 43 CANopen slaves Tesys U devices TeSys U Line motor starte
61. annel you display the tabs e Configuration enables you to declare and configure the CANopen master e Debug accessible in online mode only Faults accessible in online mode only This area also has an LED indicating the channel status 4 General parameters This area is used to view the communication function e the task associated with the CANopen bus 5 Display and command This area is composed of 3 windows which let you know e the CANopen slaves status the status of the CANopen master the status of the error counters 118 35013944 00 November 2006 CANopen Debugging Slave debug screens At a Glance This screen con only be used in online mode Illustration The figure below shows a slave debug screen 2 Altivar 31 CANopen Slave DSP 402 TEATV3112E eds C Operational y H Error control J E Configuration Debug Parameter Label Value 961W3 200 0 0 0 Test Drivecom status register 0 961W13 200 0 0 1 Test Control effort 0 961WV3 2 0 0 2 Test Output frequency 0 961W13 20 0 0 3 Test Motor current 0 0 0 0 ATV31 V1 2 HI PDO Channel 0 Test QW 3 2 0 0 0 0 Test Frequency_reference QW 3 2 0 0 0 1 Test Drivecom command re 6QW3 20 0 0 2 Test Target velocity Oo O1 Function Basic v
62. ansmit Unsigned8 during one cycle 2 Max number of high priority Unsigned8 receive queue accesses during one cycle RPDOs EMCY 3 Max number of low priority receive Unsigned8 queue accesses during one cycle SDOs Heartbeat Guarding 35013944 00 November 2006 205 CANopen Master object dictionary CANopen Master table below presents the Object Entry 4100 CANopen Master Status Status Index Sub Description Object type Data type Comments Hex index 4100 CANopen Master Status ARRAY 0 Number of entries Unsigned8 1 Global events Unsigned16 2 COMM state Unsigned8 3 COMM diagnostic Unsigned8 4 Config bits Unsigned16 5 LED control Unsigned16 6 Minimum Cycle Time Unsigned8 7 Maximum Cycle Time Unsigned8 Nd asg The table below presents the Object Entry 4101 Nd asg Index Sub Description Object type Data type Comments Hex index 4101 Nd asg ARRAY 0 Number of entries Unsigned8 1 Nd asg 0 1 2 3 Unsigned32 2 Nd_asg 4 5 6 7 Unsigned32 3 Nd_asg 8 9 10 11 Unsigned32 4 Nd_asg 12 13 14 15 Unsigned32 Nd_cfg The table below presents the Object Entry 4102 Nd_cfg Index Sub Description Object type Data type Comments Hex index 4102 Nd_cfg ARRAY 0 Number of entries Unsigned8 1 Nd cfg 0 1 2 3 Unsigned32 2 Nd_cfg 4 5 6 7 Unsigned32 3 Nd_cfg 8 9 10 11 Unsigned32 4 Nd_cfg 12
63. ational on the bus device 32 96IWr m c 36 15 35013944 00 November 2006 101 Programming Operational The table below shows the word IWr m c 37 slaves from 33 to 48 Standard symbol Type Access Description Address SLAVE ACTIV 33 BOOL R Slave operational on the bus device 33 9eIWr m c 37 0 SLAVE ACTIV 34 BOOL R Slave operational on the bus device 34 9oIWr m c 37 1 SLAVE ACTIV 35 BOOL R Slave operational on the bus device 35 IWr m c 37 2 SLAVE_ACTIV_36 BOOL R Slave operational on the bus device 36 IWr m c 37 3 SLAVE_ACTIV_37 BOOL R Slave operational on the bus device 37 IWr m c 37 4 SLAVE_ACTIV_38 BOOL R Slave operational on the bus device 38 96IWr m c 37 5 SLAVE ACTIV 39 BOOL R Slave operational on the bus device 39 96IWr m c 37 6 SLAVE ACTIV 40 BOOL R Slave operational on the bus device 40 9oIWr m c 37 7 SLAVE ACTIV 41 BOOL R Slave operational on the bus device 41 96IWr m c 37 8 SLAVE ACTIV 42 BOOL R Slave operational on the bus device 42 96IWr m c 37 9 SLAVE ACTIV 43 BOOL R Slave operational on the bus device 43 96IWr m c 37 10 SLAVE ACTIV 44 BOOL R Slave operational on the bus device 44 9oIWr m c 37 11 SLAVE ACTIV 45 BOOL R Slave operational on the bus device 45 IWr m c 37 12 SLAVE_ACTIV_46 BOOL R Slave operational on the bus device 46 IWr m c 37 13 SLAVE_ACTIV_47 BOOL R Slave operational on the bus device 47 9oIWr m c 37 14 SLAVE ACTIV 48 BOOL R Slave oper
64. ational on the bus device 48 96IWr m c 37 15 102 35013944 00 November 2006 Programming Operational slaves from 49 to 64 The table below shows the word 1Wr m c 38 Standard symbol Type Access Description Address SLAVE ACTIV 49 BOOL R Slave operational on the bus device 49 96IWr m c 38 0 SLAVE ACTIV 50 BOOL R Slave operational on the bus device 50 IWr m c 38 1 SLAVE_ACTIV_51 BOOL R Slave operational on the bus device 51 IWr m c 38 2 SLAVE_ACTIV_52 BOOL R Slave operational on the bus device 52 IWr m c 38 3 SLAVE_ACTIV_53 BOOL R Slave operational on the bus device 53 IWr m c 38 4 SLAVE_ACTIV_54 BOOL R Slave operational on the bus device 54 IWr m c 38 5 SLAVE_ACTIV_55 BOOL R Slave operational on the bus device 55 IWr m c 38 6 SLAVE_ACTIV_56 BOOL R Slave operational on the bus device 56 IWr m c 38 7 SLAVE_ACTIV_57 BOOL R Slave operational on the bus device 57 IWr m c 38 8 SLAVE_ACTIV_58 BOOL R Slave operational on the bus device 58 IWr m c 38 9 SLAVE_ACTIV_59 BOOL R Slave operational on the bus device 59 IWr m c 38 10 SLAVE_ACTIV_60 BOOL R Slave operational on the bus device 60 IWr m c 38 1 1 SLAVE_ACTIV_61 BOOL R Slave operational on the bus device 61 IWr m c 38 12 SLAVE_ACTIV_62 BOOL R Slave operational on the bus device 62 IWr m c 38 13 SLAVE_ACTIV_63 BOOL R Slave operational on the bus device 63 IWr m c 38 14
65. atum received MW200 16 The recept buffer of the READ VAR function must be greater than the SDO The length of a SDO is indicated in device documentation 222 35013944 00 November 2006 Example of SDOs access Description of control block words The following table describes the various words of the control block Fields Word Type Description Control byte 0 least significant BYTE Bit 0 activity bit Bit 1 cancellation bit Exchange ID 0 most significant BYTE Single number identifier of the exchange ComState 1 least significant BYTE 0x00 Exchange terminated 0x01 Time Out 0x02 User cancelled 0x03 Incorrect address format 0x04 Incorrect destination address 0x06 Incorrect Com Fb parameters 0x07 Generic transmission problem 0x09 Buffer received too small 0x0B No system resources OxFF 2 Network exchange error ExchState 1 most significant BYTE If ComState 0x00 0x00 request treated 0x01 Cannot be treated 0x02 Incorrect response If ComState OxFF 0x07 Generic exchange error OxOB The destination device has no more resources 0x0D The device cannot be reached 0x2B SDO exchange error Timeout WORD Timeout value x 100 ms Length WORD Length in bytes 35013944 00 November 2006 223 Example of SDOs access Exa
66. avoided will result in death or serious injury A WARNING WARNING indicates a potentially hazardous situation which if not avoided can result in death serious injury or equipment damage A CAUTION CAUTION indicates a potentially hazardous situation which if not avoided can result in injury or equipment damage 35013944 00 November 2006 Safety Information PLEASE NOTE Electrical equipment should be installed operated serviced and maintained only by qualified personnel No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material 2006 Schneider Electric All Rights Reserved 35013944 00 November 2006 About the Book A At a Glance Document Scope Validity Note Product Related Warnings User Comments This manual describes the implementation of a CANopen network on PLCs of the Modicon M340 range The data and illustrations found in this documentation are not binding We reserve the right to modify our products in line with our policy of continuous product development The information in this document is subject to change without notice and should not be construed as a commitment by Schneider Electric Schneider Electric assumes no responsibility for any errors that may appear in this document If you have any suggestions for improvements or amendments or have found errors in this publication pl
67. ber 2006 CANopen Configuration 5 3 Device configuration At a Glance Subject of this This section presents the configuration of the initial parameters of the CANopen Section devices There are three ways of configuring the initial parameters e Configuration using Unity e Configuration using an external tool e Manual Configuration Note Before configuring a device it is strongly recommended to select the function when available What s in this This section contains the following topics Section Topic Page Slave functions 68 Configuration using Unity 70 Configuration using an external tool Configuration software 76 Configuration using an external tool Manual configuration 80 35013944 00 November 2006 67 CANopen Configuration Slave functions At a Glance So as to facilitate their configuration certain CANopen devices are represented through functions Each function defines premapped PDOs as well as certain debugging variables which can be mapped PDO tab of the slave configuration screen Note The function should be selected before the configuration of the slave 68 35013944 00 November 2006 CANopen Configuration Available The available functions are as follows Functions Function Description Devices involved Basic This function allows a simple control of the speed Altivar Standard This function allows c
68. ble can be assigned with a static PDO Note To configure the STB NCO 1010 it s necessary to determine all the objects that are valid for this device and to configure them manually in the PDOs For more information about the list of the associated objects please refer to the STB user manual For more information about the use of the PDOs see Exchanges using PDOs p 108 35013944 00 November 2006 73 CANopen Configuration Error control Tab The Error control tab for CANopen slave modules allows you to configure fault monitoring IcIAN 065 based on profile DS301V4 01 and DSP402V2 0 BLICLAN65 0100E eds IclA_N065 Channel 0 Function Default H PDO H Error control Config 0 Debugging r Error control OUse Node Guarding Protocol Guard Time 0 Sims Life Time Factor Use Heartbeat Protocol Node Heartbeat Producer 0 ms Two choices are possible e Heartbeat the Heartbeat mechanism consists of sending cyclical presence messages generated by a Heartbeat Producer A Heartbeat transmitter producer sends messages recurringly The sending time is configured with the Node Heartbeat Procucer Time Value One or several elements connected to the network receive this message The Heartbeat consumer surveys the Heartbeat message reception If its duration exceeds the Heartbeat Consumer Time 1 5
69. cation specific 133 function Explicit Exchange Language Objects Associated with the Application Specific 134 Function Management of Exchanges and Reports with Explicit Objects 136 35013944 00 November 2006 131 Language objects Introduction to the Language Objects for CANopen Communication General Language Object Types The IODDTs are predefined by the manufacturer and contain inputs outputs language objects belonging to a channel of a specific application module CANopen communication has 1 associated IODDT e T COM STS GEN used by all communication protocols Note The creation of an IODDT type variable is performed in two ways e 1 0 object tab e Data editor Each IODDT contains a group of language objects which are used to control them and check their operation There are two types of language objects e implicit exchange objects automatically exchanged at each cycle of the task associated with the module e explicit exchange objects exchanged at the request of the application using explicit exchange instructions Implicit exchanges concern the status of the modules the communication signals the slaves etc Explicit exchanges allow module parametering and diagnostics Note Each slave device has an IODDT except FTB For more information please refer to the user manual of the concerned device 132 35013944 00 November 2006 Lang
70. cator CANopen Master CANopen Slaves In this example the word IW0 0 2 1 gives the status of the CANopen Master The parameters are as follows e r 0 e m 0 e c 2 CANopen channel The last parameter 1 indicates the used word CAN STS 35013944 00 November 2006 95 Programming The table below shows the meaning of bits from various status words from the master and event indicators Addresses Description Bit meaning SIWr m c 0 Communication status of master Bit 021 Overflow of the reception queue low priority The CANopen master is receiving Heartbeat and Node guarding messages as well as SSDOs and CSDOs via the low priority queue Bit 121 FIFO overwrite of CAN controller Bit 221 The CAN controller has status BUS Off Bit 321 CAN controller fault Bit reset to 0 when the fault disappears Bit 421 The CAN controller has left fault state Bit 521 Overflow of the emission queue low priority The CANopen master is transmitting Heartbeat and Node guarding messages as well as SSDOs and CSDOs via the low priority transmission queue Bit 621 Overflow of the reception queue high priority The CANopen master is receiving RPDOs NMT commands the message Sync and emergency messages via the high priority reception queue Bit 721 Overflow of the reception queue high priority The CANopen master is sending TPDOs NMT commands the message Sync and emergency
71. celeration 6 16 2005 07 user i i i i profile acceleration 3 i i i profile acceleration 7 i 17 2005 08 user profile acceleration 8 18 2005 09 user pro le acceleration 9 19 2005 0A user profile acceleration 10 20 2006 01 user profile deceleration 1 21 2006 02 user profile deceleration 2 o o ole o AAI AI IAAI IDI oo gt o oj ojola ie The next table shows the various elements of the configuration screen and their functions Number Element Function 1 Tabs The tab in the foreground indicates the type of screen displayed In this case it is the configuration screen 2 Module area Gives a reminder of the device s shortened name 35013944 00 November 2006 71 CANopen Configuration Number Element Function 3 Channel area This zone allows you to select the communication channel to be configured By clicking on the device you display the following tabs e Description gives the characteristics of the device e CANopen allows you to access SDO in online mode e 1 0 Objects allows pre symbolizing of the input output objects e Fault accessible in online mode only By clicking on the channel you display the following tabs e PDO input output objects e Error control e Configuration e Debug which can be accessed only in
72. d SYNC message COB ID SYNC message period 250 v kBaud 128 100 ms To configure the bus it is necessary to indicate e the transmission speed see Bus length p 24 250 kBauds default e the COB ID see p 231 of the synchronization message 128 default e the synchronization message period 100 ms default Language The parameters presented below are represented in the Kw language objects objects Read Parameter Language object Inputs Number of words MW SKW8 Index of the first word SKW10 Number of bits M SKW4 Index of the first bit SKW6 Outputs Fallback mode KWO Number of words MW KW9 Index of the first word SKW11 Number of bits M KW5 Index of the first bit SKW7 Bus parameters Transmission speed SKW1 SYNC message COB ID SKW2 SYNC message period SKW3 90 35013944 00 November 2006 Programming At a Glance Introduction What s in this Chapter This section describes the programming of a CANopen architecture This chapter contains the following sections Section Topic Page 6 1 Objects concerning the CANopen Master 93 6 2 Objects concerning the devices 107 35013944 00 November 2006 91 Programming 92 35013944 00 November 2006 Programming 6 1 Objects concerning the CANopen Master At a Glance Subject of this Section What s in this Section This chapt
73. de on an open field bus network Supervision screen Use of elements from the library and new objects Main supervision program This program is developed using a sequential function chart SFC also called GRAFCET The various sections and transitions are created in Ladder Diagram LD language and in Structured Text language ST Note This example shows PDO and SDO exchange towards a speed drive However for speed drive configuration and control the use of Motion Function Block is recommended 154 35013944 00 November 2006 Application using Unity Pro The different steps in the process using Unity Pro At a glance Description The following logic diagram shows the different steps to follow to create the application A chronological order must be respected in order to correctly define all of the application elements Description of the different types Launching of Unit Pro and selection of the processor Y Y Configuration of project in Configuration Y Y Configuration of I O derived variables in Configuration Creation of variables in Variables amp FB instances Y Y Creation of Section in Programs Tasks MAST Y Y Creation of an animation table in Animation tables Y v Creation of an operator screen in Operator screens Y Y Generation of project connection to API and switch to RUN mode
74. dvantys OTB Preventa devices These are Advantys islands STB and Tesys U The STB islands also allow the monitoring of inputs outputs 36 35013944 00 November 2006 CANopen slaves CANopen motion command devices At a glance Motion command devices enable you to control motors These devices are Altivar Lexium IcLA Osicoder Altivar devices An Altivar device enable to control the speed regulation of a motor by flux vector control The following figure gives an example of an Altivar device Note ATV31 V1 7 is not supported However it can be used by configuring it with ATV31 1 2 profile In this case only the ATV31 V1 2 functions will be available 35013944 00 November 2006 37 CANopen slaves Lexium devices IcLA devices A Lexium device integrates functions and components usually found externally which are used to keep its compact design making it easier to integrate the drive into control enclosures or machines The following figure gives an example of a Lexium device IcLA devices are intelligent compact drives They integrate everything required for motion tasks positioning controller power electronics and servo EC or stepper motor The following figure gives an example of an IcLA device 38 35013944 00 November 2006 CANopen slaves Osicoder devices Osicoder absolute rotary encoders identify every point in a movement through a
75. e CANopen 0 1000 Kbaud network p 24 e 2 500 Kbaud e 3 250 Kbaud e 4 125 Kbaud e 5 50 Kbaud e 6 20 Kbaud 9eKWr m c 2 INT COB ID Synchronization Default value 0080h 9eKWr m c 3 INT Synchronization period 1 1000 ms KWr m c 4 INT Configuration bits Size of input image zone TOR in the memory in number of bits KWr m c 5 INT Configuration bits Size of output image zone TOR in the memory in number of bits KWr m c 6 INT Configuration bits Address of the start of the input image zone TOR M 9eKWr m c 7 INT Configuration bits Address of the start of the output image zone TOR 96M KWr m c 8 INT Configuration bits Size of input image zone in the memory in number of words KWr m c 9 INT Configuration bits Size of output image zone in the memory in number of words KWr m c 10 INT Configuration bits Address of the start of the input image zone MW KWr m c 11 INT Configuration bits Address of the start of the input image zone MW 35013944 00 November 2006 139 Language objects 9 3 Emergency objects Emergency objects At a Glance Error code 00xx Emergency objects EMCY have been defined for CANopen for diagnostic applications The COB ID of these objects contain the identity of the node of the device which produced the emergency message The COB ID of emergency objects are constructed in the following manner COB IDgycy 0x80 node identity The data
76. e network is scanned The master is waiting for a start command Start CANopen Master Manager or Start network OxAx RUN The network is in Operational state OxCx STOP The network is in Stop state OxEx PREOPERATIONAL The network is in Pre operational status 0x9x FATAL ERROR A fatal error has occurred The CANopen master must be reinitialized The network is scanned The 4 heavy bits of the status variable indicate the state of the network CLEAR RUN STOP PREOPERATIONAL The 4 light bits contain additional information Bit 0 Error bit for optional modules e 0 Noerror 1 Atleastone of the optional modules doesn t correspond to the configuration of the expected network Bit 1 Error bit for obligatory modules e 0 Noerror 1 Atleast one of the obligatory modules is not in the expected status Bit 2 Bit Operational 0 No module including the CANopen Master is in 5013944 00 November 2006 CANopen Operationnel status 97 1 Atleast one of the modules is in Operationnel status excluding the CANopen Master Bit 3 Operational bit of CANopen Master Programming Addresses Description Bit meaning SIWr m c 2 Event indicator Bit 021 This bit was still at 1 when a communication error occurred with the network The communication status of CANopen Master gives the exact reason The CANopen master is a fatal error Bit 1
77. e physical layer of a CAN bus with two wires o o Q O Description No Description 1 CAN high wire 2 CAN low wire 3 Difference in the potential of CAN high CAN low signals 4 Resistance block of 120 5 Cell The Bus wires can be parallel routed twisted or reinforced according to the electromagnetic compatibility requirements A structure with only one line reduces the reflection 16 35013944 00 November 2006 Overview of CANopen communication CANopen profiles Configuration of devices via the CAN bus General characteristics of CAN open profiles Certifying CANopen products Communication Profile The CANopen profile family is based on a communication profile that specifies principal communication mechanisms and their description DS301 Device Profile The most important device types used in the industrial robotics technique are described in Device profiles Their functionalities are also defined there Examples of standard devices described are the input output digital and analog distributors DS401 DS402 Motors Command devices DSP403 Loop controllers DSP404 PLCs DS405 Coding devices DS406 The possibility of configuring device using the CAN bus is the basic element of the independence desired by the manufacturers by the profile family CANopen i
78. ease notify us No part of this document may be reproduced in any form or by any means electronic or mechanical including photocopying without express written permission of Schneider Electric All pertinent state regional and local safety regulations must be observed when installing and using this product For reasons of safety and to ensure compliance with documented system data only the manufacturer should perform repairs to components When controllers are used for applications with technical safety requirements please follow the relevant instructions Failure to observe this product related warning can result in injury or equipment damage We welcome your comments about this document You can reach us by e mail at techpub schneider electric com 35013944 00 November 2006 About the Book 10 35013944 00 November 2006 Overview of CANopen communication At a Glance Aim of this Chapter What s in this Part This part introduces communication on a CANopen Field bus This part contains the following chapters Chapter Chapter Name Page 1 Overview of CANopen communication 13 35013944 00 November 2006 11 CANopen network 12 35013944 00 November 2006 Overview of CANopen communication 1 At a Glance Aim of this Chapter What s in this Chapter This chapter describes the main technical characteristics for CANopen co
79. elow shows the meaning of the command word of the CANopen master emergency default Addresses Description Bit meaning SQWr m c 0 Command word of the CANopen master Bit 021 Reset emergency slaves bitlist This bit is set to zero after the reset of the bitlist Bit 1 to bit 15 Reserved 104 35013944 00 November 2006 Programming Explicit Exchange Language Objects At a Glance This part shows the explicit exchange language objects for the CANopen master These objects are exchanged on the application s request using the instruction READ_STS The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e represents the channel number Execution The table below shows the meanings of channel exchange control bits from channel indicator EXCH STS MWr m c 0 EXCH STS Symbol Type Acces Description Number s STS IN PROGR BOOL R Status parameter read in progress MWr m c 0 0 Exchangereport The table below presents the meaning of the run report bits of the channel EXCH RPT EXCH RPT SMW r m c 1 Symbol Type Acces Description Number s STS_ERR BOOL R Error while reading channel status MWr m c 1 0 35013944 00 November 2006 105 Prog
80. equence At a glance The main program is written in SFC Grafcet The different sections of the grafcet steps and transitions are written in LD This program is declared in a MAST task and will depend on the status of a Boolean variable The main advantage of SFC language is that its graphic animation allows us to monitor in real time the execution of an application Several sections are declared in the MAST task e The Move Sequence See Illustration of the Move Sequence section p 174 section written in SFC and describing the operate mode e The Application See Creating a Program in LD for Application Execution p 176 section written in LD which executes the mobile action delay time and resets the positioning start bit New Setpoint e The Operator Screen Animation See Creating a Program in LD for the operator screen animation p 178 section written in LD which is used to animate the operator screen e The Lexium Config See Creating a program in ST for the Lexium configuration p 179 section written in ST and describing the different steps of the Lexium configuration 172 35013944 00 November 2006 Application using Unity Pro Procedure for Creating an SFC Section In the project browser the sections are represented as follow Project Browser Ta Structural View ca Station Be TENET 7j Configuration r 9 Derived Data Types B Derived FB Typ
81. er 2006 147 Description of the application Illustration ofthe This is the application s final operator screen application Start Sequence Stop Sequence Start Point Position A Position B Position C The equipments can be connected as follow BMX P34 2010 Motor CANopen Bus Advantys STB 148 35013944 00 November 2006 Description of the application Operating mode The operating mode is as follows e A Start Sequence button is used to start the defined sequence e In this example the mobile first goes to B position then to the A position and at the end to the C position before coming back to the Start Point waiting for a new start up request e The mobile stops for few seconds at each position to simulate an action time e AStop Sequence button interrupts the mobile sequence The mobile stops to the last targeted position and comes back to the Start Point waiting for a new start up request 35013944 00 November 2006 149 Description of the application 150 35013944 00 November 2006 Installing the application using Unity Pro 1 1 At a glance Subject of this This chapter describes the procedure for creating the application described It chapter shows in general and in more detail the steps in creating the different components of the application What s in this This chapter contains the following
82. er describes the IODDT language objects that are CANopen Master specific This section contains the following topics Topic Page Implicit Exchange Language Objects 94 Explicit Exchange Language Objects 105 35013944 00 November 2006 93 Programming Implicit Exchange Language Objects At a Glance Implicit exchange objects are automatically exchanged at each cycle of a task associated with the channel There objects are 1 IW Q and QW The table below presents the various implicit exchange objects of IODDT T COM CO The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the module number e c represents the channel number Channel error The table below presents the bit 9elr m c ERR Standard symbol Type Access Description Address CH ERROR BOOL R Channel error Ir m c ERR 94 35013944 00 November 2006 Programming Master status The table below shows the words IWr m c 0 IWr m c 2 and event indicator Standard symbol Type Access Description Address COMM STS INT R Communication status of master 96IWr m c O CAN STS INT R Status of CANopen Master 9oIWr m c 1 EVT STS INT R Event indicator IWr m c 2 The following figure gives an exemple of Master status indi
83. er presents the debugging of the CANopen bus master and slaves This chapter contains the following topics Topic Page How to Access the Debug Screens of Remote Devices 116 Debugging screen of the CANopen master 117 Slave debug screens 119 35013944 00 November 2006 115 CANopen Debugging How to Access the Debug Screens of Remote Devices At a Glance The following operations describe how to access different debug screens of the CANopen network elements Note The debug screenscan only be accessed in online mode Master debug To access the master debug screen perform the following actions screen Step Action 1 Connect to the manager PLC 2 Access the CANopen master configuration screen see How to access the CANopen master configuration screen p 83 3 Select the Debug tab Slave debug To access the slave debug screen perform the following actions screen Step Action 1 Connect to the manager PLC 2 Access the CANopen slave configuration screen see Configuration using Unity p 70 3 Select the Debug tab 116 35013944 00 November 2006 CANopen Debugging Debugging screen of the CANopen master At a Glance This screen can only be used in online mode Illustra
84. ergency objects 140 Explicit Exchange Language Objects 105 G General Architecture of a CANopen field bus 19 Generalities 47 55 H Hardware implementation 27 Processeurs 29 Implementation Principle 48 Implicit Exchange Language Objects 94 35013944 00 November 2006 235 Index Installation 31 L Language Objects Explicit Exchange 134 Implicit Exchange 133 Management of Exchanges 136 Language objects 129 Language objects associated with configuration 138 Length limitations 24 Method Implementation 50 Modbus Request FC43 225 O Other 43 Overview of CANopen communication 13 P PDO 108 Performances 51 Programming 91 Project browser 66 R READ VAR 218 S SDO 112 Access 112 218 225 Slave debug screens 119 Slaves Functions 68 Software Implementation 45 T T COM CPP110 132 T COM STS GEN 132 Topologic Addressing 108 Topology 21 V Visual diagnostics of processors 32 W WRITE_VAR 218 236 35013944 00 November 2006
85. es Br 7j Variables amp FB instances r t 4 Motion E terer Communication B Qj Program E CX Tasks i Bre MAST E E C3 1075 o Eh Big Move Sequence TENE LD Application r 07 Operator Screen_Animatin RE Feo Lexium Config arias Cx SR Sections E Events B serer Animations Tables Bre 7 Operator Screens FH 7 Documentation with the PLC in RUN Note The LD SFC and FBD type sections used in the application must be animated in online mode See Execution of Application in Standard Mode p 187 CANopen Master cycle Note If task cycle is faster than CANopen Master cycle outputs can be overwritted To avoid that it is recommended to have a task cycle higher than the The table below shows the procedure for creating an SFC section for the application Step Action 1 In Project Browser Program Tasks double click on MAST 2 Right click on Section then select New section Give your section a name Movement_sequence for the SFC section then select SFC language 3 The name of your section appears and can now be edited by double clicking on it 35013944 00 November 2006 173 Application using Unity Pro Step Action 4 The SFC edit tools appear in the window which you can use to create your Grafcet For example to create a step with a transition To create the s
86. f SDOs access 217 Ata glances asie neea exu ate ee 217 Communication functions exemple 218 Modbus request 225 Actions and 227 At aglance x fee ete BS eR Me ape T pda da aes 227 BE Pee ae ia Pe ee ee ee ede ead 228 ACTIONS ts he aie dto eur ne Ss ane Db ta ltd t 229 pere e bd eL ia Pres M ata t tale 231 koX Ceuta nh D eye aeree aL Uu ee te iE eee deas 235 35013944 00 November 2006 Safety Information P Important Information NOTICE Read these instructions carefully and look at the equipment to become familiar with the device before trying to install operate or maintain it The following special messages may appear throughout this documentation or on the equipment to warn of potential hazards or to call attention to information that clarifies or simplifies a procedure The addition of this symbol to a Danger or Warning safety label indicates A that an electrical hazard exists which will result in personal injury if the instructions are not followed This is the safety alert symbol It is used to alert you to potential personal injury hazards Obey all safety messages that follow this symbol to avoid possible injury or death A DANGER DANGER indicates an imminently hazardous situation which if not
87. field of an EMCY object is composed of 8 bytes containing e Emergency error code 2 bytes e the error register 1 byte e The factory specific error information 5 bytes The following illustration shows the structure of an EMCY object Register Error Information COB ID Error code error manufacturer specific 0x80 node ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Note The contents of the error code and error register are specified by CiA The Error tab see Slave diagnostics p 126 allows to consult the 4 last emergency messages received in chronological order The following table describes the content of error code 00xx Error code hex Description 00xx Error reset to zero or no error 140 35013944 00 November 2006 Language objects Error code 10xx Error code 2xxx Error code 3xxx Error code 4xxx Error code 50xx The following table describes the content of error code 10xx Error code hex Description 10xx Generic error The following table describes the content of error code 2xxx Error code hex Description 20xx Current 21xx Current input side of the device 22xx Internal current to the device 23xx Current output side of the device The following table describes the content of error code 3xxx Error code hex Desc
88. gency messages see Emergency objects p 140 received in chronological order Illustration The figure below shows a slave diagnostic screen 1 2 Altivar 31 CANopen Slave DSP 402 TEATV3112E eds 6 e Operational Emergency v mave Ez Description CANopen 7 Error E 1 0 Object O Channel 0 Emergency message counter il 3 Error code Meaning Factory error field 8100h Communication 0000000000h 4 126 35013944 00 November 2006 Diagnostics Elements and functions The table below describes the different areas which make up the master debug screen Read Number Channel 1 Tab The tab in the foreground indicates the type of screen displayed In this case the diagnostic screen Module This area is made up of the abbreviated heading of the module equipped with a CANopen port as well as 2 LEDs indicating the status of the module Channel This area allows you to select the communication channel to be debugged By clicking on the device you display the tabs e Description gives the characteristics of the device e CANopen allows read write of SDO online mode only e Faults allows you to see the last 4 error codes generated by the slave module tab only accessible in online mode see manufacturer s documentation e O Objects allows pre symbolizing of the input output objects This area also has an LED indicating the channel status Display This area is compo
89. he CAN RUN LED is on The following figures show the LEDs on the facade of modules Visualization screen of BMX P34 2010 Visualization screen of BMX P34 2030 32 35013944 00 November 2006 CANopen on BMX P34 processors LED status The following trend diagram represents the possible status of LEDs On Rapid flashing Initialization duration S 50 ms Flashing 200 ms 200 ms Pre operational state Off On Single flash 200 ms 1000 ms S Stopped a Double flash On Nodeguarding or 1200 ms 200 ms 200 ms 1000 ms 1 Heartbeat off On Triple flash 200 ms 200 ms 200 ms 200 ms 200 sL 1000 ms gt Data transfer Slow flashing B 1000 ms EN 1000 ms Self test Off On LEDs lit up Off 35013944 00 November 2006 33 CANopen on BMX P34 processors Description The following table describes the role CAN RUN and CAN ERR LEDs Display On Rapid flashing Flash Flashing Off Slow flashing xs o 9 amp RUN The master is Initialization in SImple The The masteris Starting green operational process master is pre CANopen stopped operational master self Triple
90. he CIA organization E EBOOL Boolean with edge detection and forcing possibilities EDM Multi language Electronic Data Sheet extended version of EDS file Extensions include European multilingual support as well as a description of physical character istics of a device EDS Electronic Data Sheet Description of a CANopen device profile description normalized by the DSP306 CiA specification EMCY Emergency A trigger event generated by an internal error fault This object is transmitted with each new error since error codes are independent mechanisms ETS Empty Terminal Support Additional information is stored in the PLC application for uploading H HEALTH bit from 1 Mode functions correctly bit from 0 e Bad configuration or e Module configured but absent or e module already configures but with the same address as an existing module or e No Communication 232 35013944 00 November 2006 Glossary INT Integer Integer 16 bit word IODDT Input Output Derived Data Type M Mapping Transformation of data consigned in a special and different format N NIM Network Interface Module Communication between the device and field bus NMT Network Management This is responsible for managing the execution configuration and errors in a CAN network P PDO Process Data Object object for data exchange between different elements is CAN open PROCESS Part of the system memory where the E S values are stored
91. he document CANopen Hardware Implementation Manual 35013944 00 November 2006 25 Overview of CANopen communication Conformity Class At a Glance The communication port CANopen conforms to the Schneider M20 class Class M20 Layer configuration Slave identification 1 63 Binary flow Kbit s 50 125 250 500 1000 Supported Devices 63 NMT NMT Master NMT Master conforms to DS301 Boot Procedure DSP 302 compliant SDO SDO Client 1 SDO Server 1 SDO Data transfer Sent segmented transfer PDO COB ID Read Write PDO TT 0 1 240 254 255 PDO Inhibit Time TPDOs Read Write PDO Event Timer TPDOs Read Write SYNC SYNC Production EMCY Consumer producer HEALTH Heartbeat 63 consumers 1 producer Node guarding yes Parameters Save parameters yes Note The number of supported PDOs is the following e Receiving 256 RxPDO e 256 Transmitted TxPDO 26 35013944 00 November 2006 Hardware implementation of CANopen At a Glance Subject of this Section What s in this Part This section describes the various hardware configuration possibilities of a CANopen bus architecture This part contains the following chapters Chapter Chapter Name Page 2 Hardware implementation of BMX processors P34 29 3 Presentation of CANopen devices 35 35013944 00 November 2006 27 Bus CANopen
92. he tasks are asynchronous in relation to exchanges on the bus Configuration This field enables you to e configure the PLC internal memory addresses where inputs from the CANopen devices will periodically be copied e configure the PLC internal memory addresses where outputs from the CANopen devices will periodically be read e configure the parameters of the CANopen bus 35013944 00 November 2006 87 CANopen Configuration Description of master configuration screen At a Glance The configuration screen allows configuration of the bus parameters as well as the inputs and outputs Inputs The figure below illustrates the inputs configuration area Inputs No of words MW 32 Index of first MW e Nb of bits 32 Index of first M 0 To configure the inputs of the bus slaves it is necessary to indicate the memory areas to which they will be periodically recopied To define this zone you must indicate a number of words MW from 0 to 32 464 the address of the first word from 0 to 32 463 the number of bits M from 0 to 32 634 the address of the first bit from 0 to 32 633 88 35013944 00 November 2006 CANopen Configuration Outputs The figure below illustrates the outputs configuration area r Outputs Maintain Reset No of words MW 32 3 Index of Ist MW 32 zi Nb of bits 95M
93. hus triggers modification of the address of inputs outputs objects in the program and movement of the variables associated with these objects Step Action 1 Access the CANopen configuration screen 2 Select the connection point to be moved a frame surrounds the selected connection point 3 Drag and drop the connection point to be moved to an empty connection point Result the Move Device screen appears A Topologic address 5 62 E Cancel Node identification 5 Help 4 Enter the number of the destination connection point Confirm the new connection point by pressing OK Result the Move Device screen appears Move Device Do you wantto update all references with the variables program amp data If yes then you will not be able to go back with the Undo command Vv It may take several minutes to update variables if many moved 1 0 variables are used Yes No Cancel 6 Confirm the modification by pressing Yes to modify the addresses of the inputs outputs objects in the program and move the variables associated with these objects 64 35013944 00 November 2006 CANopen Configuration Procedure for This feature is similar to the function for moving a device Duplicating a Device Step Action 1 Access the CANopen configuration screen 2 Right click on the device to be copied then click on Copy 3 Right click on the connection point
94. igned8 Depends on PDO objects in PDO mapping of the application 1 PDO mapping for the 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 8 PDO mapping for the 8 Application Unsigned32 object 1601 2 Receive PDO Mapping 0 Number of mapped application Unsigned8 Depends on PDO objects in PDO mapping of the application 1 PDO mapping for the 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 8 PDO mapping for the 8 Application Unsigned32 object 16FF 256 Receive PDO Mapping 0 Number of mapped application Unsigned8 Depends on PDO objects in PDO mapping of the application 1 PDO mapping forthe 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 200 35013944 00 November 2006 CANopen Master object dictionary Index Sub Description Object type Data type Comments Hex index 8 PDO mapping for the 8 Application Unsigned32 object 1800 1 Transmit PDO RECORD 0 Largest sub index supported Unsigned8 1 COB ID used by PDO Unsigned32 2 Transmission type Unsigned8 3 Inhibit time Unsigned16 4 Reserved Unsigned8 5 Event timer
95. ing of the application 1 PDO mapping for the 1 Application Unsigned32 Index 16 bit Sub index object to be mapped 8 bit length 8 bit 2 PDO mapping for the 2 Application Unsigned32 object 8 PDO mapping for the 8 Application Unsigned32 object 202 35013944 00 November 2006 CANopen Master object dictionary Object Dictionary entries according Profile DS302 Object The table below presents the object dictionary entries according profile DS302 Dictionary entries Index Sub Description Object type Data type Comments Hex index 1F22 Concise DCF ARRAY 0 Number of entries VAR Unsigned 1 Device with Node ID 1 VAR DOMAIN 127 Device with Node ID 127 DOMAIN 1F26 Expected Configuration Date ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F27 Expected Configuration Time ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F80 NMT Startup VAR Unsigned32 1F81 Slave Assignment ARRAY 0 Number of entries Unsigned8 1 Device with Node ID 1 Unsigned32 127 Device with Node ID 127 Unsigned32 1F82 Request NMT ARRAY 0 Number of entries Unsigned8 1 Request NMT for Node ID 1 Unsigned8 128 Request NMT for all Nodes Unsigned8 1F84 Device Type Identification ARRAY 0 Number of entries Unsigned8 35013944 00 November
96. ion 90xx External error 142 35013944 00 November 2006 Language objects Error code Fxxx The following table describes the content of error code Fxxx Error code hex Description FOxx Additional functions FFxx Specific to the device 35013944 00 November 2006 143 Language objects 144 35013944 00 November 2006 Quick start example of CANopen implementation IV At a glance Overview What s in this Part This section presents an example of CANopen implementation This part contains the following chapters Chapter Chapter Name Page 10 Description of the application 147 11 Installing the application using Unity Pro 151 12 Starting the Application 187 35013944 00 November 2006 145 Example of CANopen implementation 146 35013944 00 November 2006 Description of the application 10 Overview of the application At a glance The application described in this document is used for the driving of a working mobile The mobile goes to different working positions following a defined position sequence The mobile stops for few seconds at these positions The application s control resources are based on an operator screen which shows the status of the various position sensors and the actual mobile position value A warning message blinks when the mobile is moving 35013944 00 Novemb
97. its front panel In that case just select the standard function of the ATV31 without modifying any parameters Illustration of the following figure presents the different front panels of the ATV 31 speed drive ATV31 temecenique Altivar 31 ATV31xxxxx ATV31xxxxxxA 80 35013944 00 November 2006 CANopen Configuration Configuration of the ATV31 The ATV31 may be configured in the following way Step Action 1 Press on the ENT key to enter the ATV31 configuration menu 2 Use the Arrows keys to select the COM Communication menu then confirm using the ENT key 3 Use the Arrows keys to select the AdCO menu then confirm using the ENT key Enter a value Address on the CANopen bus Confirm using the ENT key then exit the menu using the ESC key 4 Use the Arrows keys to select the menu then confirm using the ENT key Enter a value Speed on the CANopen bus Confirm using the ENT key then exit the menu using the ESC key 5 Press several times on the ESC key to exit the configuration menu Note The configuration may be modified only when the motor is stopped and when the variable speed controller is locked cover closed Any modification entered will become effective after an Off On cycle of the speed controller For more information about the ATV31 configuration please refer to the Altivar speed drive user manual 3501
98. lands can be configured e using Advantys Configuration Software STB NCO 2212 e using Unity Pro Software STB NCO 2212 and NCO 1010 35013944 00 November 2006 213 Relation between PDOs and STB variables Configuration The procedure for configuring a STB island using Advantys Configuration Software using Advantys is as follow It only concerns the STB NCO 2212 module Configuration Island Step Action 1 In Advantys Configuration Software Version 2 2 0 2 or above create a new island 2 Select the STBNCO2212 Network Interface Module 3 Select the modules which will be used in the application 4 In the menu click on Island and on I O image overview Fieldbus Image Modbus Image Input Data a Object Ay ers Ln EO 6100 01 SE 502 ROS Ge Oa 6000 01 SSeS e ERE EE 6000 02 CON Eee 6000 03 63 TORINO 61 S ERES Eb 6000 04 Gl ee doe er E E Jl 6000 05 10 10 10 10 10 10 10 10 6000 06 gt 10 10 10 10 10 10 6401 01 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 6401 02 10 10 10 10 10 10 10110 10 10 10 10 10 10 10 2600 00 SYA SPR SYA SVR 2 23205320824 Spe Sys 9211923 32432 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2601 00 3201192118321
99. lays current errors classed according to their category e Internal errors e External errors e Other errors The Channel diagnostics screen displays current errors classed according to their category e External errors e Other errors The table below presents the possible errors of a CANopen function Error type Error Language object External The CANopen master is not operational MWr m c 2 0 On or several slaves have errors or are not MWr m c 2 1 operational Other Configuration error MWr m c 2 3 Overrun of the reception queue low priority 9elWr m c 0 0 CAN controller overrun 96IWr m c 0 1 CAN controller disconnected from the bus 9elWr m c 0 2 CAN controller error 9elWr m c 0 3 The CAN controller is no longer in error mode 9eIWr m c 0 4 Overrun of the transmission queue low priority 9elWr m c 0 5 Overrun of the reception queue high priority 9elWr m c 0 6 Overrun of the transmission queue high priority 9elWr m c 0 7 The task cycle time is greater than the CANopen eIWr m c 0 8 master cycle time 35013944 00 November 2006 125 Diagnostics Slave diagnostics At a Glance Slave diagnostics are only performed at the device level The slave diagnostic screen displays e the received emergency messages counter e The last four emer
100. ly stored in the device For more information about the configuration of an ATV31 61 71 and Tesys U using Powersuite Software or about the configuration of a Lexium 05 with Power Suite 2 please refer to the device user manual UNILINK provides simplified parameter setting for Lexium 05 servo drives It s used to configure sets and adjusts Lexium MHDA MHDS drives according to the associated SER BPH brushless motor and the application requirements For more information about the configuration of a Lexium 15 using UNILINK please refer to the Lexium user manual 78 35013944 00 November 2006 CANopen Configuration IclA Easy Software The IclA Easy operating software is used to configure an IcLA It includes a graphical user interface and can be used for commissioning diagnostics and testing IcIA Easy offers the following functions Input and display of device parameters Archiving and duplication of device parameters Display of status and device information Positioning of the motor with the PC Initialisation of reference movements Access to all documented parameters Diagnosis of operational malfunctions For more information about the configuration of an ICLA using IcLA Easy please refer to the ICLA user manual 35013944 00 November 2006 79 CANopen Configuration Configuration using an external tool Manual configuration At a glance ATV 31 devices can also be configured manually from
101. mber of the bit 1 Operational The table below presents the word 1Wr m c 35 slaves from 1 to 16 Standard symbol Type Access Description Address SLAVE ACTIV 1 BOOL R Slave operational on the bus device 1 96IWr m c 35 0 SLAVE ACTIV 2 BOOL R Slave operational on the bus device 2 96IWr m c 35 1 SLAVE ACTIV 3 BOOL R Slave operational on the bus device 3 96IWr m c 35 2 SLAVE ACTIV 4 BOOL R Slave operational on the bus device 4 96IWr m c 35 3 SLAVE ACTIV 5 BOOL R Slave operational on the bus device 5 96IWr m c 35 4 SLAVE ACTIV 6 BOOL R Slave operational on the bus device 6 96IWr m c 35 5 SLAVE ACTIV 7 BOOL R Slave operational on the bus device 7 96IWr m c 35 6 SLAVE ACTIV 8 BOOL R Slave operational on the bus device 8 96IWr m c 35 7 SLAVE ACTIV 9 BOOL R Slave operational on the bus device 9 96IWr m c 35 8 SLAVE ACTIV 10 BOOL R Slave operational on the bus device 10 96IWr m c 35 9 SLAVE ACTIV 11 BOOL R Slave operational on the bus device 11 96IWr m c 35 10 SLAVE ACTIV 12 BOOL R Slave operational on the bus device 12 96IWr m c 35 11 SLAVE ACTIV 13 BOOL R Slave operational on the bus device 13 96IWr m c 35 12 SLAVE ACTIV 14 BOOL R Slave operational on the bus device 14 96IWr m c 35 13 SLAVE ACTIV 15 BOOL R Slave operational on the bus device 15 96IWr m c 35 14 SLAVE ACTIV 16 BOOL R Slave operational on the bus device 16 96IWr m c 35 15 The node number corresponds
102. mment w r Actio e 49 Configuration Done BOOL M index subindex DINT Lexium_Config_Step INT Lexium_Disabling INT 6 Lexium operation enable INT 15 1 Q MobleatPoson A BOOL Mobile at Position B BOOL 1 9 Mobile at Position C BOOL 1 9 Mobile at Start Position BOOL t Mobile In Progress BOOL te New SetPoint BOOL QW 3 55 0 0 0 25 4 4 Operation Done BOOL 4 Position A DINT 50000 1 49 Position B DINT 100000 4 Position C DINT 200000 Ready For Stop BOOL 50 Sequence Number INT Start Configuration EBOOL E Stop BOOL Target Reached BOOL 561W13 5510 0 0 22 10 170 35013944 00 November 2006 Application using Unity Pro Note At start up the Lexium 05 is in Ready to switch on state rdy is displayed To be able to drive the motor the Lexium must be in Operation enable state To switch in this state a bus command sets the 4 last bits of the Lexium control word to 1 00001111 binary 15 decimal To switch the Lexium 05 to the Ready to switch on state a bus command sets the sixth and the seventh bit of the Lexium control word to 1 00000110 binary 6 decimal For more information on Lexium control word consult the Lexium manufacturer manuel 35013944 00 November 2006 171 Application using Unity Pro Creating the program in SFC for managing the move s
103. mmunication This chapter contains the following topics Topic Page Principles 14 CAN At a Glance 16 General architecture of the CANopen field bus 19 Topology 21 Length limitations of the CANopen network 24 Conformity Class 26 35013944 00 November 2006 13 Overview of CANopen communication Principles Introduction Master Slave Structure Baud rate Point to point communication Originally developed for onboard automobile systems the CAN communication bus is now used in many fields including e Transport e Mobile devices e Medical equipment e Construction e Industrial control Strong points of the CAN system are e The bus allocation system e Error detection e Reliability of data exchanges The CAN bus has a master slave bus management structure The master manages e The initialization of the slaves e The communication errors e The statuses of the slaves The baud rate depends on the length of bus see Length limitations of the CANopen network p 24 and the topology Communication on the bus functions point to point At any time each device can send a request to the bus to which the devices concerned respond The priority of the requests circulating on the bus is determined by an identifier for each message 14 35013944 00 November 2006 Overview of CANopen communication Design principles of the bus The
104. mple in ST read the node 5 SDO index 1018 subindex 3 language if 400 then subindex_index 16 00031018 SMW1052 50 timeout 5 secondes READ_VAR ADDM 0 0 2 5 SDO subindex_index 0 3MW1050 4 SM WiL00e2 3 SM400 0 end_if Write the node 31 SDO index 203C subindex 2 if M401 then subindex_index 16 0002203C SMW1152 50 timeout 5 secondes MW1153 2 length 2 bytes SMW1200 16 03E8 value of object WRITE VAR ADDM 0 0 2 31 SDO subindex index 0 SMW1200 1 MW1150 4 SM401 0 end_if 224 35013944 00 November 2006 Example of SDOs access Modbus request example At a Glance SDO read example Write SDO example From a Man Machine interface example XBT it is possible to access the SDOs using the Modbus FC43 request Node reading 1F object 1005 subindex 00 length 8 bytes FC MEI Prot Nid Index Sub Offset Length 2B oD 00 1F 1005 00 00 00 0008 Response OK reception of 4 bytes FC MEI Prot Nid Index Sub Offset Length Object value 2B oD 00 1F 1005 00 00 00 00 04 80 00 00 00 Failure SDO cancellation code FC MEC Extlength Excpt code SDO abort code AB FF 00 06 oD EC 06 02 00 00 Node reading 1F object 203C subindex 02 length 2 bytes 03 E8 FC MEI Prot Nid Index Sub Offset Le
105. n Inputs Outputs Nb of words MW 308 Hold Reset Index of lst MW 0 e Nb of words MW 255 Nb ofbits 6M p j Index of Ist MW 400 E Index of 1st 5M 0 3 Nb of bits M 32 E Index of 1st 95M 32 E Function Bus parameters CANopen v Transmission Speed 500 v kBaud Task SYNC message COB ID 128 MAST SYNC message periode 100 ms Click on the button in the toolbarto validate the configuration Note When the project is build warning and error messages can be displayed in the output window If it not displayed click on View Output Window Warning messages indicates that there are more configured words than necessary on the bus Error messages indicate that configured words are missing 35013944 00 November 2006 163 Application using Unity Pro Configuration of the equipments At a glance Configuration of Once the slave is declared it s possible to have access to its configuration window The table below shows the procedure for the Lexium configuration the Lexium Servo Drives Step Action 1 In the Project browser double click on Configuratio
106. n CANopen 1 0 objects Channe r CANopen slave details Device name 065 Vendor name BERGER LAHR Description IcIAN 065 based on profiles DS 301V4 01 and DSP402V2 0 BLICLAN65 0100E r Request to send Request to send Lecture SDO Y ao bytes max 164 Vendor name 164 v Parameter name Description 164 v Parameter size Byte Send Status Response received I gt The value is displayed in the following way LSB MSB For a word of 4 bytes containing the value 1 the displayed value is 01 00 00 00 35013944 00 November 2006 113 Programming Modbus request From a Man Machine interface example XBT it is possible to access the SDOs using the Modbus FC43 request BMX P34 2010 2030 Sending request FC43 TTTTS Altivar For more information about the use of the request Modbus FC43 0xD see Modbus request example p 225 SDO Timeouts Various timeouts are implemented They depend on the type of object as well as the type of access read write Object Timeout 1010h 15s 1011h 3s 2000h to 6000h 8s All other objects SDO Reading 1s SDO Writing 2s 114 35013944 00 November 2006 Debugging communication on the CANopen bus 7 At a Glance Aim of this Chapter What s in this Chapter This chapt
107. n comm head to access the I O objects tab 35013944 00 November 2006 167 Application using Unity Pro Declaration of variables At a glance All of the variables used in the different sections of the program must be declared Undeclared variables cannot be used in the program Note For more information see Unity Pro online help click on then Unity then Unity Pro then Operate modes and Data editor Procedure for The table below shows the procedure for declaring application variables declaring Step Action variables 1 In Project browser Variables amp FB instances double click on Elementary variables 2 In the Data editor window select the box in the Name column and enter a name for your first variable Now select a Type for this variable When all your variables are declared you can close the window 168 35013944 00 November 2006 Application using Unity Pro Variables used The following table shows the details of the variables used in the application accion Variable Type Definition Action_Time TIME Mobile stopping time at each position Configuration_Done BOOL The Lexium configuration is done Homing_Done BOOL The definition of the origin point is done index_subindex DINT CANopen parameter adresses for the WRITE_VAR block Lexium_Config_Step INT Configuration step
108. n then 3 CANopen 2 In the CANopen window double click on the Lexium representation The Lexium configuration window opens Click on the PDO tab to see the PDO configuration the variables and their topological addresses For this example select PDO2 Static in the Transmit l and the Received Q windows H PDO rfj Eror control 5 Config Transmit 1 PDO Tr Ty Inhibi Even Symbol Topo Addr M CO Index zE Variables Status lexium 961W 3 550 6041 IC Display only umapped variables VEN PDO2 255 9 100 10081 ParameterName Ind NIME lexium IW 3 55 0 6041 suus RAMPsym 3006 01 Positi lexium 1D 3 55 0 6064 Oat 3008 01 PDO 3 25 0 100 ANAT act 3009 01 L Status lexium 1W 3 55 0 6041 ANA2 act 3009 05 gt Veloci lexium 1D 3 55 0 606C PLCopenRx1 3018 05 PDO4 254 0 0 PLCopenRx2 3018 06 LNX Ls PLCopenTx1 301B 07 l PLCopenT x2 301B 08 Receive Q OGactivate 301B 09 T _actionS tatus 301C 04 PDO Tr Inhibi Even Symbol Topo Addr 95M CO Index p actRAMPusr 301F 02 Em CUR T target 3020 04 Contr lexium QW 3 55 0 6040 SPEEDn target 3021 04 Wey PDO 20 255 16 337 PTPp abs 3023 01 f Cont lexium QW 3 55 0 6040 PTPp relpref 3023 03 ERE Target lexium QD 3 55 0 E LP b target 3023 0
109. nfiguration 35013944 00 November 2006 165 Application using Unity Pro Step Action 8 Close the window For more information about STB configuration see STB island configuration p 213 Declaration ofl O table below shows the procedure to load the configuration defined with the objects Advantys Configuration software Step Action 1 Open the 3 55 0 0 Lexium05 window by clicking on the Lexium module icon in the CANopen window Click on the Lexium05 and then on the I O object tab 2 Click on the I O object prefix address cH then on the Update grid button the channel address appears in the I O object grid 3 Click on the line CH 3 55 0 0 and then in the I O object creation window enter a channel name in the prefix for name zone Lexium for example 4 Now click on different Implicit I O object prefix adresses then on update grid button to see the names and addresses of the imlicit I O objects H Overview H CANopen l8 1 0 objects SS i Address Name 1 0 variable creation HITEC 5000 Lexum Prefixe for name 2 961D 3 55 0 0 0 Lexium CapIPos 3 ID 3 55 0 0 0 2 _ Lexium Cap2P os Type vj 4 ID 3 55 0 0 0 4 Lexium param27 num 5 96 Di3
110. ng the LEDs located on the forward face of the processor to search for faults on the CANopen bus see Visual diagnostics of CANopen processors p 32 Next you can use the procedure described below which details bus start up management and the checks to be carried out using the language objects provided by the PLC The following diagram indicates the different phases of the procedure A slaves Identify inactive A NOK r4 16 Ax YES v CANstate has the value Check 96IWO y 2 0 Bits 0 1 2 3 5 6 and 7 0 i YES Check IWO y 2 1 CANopen Master must be in RUN state YES Check the active slaves OK Slave diagnostics YES YES x4 l0 y 2 ERR 1 Check IW0 y 2 3 to 96IWO y 2 42 Assigned devices IW0 y 2 3 to IW0 y 2 3 must be without configuration error 61WO0 y 2 19 to 61WO y 2 22 without emergency error IW0 y 2 27 to 61WO y 2 30 In operationnal state IW0 y 2 35 to IW0 y 2 38 Normal operation To understand the various states of IW see Implicit Exchange Language Objects 94 124 35013944 00 November 2006 Diagnostics Master Diagnostics At a Glance Module Diagnostics Channel diagnostics The CANopen bus master can be diagnosed e at module level e at channel level The Module diagnostics screen disp
111. ngth Data 2B oD 01 1F 20 C3 02 0000 0002 03 E8 Response OK reception of 4 bytes FC MEI Prot Nid Index Sub Offset Length 2B oD 00 1F 20 3C 02 00 00 0000 Failure SDO cancellation code FC MEC Extlength Excpt code SDO abort code AB FF 00 06 oD EC 06 02 00 00 35013944 00 November 2006 225 Example of SDOs access 226 35013944 00 November 2006 Actions and transitions At a glance Subject of this chapter What s in this Chapter This chapter contains the actions and the transitions used in the grafcet See Creating the program in SFC for managing the move sequence p 172 This chapter contains the following topics Topic Page Transitions 228 Actions 229 35013944 00 November 2006 227 Actions and transitions Transitions At a glance The next tasks written in LD are used in different transitions of the grafcet Back_to_Start_ The action associated to the Back_to_Start_Point transition is as follows Point transition Stop Back_to_Start_Point Y M 7 Sequence _Number gt 3 The sequence is over Lexium_ The action associated to the Lexium_Disabled transition is as follows Disabled transition COMPARE _ Lexium_Disabled Lexium Statusword 2 0 Test the Lexium 05 state 228 35013944 00
112. on The communication function syntax is as follows ADDM IN 0 0 2 2 ST MW2100 8 LD 50 ST SMW2182 timeout 5 secondes LD 2 ST MW2183 Length Read the Vendor ID object slave 02 CANopen Network READ VAR ADR MW2100 8 OBJ SDO NUM 16 00011018 NB 0 GEST MW2120 4 RECP MW2110 4 Write the value 164FFFF slave 2 ouputs CANopen Network LD 16 ffff ST W2200 oe WRITE VAR ADR MW2100 8 OBJ SDO UM 16 00016300 0 EMIS MW2200 1 GEST MW2180 4 220 35013944 00 November 2006 Example of SDOs access Note The offset parameter must be set to 0 Note The subindex index parameter is encoded in a simple word subindex is the higher byte Parameter The following table outlines the various parameters of the WRITE VAR function Description of the WRITE VAR Function Parameter Description ADDM r m c node Address of the destination entity of the exchange e r the processor rack number processor slot in the rack 0 e c channel only use the channel 2 for CANopen e node identifier of the transmitting device on the CANopen bus SDO SDO object type subindex index Double word or immediate value identifying the CANopen SDO index or subindex The most significant word making up the double word contains the sub index and the least significant word cont
113. online mode e Diagnostics accessible only in Online mode General parameters area This field allows you to select the slave function Configuration area This area is used to set up the channels of the devices Some devices can be configured with an external tool In this case the configuration is stored in the device and you cannot enter configuration parameters because this field is empty Note Refer to the documentation of each device for information on general configuration adjustment and debugging parameters Note All parameters are not sent when the device takes its configuration The CPU send only parameters which are different from the default values 72 35013944 00 November 2006 CANopen Configuration PDO Tab PDOs allow to manage the communication flow between the CANopen Master and g the slaves The PDO tab allows to configure a PDO This screen is divided in 3 parts H PDO FBR Erorconrol 5 Config Transmit 96T PDO Tr Ty Inhibi Even Symbol Topo Addr M CO Index Mea Variables 4 Status lexium IW 3 1 0 0 MW16 6041 C Display only umapped variables Wey PDO2
114. ontrol of the speed and or torque All the parameters that can be mapped are mapped in the supplemental PDOs for an adjustment of the operating parameters length of acceleration additional surveillance current value e additional control PID outputs command Advanced This function allows control of the speed and or torque Certain parameters can be configured and can also be mapped in the PDOs to allow an adjustment of the operating parameters length of acceleration additional surveillance current value e additional control PID outputs command Controlling This function is especially created for CANopen communications with the built in Altivar 61 71 controller card and all the application cards pump control Default This feature is the default function for certain devices It may not be modified All the slaves except ATV and Lexium appears grayed out and cannot be modified Function Default v Note Certain devices can only handle one function In this case the function 35013944 00 November 2006 69 CANopen Configuration Configuration using Unity At a glance Procedure Some equipments can be configured directly from Unity FTB Osicoder OTB Preventa STB NCO 1010 Tego Power To configure a slave perform the following actions Step Action 1 Access the CANopen see How to access
115. open 46 35013944 00 November 2006 Generalities At a Glance Subject of this Section What s in this Chapter This chapter describes the software implementation principles for the CANopen on Modicon M340 bus This chapter contains the following topics Topic Page Implementation Principle 48 Implementation method 50 Performances 51 35013944 00 November 2006 47 Generalities Implementation Principle At a Glance In order to implement a CANopen bus it is necessary to define the physical context of the application in which the bus is integrated rack supply processor modules then ensure the necessary software is implemented The software is implemented in two ways with Unity Pro e in offline mode e in online mode 48 35013944 00 November 2006 Generalities Implementation The following table shows the different implementation phases Principle Mode Phase Description Offline Configuration Entry of configuration parameters Offline or online Symbolization Symbolization of the variables associated with the CANopen port of the BMX P34 processor Programming Programming the specific functions bit objects or associated words Specific instructions Online Transfer Transferring the application to the PLC Debugging Different resources are available for debugging the Diagnostics application cont
116. ormances of CANopen are shown below The time given to each task cycle is as follows Task Minimum CANopen inputs 100 us 15 us par PDO CANopen outputs 100 us 15 us par PDO Diagnostics 100us The average duration of READ VAR and WRITE VAR functions is as follows Function Minimum READ VAR 10 ms WRITE VAR 20 ms The SDO treatment influence on the task cycle is about 150 us Note Only one SDO is exchanged at the same time on the bus It is necessary to await the end of the preceding exchange to begin a new exchange The end of exchange polling is carried out at each task cycle so there is one SDO exchange for each task cycle 35013944 00 November 2006 51 Generalities 52 35013944 00 November 2006 Configuration of communication on the CANopen bus 5 At a Glance Aim of this This chapter presents the configuration of the CANopen field bus and of the bus Chapter master and slaves What s in this This chapter contains the following sections 2 Chapter Section Topic Page 5 1 General points 55 5 2 Bus configuration 56 5 3 Device configuration 67 5 4 Master configuration 82 35013944 00 November 2006 53 CANopen Configuration 54 35013944 00 November 2006 CANopen Configuration 5 1 General points Generalities Introduction Configuration of a CANopen architect
117. ow of the queue for application specific for the SDO interface Bit12 1 The master cycle time is greater than 256 ms Bit13 1 Reserved Bit14 1 Reserved Bit15 1 The Master is alone on the bus Check that the cable is connected 98 35013944 00 November 2006 Programming Assigned slaves The table below shows the words IWr m c 3 IWr m c 6 Standard symbol Type Access Description Address SLAVE ASSIGNED 1 16 INT R For assigned slaves from 1 to 16 9eIWr m c 3 SLAVE ASSIGNED 17 32 INT R For assigned slaves from 17 to 32 96IWr m c 4 SLAVE ASSIGNED 33 48 INT R For assigned slaves from 33 to 48 lWr m c 5 SLAVE ASSIGNED 49 64 INT R For assigned slaves from 49 to 63 IWR m c 6 If the bit is equal to 0 no slave is assigned to this bit If the bit is equal to 1 a slave is assigned to this bit The node number corresponds to the number of the bit 1 Slaves The table below shows the words IWr m c 11 IWr m c 14 configured Standard symbol Type Access Description Address SLAVE CONF 1 16 INT R For configured slaves from 1 to 16 lWr m c 11 SLAVE CONF 17 32 INT R For configured slaves from 17 to 32 lWr m c 12 SLAVE CONF 33 48 INT R For configured slaves from 33 to 48 lWr m c 13 SLAVE CONF 49 64 INT R For configured slaves from 49 to 63 lWr m c 14 If the bit is equal to 0 the slave is not configured and cannot start If
118. pen Bus 3 CANopen comm head 01 00 Connections configured 1 LEXIUM05 5 Follow the same procedure to declare the Advantys STB island In the New Device window enter the node number 54 then double click on Other and select the STB_NCO_2212 Note This example shows PDO and SDO exchange towards a speed drive However for speed drive configuration and control the use of Motion Function Block is recommended Note This Advantys STB island configuration has to be set up using the Advantys Configuration Software 160 35013944 00 November 2006 Application using Unity Pro STB island configuration The table below shows the procedure to configure a STB island with Advantys Configuration Software Step Action 1 Open Advantys Configuration Software Version 2 2 0 2 and create a new STB Island 2 Insert a STB NCO2212 supply module a STB DDI3420 discrete input module and a STB 0003410 discrete output module on the island 3 Save the configuration and click on File Export for exporting the island in DCF format The Export window opens Export r Target Information Directory DADATA E Filename TestNC02212 dcf Short file name Prefix Export Format PLC Information DCF for TwidoSoft CoDeSys etc Address Type Y O EDS for SyCon etc Topological Adress Connection Point GSD for SyGon Rack O SCY for
119. phase at the end of which it enters pre operational state At this stage only communication by SDO is allowed After receiving a start up order the device goes into an operational state PDO exchanges are then started and communication by SDO is still possible PDO are objects that are the communication interface with process data and allow Real Time data exchange All PDO in a CANopen device describe implicit exchanges between this device and its communication partners on the network PDO exchange is authorized as soon as the device is in Operational mode SDO allow access to device data by explicit requests The SDO service is available when the device is in an Operational or Pre operational state 18 35013944 00 November 2006 Overview of CANopen communication General architecture of the CANopen field bus At a Glance A CANopen architecture includes e A Bus Master e slave devices Note The address of CANopen master is node n 127 35013944 00 November 2006 19 Overview of CANopen communication Architecture The following figure gives an example of CANopen architecture example O Tesys U Osicoder 20 35013944 00 November 2006 Overview of CANopen communication Topology Introduction A CANopen field bus always has a master the BMX P34 processor 2010 2030 The bus editor enables you to declare the network devices and to associate them to a uni
120. position Mobile action x Operation Done 5 Action Time PT EL Ready_for_stop 5 Management of Lexium 05 control bit Target_reached New_Setpoint te Description of e The first line is used to simulate the action time once the mobile is at the target the Application position When the Mobile Action step is active a TON timer is triggered When Section the PT time is reached the TON output switches to 1 validate the transition variable Operation done and set the Ready for stop variable e The second line resets the variable New Setpoint on the Target reached positive transition 176 35013944 00 November 2006 Application using Unity Pro Procedure for Creating an LD Section The table below describes the procedure for creating part of the Application section Step Action 1 In Project Browser Program Tasks double click on MAST 2 Right click on Section then select New section Name this section Application then select the language type LD The edit window opens 3 To create the contact Action_Mobile x click on then place it in the editor Double click on this contact then enter the name of the step with the suffix x at the end signifying a step of an SFC section Confirm with OK 4 To use the TON block you must instantiate it Right click in the editor then click on Data Selection and on Click on the Function and Function Block Types
121. pter contains the following topics Topic Page Communication functions exemple 218 Modbus request example 225 35013944 00 November 2006 217 Example of SDOs access Communication functions exemple At a Glance WRITE_VAR There are 3 possible repres e the FBD representation entations e the Ladder representation e the IL representation It is possible to access SDOs using the communication functions READ_VAR and FBD The FBD representations of the communication functions are the following representation WRITE_VAR ADDM r m c node j ADR SDO OBJ subindex index NUM offset __ NB MW200 2 1 EMIS SSMW210 4 GEST GEST READ VAR ADDM r m c node 4 ADR RECP SDO OBJ subindex index NUM offset J NB SSMW210 4 GEST GEST MW210 4 MW200 16 MW210 4 218 35013944 00 November 2006 Example of SDOs access Ladder The Ladder representations of the communication functions are the following representation WRITE_VAR EN ENO ADDM r m c node ADR SDO OBJ subindex index NUM offset __ NB MW200 2 EMIS MW210 4 GEST GEST MW210 4 READ VAR EN ENO ADDM r m c node ADR RECP MW200 16 SDO 4 OBJ subindex index NUM offset NB MW210 4 GEST GEST MW210 4 35013944 00 November 2006 219 Example of SDOs access IL representati
122. que address There are 2 types of devices e compact elements composed of a single module e modular elements composed of a communicator and one or several modules Modular devices can for example be STB islands see Configuration using an external tool Configuration software p 76 or OTB devices 35013944 00 November 2006 21 Overview of CANopen communication CANopen topology The devices can be connected to the bus e Drop using nodes connected to a single port or multi port shunt box e Chaining with single or double connectors Whatever the chosen topology type length limitations see Length limitations of the CANopen network p 24 must be taken into account These limitations concern e the bus totality that is the maximum distance between 2 nodes e Segment length e Tap length All segments must have a line termination at each extremity The following illustration shows an example shunt topology FTB STB NCO 1010 Osicoder 22 35013944 00 November 2006 Overview of CANopen communication Line terminator Number of devices ina segment It is imperative to put a line termination in the proximity of each bus extremity in order to minimize reflections at the end of the line Each line termination must be connected between lines CAN_H and CAN_L These terminations are resistant to 120Q 1 4 W 5 resistors Note In some cases the line termination is included in
123. quest and using the READ_STS instructions read of status words These exchanges apply to a set of sMw objects of the same type status belonging to a channel Note These objects provide information about the module e g type of fault ona channel The diagram below shows the different types of explicit exchanges that can be made between the processor and module PLC processor MWr m c Status parameters we READ_STS Communication module Communication channel Command parameters Adjustment parameters parameters Initial adjustment parameters Status parameters Command parameters Current adjustment parameters 134 35013944 00 November 2006 Language objects Managing exchanges During an explicit exchange it is necessary to check its performance in order that data is only taken into account when the exchange has been correctly executed To do this two types of information is available e information concerning the exchange in progress e The exchange report The following diagram describes the management principle for an exchange Explicit Exchange Execution Exchange in progress Exchange Report 35013944 00 November 2006 135 Language objects Management of Exchanges and Reports with Explicit Objects At a Glance
124. r 2006 Programming 6 2 Objects concerning the devices At a glance Subject of this section What s in this Section This chapter describes the objects that are used by the devices e PDOs e SDOs This section contains the following topics Topic Page Exchanges using PDOs 108 Exchanges using SDOs 112 35013944 00 November 2006 107 Programming Exchanges using PDOs At a Glance The PDOs used topologic addresses 1 IW QW and internal variables SM or SMW Hi 1 5 Error cortrol 5 Config Transmit 961 Topo Addr Variables C Display only umapped varia Parameter Name Ind RAMPsym 3006 01 10 ANAI act 2 act PLCopenRx1 PLCopenR x2 PLCopenTx1 PLCopentT x2 Eu joacnate 3018 00 PDO Tr Ty Inhibi Even Topo Addr ac onstatus 301 04 y p actRAMPusr 301 02 CUR target _ 3020 04 AMWI6 SPEEDn taret 302104 61W3 110 0 0 16 ID 3 1 0 0 0 8 Topologic address Internal variable PTPp_abs 3023 01 QW 3 1 0 0 0 16 PTPp relpref 3023 03 PTPp target 3023 05 1 0013 10 0 0 8 PTPp relpact 3023 06 GEARdenom 3026 03 QW 3
125. ramming Standard channel faults CH_FLT The following table explains the meaning of the CH_FLT smMWr m c 2 status word bits Reading is performed by a READ_STS Object Function Meaning MWr m c 2 Status of the CANopen Master Bit 021 The CANopen Master is not in operationnal state Bit 1 1 Slave has an error one or more slaves have errors or are not in operationnal state Bit 2 Reserved Bit 3 1 Configuration error Bit 4 to bit 7 Reserved Bit 8 to Bit 10 CAN ERR led 000 off 001 single flash 010 double flash 011 triple flash 111 on Bit 11 to Bit 13 CAN RUN led e 001 single flash e 100 blinking e 111 0n Bit 14 to Bit 15 Reserved MWr m c 3 Generic error count Number of received emergency messages with code 10xxH MWr m c 4 Device hardware error count Number of received emergency messages with code 50xxH MWr m c 5 Device software error count Number of received emergency messages with code 60xxH MWr m c 6 Communication error count Number of received emergency messages with code 81xxH MWr m c 7 Protocol error count Number of received emergency messages with code 82xxH MWr m c 8 External error count Number of received emergency messages with code 90xxH MWr m c 9 Device specific Number of received emergency messages with code FFxxH 106 35013944 00 Novembe
126. ription 30xx Voltage 31xx Principal voltage 32xx Internal voltage to the device 33xx Output voltage The following table describes the content of error code 4xxx Error code hex Description 40xx Temperature 41xx Ambient temperature 42xx Device temperature The following table describes the content of error code 50xx Error code hex Description 50xx Device hardware 35013944 00 November 2006 141 Language objects Error code 6xxx Error code 70xx Error code 8xxx Error code 90xx The following table describes the content of error code 6xxx Error code hex Description 60xx Device software 61xx Internal software 62xx User software 63xx Data set The following table describes the content of error code 70xx Error code hex Description 70 Additional modules The following table describes the content of error code 8xxx Error code hex Description 80xx Monitoring 81xx Communication 8110 CAN overflow objects lost 8120 CAN in passive error mode 8130 Life Guard error or Heartbeat error 8140 Recovered from bus 8150 Collision during COB ID transmission 82xx Protocol error 8210 PDO not processed due to length error 8220 PDO length exceeded The following table describes the content of error code 90xx Error code hex Descript
127. rolling inputs outputs and diagnosing faults Language objects or IODDTs e The Unity Pro debugging screen e Signaling by LED Offline or online Documentation Printing the various information relating to the configuration of the CANopen port Note The above order is given for your information Unity Pro software enables you to use editors in the desired order of interactive manner A DANGER UNEXPECTED BEHAVIOUR OF APPLICATION Use diagnosis system information and monitor the response time of the communication In case of disturbed communication the response time can be too high Failure to follow this instruction will result in death or serious injury 35013944 00 November 2006 49 Generalities Implementation method Summary The following flowchart shows the CANopen port implementation method for BMX P34 processors Declaration and configuration slaves Configuration of the master Programming the application Using PDO object Using READ VAR WRITE VAR function cd i Transfer of the application to the PLC Debugging and diagnostics Documentation 50 35013944 00 November 2006 Generalities Performances Introduction Impact on task cycle time Communication by SDO Various perf
128. rs provide motor control for choices ranging from a basic motor starter with solid state thermal overload protection to a sophisticated motor controller which communicates on networks and includes programmable motor protection This device performs the following functions e Protection and control of 1 phase or 3 phase motors e isolation breaking function e electronic short circuit protection e electronic overload protection e power switching e Control of the application alarming warning protection function alarms e g overload pending status monitoring running ready fault application monitoring running time number of faults motor current values fault logging last 5 faults saved together with motor parameter values The following figure gives an example of a Tesys U device 44 35013944 00 November 2006 Software Implementation of CANopen communication At a Glance Subject of this Section What s in this Part This section describes the different possibilities for software configuration programming and diagnostics in a CANopen application This part contains the following chapters Chapter Chapter Name Page 4 Generalities 47 5 Configuration of communication on the CANopen bus 53 6 Programming 91 7 Debugging communication on the CANopen bus 115 8 Diagnostics 123 9 Language objects 129 35013944 00 November 2006 45 Bus CAN
129. rts INC Sequence Number Note For the incrementation action the qualifier must be positionned on P rising edge The action associated to the Return to Start Point step is as follows Target Position Loading Lexium Target_Position 0 Start a new positioning New Setpoint 71 The action associated to the Disable Lexium step is as follows Lexium voltage disabling Lexium Controlword Lexium disabling 230 35013944 00 November 2006 Glossary A ADVANTYS Schneider CANopen Configuration tool for PLC islands B BOOL Boolean C CAN Controller Area Network field bus originally developed for automobile applications and now used in many sectors CiA CAN in Automation international organization of users and manufacturers of CAN devices COB Communication Object transport unit on CANopen bus A COB is identified by a unique identifier which is coded on 11 bits 0 2047 COB contains a maximum of 8 data bytes The transmission priority of a COB is given by its identifier The weaker the identifier the more the associated COB is priority COB ID COB Identifier unique identifier of a COB on a CANopen network The identifier determines the priority of a COB 35013944 00 November 2006 231 Glossary CSDO SDO Client D DINT Double integer 32 bit word Discrete Module Tout Ou Rien DS Draft Standard specifications document created by t
130. s program Lexium_Disabling INT Shutdown command Lexium_operation_enable INT Command to start the Lexium drive Mobile _at_Position_A BOOL Mobile at the A position Mobile _at_Position_B BOOL Mobile at the B position Mobile _at_Position_C BOOL Mobile at the C position Mobile_at_start_position BOOL Mobile at the start position Mobile_in_Progress BOOL The mobile is moving New_SetPoint BOOL Start the next move Operation_done BOOL The mobile operation is done Position_A DINT First positioning value Position_B DINT Second positioning value Position_C DINT Third positioning value Ready_For_Stop BOOL The mobile goes to the last targeted position indicated before stopping the application Then it comes back to the start position Run BOOL Start of the sequence Sequence_Number INT Number of displacements made by the mobile Start_Configuration EBOOL Start the Lexium configuration Stop BOOL The mobile stops the sequence and comes back to the start point Target_Reached BOOL The target position is reached 35013944 00 November 2006 169 Application using Unity Pro The following screen shows the application variables created using the data editor Data Editor Variables DDT types Function blocks DFB types x id T Name d v EDT DDT 110 0 Name Type Address w Value Co
131. s a group of profiles for CAN systems which have the following specifications Open bus system Real time data exchange without protocol overload Open bus system modular conception with the possibility of modifying the size Interconnection and interchangeability of devices supported by numerous international manufacturers Standardized configuration of networks access to all the device parameters Synchronization and circulation of data with cyclic process and or commanded by events possiblity of reaction time for short systems All manufacturers offering CANopen products certified on the market are members of the Association As an active member of this Association CiA Schneider Electric Industries SAS develops its products in conformity with standards recommendations 35013944 00 November 2006 17 Overview of CANopen communication CAN Standards Communication on the CANopen network The PDO The SDO CANopen specifications are defined by the CiA association and are partially accessible on the site www can cia com The Source code for master and slaves are available from various suppliers Note To find out more about CANopen specifications and standard mechanisms visit the CiA home page http www can cia de The communication profile is based on CAL services and protocols It allows the user two types of exchange SDO and PDO On switch on the device goes into initialization
132. se a slave can only have a maximum of 1000 input and output words 110 35013944 00 November 2006 Programming Example of topologic bus number 3 addressing Example of topologic addressing of an item connected to point 4 of the CANopen Module digital TOR autonomous with Boolean vision l 3 4 0 0 5 Boolean value is entered on channel 5 rang 0 ommitted Module digital standard IW 3 4 0 0 0 2 5 Boolean value is entered on unique channel 0 rank 2 bit 5 Themapping is given when the DCF file is imported Digital module on an Advantys STB island IW 3 4 0 0 0 3 2 Word 3 bit 2 data by Advantys Configuration Software Numbering starts at e Ofor channel e Ofor rank Note Virtual objects racks modules always have a rank number equal to 0 Object addressing of CANopen digital input output follows the same rules as object addressing of digital input output on rack words double words and floaters are in the same block Example device at connection point 4 of CANopen bus 3 on channel 0 with Type of data Topologic address 2 input words IW 3 4 0 0 0 0 or IW 3 4 0 0 0 1 1 double input word ID 3 4 0 0 0 2 1 floating input IF 3 4 0 0 0 4 1 output word QW 3 4 0 0 0 6 35013944 00 November 2006 111 Programming Exchanges using SDOs At a glance Communication
133. sections 2 Chapter Section Topic Page 11 1 Presentation of the solution used 153 11 2 Developping the application 156 35013944 00 November 2006 151 Application using Unity Pro 152 35013944 00 November 2006 Application using Unity Pro 11 1 Presentation of the solution used At a glance Subject of this This section presents the solution used to develop the application It explains the section technological choices and gives the application s creation timeline What s in this This section contains the following topics Section Technological choices used 154 The different steps in the process using Unity Pro 155 35013944 00 November 2006 153 Application using Unity Pro Technological choices used At a glance Technological choices There are several ways of writing a mobile driving application using Unity Pro The one proposed uses a Lexium 05 servo drives and Advantys STB island set up ona CANopen network The following table shows the technological choices used for the application Objects Choices used Lexium Operating Mode Use of the Positioning Mode This mode allows you to send a target position to the Lexium 05 servo drives through the CANopen network Sensor Interface Use of a STB Advantys This device is an assembly of distributed I O power and other modules that function together as an island no
134. sed of error counters e ofthe last 4 error messages the last received message is in the upper line Note The error counter cannot be reset to 0 35013944 00 November 2006 127 Diagnostics 128 35013944 00 November 2006 Language objects At a Glance Aim of this This section describes the implicit and explicit language objects associated with the Chapter CANopen master embedded in CPU modules Note The system bits S9 and system words SW8 and SW9 are not applicable on CANopen Note For information about specific CANopen Master objects see Objects concerning the CANopen Master p 93 What s in this This chapter contains the following sections 2 Chapter Section Topic Page 9 1 Language objects and IODDT for CANopen communication 131 9 2 CANopen configuration language objects 138 9 3 Emergency objects 140 35013944 00 November 2006 129 Language objects 130 35013944 00 November 2006 Language objects 9 1 Language objects and IODDT for CANopen communication At a Glance Subject of this Section What s in this Section This chapter describes the language objects and IODDT of CANopen communication This section contains the following topics Topic Page Introduction to the Language Objects for CANopen Communication 132 Implicit exchange language objects associated with the appli
135. see foreshore be cep Ata bw Pa WOR D RU kt 35 CANopen 36 CANopen motion command devices 37 CANopen Input Output 40 Other devices sc itr oh deren hee a ake le ae ee eset 43 Part III Software Implementation of CANopen communication 45 Ata Glance v bleed dancing donee 45 35013944 00 November 2006 3 Chapter 4 Chapter 5 5 1 5 2 5 3 5 4 Chapter 6 6 1 6 2 Chapter 7 Generalities ELEM uA WERE EPA UE 47 Ata Glance enre kei pues Boa eot RR Wd e ET E RE Wr sack dre 47 Implementation 48 Implementation 50 Performances mur E e Peu Bee nnus 51 Configuration of communication on the CANopen bus 53 Alia Glance s cocer Moro epe ei eis E ead ah cat She tau day s 53 General points eur Seek boned oan aed keene PERI hea 55 Generalities e lk ee oe Poe eae UE REI UG 55 Bus configuration ierra nere Ee See vie he ee Pee 56 Ata Glance toc cca ene pv DP Seda ur 56 How to access the CANopen bus configuration 5 57 CANopen bus 59 How to Add a Device on the
136. sent or is disconnected explicit exchange objects READ STS for example are not sent to the module STS IN PROG 0 but the words are refreshed MWr m c 0 0 The table below presents the 1 EXCH RPT MWr m c 1 report bits Standard symbol Type Access Meaning Address STS ERR BOOL R Error reading channel status words 1 failure MWr m c 1 0 35013944 00 November 2006 137 Language objects 9 2 CANopen configuration language objects Language objects associated with configuration At a Glance The configuration of a CANopen master is stored in the configuration constants SKW The parameters r m and c shown in the following tables represent the topologic addressing of the module Each parameter had the following signification e r represents the rack number e m represents the position of the module on the rack e c represents the channel number 138 35013944 00 November 2006 Language objects Configuration The following table lists all process control language objects associated objects configuration of CANopen network Number Type Function Description KWr m c 0 INT Constant value used by Least significant byte 16 00 the system 0 reset e 1 maintain Most significant byte 16 37 KWr m c 1 INT Baud rate see Length Values are encoded limitations of th
137. software XL version in this example 2 Click on File then New to select a CANopen Master PLC BMX P34 2010 for example New Project PLC Version Description M340 M340 2 BMX P34 1000 01 00 CPU 340 10 Modbus Cancel 1 BAO 01 00 CPU 340 20 Modbus CANopen Hel BMX P34 2020 01 00 340 20 Modbus Ethernet Le BMX P34 2030 01 00 CPU 340 20 Ethernet CANopen Premium Premium Quantum Quantum 3 Confirm with OK 35013944 00 November 2006 157 Application using Unity Pro Configuration of the CANopen Bus At a glance Developing a CANopen application involves choosing the right slave devices and appropriate configuration Illustration ofthe following screen shows the configured CANopen bus CANopen bus 3 CANopen comm head 01 00 Connections configured 2 gt LEXIUM05 Lexium 1 hs gt A 158 35013944 00 November 2006 Application using Unity Pro CANopen bus The table below shows the procedure for selecting the CANopen slaves Configuration Step Action 1 In the Project brower double click on Configuration then on 3 CANopen The CANopen Micro window opens 2 In the CANopen Micro window double click on the node where the slave must be linked to Result the following windo
138. ss Esc Press the Esc until RDY displayed 35013944 00 November 2006 193 Starting the application 194 35013944 00 November 2006 Appendices At a glance Overview What s in this Appendix These appendices contain information that should be useful for programming the application The appendix contains the following chapters Chapter Chapter Name Page A CANopen Master local object dictionary entry 197 B Relation between PDOs and STB variables 213 C Example of SDOs access 217 D Actions and transitions 227 35013944 00 November 2006 195 Appendices 196 35013944 00 November 2006 CANopen Master local object dictionary entry A At a glance Subject of this chapter What s in this Chapter This chapter contains the local object dictionary entry for CANopen Master This chapter contains the following topics Topic Page Object Dictionary entries according Profile DS301 198 Object Dictionary entries according Profile DS302 203 Midrange Manufacturer Specific Object Dictionary Entries 205 35013944 00 November 2006 197 CANopen Master object dictionary Object Dictionary entries according Profile DS301 Object The table below presents the object dictionary entries according profile DS3
139. tab Click on Libset select the TON block in the list then confirm with OK and position your block To link the Action_Mobile x contact to the Input of the TON function block align the contact and the input horizontally click on and position the link between the contact and the input Note For more information on creating an LD section see Unity Pro online help click on then Unity then Unity Pro then Operate modes then Programming and LD editor 35013944 00 November 2006 177 Application using Unity Pro Creating a Program in LD for the operator screen animation At a glance This section animates the operator screen Illustration of the section below is part of the MAST task It has no condition defined for it so is Operator_Screen permanently executed Animation Operator screen animation section Init x Mobile at Start Position Lexium Configuration x COMPARE Mobile at Position B Sequence 1 Mobile Action x COMPARE Mobile at Position A Sequence_Number 2 COMPARE Mobile at Position C Sequence_Number 3 Management of the warning message on the operator screen Return to Start Point x u Mobile in Progress Move to Next Position x Procedure for For creating a LD section see Procedure for Creating an LD Section p 177 Creating an LD Section 178 35013944 00 November 2006
140. tation in the device mainly used for digital I O e synchronous PDO the transmission type 255 means that the PDO is transmitted asynchronous when the value change Verify that the configured transmission type is supported by the selected device e the inhibit time mask the communication during this time e the event timer time to manage an event in order to start a PDO Note PDOs can be pnly configured using Unity Pro 35013944 00 November 2006 109 Programming Structure of The topologic address of input output objects of a CANopen bus slave is structured topologic in the following way address LQ X W D F be m c d Family Element Values Meaning Symbol Indicates an IEC object Object type Input object Q Output object Format size X 8 bits Ebool Ebool type Boolean not compulsory 16 bits 16 bit WORD type word D 32 Bit 32 bit DINT type word F 32 Bit 32 bit REAL type word Module channel b 3 to 999 Bus number address and e 1 to 63 Connection point number CANopen slave connection point number Rack number r 0 Virtual rack number always 0 Module number m 0 Virtual module number always 0 Channel number Equal to 0 for all devices Channel number except the FTBs channels numbered 0 to 7 then from 10 to 17 Rank of data in the d 0 999 Data number of slave channel This number can vary from 0 to 999 becau
141. tep click on m then place it in the editor Tocreate the transition click on ag the preceding step then place it in the editor generally under Illustration ofthe The following screen shows the application Grafcet There is no condition defined Move_Sequence gt section Init Start_Configuration Lexium_Configuration Configuration_Done gt Mov to Next Position Back to tart Point Target eached Rettrn_to_Start_Foint obile_Action Target_Rleached Operation Done Disable Lexium yore to ec Post Lexium_disabled Ce 174 35013944 00 November 2006 Application using Unity Pro Description of the Move_Sequence Section For actions and transitions used in the grafcet see Actions and transitions p 227 Note For more information on creating an SFC section see Unity Pro online help click on then Unity then Unity Pro then Operate modes then Programming and SFC editor The following table describes the different steps and transitions of the Move_Sequence Grafcet Step Transition Description Init This is the initial state Start_Configuration This transition is active when the variables e Stop 0 e Run 1 Lexium_Configuration The Lexium 05 is enabled and the 0 position is defined using the Lexium s Homing function Config
142. the CANopen bus configuration Screen p 57 bus configuration screen Double click on the slave to be configured Configure the usage function using the Config tab Configure the PDOs using the PDO tab Select the error control using the Error control tab 70 35013944 00 November 2006 CANopen Configuration Config tab The following figure shows an example of the configuration screen of a slave 1 2 IcIAN065 based on profile DS 301V4 01 and DSP 402V2 0 BL 65 0100E eds E IclA_N065 Channel 0 PDO Error control FJ Config 0 Debugging Index Label Value 2004 01 user proie veloci 2004 02 user pro 2004 03 User e veloci proie veloci 2004 04 luser profile veloci 2004 05 luser profile veloci 2004 06 luser profile veloci 2004 07 juser profile veloci 2004 08 juser profile veloci 2004 09 juser o cof SD BY co profile veloci o ommo 20040A juser profile velocity 10 10 2005 01 user profile acceleration 1 11 2005 02 user profile acceleration 2 1212005 03 user 13 2005 04 user profile acceleration 4 Function Default gt 14 2005 05 profile acceleration 5 15 2005 06 user profile ac
143. the Lexium 05 Powersuite Software for the ATV and the Tesys U UNILINK for the Lexium 15 IcLA Easy for the IcLA Note For motion and drive devices it is highly recommended to use the software in conjonction with the Unity MFB in order to facilitate the configuration and programming 76 35013944 00 November 2006 CANopen Configuration Advantys Configuration Software Advantys Configuration Software Version 2 3 or above should be used to configure a STB NCO 2212 The Advantys Configuration Software validates the configuration and creates a DCF file that contains all the objects used in the configuration ordered in the proper sequence The DCF file can be import from Unity Pro Note The creation of the DCF file is only possible from the full version of Advantys The procedure for adding an island to a CANopen bus is as follows Step Action 1 In Advantys Configuration Software Version 2 2 or above create a new Island Select the STB NCO 2212 Network Interface Module Select the modules which will be used in the application Configure the island c1 A When the configuration is over click on File Export to export the island in DCF format The following window is displayed Export larget Information Directory DADATA E TestNC02212 dcf Short file name Filename Prefix Export Format Information
144. tion The figure below shows a master debug screen 1 2 Communicator head CANopen Version 0 04 e 9 Run Err 10 v 3 CANopen comm head fi Config Debugging mi Error t Channel2 Status of slaves Status of master Addr Name of device Status NMT Emcy ES 1 ATV31 V11 Configured Operational Emergency Status of CANopen Master 0X00AD Communication status 0X0010 Event indicator 0X0080 Counters Generic error counter 0 4 Hardware error counter 0 Function Software error counter 0 CANopen v Communication 1 error counter v Protocol error counter 0 External error counter 0 Specific to the device 0 __ __ 35013944 00 November 2006 117 CANopen Debugging Elements and The table below describes the different areas which make up the master debug functions screen Read Number Channel 1 Tab The tab in the foreground indicates the type of screen displayed In this case the debug screen 2 Module This area is made up of the abbreviated heading of the module equipped with a CANopen port as well as 3 LEDs indicating the status of the module 3 Channel This area allows you to select the communication channel to be debugged By clicking on the device you display the tabs e Description gives the characteristics of the built in CANopen port Inputs outputs objects allows pre symbolizing of the input output objects By clicking on the ch
145. to the number of the bit 1 100 35013944 00 November 2006 Programming Operational slaves from 17 to 32 The table below presents the word 1Wr m c 36 Standard symbol Type Access Description Address SLAVE ACTIV 17 BOOL R Slave operational on the bus device 17 96IWr m c 36 0 SLAVE ACTIV 18 BOOL R Slave operational on the bus device 18 Wr m c 36 1 SLAVE_ACTIV_19 BOOL R Slave operational on the bus device 19 IWr m c 36 2 SLAVE_ACTIV_20 BOOL R Slave operational on the bus device 20 IWr m c 36 3 SLAVE_ACTIV_21 BOOL R Slave operational on the bus device 21 Wr m c 36 4 SLAVE_ACTIV_22 BOOL R Slave operational on the bus device 22 IWr m c 36 5 SLAVE_ACTIV_23 BOOL R Slave operational on the bus device 23 96IWr m c 36 6 SLAVE ACTIV 24 BOOL R Slave operational on the bus device 24 96IWr m c 36 7 SLAVE ACTIV 25 BOOL R Slave operational on the bus device 25 9eIWr m c 36 8 SLAVE ACTIV 26 BOOL R Slave operational on the bus device 26 96IWr m c 36 9 SLAVE ACTIV 27 BOOL R Slave operational on the bus device 27 9eIWr m c 36 10 SLAVE ACTIV 28 BOOL R Slave operational on the bus device 28 96IWr m c 36 11 SLAVE ACTIV 29 BOOL R Slave operational on the bus device 29 96IWr m c 36 12 SLAVE ACTIV 30 BOOL R Slave operational on the bus device 30 96IWr m c 36 13 SLAVE ACTIV 31 BOOL R Slave operational on the bus device 31 96IWr m c 36 14 SLAVE ACTIV 32 BOOL R Slave oper
146. uage objects Implicit exchange language objects associated with the application specific function At a Glance Reminders Figure An integrated application specific interface or the addition of a module automatically enhances the language objects application used to program this interface or module These objects correspond to the input output images and software data of the module or integrated application specific interface The module inputs 1 and 1IW are updated in the PLC memory at the start of the task the PLC being in RUN or STOP mode The outputs 50 and QW are updated at the end of the task only when the PLC is in RUN mode Note For BMX P34 processors when the task occurs in STOP mode depending on the configuration selected e Outputs are set to fallback position fallback mode e Outputs are maintained at their last value maintain mode The following diagram shows the operating cycle of a PLC task cyclical execution Y Internal processing Y Acquisition of inputs RUN STOP Y Execution of the program Y Update of outputs 35013944 00 November 2006 133 Language objects Explicit Exchange Language Objects Associated with the Application Specific Function At a Glance General principle for using explicit instructions Explicit exchanges are exchanges performed at the user program s re
147. uration_done The transition is active when the Lexium is initialized Move_to_next_position The next target position is loaded in the Lexium 05 When this step is activated the sequence number is incremented Target_reached This variable is set to 1 by the Lexium 5 when the target position is reached Mobile_action The mobile is at the target position and is operating an action Operation_done This transition is active when the mobile operation is over Back_to_start_point This transition is active when the sequence is over or when a stop request is ordered Return_to_start_point The start point is defined at the target position Disable_Lexium The Lexium 05 drive is disabled Lexium_disabled This transition is valid when the Lexium is disabled Note You can see all the steps and actions and transitions of your SFC by clicking on H in front of the name of your SFC section 35013944 00 November 2006 175 Application using Unity Pro Creating a Program in LD for Application Execution At a glance This section executes the mobile action delay time and resets the positioning start bit New_Setpoint Illustration of the section below is part of the MAST task It has no condition defined for it so is Application permanently executed Section FBI 1 TON Delay time to simulate the mobile OUEN ENO action at the target
148. ure is entirely integrated to Unity Pro When the channel of the CANopen master has been configured a node is automatically created in the project browser It is then possible to launch Bus Editor from this node in order to define the topology of the bus and configure the CANopen elements Note You cannot modify the configuration of the CANopen bus in connected mode 35013944 00 November 2006 55 CANopen Configuration 5 2 Bus configuration At a Glance Subject of this This section presents the configuration of the CANopen bus Section What s in this This section contains the following topics ion Section Topic Page How to access the CANopen bus configuration screen 57 CANopen bus editor 59 How to Add a Device on the Bus 61 How to Delete Move Duplicate a Bus Device 63 View CANopen bus in the Project browser 66 56 35013944 00 November 2006 CANopen Configuration How to access the CANopen bus configuration screen At a Glance This describes how to access the configuration screen of the CANopen bus for a Modicon M340 PLC with a built in CANopen link 35013944 00 November 2006 57 CANopen Configuration Procedure To access the CANopen field bus perform the following actions Step Action 1 From the project navigator deploy the Configuration directory Result the following screen appears Eb Station E Sa 0
149. values Note COMM STS CAN STS and EVT STS words are used to check the application good operating For more information consult the CANopen user manual Note To fill the animation table quickly select several variables by maintaining the Control button 35013944 00 November 2006 183 Application using Unity Pro Creating the Operator Screen At a glance The operator screen is used to animate graphic objects that symbolize the application These objects can belong to the Unity Pro library or can be created using the graphic editor Note For more information see Unity Pro online help click on then Unity then Unity Pro then Operate modes and Operator screens 184 35013944 00 November 2006 Application using Unity Pro Illustration of the following illustration shows the application operator screen Operator Screen Start Sequence Stop Sequence Start Point Pogition A Position B Positign C 2 Y gt 7 3 4 5 The associated variables are presented in the table below N Description Associated variable 1 Start button Run 2 Start point light indicator Mobile_At_Start_Position 3 Position A light indicator Mobile_At_Position_A 4 Position B light indicator Mobile_At_Position_B 5 Position C light indicator Mobile_At_Position_C
150. w opens New equipment OK 4 Help ENSEM Topological Address 1 63 Node ID Part Number Description F CANopen drop Discrete Motion o i ATV31 V1 1 Altivar 31 CANopen Slave DSP402 TEATV3111E eds Fore ATV31 V1 2 Altivar 31 CANopen Slave DSP402 TEATV3112E eds ATV3IT V1 3 Altivar 31 CANopen Slave DSP 402 TEATV3112E eds o 1 6 VI 1 ATV61 TEATV6LIIE eds ANV ATV71 TEATV7111E eds IFA IclA IFA CANopen IclA IFA eds IclA IFE CANopen IclA IFE eds 1 5 IclA IFS CANopen IclA IFS eds r N065 IcIAN065 based on profile DS 301V4 01 and DSP 402V2 5 DCX170 CANopen TEDCX170 0100E eds 5 1 Lexium05 MFB LXM05A P LCopen LEXIUMOS MFB EDS r Lexium15 HP LEXIUM 15 HP servodrive Lexium 15 MP HP eds r7 Lexium15 MP LEXIUM 15 MP servodrive Lexium 15 MP HP eds Drop end communicator 3 In the New Device window enter the node number 55 then double click on Motion and select the Lexium05 35013944 00 November 2006 159 Application using Unity Pro Step Action 4 Confirm with OK Result the slave module is declared CANo

Download Pdf Manuals

image

Related Search

Related Contents

VX-1 R  Télécharger - Radio Télévision Suisse Romande    ID78K0-LCE User`s Manual, Preliminary    HerpeCure  Samsung Samsung C266 manual do usuário  Part Two - Service Media Center  Benutzerhandbuch Tele Columbus Kabelbox  Sanyo VCC-MC600P User's Manual  

Copyright © All rights reserved.
Failed to retrieve file