Search code examples
can-buscanopen

Time to send SDO


I am working on CANopen architecture and had three questions:

1- When the 'synchronous window' is closed until the next SYNC message, should we send the SDO message? Can we not send a message during this period?

2- Is it possible not to send the PDO message during the simultaneous window?

3- What is the answer that the slaves give in the SYNC message?

CANopen SYNC & Synchronous Windows Diagram


Solution

  • Disclaimer: I don't have exact answers but I just wanted to share my assumptions & thoughts.

    1. CiA 301 doesn't mention the relation between synchronous window and SDOs. In normal operation after the initial configuration, one may assume that SDOs aren't present on the system, or at least they are rare compared to PDOs. Although not strictly necessary, SDOs are generally initiated by a device which has the master role, and that device also produces the SYNC messages (again, it's not strictly necessary but it's the usual/common implementation). So, the master device may adjust the timing of SDO requests according to the synchronous window.

    Here is a quote from CiA 301:

    If the synchronous window length expires all synchronous TPDOs may be discarded and an EMCY message may be transmitted; all synchronous RPDOs may be discarded until the next SYNC message is received. Synchronous RPDO processing is resumed with the next SYNC message.

    1. CiA 301 uses the word "may" (see the quote above). So I'm not sure if it's mandatory or not. In my opinion, it makes sense to follow the advice and abort synchronous TPDO transmissions after the synchronous window and send an EMCY message. Event-driven (non-synchronous) TPDOs can be sent within or after the synchronous window.

    2. There is no direct response to SYNC messages. On SYNC reception, SYNC consumers (slaves) sample their inputs, drive their outputs according to the previous RPDOs, and start transmitting their TPDOs containing the previous samples (or the current ones? I'm not sure about this).