Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY
This library contains functionality from the following previously used libraries:
CANopen.library
CANopenCSDO.library
CANopen_302.library
NetworkManager.library
The application calls the CANopen library which uses the CANVXD API library to send and receive CAN messages.
The CANVXD API library is an interface library to CAN L2 library which uses low-level CAN libraries.
The application must call all used protocols initialization and update methods separately according to the following table.
The ProtocolData column shows the data storage used by each protocol (struct table).
ProtocolType |
POU |
ProtocolData |
Update |
Init |
OD |
- |
ODData |
- |
- |
NMT slave |
CANopenNMT |
NMTData |
CANopenNMT.Update |
CANopenNMT.Init |
NMT master |
CANopenNMT |
SlaveData |
CANopenNMT.Update |
CANopenNMT.Init |
SDO server |
CANopenSDOServer |
SSDOData |
CANopenSDOServer.Update |
CANopenSDOServer.Init |
SDO client |
CANopenSDOClient, CANopenSDOManager |
- |
- |
CANopenSDOManager.Init |
PDO * |
CANopenPDO, CANopenPDOHandler |
PDOData |
CANopenPDOHandler.Update |
CANopenPDO.Init CANopenPDOHandler.Init |
SRDO * |
CANopenSRDO, CANopenSRDOHandler |
SRDOData |
CANopenSRDOHandler.Update |
CANopenSRDO.Init CANopenSRDOHandler.Init |
GFC ** |
CANopenGFC |
GFCData |
CANopenGFC.Update |
CANopenGFC.Init |
SYNC ** |
CANopenSYNC |
SYNCData |
CANopenSYNC.Update |
CANopenSYNC.Init |
HB ** |
CANopenHB |
HBData |
CANopenHB.Update |
CANopenHB.Init |
EMCY ** |
CANopenEMCY |
EMCYData |
CANopenEMCY.Update |
CANopenEMCY.Init |
* both transmit and receive functionality
** both producer and consumer functionality
POU |
Description |
CANopenDeviceAddProtocol (FUN) |
Adds Protocol to device. |
CANopenGetProtocolData (FUN) |
Returns pointer to required protocol data. |
POU |
Description |
CANopenODAddLine (FUN) |
Adds or updates a line in Object Dictionary. |
CANopenODAddDefaultTypes (FUN) |
Adds type definition indexes 1-9 to given OD. |
CANopenODGetData (FB) |
Gets pointer to subindex of given OD line. |
CANopenODGetIndexEntryPtr (FUN) |
Returns pointer to OD entry of given OD index. |
CANopenODGetLine (FUN) |
Returns line number of requested index in given OD if found. |
CANopenODReOrg (FUN) |
Order Object Dictionary by ascending index. |
POU |
Description |
CANopenPDOHandler (FB) |
PDO protocol handler. Updates data of all registered PDOs. |
CANopenPDO (FB) |
Handler for single PDO. Both TPDO and RPDO supported. |
POU |
Description |
CANopenSDOServer (FB) |
SDO protocol server. This function block implements interfaces CANopen.ICANOpenProtocol and CANVXD_API.IReceiveCallback. The function block handles incoming SDO client messages. |
CANopenSDOManager (PRG) |
This program is used to handle SDO client access to all supported buses. |
CANopenCSDO (FB) |
This function block packs and sends SDO client messages. |
CANopenSDOClient (FB) |
The SDO client FB. The FB uses CANopenSDOManager to access SDO channels, so no predefined channels are required. Also uses CANopenCSDO FB. |
POU |
Description |
CANopenSRDOHandler (FB) |
SRDO protocol handler. Updates data of all registered SRDOs. |
CANopenSRDO (FB) |
Handler for single SRDO. Both TSRDO and RSRDO supported. |
POU |
Description |
CANopenNMT (FB) |
NMT protocol handler. Implements both NMT slave and master functionality. |
CANopenNMTConfigureSlave (FB) |
This FB configures slave node with a sequence: SDO, TPDO and RPDO. |
CANopenNMTSendCommand (FUN) |
Sends a NMT command to given device. |
POU |
Description |
CANopenHB |
HeartBeat protocol handler. |
CANopenHBCallback (FB) |
Callback FB for Heartbeat protocol messages. Each heartbeat producer has its own instance of the callback |
POU |
Description |
CANopenGFC |
GFC protocol handler. This FB handles both incoming GFC messages and activation by application. |
POU |
Description |
CANopenSYNC |
SYNC protocol handler. This FB handles both sending and receiving of SYNC messages. |
POU |
Description |
CANopenEMCY |
EMergenCY protocol handler. |
CANopenEMCYCallback (FB) |
Callback FB for EMCY protocol messages. Each EMCY producer has its own instance of the callback |
CANVXD API library
Source file topic100492.htm
Last updated 19-Dec-2024