Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

EtherCAT: How to set Initial Commands (SDO CoE InitCmd)?

Labview does not read the SDO CoE InitCmds correctly from ESI file. For instance, is this is written to the ESI file in the Mailbox properties:

 

<Mailbox DataLinkLayer="true">

<EoE/>

<CoE PdoConfig="true" PdoAssign="true" CompleteAccess="true" SegmentedSdo="true" SdoInfo="true"><InitCmd>

<Transition>IP</Transition>

<Index>32800</Index>

<SubIndex>07</SubIndex>

<Data>00</Data>

<Comment>BufferedInput</Comment>

</InitCmd>

</CoE>

<FoE/>

</Mailbox>

 

Labview should recognized this command and include it in the menu shown below.

DeviceProperties_InitCmds.PNG

 

But it does not recognize it and also the menu shown in the picture does not allow to add a command.

 

Please advise if there is a way to recognize InitCmds from the ESI file in Labview. Thanks!

0 Kudos
Message 1 of 10
(6,190 Views)

Hi RobStan,

 

NI EtherCAT cannot well support InitCmd defined in IO module XML. I would suggest that you remove the InitCmd in the XML file and test again.

 

0 Kudos
Message 2 of 10
(6,171 Views)

How can I edit that table to send initial CoE commands?

 

 

0 Kudos
Message 3 of 10
(6,055 Views)

The table is just a view of what initial CoE commands are written into the ESI.

0 Kudos
Message 4 of 10
(6,013 Views)

So I have to modify the ESI file? I will have different settings for different modules of the same type-- for example one analog input module is configured for mA inputs, the other voltage. I want to be able to drop in an unconfigured module and have it configured based on its address. You can do this with TwinCAT

0 Kudos
Message 5 of 10
(6,010 Views)

Modifying ESI is one possible cubersome workaround with drawbacks as you mentioned.

 

I think you can use NI EtherCAT programmatic APIs approach. You can discover all slaves via Refresh Modules VI in Scan Engine Config mode. Then you send SDOs to different slaves to do all the changes indicated by InitCmds.

 

 

0 Kudos
Message 6 of 10
(5,997 Views)

Hello Yin_W,

I am facing the same issue the OP has described.

Would you have any example for sending init parameters via CoE?

Thank you very much!

0 Kudos
Message 7 of 10
(5,906 Views)

Can you provide your init cmds here? Let me try if I can do something.

Message 8 of 10
(5,890 Views)

Hi pcerrada,

 

The attachment is the example of using NI EtherCAT API to send the init parameters via CoE. Thank you

Message 9 of 10
(5,872 Views)

Hi zhengchen, Yin_W,

thank you so much for your replies.

What I am trying to configure is a Beckhoff EL2502, which I need to work in "Operation mode = 2" (CoE: 8000:7; value=2). With your tip, I will be able to configure the SDO via CoE (I will let you know the results when I test it).


Additionally, I got to modify the PDO assignment by changing the xml (device descriptor) from Beckhoff (see screenshot from TwinCAT below).2019-08-07_09h27_10.png

This has the inconvenient that, in case you have some terminals with different configurations, you will not be able to have different PDO assignments for each terminal.

For my current project this is not a problem, but still, it is something good to have: do you know a way to assign PDOs programatically?

Thank you very much!

0 Kudos
Message 10 of 10
(5,851 Views)