4. Running the acontis EtherCAT Master Demo
In this section we will get the EtherCAT master demo application running. In the first step, a simple network scan will be made. The network will not be set into OPERATIONAL mode.
4.1. Adjust the configuration
In this tutorial we use rtos_eth1
as the unique <RTOS device name>
.
Please adjust the respective configuration file for the EtherCAT demo.
You may also have to adjust the parameters for the master stack demo.
RTOS-32
gedit /hv/rtos-32/ecmasterdemo.config
Add or uncomment #include "../config/rtos_eth1.config"
.
Assure the following command line is used (you will find this at the end of the file).
"CommandLine"="-i8254x 1 1 -v 3 -perf -t 0 -b 1000 -sp"
Real-time Linux
gedit /hv/lx/hv.config
Add or uncomment #include "../config/rtos_eth1.config"
.
4.2. Run the demo
RTOS-32
cd /hv/rtos-32
sudo ./ecmasterdemo.sh
Real-time Linux
cd /hv/lx
sudo ./lx.sh
./dbgcon.sh
Start the EC-Master (without an ENI
):
vmf64 login: root
password: root
cd /mnt/rtfiles/ecat
./noeni.sh
Finally, terminate the console connection to the real-time guest and stop the Real-time guest OS:
CTRL + C
sudo ./stopall.sh
4.3. Using Network configuration file (ENI)
In this section we will run the EtherCAT network into OPERATIONAL mode.
You need to generate a network configuration files (ENI
) prior to executing this tutorial.
If you are not yet familiar with ENI files you should skip this chapter for now and return on demand.
RTOS-32
Copy your ENI
file to /hv/rtos-32/rtfiles/ecmasterdemo/ENI.xml
.
gedit ./hv/rtos-32/ecmasterdemo.config
Locate the [ecat]
entry "CommandLine"
and append -f ENI.xml
to its value. Now you can run the demo as before.
Real-time Linux
Copy your ENI
file to /hv/lx/rtfiles/ecat/ecmasterdemo/ENI.xml
.
cd /hv/lx/rtfiles/ecat
cp ./noeni.sh ./eni.sh
gedit ./eni.sh
Add -f ENI.xml
to the command line parameters entry. Now you can run the demo with ENI using ./eni.sh
instead of ./noeni.sh
.