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

cross mob
chrisdsimpson
Level 1
Level 1
First comment on blog 10 sign-ins 5 replies posted

I am working with the XMC4300 relax board running it as an EtherCAT slave  using the ETHCAT_SSC_XMC43 slave example code.  I am trying to use REAL data types in the XMC_ESC.xlsx file that generates the ESI file for my PDO map. When I get the project build and running and am looking at the data in TwinCAT 3. It looks like my REAL values and miss aligned in the PDO data. They look fine in CoE. Any Idea what I might be doing wrong ? 

0 Likes
5 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @chrisdsimpson ,

Can you share the excel sheet here so that we can take a closer look at it?

Do you find the misalignment when you try to send other datatypes such as UINT16?

Best regards,
Nikhil

0 Likes

Hello @ncbs 

I have added the modified XMC_ESC.xlsx file along with my TwinCAT running in OP mode showing the device. You can see that it looks correct in CoE but its wrong in PDO.  So far any change to the   XMC_ESC.xlsx data types gives me incorrect data in PDO but looks fine in CoE.

I have also and added 2 new CoE  BOOLs at the bottom of the XMC_ESC.xlsx file at address 0xFB40 sub index 1 and 2. Is there an example that shows how access the CoE in my XMC project  ? 

0 Likes

Hello @ncbs 

If I just add more UINT16 datatype they work fine. But any 32 bit datatypes cause the problem. 

0 Likes
chrisdsimpson
Level 1
Level 1
First comment on blog 10 sign-ins 5 replies posted

Here is the  XMC_ESC.xlsx with 2 REAL data type replacing the first 2 original UNITs

XMC_ESC.xlsx_with_REAL.png

 

This is my TwinCAT3 with the ESC_XMC device running and displaying a pressure and temperature that are both REAL data types. You can see it looks correct in CoE but in the PDO data its incorrect. Also in PDO the IN_GEN_INT3 has the value 16849 and in my project this is set to 0.

TwinCAT3_XMC_ESC_REAL Error.png

0 Likes

Here is my XMC_ESC.xlsx file.

0 Likes