Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
embedded_systems:ethercat:teststand [2021-11-26 09:41] Urs Grafembedded_systems:ethercat:teststand [2022-04-01 15:26] (aktuell) Urs Graf
Zeile 1: Zeile 1:
 ====== EtherCAT Teststand ====== ====== EtherCAT Teststand ======
  
-To be able to check the [[embedded_systems:ethercat:#recommended_workflow|Recommended Workflow ]] steps 1-8, the test bench equipped with the hardware described below can be used. As host-machine you either use a x86 based PC or a PLC system CX2020. The following manual can be used for both machines.+To be able to check the [[embedded_systems:ethercat:#recommended_workflow|Recommended Workflow ]] steps 1-8, we have a test bench equipped with two ELMO drives, see hardware description below. As host-machine you either use a x86 based PC or a PLC system CX2020. The following manual can be used for both machines.
  
-A test program is available in which the two motors can be rotated and sample values can be read out from the encoder via the EtherCAT connectionHow to run this specific test program is described in the next sections.+A test program is available in which the drives turn the two motors while position and velocity data are logged. The code can be found under [[https://gitlab.ost.ch/tech/inf/public/ethercat-teststand]]. You will find two applications: 
 +  * standalone 
 +  * using EEROS 
  
 ===== Build the Image with Yocto ===== ===== Build the Image with Yocto =====
Zeile 15: Zeile 17:
 git clone git://git.openembedded.org/meta-openembedded -b dunfell  git clone git://git.openembedded.org/meta-openembedded -b dunfell 
 git clone https://gitlab.ost.ch/tech/inf/public/meta-ost git clone https://gitlab.ost.ch/tech/inf/public/meta-ost
-git clone https://gitlab.ost.ch/tech/inf/projects/yocto/meta-ntb-ethercat+git clone https://gitlab.ost.ch/tech/inf/projects/yocto/meta-ost-ethercat
 </code> </code>
  
Zeile 34: Zeile 36:
 <path to yocto directory>/yocto/meta-openembedded/meta-oe \ <path to yocto directory>/yocto/meta-openembedded/meta-oe \
 <path to yocto directory> /yocto/meta-ost/meta-ost \ <path to yocto directory> /yocto/meta-ost/meta-ost \
-<path to yocto directory> /yocto/meta-ntb-ethercat \+<path to yocto directory> /yocto/meta-ost-ethercat \
 " "
 </code> </code>
Zeile 59: Zeile 61:
 The command to build the teststand-image is ''bitbake teststand-image'' but do not forget to source the build environment.\\ The command to build the teststand-image is ''bitbake teststand-image'' but do not forget to source the build environment.\\
  
-**Flash the image**\\+==== Flash the image ====
 Follow [[software:linux:images:downloads:#flashing_a_.wic_image|this]] guide to flash the image to e.g. a USB-Stick. Follow [[software:linux:images:downloads:#flashing_a_.wic_image|this]] guide to flash the image to e.g. a USB-Stick.
 The image was created in\\ ''<path to yocto directory>/build/tmp/deploy/images/c6930/teststand-image-c6930.wic''.\\ The image was created in\\ ''<path to yocto directory>/build/tmp/deploy/images/c6930/teststand-image-c6930.wic''.\\
  
-===== Run Test Program ===== 
  
-**Booting the image for the first time**\\ +==== Run the example ==== 
-When booting the image for the first time, it straight goes to emergency mode. This is because the wrong storage is set. To fix that, open ''nano /etc/ftsab'' and change // /dev/sda1 // and // /dev/sda3 // to // /dev/sdb1 // and // /dev/sdb3 //. Reboot the system ''reboot'' and log in with ''root''.\\ +
- +
- +
-**Run the example**\\+
 If the connection is not yet established, connect the PLC to the Elmo Drives via the port selected earlier. If the connection is not yet established, connect the PLC to the Elmo Drives via the port selected earlier.
  
Zeile 91: Zeile 88:
 Now you are ready to run the test program. Now you are ready to run the test program.
  
 +Either the standard test program:
 <code text> <code text>
 teststand -f /etc/eni/teststand.xml –i8254x 2 1 -dcmmode off -perf teststand -f /etc/eni/teststand.xml –i8254x 2 1 -dcmmode off -perf
 </code> </code>
 +
 +or the test program with EEROS:
 +<code text>
 +teststand_eeros -f /etc/eni/teststand.xml –i8254x 2 1 -dcmmode off -perf
 +</code>
 +
 +
  
 **Syntax**: **Syntax**:
   * **-f** Path to corresponding ENI file ((The ENI file is already provided in the cloned repository. If you want to change the EtherCAT network, create a new ENI file as described in [[embedded_systems:ethercat:create_eni_file|Create an ENI File]].))   * **-f** Path to corresponding ENI file ((The ENI file is already provided in the cloned repository. If you want to change the EtherCAT network, create a new ENI file as described in [[embedded_systems:ethercat:create_eni_file|Create an ENI File]].))
-  * **-i8254x** Use LinkLayer "//emllI8254x Intel Pro/1000//" for "//Intel Pro/1000 network adapter cards//"You may have a different LinkLayer.+  * **-i8254x** Use LinkLayer "//emllI8254x Intel Pro/1000//" for "//Intel Pro/1000 network adapter cards//" if you use the plug in front of the PLCIf used via a terminal module on the side of the PLC use the Beckhoff link layer ''-ccat''. But you may also have a different link layer.
     * **2** <instance> Select the EtherCAT port.     * **2** <instance> Select the EtherCAT port.
     * **1** <mode>     * **1** <mode>
Zeile 105: Zeile 110:
   * **-perf** Display performance measurements (Enable max. and average time measurement in μs for all EtherCAT jobs)   * **-perf** Display performance measurements (Enable max. and average time measurement in μs for all EtherCAT jobs)
  
- +===== Findings ===== 
-===== Customize Test Program ===== +  * When ENI are not setup correctly, the process data image can show strange alignment problems. 
- +  * Velocity readings on the teststand may vary greatly. The internal sampling rate of the drive may be 8 times higher than the sampling on the bus with 1ms. This leads to very few ticks, because the encoder has 25000 ticks per turn and the velocity is very slow. The drive obviously has an internal filter / observer .  
-TODO+  * There is a emergency stop button. This button is connected to a digital input of the ELMO drive. However, we currently do not read this input, because that's not possible with PDO transfers.
  
 ===== Hardware ===== ===== Hardware =====
  
- +The drives are [[https://www.elmomc.com/product/gold-twitter/ | Gold Twitter]] drives from ElmoMC. All datasheets and the standalone test-program code inclusive corresponding ENI-file are stored in the following GitLab repository: [[https://gitlab.ost.ch/tech/inf/projects/ethercat-teststand|ethercat-teststand Repository]]. \\
-The drives are [[https://www.elmomc.com/product/gold-twitter/ | Gold Twitter]] drives from ElmoMC. All datasheets and the EtherCAT stack from Acontis is stored in the following GitLab repository: [[https://gitlab.ost.ch/tech/inf/projects/ethercat-teststand|ethercat-teststand Repository]]. \\+
  
 {{ :embedded_systems:ethercat:20211029_blockdiagramm_teststand.png?nolink |}} {{ :embedded_systems:ethercat:20211029_blockdiagramm_teststand.png?nolink |}}