Skip to end of banner
Go to start of banner

CANopen LAYER_2 communication [EN]

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

LAYER_2 communication can be implemented equally with the CANopen slave firmware and / or the CANopen master firmware.

If only LAYER_2 communication is required, the start behavior of both firmware (master / slave) must be set to "Controlled by Application" in the SYCON.net configuration.


The master will then only send a CAN telegram with CAN ID 0x700 + NODE ID, which cannot be turned off either.

The slave does not send this telegram. SYCON.net only takes over a part of the configuration.


Everything else (configuration, sending and receiving of CAN telegrams) is done exclusively via the mailboxes of the CIFX card, i.e. with the driver functions xChannelPutPacket () and xChannelGetPacket ().

Since it has to be configured via packages anyway, the whole configuration can also be implemented without SYCON.net (only the baud rate is defined by SYCON.net).


Application

The individual commands that are required for this are put dogether as a dump (all values in HEX) below.

These are packages that are taken from the API Manuals protocol.

The baud rate is 1MBaud in both cases.

CANopen-Master SetBusParam
DEST: 20
CMD:  2806
LEN:  2C
DATA: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

CANopen-Slave SetBusParam
DEST: 20
CMD:  2E04
LEN:  44
DATA: 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Channel Init
DEST: 20
CMD:  2F80
LEN:  0
DATA:

CAN_DL-Register
DEST: 20
CMD:  2A0A
LEN:  04
DATA: 00 00 00 00

CAN_DL-Enable RxID
DEST: 20
CMD:  2A12
LEN:  18
DATA: 03 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 FF 07 00 00 00 00 00 00

CAN_DL-Send Data
DEST: 20
CMD:  2A02
LEN:  14
DATA: 00 00 00 00 08 00 00 00 42 00 00 00 11 22 33 44 55 66 77 88


The following packets must be sent for the CANopen master (without SYCON.net) in the following order (the CAN telegram described above with CAN ID 0x700 + NODE ID is also sent here):

     CANopen master SetBusParam
     CAN_DL register
     CAN_DL-Enable RxID
     (CAN_DL-Send Data) - Exemplary sending of a CAN telegram
     For the CANopen slave (without SYCON.net) the following packets must be sent in the following order:
     CANopen slave SetBusParam
     Channel Init
     CAN_DL register
     CAN_DL-Enable RxID
     (CAN_DL-Send Data) - Exemplary sending of a CAN telegram


CAN telegrams are then received by the customer application via the card's Receive Mailbox (CAN_DL_CMD_DATA_IND)

If SYCON.net is used, the SetBusParam and for the slave the Channel Init must be skipped.



Für den CANopen Master müssen (ohne SYCON.net) folgende Pakete in folgender Reihenfolge gesendet werden (das oben beschriebene CAN-Telegramm mit CAN-ID 0x700 + NODE-ID wird hier auch gesendet):

  • CANopen-Master SetBusParam
  • CAN_DL-Register
  • CAN_DL-Enable RxID
  • (CAN_DL-Send Data) – Exemplarisches Senden eines CAN-Telegramms
  • Für den CANopen Slave müssen (ohne SYCON.net) folgende Pakete in folgender Reihenfolge gesendet werden:
  • CANopen-Slave SetBusParam
  • Channel Init
  • CAN_DL-Register
  • CAN_DL-Enable RxID
  • (CAN_DL-Send Data) – Exemplarisches Senden eines CAN-Telegramms


CAN-Telegramme werden dann von der Kundenapplikation über die Receive Mailbox der Karte empfangen (CAN_DL_CMD_DATA_IND)

Wenn SYCON.net verwendet wird, müssen die SetBusParam und beim Slave der Channel Init übersprungen werden.

  • No labels