-
Notifications
You must be signed in to change notification settings - Fork 42
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
config_map ConfigMapError because subindex 0 does not exist #105
Comments
Sorry, I don't have a clue how you could get around this. |
Hello Thanks for the response. |
Or at least make this error not abort and read the specified number of subindex entries? |
Sorry, I found out actually subindex 0 exists, but for some reason 'Unsupported access to an object' is given when |
Additionally, I appreciate if there is way to debug why this is becoming error. |
Hello. Using Wireshark, I looked the transaction sequence. It found the first sending of Initiate Upload request is responded by Abort Transfer, but the resending request to the same is returned normally. How can I avoid program to stop running by this error? |
If only the first read of this object creates an error, you might try to access this object before calling config_map() and catching the Abort Transfer, like this: try:
device.sdo_read(0x...)
except pysoem.SdoError:
pass
master.config_map() Modified: changed config_init() to changed config_map() |
Thanks for reply. I tried. It made error, but the first access of the write of config_map() creates the abort error. |
This seems to abort in the middle of the function without finishing it. |
Hi, bnjmnp. |
Hi, bnjmnp. |
Creates a 1000 (hex 3E8) elements long array of bytes filled with zeros. Maybe this is not what you want to write to 0x7001:01. I guess object 0x7001 entry 1 is a 32 bit unsigned integer, and you want to write the hexadecimal value 0x000003E8 to it. This could be done by something like that. self._master.slaves[0].sdo_write(index=0x7005, subindex=1, data=(0x000003E8).to_bytes(4, byteorder='little', signed=False), ca=False) Or that self._master.slaves[0].sdo_write(index=0x7005, subindex=1, data=bytes(ctypes.c_uint32(0x000003E8)), ca=False) I wrote a few things together in the PySOEM documentation: https://pysoem.readthedocs.io/en/latest/coe_objects.html#reading-and-writing-coe-objects about this topic. |
Note that actuators need to be in operational state in order to be able to change the state of their outputs. Could you share the wireshark log of this incident:
|
Hi, bnjmnp. |
You can attach the log directly to a comment. Just keep it small I would say. |
Hello I have just one other. that is ok. I attach the log. please check. |
Hello bnjmnp |
I just noticed that it is the SDO read with "complete access" that fails for 0x1600, the normal one goes through. I remember there was a similar issue #99 where this was solved by a firmware update of the device. The pysoem workaround is not there at the moment. Maybe you also have a firmware update for your device? |
Hello, bnjmnp. |
Hello, bnjmnp. |
This error is handled in the SOEM C code, so there is no way to let it pass in PySOEM code. I'll try to implement a way to "disabling complete access" in the next days. |
Hello bnjmnp. Thanks a lot! |
I got something for you to try out. I pushed it to the develop branch and you can test it by installing pysoem form TestPyPI instead of the regular PyPI using If it works fine, I will later merge the develop branch into the main branch and upload a release to PyPI. The new version introduces function master.slaves[<pos_of_faulty_device>]._disable_complete_access()
master.config_map() or you do that inside the |
Hello bnjmnp. Thanks! |
Hello bnjmnp. It worked without abort. |
Great. The |
Hello I have this error,
SdoError(1, ****, **, ****, 'Unsupported access to an object'),
because my device's PDO Mapping Object does not support subindex 0.
Instead, it starts with 1. How can workaround this?
(By the way, I have other slave that have subindex starts with 0. that works fine.)
The text was updated successfully, but these errors were encountered: