EtherCAT with XMC4800 - (Segmented) SDO read via CoE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User11236
Level 1
Level 1
Hi All, I don't know whether this is the right place to post my problem,
but hopefully someone of You can help me out.

I'm using XMC4800 to implement an EtherCAT slave device.
I develop the slave with
DAVE version: 4.4.2
ECAT_SSC App: 4.0.24
SSC Tool: 1.4.2
SSC: 5.12

The slave stack was built using Infineon's configuration file for the SSC
and a customized object dictionary (Excel).
I applied patches to SSC code as listed in
https://www.ethercat.org/memberarea/forum.asp?../memberarea/forum/free-download-slave-stack-code-v5-...

I'm running an EtherCAT master from within a TwinCAT3 PLC project to test my
slave implementation.

One of the desired functionalities of the slave controllers is to capture
sampled ADC data into an array of buffers.
The capture process is triggered by writing a bit into a control SDO.
When the desired amount of samples has been written into the capture buffers,
XMC firmware sets a bit in a status SDO.
(Status word and control word shall later be implemented using PDO for a more
flexible handshaking, but for the time beeing I used SDOs)

I tested the implemented capture function using an ADS client (Visual C++,
ADS API). The client checks the current status of the capture mechanism using
ADS API command AdsSyncReadReq(), then writes configuration data (which ADC
channels should be captured, number of samples, etc) via several ADS commands
AdsSyncWriteReq().
Checking the capture status as well as writing configuration data and trigger
work as expected.
After status SDO indicates that the buffers have been filled successfully, the
capture buffers are read one after another in a loop using AdsSyncReadReq().
To check data consistency and order, I used consecutive numbers instead of ADC
data to fill the buffers.

I hereby notice the following problem:
Only buffers 1 to 3 are filled correctly with expected data.
Each subsequent pair of buffers is filled starting with offset of 48 in the
index but with data obviously being read from start of buffers 2 and 3.
So, data in buffers 3 and 4 start at index 48, data in buffers 5 and 6 start
at index 96 (2x 48), a.s.o..
Same picture can be seen using CoE - Online view of the capture buffers of
the selected box in the TwinCAT project.
In fact, all the capture buffers are filled correctly in the controller's
memory (checked with debugger).
It seems that the issue is with addressing the buffer SDOs or segmentation when
reading them via CoE.

Has anyone made a similar experience or can make a suggestion on how to look
behind the scenes in this case ?

Every hint is welcome as to how I can systematically check probable causes
of this behaviour with reasonable effort.

Thanks in advance,
0 Likes
1 Reply
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Dear Knuti,
our examples for the Relax-Kits demonstrate the integration and development flow on using SSC-Tool on the XMC.
All further questions in regard to project specific implementations on the ETG stack and use in combination with BECKHOFF master functionalities we like to advise you to clarify them with ETG (see forum inside member-area) directly.

Kind Regards

Michael
0 Likes