question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BaseNode402 Transition from 'OPERATION ENABLED' to 'QUICK STOP ACTIVE'

See original GitHub issue

Hi there,

I have a problem when I do a transition form the state ‘OPERATION ENABLED’ to ‘QUICK STOP ACTIVE’. I always get an ValueError: 'Illegal transition from SWITCH ON DISABLED to QUICK STOP ACTIVE'. Other transitions are working fine, and besides the error, the motor is doing the transition just fine. I came to the conclusion, that the problem may be, that the transition to ‘QUICK STOP ACTIVE’ immediately triggers a transition to ‘SWITCH ON DISABLED’ so that the motor never really is in state ‘QUICK STOP ACTIVE’ so that your routine while self.state != new_state: never gets true and ends up comparing the current state which is ‘SWITCH ON DISABLED’ with ‘QUICK STOP ACTIVE’ which then is an illegal transition.

Do you have an idea how to fix this?

edit: This is my code.

import canopen

Net = canopen.Network()
    Net.connect(bustype='socketcan', channel='can0', bitrate=1000000)
    Node = canopen.BaseNode402(1, '/path_to_my.eds')
    Net.add_node(Node)
    Node.load_configuration()

    Node.setup_402_state_machine()
    Node.state = 'OPERATION ENABLED' 
    print(Node.state)            ## prints 'OPERATION ENABLED'
    Node.state = 'QUICK STOP ACTIVE'
    print(Node.state)            ## prints 'SWITCH ON DISABLED'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JulianS-Unicommented, Nov 21, 2019

@gsulc

Hm… code 0 seems to define this behavior, but I’m not seeing it for 1 and 2.

Object Index 605A Sub-Index 00 : CANopen_HB_engl.pdf search for 605A

Specifies the behaviour of the device, when it is switched to the state Quick Stop Active by the master.

In state Quick Stop Active, the drive decelerates speed controlled as specified in Quick Stop Option Code until stop and switches to the state Switch On Disabled (power stage disabled).

Her is another AKD CANopen Kommunikationshandbuch DE (REV U).pdf it is german but you can copy paste it to google translator. Bit:

1 — Bremsen mit Verzögerungsrampe und Übergang in "Einschalten Disabled" 2 — Bremsen mit Schnellhaltrampe und Übergang in “Einschalten Disabled” 5 — Bremsen mit Verzögerungsrampe und in “Schnellhalt Aktiv” bleiben 6 — Bremsen mit Schnellhaltrampe und in “Schnellhalt Aktiv” bleiben

It is even in here Nanotec which we linked already.

1reaction
gsulccommented, Nov 20, 2019

I’d like to chime in on this. Is there any indication that this automatic transition is prevalent among manufactured drives? This seems like non-standard behavior to me, which I think the library should not support, unless the problem lies in not correctly getting the current state.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Device profiles - Read the Docs
During operation the state can change to states which cannot be commanded by the Controlword, for example a 'FAULT' state. Therefore the BaseNode402...
Read more >
PD4-E CANopen Online Manual: CiA 402 Power State Machine
Exceptions are the resetting of the error (fault reset) and the changeover from Quick Stop Active to Operation Enabled : the transition is...
Read more >
canopen Documentation - Read the Docs
'SWITCHED ON'. • 'OPERATION ENABLED'. • 'QUICK STOP ACTIVE'. 11.1.2 API class canopen.profiles.p402.BaseNode402(node_id, object_dictionary).
Read more >
CiA® 402-CANopen Drives and Motion Control Profile
Switch off power section, motor free to rotate. Transition 11: Operation Enable => Quick Stop Active. Event: "Quick Stop" command received from host...
Read more >
Object 605Ah: Quick stop option code (DS402)
Slow down on quick stop ramp and transit into Switch On Disabled. 5. Slow down on slow down ramp and stay in Quick...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found