3 l_caninit - initialising the can driver, 3 l_caninit − initialising the can driver, System bus (can) for lenze plc devices – Lenze DDS System bus CAN for PLC User Manual
Page 144: Lenzecandrv.lib function library

10.3
L_CanInit − initialising the CAN driver
System bus (CAN) for Lenze PLC devices
LenzeCanDrv.lib function library
10−2
L
PLC−Systembus EN 2.0
10.3
L_CanInit − initialising the CAN driver
Function
DWORD
L_CanInit (wDrvNr, dwRelocCobIdArea)
Before it is possible to work with the free CAN objects, an initialisation of the CAN driver has to be
carried out.
·
By repeatedly calling this function, the CAN driver in the initialised state can be switched over
to other parameters.
– The acceptance of the new parameters is effected immediately and therefore can have an
impact on transmission and reception jobs which are still pending. Thus, the function may
not be called cyclically.
L_CanInit
wDrvNr
dwRelocCobId
Transfer parameters
Identifier
Data type
Possible settings
Information
wDrvNr
Word
10
System bus
dwRelocCobIdArea
Double Word
0
192...319
832...1344
1664...1728
1856...1984
Identifier area − Only relevant for 9300 Servo PLC!
dwRelocCobIdArea
= 832 (Lenze setting)
Free range 1
Free range 2
Free range 3
Free range 4
Return value
Data type
Bit
Value
Meaning
Priority
Double Word
0
0
Driver is initialised.
−
1
Error during initialisation.
·
In this case the bits 1 ... 31 are all set to "1" and therefore are invalid.
1
0
Setting dwRelocCobIdAreaOK.
1
Setting dwRelocCobIdAreanot OK.
·
The identifier area featuring 64 objects overlaps with another area or is settled
beyond the limits 0 ... 2047.
2
0
Free object found.
1
No free object found.
Remedy:
·
Do not use one of the CAN objects CAN1_IN ... CAN3_IN or CAN1_OUT ... CAN3_OUT.
·
Set C2118 to 0" (write parameters via SDO2).
PLEASE NOTE: at C2118 = 0 the SDO2 channel is no longer available!
·
Switch off generation of the sync object (C0369 = 0).
3−15
Reserved for future supplements (bits are set to "0").
16−31
Version of the LenzeCanDrv.lib
function library
Format: main version/subversion (e. g. 0103hex = version 1.03)