Closed nikki330 closed 8 months ago
Hi @nikki330,
your first code snippet looks fine, the list should not be empty. I can't tell if pysoem on a virtual Ubuntu machine will work on a Mac. Maybe there are problems with access rights, and you are not allowed to open 'eth0'. For the rest, take a look at #30 there I provided a minimal example on how to operate a Trinamic servo drive. I hope this helps a little bit.
Closed due to inactivity of the OP.
As the document said, the pysoem seems can run on linux and windows. But I only have a Mac, I tried to install ubuntu with parallel, but when I tried to use find _adapters, it can find the 'eth0', However When I tried the following code, it returns a empty list. I'm sure the servo device is correctly connected on my computer.
Is there any other configurations I need to do, or this library can't work on a virtual machine. Anyway, I'm new to develop etherCAT servo. I really want to let the servo run as the code. I also tried to use a raspberry 4b, it can find the servo as the above code. Then I tried to use sdo_write to write params, I follows a case on the manual of the servo, I write all the params with correct indexes and types and values. I also tried to use sdo_read to check if the device got the values. The params' indexs, types and values are all good, but the servo device was still not work. I tried to read other values, like temperature, it works and reasonable.
So confused, why my device not work. Is my understanding correct? I use sdo_write gives all params that the devices need, it should work correctly?
my code like this:
I am grateful if anyone can point out the mistakes I made or help me solve these problems. Thanks so much friends