Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

CANopen : re-establishing communication once it goes down

djole01
2021-09-23
2021-10-26
  • djole01 - 2021-09-23

    Hi,

    I am working on a project where we have CANopen communication between a safetyPLC (CANopen Manager / master)and an industrial PC (slave).
    It's working pretty well, except for this one issue;

    When the PC slave device shuts off, CANopen stops. But when the PC comes back up again, the CANopen communication does not resume until I do a PLC restart (power off and on), or code re-download.

    In our application, we use the S_CANopen_PC_SIL2.S_xActive to monitor communication status.
    I experimented by setting S_CANopen_PC_SIL2.xEnable to true and to acknowledge error once it goes down, and like this I am able to get the CANopen to resume after PC slave comes back alive. However this only works for 1 time.
    I don't know why it only does the trick once.

    This is the sequence currently:
    PLC & PC up an running : S_CANopen_PC_SIL2.S_xActive = TRUE , no errors
    PC stops communicating : S_CANopen_PC_SIL2.S_xActive = FALSE , still no errors
    PC comes back alive : S_CANopen_PC_SIL2.S_xActive = TRUE , no errors - successfully re-established once.
    PC stops again : S_CANopen_PC_SIL2.S_xActive = FALSE , now I get error : SCT_timout instantly .
    PC comes back alive, (sends same NMT bootup message as before) : S_CANopen_PC_SIL2.S_xActive = FALSE

    Note: The time of the PC being off doesn't seem to have an effect, first xEnable it always comes back up, second time it doesn't.

    Ideally CANopen manager should be the one to control the xEnable of the slave device, and our application should only monitor the status. I will attach the current CANopen manager settings.

    How could I get CANopen to re-establish the communication after it stops once for any reason?

    Thanks in advance,
    Djordje

     
  • djole01 - 2021-09-23

    and here is the CANopen settings for the PC slave

     
  • djole01 - 2021-09-27

    bump

     
  • eschwellinger

    eschwellinger - 2021-09-28

    did you try:
    https://help.codesys.com/webapp/EJRR-G2buObcxgy7pR9gJbNzzcI%2FCANRemoteDeviceSafe;product=3S%20CANopenSafety;version=3.5.17.0
    to set S_xErrorAck to quit this error?
    and check - S_eError for the result.
    SCT Timeout means: Telegrams did not arrive in time
    Maybe a good option is to ask the plc manufacturer, this is what I would recommend

     
    πŸ‘
    1
    • djole01 - 2021-09-28

      Thanks for the response.
      Yes, I've tried using S_xErrorAck, but it didn't help.
      I've been thinking about this problem; I think it's related to an SDO request we have. I'm going to investigate that further and will be contacting the plc vendor if I don't resolve it.

       
    • djole01 - 2021-10-26

      Hi again Eschwellinger,

      Could this be because it's CANopen safety?
      When the communication breaks, it's supposed to go into a safe-state.

      Do you know if it's possible to have the manager restart communication once the slave comes back up, without needing a HW restart?

       

Log in to post a comment.