ifm / python-opd100-example

Python based OPD100 profile reading example
Apache License 2.0
2 stars 3 forks source link

Problem setting device id #2

Open aslakjo opened 2 years ago

aslakjo commented 2 years ago

Hi

I downloaded your sample and set it up with a AL1950 and a OPD100. However i can only get 4 bytes where i was expecting 32 from the PDin value. Here https://github.com/ifm/python-opd100-example/blob/93cdad05bb96890582429ca14156ebba398297a2/opd100_loader.py#L249

I have traced the problem to not being able to set the device id correctly. Here; https://github.com/ifm/python-opd100-example/blob/93cdad05bb96890582429ca14156ebba398297a2/opd100_loader.py#L179

I see that the example is a bit old. Does it still work out of the box with new hardware?

You can probably reproduce the problem with this postman collection. Perform setdevice id, and read device id. I will still get 1260 not 1267.

ifm-slang commented 2 years ago

1276 is the "TOOL" DeviceID of 1260 (seems to be correct in py script) ... not sure if it is a typo in your message or if you really tried to set 1267 instead of 1276