bnjmnp / pysoem

Cython wrapper for the Simple Open EtherCAT Master Library
MIT License
97 stars 38 forks source link

slave.write_eeprom() bug? #143

Closed Michaelicious closed 3 months ago

Michaelicious commented 3 months ago

EDIT: Ok so Attribute error is due to a wrong size. writing 2 bytes seems to work.

I'm trying to do eeprom_write, and got exceptions while trying to input bytes([1,1,1,1]), and multiple variants of it. So I've tried to write exactly what I read, and it still throws an exception Couldn't find any usage examples Any ideas ?

image

MartinALL91 commented 3 months ago

The input data to the eemprom_write method must be 2 bytes. The data retrieved by the eemprom_read method is 4 bytes.

Michaelicious commented 3 months ago

The input data to the eemprom_write method must be 2 bytes. The data retrieved by the eemprom_read method is 4 bytes.

thats why the reading is done by jumps of 2 (Meaning i cant eeprom_read 1, only 0 or 2 should work) But eeprom_write is done 2 bytes at a time, therefore i'm able to use odd indexes ?