CANopen transitions from PRE_OP to OP state.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CANopen transitions from PRE_OP to OP state.

John Dammeyer

Hi everyone,

 

I have a question for CANopen conformance experts. 

 

Is a node allowed to go NMT_OPERATIONAL on receipt of the system master’s heartbeat that shows the master is  NMT_OPERATIONAL or does it require a specific NMT command, either global or to its specific ID, to make that transition.

 

The Flow Diagram of the NMT states suggest the change to OPERATIONAL only happens with the ID=0x000 message from the NMT Master and a GO_OPERATIONAL (0x01) command.  That can be to a specific node (0x01..0x7F) or to all nodes (0x00)

 

To pass conformance if the node times out on a missing heartbeat should it drop back to PRE_OPERATIONAL and suspend PDO messages or just perform whatever operation it requires and remain OPERATIONAL?

 

Thanks

John Dammeyer

 

 

"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.

http://www.autoartisans.com/ELS/

Ph. 1 250 544 4950

 

 

Reply | Threaded
Open this post in threaded view
|

Re: CANopen transitions from PRE_OP to OP state.

Simon Byholm
Hello John

There is a spec for autostarting slaves.

If bit 4 in object 0x1F80 is 1 and all other bits are zero in a
slave it is autostart and should go operational automatically.

CiA 302-2 has more info on the NMT startup and heartbeat
processes.

Simon

Simon Byholm - Software Manager / Quality Manager

Phone: +358 6 357 6306
Fax: +358 6 357 6320
email: [hidden email]
web: www.tke.fi

TK Engineering solves your CAN, CANopen, J1939 and NMEA2000 problems by providing the hardware, software and know-how you need to design, manufacture and troubleshoot your industrial and heavy machine CAN networks. Call +358 6 357 6300 or email [hidden email] to learn how we can help you solve your CAN related problems.

On Wed, Sep 6, 2017 at 6:54 PM, John Dammeyer <[hidden email]> wrote:

Hi everyone,

 

I have a question for CANopen conformance experts. 

 

Is a node allowed to go NMT_OPERATIONAL on receipt of the system master’s heartbeat that shows the master is  NMT_OPERATIONAL or does it require a specific NMT command, either global or to its specific ID, to make that transition.

 

The Flow Diagram of the NMT states suggest the change to OPERATIONAL only happens with the ID=0x000 message from the NMT Master and a GO_OPERATIONAL (0x01) command.  That can be to a specific node (0x01..0x7F) or to all nodes (0x00)

 

To pass conformance if the node times out on a missing heartbeat should it drop back to PRE_OPERATIONAL and suspend PDO messages or just perform whatever operation it requires and remain OPERATIONAL?

 

Thanks

John Dammeyer

 

 

"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.

http://www.autoartisans.com/ELS/

Ph. <a href="tel:%28250%29%20544-4950" value="+12505444950" target="_blank">1 250 544 4950

 

 


Reply | Threaded
Open this post in threaded view
|

RE: CANopen transitions from PRE_OP to OP state.

John Dammeyer

Thanks. 

I don’t have any problem with the node autostarting or going operational if it sees the system master 0x701 heartbeat as operational.  But for some reason I thought it had to be the autostart slave or a NMT command. 

So many possibilities.

John

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Simon Byholm
Sent: September-06-17 10:51 AM
To: [hidden email]
Subject: Re: [CANLIST] CANopen transitions from PRE_OP to OP state.

 

Hello John

 

There is a spec for autostarting slaves.

 

If bit 4 in object 0x1F80 is 1 and all other bits are zero in a

slave it is autostart and should go operational automatically.

 

CiA 302-2 has more info on the NMT startup and heartbeat

processes.

 

Simon


Simon Byholm - Software Manager / Quality Manager

Phone: +358 6 357 6306
Fax: +358 6 357 6320
email: [hidden email]
web: www.tke.fi

TK Engineering solves your CAN, CANopen, J1939 and NMEA2000 problems by providing the hardware, software and know-how you need to design, manufacture and troubleshoot your industrial and heavy machine CAN networks. Call +358 6 357 6300 or email [hidden email] to learn how we can help you solve your CAN related problems.

 

On Wed, Sep 6, 2017 at 6:54 PM, John Dammeyer <[hidden email]> wrote:

Hi everyone,

 

I have a question for CANopen conformance experts. 

 

Is a node allowed to go NMT_OPERATIONAL on receipt of the system master’s heartbeat that shows the master is  NMT_OPERATIONAL or does it require a specific NMT command, either global or to its specific ID, to make that transition.

 

The Flow Diagram of the NMT states suggest the change to OPERATIONAL only happens with the ID=0x000 message from the NMT Master and a GO_OPERATIONAL (0x01) command.  That can be to a specific node (0x01..0x7F) or to all nodes (0x00)

 

To pass conformance if the node times out on a missing heartbeat should it drop back to PRE_OPERATIONAL and suspend PDO messages or just perform whatever operation it requires and remain OPERATIONAL?

 

Thanks

John Dammeyer

 

 

"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.

http://www.autoartisans.com/ELS/

Ph. <a href="tel:%28250%29%20544-4950" target="_blank">1 250 544 4950

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: CANopen transitions from PRE_OP to OP state.

heikki saha
Hello John,

There is no set of options for waiting for heartbeat of another device and perform autostart based on it through object dictionary in general. Autostart is an independent feature, which issues internal NMT start without a need for external NMT-master.

Error behavior is another interesting optional feature. By corresponding object (at 0x1029) you can take control over, into which NMT state the device shall enter when it detects an error in listed category (See object 0x1029 specification for more details). Typical scenario is, that in a case of serious communication failure, the device is set to change to NMT-stopped state. It differs from start-up, where the devices sends a boot-message and heartbeat with pre-op status.

If you have a PLC supporting CiA-314 API, then you can implement in your application the behavior you were looking for:
- poll NMT-state of the master node by CIA314_GET_STATE()
- when the required node has entered NMT state operational, use CIA314_NMT() for the local CANopen device start
- for the rest you can just use error behavior to control
  * poll NMT-state of the master
  * in a case of any deviation, force local NMT state to stopped

However, I'd recommend to use the standard start-up and error management procedures in order to keep things simple.

Best regards,

-H

Heikki Saha, CTO
  M.Sc. Automation
  Dr.Tech. Electronics
TK Engineering Oy
Mail address:  P.O. box 810, FIN-65101 VAASA
Visit address: Yrittäjänkatu 17, FIN-65380 VAASA
+358 (0)50 588 6894
email: [hidden email]
skype: heikki.saha_tke

On Wed, Sep 6, 2017 at 10:48 PM, John Dammeyer <[hidden email]> wrote:

Thanks. 

I don’t have any problem with the node autostarting or going operational if it sees the system master 0x701 heartbeat as operational.  But for some reason I thought it had to be the autostart slave or a NMT command. 

So many possibilities.

John

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Simon Byholm
Sent: September-06-17 10:51 AM
To: [hidden email]
Subject: Re: [CANLIST] CANopen transitions from PRE_OP to OP state.

 

Hello John

 

There is a spec for autostarting slaves.

 

If bit 4 in object 0x1F80 is 1 and all other bits are zero in a

slave it is autostart and should go operational automatically.

 

CiA 302-2 has more info on the NMT startup and heartbeat

processes.

 

Simon


Simon Byholm - Software Manager / Quality Manager

Phone: <a href="tel:+358%206%203576306" value="+35863576306" target="_blank">+358 6 357 6306
Fax: <a href="tel:+358%206%203576320" value="+35863576320" target="_blank">+358 6 357 6320
email: [hidden email]
web: www.tke.fi

TK Engineering solves your CAN, CANopen, J1939 and NMEA2000 problems by providing the hardware, software and know-how you need to design, manufacture and troubleshoot your industrial and heavy machine CAN networks. Call <a href="tel:+358%206%203576300" value="+35863576300" target="_blank">+358 6 357 6300 or email [hidden email] to learn how we can help you solve your CAN related problems.

 

On Wed, Sep 6, 2017 at 6:54 PM, John Dammeyer <[hidden email]> wrote:

Hi everyone,

 

I have a question for CANopen conformance experts. 

 

Is a node allowed to go NMT_OPERATIONAL on receipt of the system master’s heartbeat that shows the master is  NMT_OPERATIONAL or does it require a specific NMT command, either global or to its specific ID, to make that transition.

 

The Flow Diagram of the NMT states suggest the change to OPERATIONAL only happens with the ID=0x000 message from the NMT Master and a GO_OPERATIONAL (0x01) command.  That can be to a specific node (0x01..0x7F) or to all nodes (0x00)

 

To pass conformance if the node times out on a missing heartbeat should it drop back to PRE_OPERATIONAL and suspend PDO messages or just perform whatever operation it requires and remain OPERATIONAL?

 

Thanks

John Dammeyer

 

 

"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.

http://www.autoartisans.com/ELS/

Ph. <a href="tel:%28250%29%20544-4950" target="_blank">1 250 544 4950

 

 

 


Reply | Threaded
Open this post in threaded view
|

Re: CANopen transitions from PRE_OP to OP state.

Simon Byholm
In reply to this post by John Dammeyer
The only ways described in the spec is NMT start and slave autostart, but masters have
the option to be started by the local application, and I don't think it's explicitly forbidden
for slaves so it's a bit of a gray area.

I would stick to the official methods, to not confuse people.

Simon

Simon Byholm - Software Manager / Quality Manager

Phone: +358 6 357 6306
Fax: +358 6 357 6320
email: [hidden email]
web: www.tke.fi

TK Engineering solves your CAN, CANopen, J1939 and NMEA2000 problems by providing the hardware, software and know-how you need to design, manufacture and troubleshoot your industrial and heavy machine CAN networks. Call +358 6 357 6300 or email [hidden email] to learn how we can help you solve your CAN related problems.

On Wed, Sep 6, 2017 at 10:48 PM, John Dammeyer <[hidden email]> wrote:

Thanks. 

I don’t have any problem with the node autostarting or going operational if it sees the system master 0x701 heartbeat as operational.  But for some reason I thought it had to be the autostart slave or a NMT command. 

So many possibilities.

John

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Simon Byholm
Sent: September-06-17 10:51 AM
To: [hidden email]
Subject: Re: [CANLIST] CANopen transitions from PRE_OP to OP state.

 

Hello John

 

There is a spec for autostarting slaves.

 

If bit 4 in object 0x1F80 is 1 and all other bits are zero in a

slave it is autostart and should go operational automatically.

 

CiA 302-2 has more info on the NMT startup and heartbeat

processes.

 

Simon


Simon Byholm - Software Manager / Quality Manager

Phone: <a href="tel:+358%206%203576306" value="+35863576306" target="_blank">+358 6 357 6306
Fax: <a href="tel:+358%206%203576320" value="+35863576320" target="_blank">+358 6 357 6320
email: [hidden email]
web: www.tke.fi

TK Engineering solves your CAN, CANopen, J1939 and NMEA2000 problems by providing the hardware, software and know-how you need to design, manufacture and troubleshoot your industrial and heavy machine CAN networks. Call <a href="tel:+358%206%203576300" value="+35863576300" target="_blank">+358 6 357 6300 or email [hidden email] to learn how we can help you solve your CAN related problems.

 

On Wed, Sep 6, 2017 at 6:54 PM, John Dammeyer <[hidden email]> wrote:

Hi everyone,

 

I have a question for CANopen conformance experts. 

 

Is a node allowed to go NMT_OPERATIONAL on receipt of the system master’s heartbeat that shows the master is  NMT_OPERATIONAL or does it require a specific NMT command, either global or to its specific ID, to make that transition.

 

The Flow Diagram of the NMT states suggest the change to OPERATIONAL only happens with the ID=0x000 message from the NMT Master and a GO_OPERATIONAL (0x01) command.  That can be to a specific node (0x01..0x7F) or to all nodes (0x00)

 

To pass conformance if the node times out on a missing heartbeat should it drop back to PRE_OPERATIONAL and suspend PDO messages or just perform whatever operation it requires and remain OPERATIONAL?

 

Thanks

John Dammeyer

 

 

"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.

http://www.autoartisans.com/ELS/

Ph. <a href="tel:%28250%29%20544-4950" target="_blank">1 250 544 4950