Skip to content

After multiple slave devices are connected, the pointer of the slave devices changes, but the data seems to be mapped to the same area #189

@TCczs-6

Description

@TCczs-6

I am using some EtherCAT devices connected by pysoem, but I find that when I run the same piece of code, the data of some devices will be mapped to the devices directly connected to the master station, including slave. name, slave. id, etc. Even slave. input and slave. output. These data and data lengths are identical, but this will not happen when I change to another manufacturer's EtherCAT device. But can you tell me how to solve this problem if I have to use the manufacturer's EtherCAT.

Here is my code
`import pysoem

adapters = pysoem.find_adapters()
for i, adapter in enumerate(adapters):
print('Adapter {}'.format(i))
print(' {}'.format(adapter.name))
print(' {}'.format(adapter.desc))

master = pysoem.Master()
master.open(r"\Device\NPF_{905DFD07-A39F-4BB0-8A8A-F446A2556FE3}")
master.config_init()

for slave in master.slaves:
print(slave.name)
print(slave.man)
print(slave.id)`

In addition, when I tried to connect pysoem and pyqt, I found that there was a chance that moving or switching my pyqt app window to another window would cause the EtherCAT connection to disconnect, which needed to be reconnected to solve the problem. However, with TwinCAT, this would not happen, so I can almost rule out device issues, but I don't know how to solve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions