ethercat | Harmony 3 EtherCAT solutions
kandi X-RAY | ethercat Summary
kandi X-RAY | ethercat Summary
Example applications for EtherCAT library components. EtherCAT module configuration file. EtherCAT library help documentation (html format). Driver/Firmware files for different products.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ethercat
ethercat Key Features
ethercat Examples and Code Snippets
Community Discussions
Trending Discussions on ethercat
QUESTION
I am using the simple Open EtherCAT Master (SOEM) https://github.com/OpenEtherCATsociety/SOEM. I want to use the existing files in SOEM to create a .dll dynamic link library to build other projects with. I have tried creating a DLL in visual studio and simply uploading all the .c and .h files from SOEM to the DLL. When I do this, some of the header files are not recognized. Specifically the OSAL and OSHW header files. I'm not sure if this is a general issue between the header files or if this is an issue specific to the SOEM files. I would think that once you put all the .c and .h files in the same project, they would all be able to include each other.
...ANSWER
Answered 2021-Oct-21 at 15:00Making the DLL:
- put all .c and .h files into dll project
- set directories to all files in solution properties > configuration properties > c/c++ > additional include directories
- add additional dependecies to libraries for wpcap and others (Ws2_32.lib, wpcap.lib, winmm.lib) solution properties > configuration properties > linker > input > additional dependecies
- set directories for wpcap libraries in solution properties > configuration properties > linker > general > additional library directories
- build was successful after step 4
QUESTION
I am trying to make UI using GTK in c for raspberry pi 4. I want to change the visibility of different widgets based on button click just to simulate a new page. I have tried everything available on the internet but as I am not that good at coding I cant figure out what is wrong. can someone please help ?
This program compiles but when I press the button it gives error " assertion failed on gtk_widget_show " and also on widget hide. Also a segmentation fault occurs and the program crashes.
I am using cmake to compile my code. I have attached the error screen shot.
...ANSWER
Answered 2021-Sep-13 at 20:39The function signature of your "clicked" callbacks is wrong. It should be of the form as described in the documentation:
QUESTION
At work we are building an airline machine. It is a machine which holds bicycle frames and it has several stations.
Depending on how much stations there are, the amount of physical IO blocks on the ethercat bus may differ. This may differ per customer.
The amount of stations can be entered via a user interface. So the Beckhoff can calculate how much IO there should be present.... in theory that is.
We would like one single program for this machine which can work if not all IO is present on the ethercat bus. But we do not know how to.
We have found out about Conditional pragmas but that is our last resort.
...ANSWER
Answered 2021-Aug-09 at 08:08I don't think it is possible to change the number of IO links while the program is executing. Whenever a change is made to some IO links, you have to reactivate the configuration.
Like you mentioned you can use conditional pragma's in combination with TcLinkTo attributes to change IO links.
QUESTION
We have a EtherCAT project and for this we are using the XMC4800 MCU from Infineon. I was working in Dave (their IDE) first, but because it is not CMAKE based I ran into issues with adding re-usable libs (we use CPM for this).
So I decided to try and create a CMakeLists.txt file for the Dave project and see if I could open/compile the project in CLion.
After a couple of hours I was able to get the project building in CLion. (I just open Dave to make changes to the Hardware settings)
...ANSWER
Answered 2021-Jul-02 at 07:15I was able to get it working. After digging into the settings of the Dave project I copied the exact command line parameters for the GDB server from Dave into CLion and from then on the debugging worked as it should.
QUESTION
I am trying to send a Raw Ethernet frame over layer 2, using the prottest.c example code for the NDIS driver, in C. The example works without problem, but when I modify the Ether Type (0x88A4 EtherCat) and adapt the frame with the necessary structure and information, the Writefile function always returns Error 87 (Incorrect parameters).
Is it not possible to write with this function on Layer 2, in Raw, without the TCP/IP stack, what could be wrong?
Thanks for your help. Best regards.
...ANSWER
Answered 2021-Jun-01 at 23:15For security, the driver refuses to send these types of packets by default.
Of course, since you have the source code to the driver, you are free to modify this restriction however you like — it's your driver. You can add a line to specifically allow the 0x88A4 EtherType, or delete the entire if-statement to allow all EtherTypes. You can require the usermode process to be running as Administrator if it wants to send "suspicious" network frames.
A bit more detail on the security angle. If you allow untrusted users/programs to place arbitrary data onto the network, that may compromise or weaken network security. This is why the sample driver (and Windows in general) does not allow arbitrary programs to put arbitrary data on the network.
For example, a malicious program that has unrestricted access to the Ethernet layer can advertise a malicious DHCP server that points clients to a malicious DNS server, conduct ARP poisoning attacks on your switch, DoS a switch (with, for example, 802.3x PAUSE frames, or with LLDPDUs that undermine the QoS policy), or circumvent any firewall policies you might have.
These potential attacks aren't necessarily a deal-breaker: consider that this is roughly the equivalent of allowing someone to plug an arbitrary unmanaged device into an Ethernet jack on your network. If your network already has measures in place to defend against hostile Ethernet endpoints, then removing restrictions from the sample driver not making things much worse. Alternatively, if you have some level of trust for all the users & code on the PCs that will run your driver, then modifying the driver won't matter. Or if your threat model already assumes the network is hostile and unreliable, then removing these restrictions will only help fulfill your threat model's expectations. ;)
QUESTION
I'm new to EtherCAT/TwinCAT. I have a slave device connected to Master. I can read data with an ADS Client from the slave device if I create a variable in my PLC and link that variable to a value on the slave. Is there a way to get a value from the slave without having to create a PLC variable? I'd like to be able to read and modify multiple objects on the slave without having to create a variable for each in the PLC.
...ANSWER
Answered 2021-May-17 at 04:43In order to enable this functionality all you need to do is Enable ADS Server on the EtherCAT device that you are trying to access.
Making ADS IO symbols availableThere are a few setup steps that are required to make this work, but it is reasonably straight-forward.
- Scan in IO from EtherCAT chain
- Add a new 'Twincat Task with Image'
- Added from the context menu of 'System>Tasks'
- Create and link variable from added task to IO
- Force the sync-unit updates and allow control of EtherCAT timing
- I added a variable that linked to the SlaveCount with a UINT, very basic
- For EtherCAT master enable 'Enable ADS Server' and 'Create Symbols'
- Access Symbols as you would any other on the controller
- Only oddity around this is that you need to access the CONTROLLER net ID, not the EtherCAT master, But you still use the port from the EtherCAT master
Where to find 'Enable ADS Server', 'Create Symbols' and ADS Port
Example Symbol path in the IO device list
QUESTION
Question: For a conditional statement that contains code that invalidates the condition that triggered it, are there any conditions in which the conditional will exit, prematurely, without a break function? Similar to this:
...ANSWER
Answered 2021-Apr-14 at 07:20The answer to your question is: "No, only in a multi-threaded context."
In a multi-threaded context almost anything you cannot imagine will happen. The background and context you provided is extensive but not sufficient to study this.
One thing Conv_shouldread = false; //If true, Conv_ReadAvail returns true
apparently modifies (or determines) the outcome of if(ThreadSync.Conv_ReadAvail())
and it seem obvious that other threads are also interfering with this. I would, thus, clearly put the Conv_shouldread = false;
inside the mutex protection.
But besides this, I must confess the problem could be clearly somewhere else and there can be a lot of side effects between different threads.
QUESTION
I am trying out the Twincat TF6340 TC3 serial communication function and is following Example 1 from here.
My objective is to connect an RS422 device to the PC via an Ethercat convertor.
As far as I understand, the fast task (refer here for the manual - pg 21) is for enabling communication between the serial device and the COM buffer, and the standard task(FB_SerialCom) is for processing data from the buffer.
Hence my program would need both a standard task and a fast task, wouldn't it?
Ps. I am a beginner in Twincat. Also, I use EL6xxx Ethercat convertor.
...ANSWER
Answered 2021-Mar-19 at 02:50You will need two different tasks running at different speeds, determined by the baud rate of your communications and how often you want to process the data present on the buffer.
If you examine the example included in your reference link then you will see that then then there is two different tasks (2ms, 10ms cycle times). The high-speed task retrieves data directly from the serial port and loads it onto the message buffer, and the low-speed task processes the data.
QUESTION
I'm pretty new to the EtherCAT/CANopen universe and trying to implement a custom slave. The slave is passing conformance test so far and want to write to one of my Slave Data Objects, the slave is attached to a CX5120, which is found by the XAE and also shows the Slave device. For that, I copied my ESI-file to the TwinCAT folder (C:\TwinCAT\3.1\Config\Io\EtherCAT).
I've created a small Structured Text PLC program that uses FB_EcCoESdoWrite to write data to address 0x607A. But when I set it active and try to connect, Visual Studio tells me that the device needs at least one Sync Master. Also, when setting bExecute to TRUE, I'm getting an error from the function. As far as I understand, I have to link variables between my ST program and the slave, but I don't see the need of linking variables because afaik the function call should manage the transmission? What are the steps to write to a SDO of an ESC? Can someone tell me what I'm missing or has a small example at hand?
...ANSWER
Answered 2020-Mar-06 at 08:59Fixed problem by linking variable from PLC code to DevState-input of the device. Linking to plain InfoData doesn't seem to work though.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ethercat
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page