Blockread, Function library "canopensdodrv – Lenze Function library CANopenSdoDrv User Manual

Page 16

Advertising
background image

Function library "CANopenSdoDrv"

Function blocks

BlockRead - read CAN index per segmented data transfer

16

L

DMS 1.0 EN - 07/2011 - TD05

4.3

BlockRead - read CAN index per segmented data transfer

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.

A the same time, the parameter channel to be used (SDO1 or SDO2) is selected at the

node via nAddress.

Call possible in:

;

Cyclic task

…

Interrupt task

;

Time-controlled task (INTERVAL)

…

Event-controlled task (EVENT)

Note!

• The FB must be called cyclically in order that the response to the write request

("read response") is detected. Typically, the response arrives only some

program cycles later.

• Make sure that several nodes do not execute an SDO access a node at the

same time via the same parameter channel, since this "collision" would cause

the system bus (CAN) to change to the "bus off" status.

• Do not start several SDO accesses to the same node at the same time. This

causes an incorrect evaluation of the node response.

• Do not use the FBs from the "CANopenSdoDrv.lib" library and the FBs

L_ParWrite and L_ParRead from the "LenzeDrive.lib" library at the same time.

BlockRead

⎯ bExecute

bDone ⎯

⎯ nAddress

bBusy ⎯

⎯ nIndex

nIndexSize ⎯

⎯ nSubIndex

bError ⎯

⎯ tRxTimeout

dnErrorNo ⎯

⎯ nBufferSize
⎯ pData

Advertising