Ä.
Function library "CANopenSdoDrv" Contents Contents 1 About this documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Conventions used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Definition of notes used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function library "CANopenSdoDrv" About this documentation 1 About this documentation This documentation describes the function blocks contained in the "CANopenSdoDrv" function library for the »Drive PLC Developer Studio«. Functional survey Reading and writing of CAN indices with a data size of up to 255 characters by segmented SDO transfer (block data transfer). Reading and writing of CAN indices with a data size of 1, 2 or 4 bytes by a reduced transfer mode.
Function library "CANopenSdoDrv" About this documentation Conventions used 1.1 Conventions used This documentation uses the following conventions to distinguish between different types of information: Type of information Writing Examples/notes Numbers Decimal separator Point The decimal point is always used. Example: 1234.56 Text Program name Window »« Italics Variable identifier Control element The Message window ... / The Options dialog box... By setting bEnable to TRUE...
Function library "CANopenSdoDrv" About this documentation Definition of notes used 1.
Function library "CANopenSdoDrv" System requirements 2 System requirements Software The function library can be used with the following Lenze software: Product Type designation Version Drive PLC Developer Studio ESP-DDS2-x 2.x Supported target systems Product range Type designation Hardware version From software version Drive PLC EPL-10200 1A or higher 2.x 9300 Servo PLC EVS93xx-EI EVS93xx-ET 1A or higher 2.x ECS ECSxA 1A or higher 6.
Function library "CANopenSdoDrv" Basics - Service Data Objects (SDOs) Addressing through index and subindex 3 Basics - Service Data Objects (SDOs) "Service Data Objects" (abbreviated with SDOs) serve to exchange data of any length and data type between two CAN nodes. The exchange takes place according to the client server model: As an "SDO client", a CAN node accesses data of a the other CAN node ("SDO server) by writing (download) or reading (upload).
Function library "CANopenSdoDrv" Basics - Service Data Objects (SDOs) SDO services 3.2 SDO services The following services can be used for SDOs: SDO download With this service, the SDO client transfers data to the SDO server. The SDO client reports to the SDO server which and how much data is to be transmitted to which address (index, subindex). This service is acknowledged by the SDO server.
Function library "CANopenSdoDrv" Function blocks 4 Function blocks Function block Function IndexRead Read CAN index • The block uses the reduced SDO upload ("expedited transfer"). IndexWrite Write CAN index • The block uses the reduced SDO download ("expedited transfer"). BlockRead Read CAN index • The block uses the segmented SDO upload. BlockWrite Write CAN index • The block uses the segmented SDO download. DMS 1.
Function library "CANopenSdoDrv" Function blocks IndexRead - read CAN index 4.1 IndexRead - read CAN index Call possible in: ; Cyclic task Interrupt task ; Time-controlled task (INTERVAL) Event-controlled task (EVENT) This FB serves to read parameters (CAN indexes) of other devices via system bus (CAN). The block uses the reduced SDO upload ("expedited transfer"). nAddress serves to select the corresponding node where the SDO access is to take place.
Function library "CANopenSdoDrv" Function blocks IndexRead - read CAN index Inputs Identifier/data type bExecute nAddress Information/possible settings BOOL INT FALSEÊTRUE Activates a read request CAN node address 1 ... 63 Parameter channel 1 65 ... 127 Parameter channel 2 nIndex nSubIndex tRxTimeout CAN index INT • For converting a code number into the required CAN index, you can use the L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.
Function library "CANopenSdoDrv" Function blocks IndexRead - read CAN index Identifier/data type dnErrorNo Value/meaning DINT Error number > 0 For meaning, see chapter "Error numbers". ( 22) -1 TimeOut – no response received Remedy: Increase the set timeout time at the tRxTimeout input.
Function library "CANopenSdoDrv" Function blocks IndexWrite - write CAN index 4.2 IndexWrite - write CAN index Call possible in: ; Cyclic task Interrupt task ; Time-controlled task (INTERVAL) Event-controlled task (EVENT) This FB serves to write parameters (CAN indexes) of other devices via system bus (CAN). The block uses the reduced SDO download ("expedited transfer"). nAddress serves to select the corresponding node where the SDO access is to take place.
Function library "CANopenSdoDrv" Function blocks IndexWrite - write CAN index Inputs Identifier/data type bExecute nAddress Information/possible settings BOOL INT FALSEÊTRUE Activate a write request CAN node address 1 ... 63 Parameter channel 1 65 ... 127 Parameter channel 2 nIndex nSubIndex nIndexSize tRxTimeout dnValue CAN index INT • For converting a code number into the required CAN index, you can use the L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.
Function library "CANopenSdoDrv" Function blocks IndexWrite - write CAN index Identifier/data type dnErrorNo Value/meaning DINT Error number > 0 For meaning, see chapter "Error numbers". ( 22) -1 TimeOut – no response received Remedy: Increase the set timeout time at the tRxTimeout input. -2 Response of station does not correspond to write request -3 Value at the nIndexSize input is not correct Remedy: Select the value 1, 2 or 4 [Byte] as data type size.
Function library "CANopenSdoDrv" Function blocks BlockRead - read CAN index per segmented data transfer 4.3 BlockRead - read CAN index per segmented data transfer Call possible in: ; Cyclic task Interrupt task ; Time-controlled task (INTERVAL) Event-controlled task (EVENT) This FB serves to read parameters (CAN indexes) of other devices via system bus (CAN). The block uses the segmented SDO upload. nAddress serves to select the corresponding node where the SDO access is to take place.
Function library "CANopenSdoDrv" Function blocks BlockRead - read CAN index per segmented data transfer Inputs Identifier/data type bExecute nAddress Information/possible settings BOOL INT FALSEÊTRUE Activates a read request CAN node address 1 ... 63 Parameter channel 1 65 ... 127 Parameter channel 2 nIndex nSubIndex tRxTimeout nBufferSize pData CAN index INT • For converting a code number into the required CAN index, you can use the L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.
Function library "CANopenSdoDrv" Function blocks BlockRead - read CAN index per segmented data transfer Identifier/data type dnErrorNo Value/meaning DINT Error number > 0 For meaning, see chapter "Error numbers". ( 22) -1 TimeOut – no response received Remedy: Increase the set timeout time at the tRxTimeout input. -2 Response of station does not correspond to read request -4 Number of the received data bytes does not correspond to the number of the expected data bytes.
Function library "CANopenSdoDrv" Function blocks BlockWrite - write CAN index per segmented data transfer 4.4 BlockWrite - write CAN index per segmented data transfer Call possible in: ; Cyclic task Interrupt task ; Time-controlled task (INTERVAL) Event-controlled task (EVENT) This FB serves to write parameters (CAN indexes) of other devices via system bus (CAN). The block uses the segmented SDO download. nAddress serves to select the corresponding node where the SDO access is to take place.
Function library "CANopenSdoDrv" Function blocks BlockWrite - write CAN index per segmented data transfer Inputs Identifier/data type bExecute nAddress Information/possible settings BOOL INT FALSEÊTRUE Activate a write request CAN node address 1 ... 63 Parameter channel 1 65 ... 127 Parameter channel 2 nIndex nSubIndex tRxTimeout nIndexSize pData CAN index INT • For converting a code number into the required CAN index, you can use the L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.
Function library "CANopenSdoDrv" Function blocks BlockWrite - write CAN index per segmented data transfer Identifier/data type dnErrorNo Value/meaning DINT Error number > 0 For meaning, see chapter "Error numbers". ( 22) -1 TimeOut – no response received Remedy: Increase the set timeout time at the tRxTimeout input. -2 Response of station does not correspond to write request -3 Value at the nIndexSize input is higher than 255 -6 Toggle bit in the SDO response has not changed its value.
Function library "CANopenSdoDrv" Error numbers 5 Error numbers The following error numbers are specified according to CANopen: Error number (hex) Explanation 0503 0000 Toggle bit not changed 0504 0000 SDO protocol expired 0504 0001 Invalid or unknown client/server command specifier 0504 0002 Invalid block size (block mode only) 0504 0003 Invalid processing number (block mode only) 0504 0004 CRC error (block mode only) 0504 0005 Memory does not suffice 0601 0001 Attempted read access to a
Function library "CANopenSdoDrv" Index 6 Index A Application notes 5 B BlockRead 16 BlockWrite 19 C CAN driver 6 D Document history 3 E E-mail to Lenze 24 F Feedback to Lenze 24 I IndexRead 10 IndexWrite 13 L Layout of the safety information 5 Layout of the safety instructions 5 S Safety instructions 5 V Validity information 3 Version identifier of the function library 3 DMS 1.
)(('%$&. Your opinion is important to us These instructions were created to the best of our knowledge and belief to give you the best possible support for handling our product. Perhaps we have not always succeeded in achieving this goal. If you notice this, please send us your suggestions and criticism in a short e-mail to: feedback-docu@Lenze.de Thank you for your support.
L 25
© 07/2011 ) Lenze Automation GmbH Hans-Lenze-Str. 1 D-31855 Aerzen Germany Service +49 (0)51 54 / 82-0 Lenze Service GmbH Breslauer Straße 3 D-32699 Extertal Germany 00 80 00 / 24 4 68 77 (24 h helpline) ¬ +49 (0)51 54 / 82-28 00 ¬ +49 (0)51 54 / 82-11 12 | Lenze@Lenze.de | Service@Lenze.de Þ www.Lenze.com EDSPLCLIB03 13384448 EN 1.