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.
Validity information
The information given in this documentation is valid for the following function library:
Function libraryFrom version
CANopenSdoDrvVxx.libV1.0
Function library "CANopenSdoDrv"
About this documentation
Document history
VersionDescription
1.007/2011TD05 First edition for CANopenSdoDrvV10.lib
Tip!
The "CANopenSdoDrvVxx.lib" library version can be queried via the following
global constants:
• C_wCANopenSdoDrvVersionER: Enabled major version
• C_wCANopenSdoDrvVersionEL: Enable minor version
• C_wCANopenSdoDrvVersionIR: Internal minor version
• C_wCANopenSdoDrvVersionBN: Internal build number
DMS 1.0 EN - 07/2011 - TD05L3
Function library "CANopenSdoDrv"
About this documentation
Conventions used
1.1Conventions used
This documentation uses the following conventions to distinguish between different types
of information:
Type of informationWritingExamples/notes
Numbers
Decimal separatorPointThe decimal point is always used.
Text
Program name» «The Lenze PC software »PLC Designer«...
WindowItalicsThe Message window ... / The Options dialog box...
Variable identifierBy setting bEnable to TRUE...
Control elementBoldThe OK button... / The copy command... / The
Sequence of menu
commands
Shortcut<Bold>Press <F1> to open the online help.
Program codeCourier
KeywordCourier bold
Example: 1234.56
Properties tab... / The Name input field...
If several commands must be used in sequence to
carry out a function, then the individual commands
are separated by an arrow: Select File
If a key combination is required for a command, a "+"
is inserted between the key identifiers: Use
<Shift>+<ESC>...
IF var1 < var2 THEN
a = a + 1
END IF
Open to...
HyperlinkUnderlined
Symbols
Page reference ( 4)Optically highlighted reference to another page. It is
Step-by-step instructions
Optically highlighted reference to another topic. It is
activated with a mouse click in this online
documentation.
activated with a mouse click in this online
documentation.
Step-by-step instructions are indicated by a
pictograph.
4LDMS 1.0 EN - 07/2011 - TD05
1.2Definition of notes used
The following signal words and symbols are used in this documentation to indicate
dangers and important information:
Safety instructions
Layout of the safety instructions:
Danger!
(characterises the type and severity of danger)
Note
(describes the danger and gives information about how to prevent dangerous
situations)
Function library "CANopenSdoDrv"
About this documentation
Definition of notes used
PictographSignal wordMeaning
Danger!Danger of personal injury through dangerous electrical voltage
Danger!Danger of personal injury through a general source of danger
Stop!Danger of property damage
Application notes
PictographSignal wordMeaning
Note!Important note to ensure trouble-free operation
Reference to an imminent danger that may result in death or serious personal
injury if the corresponding measures are not taken.
Reference to an imminent danger that may result in death or serious personal
injury if the corresponding measures are not taken.
Reference to a possible danger that may result in property damage if the
corresponding measures are not taken.
Tip!Useful tip for simple handling
Reference to another document
DMS 1.0 EN - 07/2011 - TD05L5
Function library "CANopenSdoDrv"
System requirements
2System requirements
Software
The function library can be used with the following Lenze software:
ProductType designationVersion
Drive PLC Developer StudioESP-DDS2-x2.x
Supported target systems
Product rangeType designationHardware versionFrom software version
Drive PLCEPL-102001A or higher2.x
9300 Servo PLCEVS93xx-EI
EVS93xx-ET
ECSECSxA1A or higher6.x
1A or higher2.x
Required libraries
Unless already available, insert the following libraries into the library management (menu
WindowLibrary management):
Standard.lib
CANopenSdoDrvV10.lib
LenzeCanDrvVxxxx.lib
Initialisation of the CAN driver
For using the free PDOs, an initialisation of the CAN driver with the L_CanInit function call
is required. This function must only be called once. Thus, best use the system POU
"PLC_ColdStart" for calling this function.
The CAN interface of the PLC target system (e.g. 9300 Servo PLC) must be in the
"Operational" status.
6LDMS 1.0 EN - 07/2011 - TD05
3Basics - 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). This data is located in the object directory of the
SDO server and is addressed by the SDO client via the given index and subindex. Each
access of the SDO client will be acknowledged by the SDO server.
The connection between the SDO client and the SDO server is also called parameter
channel. Each CANopen node must at least support one parameter channel ("default SDO")
to be accessible for other nodes. For Lenze devices, it is the parameter channel 1.
As a CAN telegram can only transmit 8 bytes, SDOs are typically transmitted in a sequence
of segments. For initialising the data transfer, the SDO client first sends a telegram to the
SDO server in which the SDO server is instructed in which way (reading/writing) it is to
access which index/subindex of the SDO server. The acknowledgement of the telegram by
the SDO server completes the initialisation phase and the segmented transmission of the
data starts.
Function library "CANopenSdoDrv"
Basics - Service Data Objects (SDOs)
Addressing through index and subindex
If only up to 4 bytes of data are to be transferred, the reduced transfer ("expedited
transfer") can be used as well. In this transfer mode, the data is already transferred during
the initialisation phase with the first telegram.
The reduced transfer ("expedited transfer") must be supported by the SDO client and the
SDO server according to the CANopen specification. It is switched to the segmented
transfer if more than 4 bytes of data must be transferred.
The least-significant byte (LSB) of the CAN telegram is reserved for the command. Among
other things, the command contains information on the access type (writing/reading) and
the transfer type (segmented/expedited).
3.1Addressing through index and subindex
The parameters or Lenze codes are addressed according to the following formula:
Index = 24575 – (Lenze code number + 2000 (parameter set – 1))
Example:
The acceleration time (code C1312) in the parameter set 2 is to be addressed. This code has
the subindex 0 (no subindex).
Calculation:
Index = 24575 – 12 – 2000 = 22563 = 5823hex
Subindex = 0
Tip!
For converting a code number into the required CAN index, you can use the
L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.
DMS 1.0 EN - 07/2011 - TD05L7
Function library "CANopenSdoDrv"
Basics - Service Data Objects (SDOs)
SDO services
3.2SDO 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.
The SDO download consists at least of the following services:
Initialisation:
SDO client prepares SDO server for download.
Segmented download:
SDO client transmits the data segments to the SDO server.
(Optional, only if the data size is > 4 bytes.)
SDO upload
With this service, the SDO server transfers data to the SDO client. The SDO client reports to
the SDO server which address (index, subindex) is to be used to upload the data.
The SDO upload consists at least of the following services:
Initialisation:
SDO client prepares SDO server for upload.
Segmented upload:
SDO server transmits the required data segments to the SDO client.
(Optional, only if the data size is > 4 Byte.)
SDO abort
Abort of the SDO transfer. The reason for the abort is given optionally.
8LDMS 1.0 EN - 07/2011 - TD05
Loading...
+ 18 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.