System bus (CAN) with Ser vo PLC & Drive PLC
LenzeCanDrv.lib – Functions
8.1 Initialisation (L_CanInit)
8-3
L PLC-Systembus EN 1.1
Reaction to errors (Tx/Rx buffer)
Use codes C0608/C0609 to configure the reaction to errors in the Tx/Rx buffer:
Code LCD
Possible settings
Info
Lenze Choice
C0608 over Tx queue 0 0Trip
1 Message
2 Warning
3Off
4 Fail QSP (9300 Ser vo PLC only)
Configuration monitoring
Tx buffer
C0609 over Rx-lsr 0 0Trip
4FailQSP
Configuration monitoring
Rx buffer
• 9300 Servo PLC only
Example
Calling the function in ST and decoding of the return value:
(* open CAN driver - returns g_dwReturnValue *)
g_dwReturnValue:= L_CanInit(10, 0);
g_bInitOK := NOT DWORD_TO_BOOL(g_dwReturnValue AND 16#0000_0001);
g_bDriverFail := DWORD_TO_BOOL(SHR(g_dwReturnValue,1) AND 16#0000_0001);
g_wVersion := DWORD_TO_WORD(SHR(g_dwReturnValue,16) AND 16#FFFF);