GetDiagnosis (FUN) ¶ FUNCTION GetDiagnosis : ERROR Function returns all relevant diagnostic information for a specific driver. InOut: Scope Name Type Comment Return GetDiagnosis ERROR ERROR.NO_ERROR or appropriate error code Input hDriver CAA.HANDLE handle of CAN interface pDiagnosisInfo POINTER TO DIAGNOSIS_INFO Pointer to diagnostic information
GetLostCounter (FUN) ¶ FUNCTION GetLostCounter : CAA.COUNT Returns a counter which is incremented with each lost message. Diagnostic Information can be also read by GetDiagnosis . InOut: Scope Name Type Comment Return GetLostCounter CAA.COUNT number of lost messages Input hDriver CAA.HANDLE handle of CAN interface peError POINTER TO ERROR optional pointer to error enum
GetReceiveCounter (FUN) ¶ FUNCTION GetReceiveCounter : CAA.COUNT Returns a counter which is incremented with each received message. Diagnostic Information can be also read by GetDiagnosis . InOut: Scope Name Type Comment Return GetReceiveCounter CAA.COUNT number of received messages Input hDriver CAA.HANDLE handle of CAN interface peError POINTER TO ERROR optional pointer to error enum
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 03.07.2017, 15:38:08 companyName string 3S-Smart Software Solutions GmbH libraryFile CAA_CanL2I_Extern.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP11 contentFile CAA_CanL2I_Extern.clean.json version version 2.0.0.0 ProjectInformation Depends on RTS bool False Depends onPS False Released True SIL2 False LastModificationDateTime date 03.07.2017, 15:38:06 LibraryCategories library-category-list Intern|CAA|Fieldbus Author string 3S - Smart Software Solutions GmbH Company CAA Technical Workgroup DefaultNamespace CL2I Description See: Description DocFormat reStructuredText LanguageModelAttribute qualified-access-only Placeholder CAA CanL2I Project CAA_CanL2I_Extern Title CAA Can Low Level Imp Extern SpecVersion version 3.0.0.0 Version 3.5.11.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CAA Types Extern ¶ Library Identification ¶ Placeholder: CAA Types Default Resolution: CAA Types Extern, * (CAA Technical Workgroup) Namespace: CAA Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: CAA Types
CAA Can Low Level Extern Library Documentation ¶ Company CAA Technical Workgroup Title CAA Can Low Level Extern Version 3.5.16.0 Categories Intern|CAA|Fieldbus Namespace CL2 Author 3S - Smart Software Solutions GmbH Placeholder CAA CanL2 Description 1 ¶ Hardware abstraction layer for CANbus systems (Network Level 2). Note: If RTS_SIL2 is defined, all used resources are unmanaged even if managed functions are used. Contents: ¶ CAN Low Level Enums Functions IndicatorConstants (GVL) Structures Indices and tables ¶ 1 Based on CAA_CanL2_Extern.library, last modified 27.04.2020, 15:46:57. LibDoc 4.4.0.0-b.27 The content file CAA_CanL2_Extern.clean.json was generated with CODESYS V3.5 SP16 on 27.04.2020, 15:47:03.
CAN Low Level ¶ This library contains functions for accessing the CAN field bus. Layer 7 applications (such as CANopen, J1939, DeviceNet and many others) can be realized based on this library. Note The library can be used to access the CANbus in parallel to other CAN applications (e.g. CANopenStack), even if they use the same port. All functions are thread-safe and can be used from several tasks in parallel. Note A CAN bus application example can be downloaded from the CODESYS Store . It contains a library providing an easy-to-use CAN API based on CANL2 which can be used directly in your application. The library source code is provided as well in case you are searching for an CL2 example project. Enums BUSSTATE (Enum) ERROR (Enum) Functions Basic Functions CloneMessage (Function) CreateIdAreaReceiver (Function) CreateMaskReceiver (Function) CreateMessage (Function) CreateSingleIdReceiver (Function) DeleteReceiver (Function) DriverClose (Function) DriverGetSize (Function) DriverOpenH (Function) DriverOpenP (Function) FreeMessage (Function) Read (Function) RegisterIdArea (Function) UnregisterIdArea (Function) Write (Function) Diagnostic Information GetBaudrate (Function) GetBusAlarm (Function) GetBusState (Function) GetBusload (Function) GetDiagnosis (Function) GetLostCounter (Function) GetReceiveCounter (Function) GetReceiveErrorCounter (Function) GetReceivePoolSize (Function) GetReceiveQueueLength (Function) GetTransmitCounter (Function) GetTransmitErrorCounter (Function) GetTransmitPoolSize (Function) GetTransmitQueueLength (Function) IsSendingActive (Function) ResetBusAlarm (Function) Extended Functionality DisableSyncService (Function) EnableSyncService (Function) Indicator Services GetCiAState (Function) SetCiAState (Function) Internal Basic Functions _CloneMessage (Function) _CreateArrayReceiver (Function) _CreateIdAreaReceiver (Function) _CreateMaskReceiver (Function) _CreateMessage (Function) _CreateSingleIdReceiver (Function) _DeleteReceiver (Function) _DriverClose (Function) _DriverGetSize (Function) _DriverOpenH (Function) _DriverOpenP (Function) _FreeMessage (Function) _Read (Function) _ReadArrayReceiver (Function) _RegisterIdArea (Function) _UnregisterIdArea (Function) _Write (Function) Diagnostic Information _GetBaudrate (Function) _GetBusAlarm (Function) _GetBusState (Function) _GetBusload (Function) _GetDiagnosis (Function) _GetLostCounter (Function) _GetReceiveCounter (Function) _GetReceiveErrorCounter (Function) _GetReceivePoolSize (Function) _GetReceiveQueueLength (Function) _GetTransmitCounter (Function) _GetTransmitErrorCounter (Function) _GetTransmitPoolSize (Function) _GetTransmitQueueLength (Function) _IsSendingActive (Function) _ResetBusAlarm (Function) Extended Functionality _DisableSyncService (Function) _EnableSyncService (Function) Indicator Services _GetCiAState (Function) _SetCiAState (Function) Message Information _GetMessageDataPointer (Function) _GetMessageId (Function) _GetMessageLength (Function) _GetMsgCount (Function) _GetNetId (Function) _GetTimeStamp (Function) _Is29BitIdMessage (Function) _IsRTRMessage (Function) _IsTransmitMessage (Function) _LostMessages (Function) Message Information GetMessageDataPointer (Function) GetMessageId (Function) GetMessageLength (Function) GetMsgCount (Function) GetNetId (Function) GetTimeStamp (Function) Is29BitIdMessage (Function) IsRTRMessage (Function) IsTransmitMessage (Function) LostMessages (Function) IndicatorConstants (GVL) Structures DIAGNOSIS_INFO (Struct)
Enums ¶ BUSSTATE (Enum) ERROR (Enum)
BUSSTATE (ENUM) ¶ TYPE BUSSTATE : This data type describes the current state of the CAN network. Attributes: qualified_only InOut: Name Comment UNKNOWN The state of the network is not known or busstate is not implemented by driver. ERR_FREE No occurrence of CAN bus errors so far. The error counters of the chip are zero. ACTIVE Only few CAN bus errors so far. The error counters of the chip are below the warning level. WARNING Occurence of some CAN bus errors. The error counters are above the warning level. PASSIVE Too many CAN bus errors. The error counters are above the error level. BUSOFF The node has been separated from the CAN bus. The error counter has exceeded the admissible maximum.
ERROR (ENUM) ¶ TYPE ERROR : This data type describes all errors that can occur while running CL2 functions: Attributes: qualified_only InOut: Name Initial Comment NO_ERROR 0 no occurence of errors NO_29BIT_ID 10202 29Bit identifiers are not supported WRONG_BAUDRATE 10203 baudrate is not supported NO_MEMORY 10204 memory space cannot be allocated INVALID_NETID 10205 invalid Network ID INVALID_PRIORITY 10206 invalid priority INVALID_DRIVER_HANDLE 10207 invalid driver handle INVALID_MESSAGE_HANDLE 10208 invalid message handle INVALID_ID_HANDLE 10209 invalid identifier handle NO_DRIVER 10210 no CAN driver available SENDING_ERROR 10211 message could not be sent NO_SYNC_SERVICE 10212 SYNC-service is not supported NO_SYNC_PRODUCER 10213 SYNC-producer is not supported NO_SYNC_CONSUMER 10214 SYNC-consumer is not supported NO_SYNC_EVENT 10215 SYNC-event is not supported NO_SYNC_WINDOW 10216 window length is not supported NO_SYNC_FOREWARNTIME 10217 forewarn time is not supported WRONG_PARAM 10224 wrong parameter INVALID_HANDLE 10249 the handle was invalid