Hi,
I'm new to EtherCAT and need some advice how to get my setup running. I have already browsed through this forum but still can't get it to work.
All I'm trying to do in a first step is to start a communication between an EtherCAT master and a slave, e.g. set a bit in the process image on the slave and check the same bit on the master or something similar.
Here's the setup:
EtherCAT Master: Windows XP laptop with Beckhoff's TwinCAT running
EtherCAT Slave: PC with a CIFX 50-RE PCI Card
What I did/tried so far:
On the PC:
1) I installed the Hilscher PCI card plus all drivers
2) I ran the netX configuration and diagnostic tool and downloaded the configuration to the PCI card: the diagnostics area shows me that the system is ready (green light on)
On the Laptop:
1) I installed Beckhoff TwinCAT
2) I checked the windows device manager. Under network adapters, it shows "TwinCAT-Intel PCI Ethernet Adapter"
3) I started TwinCAT in Config mode on the laptop
4) I did "Options" --> "Show real-time ethernet compatible devices": The laptops ethernet adapter was listed as compatible. I then activated a binding to TwinCAT Ethernet Protocol"
5) In the twincat system manager, I tried to provide to the master the XML file of the slave, but couldn't figure out how.
My questions:
1) What basic steps are needed to get the communication running? I would like to send both cyclic and acyclic data from slave to master and vice versa.
2) How do I provide to the master the XML file of the slave?
3) Do I need to download the configuration to the CIFX 50-RE using the netx utility only once, i.e. is the configuration saved in the flash or do I need to reload after every system start-up?
Thank you very much in advance for your hints.
Thomas
Thanks a lot.
I tried it and it worked. Twincat finds the NIC and the CIFX 50-RE. Cyclic communication is now working (I tested master to slave and slave to master using the cifxdemo application).
However, I still haven't figured out how to provide to the master the process image of the slave. (So far I assumed this is done by providing an XML file)
Also, can someone give me a hint about how the configuration for the CIFX 50-RE is done? So far I used the netx setup utility. Do I need to do this only once, or every time the system is restarted? What's the difference between the "netx setup utility" and the "cifx driver setup utility"?
I'm also not sure about the warm start parameters (seen in the cifx driver setup utility). What's their purpose and when are they used?
regards,
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
Also, can someone give me a hint about how the configuration for the CIFX 50-RE is done? So far I used the netx setup utility. Do I need to do this only once, or every time the system is restarted? What's the difference between the "netx setup utility" and the "cifx driver setup utility"?
I'm also not sure about the warm start parameters (seen in the cifx driver setup utility). What's their purpose and when are they used?
Hi,
I'm now able to interface an empty TwinCAT task (no PLC running) on the master with the CIFX 50 as slave. However, I'm still struggling on how to transfer the slave's process image (i.e. cyclic data) to the master. Do you have a hint for that, too?
regards,
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
you must activate the "Free Run Mode" in TwinCAT. You can find the button in the button bar on top of the screen. It is right from the button with the magic wand.
Hi,
I think there's a misunderstanding. I have already activated Free Run Mode to get the communication running that's working correctly. But all this is happening with the standard inputs and outputs I get from "Scan Boxes" in TwinCAT: 4 unsigned integer variables as inputs and 4 unsigned integer variables as outputs.
I would like to use a custom definition, for example this one:
Inputs:
inputVar1, inputVar2: BOOLEAN
inputVar3: UINT8
Outputs:
outputVar1 : BOOLEAN
outputVar2 : UINT32
How do I define this structure and use it for both master and slave ?
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
this needs changes in the XML file.
The EtherCAT slave firmware does not implement dynamic process mapping itself. This is a task for the particular application which e.g. implements a certain profile.
Hi again,
I'm trying now to adapt the original XML description file for the CIFX50 provided by hilscher. It's working, but not working stable together with TwinCat.
Is there any documentation available what the XML tags mean, or rather how to correctly adapted the original Hilscher XML file?
One of the changes I made is listed below (added two variables), would this change be correct?
kind regards,
Thomas
For example, I changed the PDO TX section from
to
Hilscher Gesellschaft fuer Systemautomation mbH
Hi tvonbuer,
a description of the XML file can be found on the ETG page.
Regarding your modifications on the XML file, it is better to have the entire XML file for looking into and using that for checking what is wrong. The code snippet would not be enough.
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi tvonbuer,
please start TwinCAT and be sure that the salve device is connected to the master.
Perform a right click on "I/O-Devices" in the tree structure on the left and select in the context menu "Scan Devices".
Select the correct NIC. A dialog opens and ask fro "Scan Boxes" confirm it with yes. Also the question for the free run mode.
The available and found slaves should be shown in the left side of the window.