apollo3zehn / ethercat.net Goto Github PK
View Code? Open in Web Editor NEWA high-level SOEM-based EtherCAT master with ESI support for Windows and Linux.
License: GNU Lesser General Public License v3.0
A high-level SOEM-based EtherCAT master with ESI support for Windows and Linux.
License: GNU Lesser General Public License v3.0
System: Windows 10 Enterprise 2016 LTSB
v1.0.0-alpha.3.final work, but with v1.0.0-alpha.4.final I get an error at CreateDynamicData
Slave:
EP2008-0002
EP3162-0002
With v1.0.0-alpha.3.final I get a DC-Shift Error:
"ConfigureDc failed (0x0302): The static drift compensation for distributed clocks failed."
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#15
byte[] prmData = new byte[]
{
0x80, -> 0x88
0x1,
0x14,
0xb,
0x9,
0x5f,
0x0,
0x80,
0x0,
0x8
}.Concat(userPrmData).ToArray();
context->slavelist[slaveIndex].CoEdetails == 0 although slave requires CoE (same strange behavior like EL6601?) Slave is not starting but configured exactly like TwinCAT. Maybe the reason is here also that the register upload data are wrong.
On this ESI i'm getting this error:
startIndex cannot be larger than length of string. Parameter name: startIndex : at System.String.Substring(Int32 startIndex, Int32 length) at EtherCAT.NET.Extensibility.ExtensibilityHelper.<>c__DisplayClass0_1.<CreateDynamicData>b__1(PdoTypeEntry x) in C:\projects\ethercat-net\src\EtherCAT.NET\Extensibility\ExtensibilityHelper.cs:line 87 at System.Linq.Enumerable.WhereSelectArrayIterator
2.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at EtherCAT.NET.Extensibility.ExtensibilityHelper.CreateDynamicData(String esiDirectoryPath, IExtensionFactory extensionFactory, SlaveInfo slaveInfo) in C:\projects\ethercat-net\src\EtherCAT.NET\Extensibility\ExtensibilityHelper.cs:line 93
System.DllNotFoundException: 'Unable to load DLL 'soem_wrapper' or one of its dependencies: The specified module could not be found.
.NET Standard 3.0.100
Visual Studio 16.3.5
Windows 10 Enterprise 1709
Output attached.
netcoreapp3.0.zip
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#12
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#5
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#25
New plugin called "Beckhoff" to make use of ESI VendorSpecific PDO data.
From EtherCAT.NET created by Apollo3zehn: #8
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#4
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#16
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#5
My slave Input SM starts at 0x1600, and on my slave software it reads 0x0016 if i don't configure variables, if i add a variable on index 0x6040 to this SM i read 0x4016 on the SM index on the slave software. If i configure the SM index to 0x1601 on the slave software it reads 0x1601 correctly.
It seams as if the 00 from 0x1600 are being removed and the byte shifted right.
How can i solve this?
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#18
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#19
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#10
The callback will be executed in a different thread when CA slaves are available in the system. Exceptions cause system to crash. Bootloader.HandleException geht nicht, da keine Referenz vorhanden. Selbst wenn, wie wird dann Thread abgebrochen?
sdoWriteRequestSet.ToList().ForEach(sdoWriteRequest =>
{
EthercatStatic.CheckErrorCode(SoemWrapper.SdoWrite(slaveIndex, sdoWriteRequest.Index, sdoWriteRequest.SubIndex, sdoWriteRequest.Dataset), nameof(SoemWrapper.SdoWrite));
});
Hi,
I was playing around with the sample application and run into an issue with EtherCAT slaves that need access to the SII EEPROM during the INIT->PREOP transition. The slaves are stuck in Init+Error with AL Status Code 0x0050 (EEPROM No Access).
According to ETG.1020 The EtherCAT master shall give the EEPROM access rights to the application controller [...] in the transition INIT-PREOP.
The issue seems to be in ScanDevices()
:
ecx_config_init ()
PDI asscess to the EEPROM is granted before requesting PREOP: https://github.com/OpenEtherCATsociety/SOEM/blob/d9261e801d109eaf99b94907b6d24bac4a123968/soem/ethercatconfig.c#L590-L601ScanDevices()
access is immediatly taken by the master to access the Configured Station Alias(CSA): EtherCAT.NET/native/SOEM_wrapper/soem_wrapper.c
Lines 554 to 567 in ba846c5
Waiting for the slaves to reach PREOP before accessing the CSA in EEPROM solves this issue.
Cheers,
Yves
The adapted ScanDevices function stucks in endless loop on my current configuration. I have to investigate further to check the root cause, but it seems commit 9ad66bb Wait for PREOP before accessing EEPROM broke something on ScanDevices logic. If I revert to commit b393404 all is working as expected ... any idea?
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#4
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#6
The Application is running on my build PC.
On the device pc I get the unable load exception.
Device is Windows 10 Pro x64:
Hello,
i have Problem with EtherCAT Slave "PD4-EB59CD-E-65-1" (Nanotec Motor).
The ESI-File should be correct because TwinCAT3 works with it fine.
If i starte SampleMaster i get the following Messages:
===========================================================
info: EtherCAT Master[0]
Found 4 slaves:
EK1100 (PDOs: 0 - CSA: 36726)
EL2828 (PDOs: 8 - CSA: 9020)
EL7047 (PDOs: 19 - CSA: 48200)
PD4-EB59CD-E-65-1 (PDOs: 8 - CSA: 32014)
fail: EtherCAT Master[0]
SdoWrite failed (0x0000): The working counter is 0 (SOEM).
EtherCAT message:
Time:1586370400.964 SDO slave:3 index:0216.00 error:06010001 Attempt to read to a write only object
Time:1586370400.966 SDO slave:3 index:0416.00 error:06010001 Attempt to read to a write only object
Time:1586370400.971 SDO slave:3 index:031a.00 error:06010001 Attempt to read to a write only object
Time:1586370400.977 SDO slave:4 index:1a00.01 error:06070013 Data type does not match, length of service parameter too low
Time:1586370400.979 SDO slave:4 index:1a00.02 error:06070013 Data type does not match, length of service parameter too low
Time:1586370400.981 SDO slave:4 index:1a00.03 error:06070013 Data type does not match, length of service parameter too low
Time:1586370400.982 SDO slave:4 index:1a00.04 error:06070013 Data type does not match, length of service parameter too low
Time:1586370400.985 SDO slave:4 index:1a00.05 error:06070013 Data type does not match, length of service parameter too low
Time:1586370400.987 SDO slave:4 index:1a00.06 error:06070013 Data type does not match, length of service parameter too low
===========================================================
The error occurs in the following line:
In file "Program.cs"
master.Configure(rootSlaveInfo);
In File "EcMaster.cs"
this.ConfigureIoMap(slaveInfoSet);
_actualIoMapSize = EcHL.ConfigureIoMap(this.Context, _ioMapPtr, slaveRxPdoOffsetSet, slaveTxPdoOffsetSet, out _expectedWorkingCounter);
What can i do to find the reason of the error and solve the problem?
Regards
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#1
Hi,
I've got a slave based on an XMC4300 and SSC which I can successfully run to OP using both TwinCAT and the SOEM simple_test.
When I run your SampleMaster switching from SAFE_OP to OP fails. If I connect to the slave again after this using the SOEM simple_test I get the error "Invalid watchdog configuration".
Apparently your SampleMaster clears the watchdog register 0x0400 (ESC_WD_DIVIDER_OFFSET), and 0x0420 (ESC_PD_WD_TIME) somewhere / somehow. I can confirm this by debugging into my firmware. The registers return zero.
I tried writing the register myself but this does not work... Any help would be appreciated.
Thanks, Maximilian
Patch is not required anymore:
OpenEtherCATsociety/SOEM#303
OpenEtherCATsociety/SOEM@151045e
OpenEtherCATsociety/SOEM@7b1ea32
Hello, I am trying to run the sample application, But I found it occurs an error while deserializing esi file, maybe there are some differences between my esi file structure and yours, could u provide a demo esi file in sample project !
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#14
And create proper error message if ESI is missing
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#23
https://msdn.microsoft.com/en-us/library/windows/desktop/hh706895(v=vs.85).aspx
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#17
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#2
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#11
The question is how to store this information, as not all PDO variations can be represented as OneDasModules.
Example for testing:
EthercatStatic.Initialize();
IntPtr context = SoemWrapper.CreateContext();
var slaveInfo = SoemWrapper.ScanDevices(context, "6805CA393A81");
SoemWrapper.UploadPdoConfig(context, 1, 0x1C13)
SoemWrapper.Free(context);
I tried to compile c lib in windows7 x64,but failed.
when I run init_solution.ps1
powershell shows the source directory D:/zqFile/EtherCat/Ethercat.net-master/native/soem dose not contain a cmakelists.txt file
logfile shows following error:
cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_61f26.dir\Debug\" /Fd"cmTC_61f26.dir\Debug\vc142.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.19\Modules\CMakeCXXCompilerABI.cpp" CMakeCXXCompilerABI.cpp
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#20
I install the compiler and change the init_solution.ps1 (remove -m32 at X86 and the 64Bit part)
Now I get this error:
`ubuntu@ubuntu:~/#Projekt/EtherCAT.NET-1.0.0-alpha.3.final$ pwsh init_solution.ps1
Updating Git submodule.
fatal: not a git repository (or any of the parent directories): .git
Creating native x86 project.
Directory: /home/ubuntu/#Projekt/EtherCAT.NET-1.0.0-alpha.3.final/artifacts
Mode LastWriteTime Length Name
d---- 03/06/2020 14:54 bin32
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:11 (add_subdirectory):
The source directory
/home/ubuntu/#Projekt/EtherCAT.NET-1.0.0-alpha.3.final/native/SOEM
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/#Projekt/EtherCAT.NET-1.0.0-alpha.3.final/artifacts/bin32/CMakeFiles/CMakeOutput.log".
`
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#7
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#22
ecx_pullindex returns -1
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#26
From OneDAS-Ethercat created by Apollo3zehn: OneDAS-Group/OneDAS-Ethercat#24
create / rebuild .json file with SlaveID <> file name mapping by scanning all XML files in EtherCAT folder if:
do not use SQLite, it is overkill and introduces new dependency
either rebuild cache when new file was added or offer a manual cache rebuild in GUI
see also #14
I have a very simple Projekt with only one Slave (EP3174-0002 4 Channel Analog Input).
The EP is found and the Master seems to run.
The 'slaves[0].DynamicData.PdoSet[0].VariableSet' contains the different PDOs and they also get a Pointer Address to the RAM.
The 'slaves[0].DynamicData.PdoSet[0].VariableSet.Last()' is the Value.
In the 'README.md' is only how to set a single bit per unsafe.
How can I get the Value form the PDO (Pointer).
Is there a simpler way to cyclic get the input value?
PS: Is there a implementation to write slave settings with command or on 'startup'?
Difficult because the slave extensions totally rely on OneDAS types. Maybe it gets easier with OneDAS using Blazor instead of Typescipt.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.