You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For our device, the default (ESI-defined) PDO mappings are done as follows:
Sync Manager 2 (SM2) is 0x1C12 and is for output PDO mappings that are detailed as follows:
0x1600 contains a mapping for default Output PDOs (5 PDOs, total of 6 bytes)
0x1601 contains a mapping for USER DEFINED Output PDOs (19 PDOs, total of 48 bytes)
Total Output SM2 bytes = 54 bytes
Sync Manager 3 (SM3) is 0x1C13 and is for input PDO mappings that are detailed as follows:
0x1A00 contains a mapping for default Input PDOs (13 PDOs, total of 18 bytes)
0x1A01 contains a mapping for USER DEFINED Input PDOs (35 PDOs, total of 82 bytes)
Total Input SM3 bytes = 100 bytes
ISSUE:
We use pysoem to configure the USER DEFINED PDOs (input and output) by first creating a tuple of the PDOs that we want to include in each mapping (input or output) and then we write the mapping by using:
where index is either 0x1C12 or 0x1C13 or 0x1601 or 0x1A01 and subindex is 0 for all of them.
The data that is sent is of the format (number of objects in mapping, object1_byte_size, object1_subindex, object1_index_little_endian, ..., objectZ__byte_size, objectZ_subindex,...)
After slave.sdo_write(index, subindex, struct-packed-data_of_pdo_mapping, complete_access=TRUE), we then run:
master.config_map()
And we check if the PDOs mappings have been written and if the Sync Manager size has been updated. STRANGELY, this works for all dynamic PDOs EXCEPT 0x1A01.
So 0x1C12 and 0x1C13 and 0x1601 all work just fine, we check the slave device and we see the new mapping of the dynamic PDOs. But 0x1A01 fails with an error that that Sync Manager (SM3) byte size has not been written and therefore the byte size of the written data is different from the Sync Manager byte size (which is stubbornly the original from the ESI during initial configuration = 100 bytes ... check numbers in my intro).
Is there anyone who has encountered a similar problem? Is there anyone who may have a solution to this?
Does anyone do dynamic PDO mapping using pysoem and it works just fine?
Hi @hatilima. Did you get any further on this?
The basic_example.py uses selective PDO mapping.
Did you try to solve this with an config_func, like el1259_setup() in there?
For our device, the default (ESI-defined) PDO mappings are done as follows:
Sync Manager 2 (SM2) is 0x1C12 and is for output PDO mappings that are detailed as follows:
0x1600 contains a mapping for default Output PDOs (5 PDOs, total of 6 bytes)
0x1601 contains a mapping for USER DEFINED Output PDOs (19 PDOs, total of 48 bytes)
Total Output SM2 bytes = 54 bytes
Sync Manager 3 (SM3) is 0x1C13 and is for input PDO mappings that are detailed as follows:
0x1A00 contains a mapping for default Input PDOs (13 PDOs, total of 18 bytes)
0x1A01 contains a mapping for USER DEFINED Input PDOs (35 PDOs, total of 82 bytes)
Total Input SM3 bytes = 100 bytes
ISSUE:
We use pysoem to configure the USER DEFINED PDOs (input and output) by first creating a tuple of the PDOs that we want to include in each mapping (input or output) and then we write the mapping by using:
slave.sdo_write(index, subindex, struct-packed-data, complete_access=TRUE)
where index is either 0x1C12 or 0x1C13 or 0x1601 or 0x1A01 and subindex is 0 for all of them.
The data that is sent is of the format (number of objects in mapping, object1_byte_size, object1_subindex, object1_index_little_endian, ..., objectZ__byte_size, objectZ_subindex,...)
After slave.sdo_write(index, subindex, struct-packed-data_of_pdo_mapping, complete_access=TRUE), we then run:
master.config_map()
And we check if the PDOs mappings have been written and if the Sync Manager size has been updated. STRANGELY, this works for all dynamic PDOs EXCEPT 0x1A01.
So 0x1C12 and 0x1C13 and 0x1601 all work just fine, we check the slave device and we see the new mapping of the dynamic PDOs. But 0x1A01 fails with an error that that Sync Manager (SM3) byte size has not been written and therefore the byte size of the written data is different from the Sync Manager byte size (which is stubbornly the original from the ESI during initial configuration = 100 bytes ... check numbers in my intro).
Is there anyone who has encountered a similar problem? Is there anyone who may have a solution to this?
Does anyone do dynamic PDO mapping using pysoem and it works just fine?
Is it sufficient to just do:
slave.sdo_write(index, subindex, struct-packed-data_of_pdo_mapping, complete_access=TRUE)
master.config_map()
for dynamic pdo mappings in 0x1601, 0x1A01, 0x1C12 and 0x1C13??
The text was updated successfully, but these errors were encountered: