<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hello everybody,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>we use IgH EtherCAT-Master in our system to read out the SII-data of the slaves. Based on this data we automatically generate a mapping file to connect the data elements in the PDOs to the software labels in an existing Common Data Base. In order to do that we use the structure ec_ioctl_slave_sync_pdo_entry_t defined in ioctl.h, which provides us with the elements index, subindex, bit_length and name.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>What we are missing there is the PDO Entry field "Data Type" (see Table 25 in ETG.1000.6 S (R) V1.0.2).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>We discovered that there is a routine ec_slave_fetch_sii_pdos in the file slave.c which reads out the SII PDO information:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> ec_pdo_entry_init(entry);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> entry->index = EC_READ_U16(data);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> entry->subindex = EC_READ_U8(data + 2);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ret = ec_pdo_entry_set_name(entry,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ec_slave_sii_string(slave, EC_READ_U8(data + 3)));<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (ret) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ec_pdo_entry_clear(entry);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> kfree(entry);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> return ret;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> entry->bit_length = EC_READ_U8(data + 5);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Now we could add an element "data_type" to the structure ec_pdo_entry_t (in pdo_entry.h) and add a line to the code above:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> entry->data_type = EC_READ_U8(data + 4);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>This should give us the index to the CoE Object Dictionary and for index values 0x0..0x1F a unique data type which we could then use in our mapper to declare the right data type for a PDO entry element.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So now my question after this long introduction: how can we access this modified structure in a similar way as we access the entry information provided by ioctl.c? Or is there a way to get our missing data type directly in ioctl.c?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance for your help!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Ralf Ermes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Dipl.-Ing. Ralf Ermes<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Systems Engineer<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Software Engineering<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>CAE Elektronik GmbH<o:p></o:p></span></b></p><p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Military Business Unit<o:p></o:p></span></b></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>52220 Stolberg, Germany<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>-- <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Phone: +49 2402 106 430<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Fax: +49 2402 106 8430<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>E-Mail: <a href="mailto:ralf.ermes@cae.com"><span style='color:blue'>ralf.ermes@cae.com</span></a><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>General Manager: Ian Bell<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Trade Register No.: HRB 11615 AG Aachen<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>> CONFIDENTIALITY NOTICE - This communication is for the exclusive use of the above named recipient(s). It may contain information that is privileged, proprietary, confidential and/or exempt from disclosure by law. If you are not the intended recipient or have received it in error, immediately notify the sender and delete it without copying it, disclosing it to anyone or making any use of it.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>>VERTRAULICHKEITSVERMERK - Diese Nachricht ist ausschließlich für o.g. Empfänger bestimmt. Sie enthält möglicherweise Informationen, die rechtlich geschützt, vertraulich sind und/oder deren Veröffentlichung gesetzlich untersagt ist. Sollten Sie nicht der vorgesehene Empfänger sein oder die Nachricht irrtümlich erhalten haben, benachrichtigen Sie bitte unverzüglich den Absender und löschen Sie die Nachricht, ohne sie kopiert, weitergegeben oder anderweitig genutzt zu haben.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html><pre>
--
This email was Anti Virus checked by CAE</pre>