Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: CR1080 not generating heartbeat?

  1. #1
    Join Date
    Oct 2011
    Posts
    19

    Default CR1080 not generating heartbeat?

    I have a CR1080 running firmware V01.03.01. In the PLC configuration, I have the interface CAN 1 set as a CANopen master, Node ID 30 decimal, and as a heartbeat master with a time interval of 200 ms. I have a pair of CR2032 modules as nodes 1 and 2, also generating heartbeats at 200 ms intervals.

    My understanding is that heartbeat messages have the message ID 700 hex + Node ID. If I monitor the CAN bus for message IDs 700-799 hex, I see heartbeat messages 701 and 702 (from the two CR2032 modules) but not from the CR1080; I would expect a heartbeat message ID 71E from the CR1080.

    If I set the CR2032 modules to be heartbeat consumers, the red error LED lights up, indicating they are not receiving a heartbeat message.

    I also cannot find the option to set the CR1080 as a heartbeat consumer.

    Is there something I'm missing regarding heartbeat generation and monitoring? I'm rapidly learning CoDeSys and CAN in general, so this may be an elementary question.

    Thanks,
    Dave

  2. #2
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    295

    Default

    Did you start with the Template for the CR1080 Master?

    Its located here:

    C:\Program Files\ifm electronic\CoDeSys V2.3\Projects\TEMPLATE_DVD_V020204

    You would be using the ifm_template_CR1080master_V010200_V01

    Also in the PLC Configuration>CR1080 Configuration>Local CAN Communication>Interface CAN1>CANopen Interface>CANopen Master> is the Support DSP301,V4.01, and DSP306 checked, and below it do you have a time for the heartbeat?

  3. #3
    Join Date
    Oct 2011
    Posts
    19

    Default

    Hi Erik,

    I started from template

    C:\Program Files (x86)\ifm electronic\CoDeSys V2.3\Projects\TEMPLATE_DVD_V020203\ifm_template_CR 1080layer2_V010000_V02.pro, as that was the only CR1080 template on the drive. Perhaps that's part of the problem?

    Support DSP01,V4.01 and DSP306 is checked and the heartbeat Master time is set for 200 ms.

  4. #4
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    295

    Default

    Attached is the Template for CANopen master.
    Attached Files Attached Files

  5. #5
    Join Date
    Oct 2011
    Posts
    19

    Default

    Thanks Erik.

    I moved my code onto the CANopen template you sent, but still do not see a heartbeat from the CR1080. Using the template on its own and adding my two CR2032 modules, I still do not see a CR1080 heartbeat.

    Any other thoughts?

    Thanks.

  6. #6
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    295

    Default

    Quote Originally Posted by dminerath View Post
    Thanks Erik.

    I moved my code onto the CANopen template you sent, but still do not see a heartbeat from the CR1080. Using the template on its own and adding my two CR2032 modules, I still do not see a CR1080 heartbeat.

    Any other thoughts?

    Thanks.
    Post up the code you have.
    Last edited by Erik Gerrits; 12-10-2011 at 09:49 PM.

  7. #7
    Join Date
    Oct 2011
    Posts
    19

    Default

    I attached a copy of the code I used, plus a 10-second log of the CAN bus activity with no filtering.
    Attached Files Attached Files

  8. #8
    Join Date
    Oct 2011
    Posts
    19

    Default

    Here's another tidbit that may or not be related:

    When running my full code, I will lose control of the CR2032 modules periodically. By that, I mean I cannot write to any of the output ports. The code is still trying to send commands, but the modules don't respond. This happens if I let the code run for an extended period of time without touching the controller (overnight, for example), or I can repeatedly cause the problem if I change screen pages on the CR1080.

  9. #9
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    295

    Default

    I would change the heartbeats to all the same times. I would also have the CR2032s set up as consumers. I would uncheck Reset Node.

    On a different note it is not recommended to use the CR1080 as a master. If you are using it just to pick up inputs then that it okay.

  10. #10
    Join Date
    Oct 2011
    Posts
    19

    Default

    Thanks Erik.

    When I set the CR2032 modules up as heartbeat consumers, the red error is on for both units indicating a heartbeat/node guarding error (due to the lack of a heartbeat I presume).

    The CR1080 is the only controller on the bus; it is connected via the CAN bus to the two CR2032 modules and a CR2012 module. The CR2012 module is used for inputs only, but the CR2032 modules are being used for input and output; current inputs for temperatures and pressures, and outputs for controlling some solenoid valves (ON/OFF for some, and a PWM signal for throttling one). There is a basic display on the bus as well, but it is a slave and only set up to receive a few network variables (which it is receiving).

    I'll try setting all the heartbeat times to the same value and turning on the heartbeat consumer for the modules. How do I set the CR1080 to be a consumer? There is only the option to set it as a heartbeat master.

    If using the CR1080 as a master is not recommended, then how should it be set up?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •