Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing/checking wrong number for OP State #10

Open
tadibatt opened this issue Aug 29, 2017 · 1 comment
Open

passing/checking wrong number for OP State #10

tadibatt opened this issue Aug 29, 2017 · 1 comment

Comments

@tadibatt
Copy link
Contributor

In example_01.js and readme.md to switch to OP state we should pass to writeState/statecheck '8' and not '4'.
See typdef enum from https://github.com/OpenEtherCATsociety/SOEM/blob/master/soem/ethercattype.h :
/** Possible EtherCAT slave states */ typedef enum { /** No valid state. */ EC_STATE_NONE = 0x00, /** Init state*/ EC_STATE_INIT = 0x01, /** Pre-operational. */ EC_STATE_PRE_OP = 0x02, /** Boot state*/ EC_STATE_BOOT = 0x03, /** Safe-operational. */ EC_STATE_SAFE_OP = 0x04, /** Operational */ EC_STATE_OPERATIONAL = 0x08, /** Error or ACK error */ EC_STATE_ACK = 0x10, EC_STATE_ERROR = 0x10 } ec_state;
and https://infosys.beckhoff.com/index.php?content=../content/1031/tcsystemmanager/reference/ethercat/html/EtherCAT_Diagnostics.htm&id= (section Info Data).
Or I'm missing something ?

@stefanpoeter
Copy link
Member

Don't know why it is the way it is, I guess it worked when I first used it. Your proposal seems right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants