Hey,
So I am working with a CK3E running the Ethercat Acontis Stack, and I am trying to get my EK1100 with a EL1252 I/O slice data to be mapped correctly to the proper IOBuffer and IO.Data register so I can use it in my user program.
As a specific example, PowerPMAC IDE maps my ethercat slave, and I have PDO's with data representing the status of the input (single bit) and the latched time events when the input goes high or low (64 bit ns time). I will focus in on the negative latch time PDO for input 2.
From the ECATConfig.cfg file
--------------------------------------------------
ECAT[0].IO[4103].BitLength=64
ECAT[0].IO[4103].Data=24
ECAT[0].IO[4103].Index=7433
ECAT[0].IO[4103].SubIndex=200
ECAT[0].IO[4103].Input=1
ECAT[0].IO[4103].Offset=43
ECAT[0].IO[4103].BitPosition=0
ECAT[0].IO[4103].Slave=1
From the ECATMap.pmh file
--------------------------------------------------
#define Slave_1002_EL1252_1005_1D09_200_LatchNeg2 (x) ECAT[0].IOBuffer[24 + x]
Initially, everything works when I right click on my Ethercat master -> Load Mapping to Power PMAC.
ECAT[0].IO[4100].Data and then go view the cyclic PDO in "Watch Ethercat Mapped Variables". I download and save all program files, save, and then reset the controller.
However, after a reset, my mapped variables no longer updates to a correct value, its just zero as if no data is being pumped into IOBuffer.
Inspecting the manual, IOBuffer uses ECAT[x].IO[x].Data as a storage variable for the offset when looking for the start address of any data bigger than 32 bits. Reading ECAT[0].IO[4103].Data, the value is 0 which is wrong according to ECATConfig.cfg, it should be 24.
Setting ECAT[0].IO[4103].Data=24, and ECAT[0].IOBuffer[24 + x] now returns the correct data (reverse ordered, but that is a separate issue than the current one).
What I can't understand is why .data is not sticking to 24 and is being set to zero after a power cycle; and I am wondering if it possible to re-upload ECATConfig.cfg after a power cycle or reset?
Any help is greatly appreciated,
Regards,
David
So I am working with a CK3E running the Ethercat Acontis Stack, and I am trying to get my EK1100 with a EL1252 I/O slice data to be mapped correctly to the proper IOBuffer and IO.Data register so I can use it in my user program.
As a specific example, PowerPMAC IDE maps my ethercat slave, and I have PDO's with data representing the status of the input (single bit) and the latched time events when the input goes high or low (64 bit ns time). I will focus in on the negative latch time PDO for input 2.
From the ECATConfig.cfg file
--------------------------------------------------
ECAT[0].IO[4103].BitLength=64
ECAT[0].IO[4103].Data=24
ECAT[0].IO[4103].Index=7433
ECAT[0].IO[4103].SubIndex=200
ECAT[0].IO[4103].Input=1
ECAT[0].IO[4103].Offset=43
ECAT[0].IO[4103].BitPosition=0
ECAT[0].IO[4103].Slave=1
From the ECATMap.pmh file
--------------------------------------------------
#define Slave_1002_EL1252_1005_1D09_200_LatchNeg2 (x) ECAT[0].IOBuffer[24 + x]
Initially, everything works when I right click on my Ethercat master -> Load Mapping to Power PMAC.
ECAT[0].IO[4100].Data and then go view the cyclic PDO in "Watch Ethercat Mapped Variables". I download and save all program files, save, and then reset the controller.
However, after a reset, my mapped variables no longer updates to a correct value, its just zero as if no data is being pumped into IOBuffer.
Inspecting the manual, IOBuffer uses ECAT[x].IO[x].Data as a storage variable for the offset when looking for the start address of any data bigger than 32 bits. Reading ECAT[0].IO[4103].Data, the value is 0 which is wrong according to ECATConfig.cfg, it should be 24.
Setting ECAT[0].IO[4103].Data=24, and ECAT[0].IOBuffer[24 + x] now returns the correct data (reverse ordered, but that is a separate issue than the current one).
What I can't understand is why .data is not sticking to 24 and is being set to zero after a power cycle; and I am wondering if it possible to re-upload ECATConfig.cfg after a power cycle or reset?
Any help is greatly appreciated,
Regards,
David