System bus (can) for lenze plc devices, Lenzecandrv.lib function library – Lenze DDS System bus CAN for PLC User Manual

Page 151

Advertising
background image

System bus (CAN) for Lenze PLC devices

LenzeCanDrv.lib function library

10.7

L_CanPdoTransmit − transmitting a CAN object

10−9

L

PLC−Systembus EN 2.0

Identifier

Information

Possible settings

Variable type

Data type

nState

Integer

VAR_OUTPUT

Displays the current transmit status.

·

See the following table "Transmit state
(nState)"

wNrOfCallsToSend

Word

VAR_OUTPUT

Displays how many FB calls were required to
transmit the object.

·

The "time measurement" starts with entering
the transmit request in the transmit request
memory and ends with the actual
transmission of the object.

Note!

With regard to the allocation of the CAN identifier (dwCobId) please be sure that it is not already used
by one of the other CAN objects CAN1_IO ... CAN3_IO, as otherwise bus errors/bus overload may
occur!

Transmit status (nState)

Data type

Value

Meaning

Priority

Integer

−150

CAN bus is not in the Operational state.

1 (high)

−121

Incorrect driver number (wDrvNr)

2

−120

Driver not initialised

3

−119

The transmit request memory is full. The transmit request could not be entered
anymore.
Remedy:

·

Decrease number of the transmission objects.

·

Increase cycle time of the transmission objects.

·

Increase baud rate.

Basically, an object is transmitted every 250

ms.

4

−118

No free CAN channel is provided.
Remedy:

·

Do not use one of the CAN objects CAN1_IN ... CAN3_IN or CAN1_OUT ... CAN3_OUT.

·

Set C2118 to 1" (write parameters via SDO2).
PLEASE NOTE: at C2118 = 1 the SDO2 channel no longer is available!

·

Switch off generation of the sync object (C0369 = 0).

5

−12

The set message identifier (COB−ID) is beyond the permissible range (0 ... 2047).

6

−11

Pointer pIOAdress does not point to PLC−RAM.

7 (low)

* If there are several error causes, always the return value associated with the error cause

of the highest priority is returned.

0

The transmit request has been carried out and the data have been transmitted.

1

The transmit request has not yet been completed and is still pending in the transmit request memory.

10

The specification for the telegram length byLen is higher than 8. The telegram length has been
limited to 8 bytes.

Advertising