Closed waeltut closed 7 years ago
Here is an example how a EtherCAT drive is configured, often done Before entering SAFEOP. For SOEM that means between "config init" and configure and map. This particular example use config hooks called for specific slaves during "configure and map.
See: hefloryd/SOEM@22d8f5d2a23f42b795357fadfd05ea03cff49350
Any update? I think this is a commisioning issue, not a SOEM issue.
I am successfully controlling the slave version of the EL6731 (EL6731-0010). But it was a pain to find the correct parameters. To get started, install TwinCAT 3, create an offline confguration and then check the content of the "startup" tab of the EL6731. Dont forget to create some input and/or output modules so that you have at least one PDO. The startup tab will show a hex string which contains information about e.g. the Profibus station number and the selected modules. This hex string must be written to a certain register using EC_SDOwrite.
I am in contact with Beckhoff to get a clear specification of this hex string, but I had no success since several months. I did not try to work with the CAN-Bus master, but I can imagine that it works similar.
@nakarlsson : thanks for the provided code, yes it is not a problem of SOEM it kind of adapting the SOEM solution with tmy devices. I am still working on it. @Apollo3zehn : thanks I will try this. could you please send the steps where you configured the the device? i mean teh code of configuring EL6731.
I wrote the code a while ago so I am not deep in this topic, but I will try to give some hints:
' CfgData
Dim cfgData As New List(Of Byte)
Me.SelectedModuleSet.ToList.ForEach(Sub(x)
If x > &HFF Then
cfgData.Add(CByte((x And &HFF00) >> 8))
End If
cfgData.Add(CByte(x And &HFF))
End Sub)
' PrmData
Dim userPrmData As Byte() = New Byte() {}
Dim prmData As Byte() = New Byte() {&H80, &H1, &H14, &HB, &H9, &H5F, &H0, &H80, &H0, &H8}.Concat(userPrmData).ToArray
Dim data As Byte() = New Byte() {&H2D, &H0, CByte(Me.StationNumber), &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &HA8, &H1,
&H0, &H0, &HF4, &HF0, &H0, &H0, &H0, &H0, CByte(prmData.Length), CByte(cfgData.Count),
&H0, &H0, &H0, &H0}.Concat(prmData).Concat(cfgData).ToArray
ecSdoWriteRequestSet.Add(New EcSdoWriteRequest(&H8000, data))
Best regards, Apollo3zehn
Not an open issue anymore i persume.
yes apology for not closing it
@waeltut Hi would you share your SOEM Code for BK1120 please ? I´m also at Testing with this Device and it would be great if you would share your Knowledge :)
Hi,
I am working on implementing the simple test code on the master slave configuration that i have, following are the layout: RaspberryPi(Master) -> EK1100 (slave) --> EL6751 (CANOpen) |--> EL6731 (ProfiBUS) |--> EL6752 (DeviceNET) |--> BK 1120 (EtherCAT Slave IO)
i am able to configure set and reset ios in BK1120, but the other ones are still giving errors. I have checked the manufacturer manual and it appears that the configuration is not correct. in the code, the configuration is curried out by ec_config_init(false); but i need to configure each one at a time and i need to know what is the ec_contextx for that. do you have any idea?