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

Cannot read device object dictionary #104

Open
jakezimmer opened this issue Apr 12, 2023 · 1 comment
Open

Cannot read device object dictionary #104

jakezimmer opened this issue Apr 12, 2023 · 1 comment

Comments

@jakezimmer
Copy link

Hello,

I'm trying to read the object dictionary of a slave.

master = pysoem.Master()

master.open(adapter)

if master.config_init() > 0:
    for slave in master.slaves:
        print(slave.name)
        print(slave.state)
        print(slave.sdo_read(0x1008, 0).decode('utf-8'))
        print(slave.od)
else:
    print('no device found')

master.close()

Unfortunately, while I can connect to the slave and read some basic information, I am unable to get the object dictionary.

EPOS4
1
EPOS4
---------------------------------------------------------------------------
SdoInfoError                              Traceback (most recent call last)
Cell In[14], line 12
     10         print(slave.state)
     11         print(slave.sdo_read(0x1008, 0).decode('utf-8'))
---> 12         print(slave.od)
     13 else:
     14     print('no device found')

File pysoem\pysoem.pyx:1012, in pysoem.pysoem.CdefSlave._get_od()

SdoInfoError: Sdo List Info read failed

Is there anything I'm doing wrong here or other steps needed before reading the object dictionary to get the list of objects?

Additional information:

  • OS: Windows 10
  • Slave Device: Maxon EPOS4 EtherCAT Motor Position Controller
  • Can successfully view the object dictionary through a GUI supplied by Maxon
@tdemierr
Copy link

Hello,
I am relatively new to ethercat in with pysoem. However, object dictionary does not seem to be accessible in https://pysoem.readthedocs.io/en/latest/cdef_slave.html# .

If you want to get values of sdo, you can try to use the https://github.com/bnjmnp/pysoem/blob/master/examples/read_sdo_info.py and adapt it with sdo_read to get the values you are looking for.
Best regards
Tim

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