realtime_control_environment_setup
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
realtime_control_environment_setup [24.07.2019 17:58] – [Host-target ethernet link setup] Guoping Zhao | realtime_control_environment_setup [27.11.2022 22:58] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Realtime control environment setup ====== | ====== Realtime control environment setup ====== | ||
+ | |||
+ | **Author**: Guoping Zhao, Lauflabor (www.lauflabor.de), | ||
+ | |||
+ | **Date**: July, 2019 | ||
+ | |||
+ | ---- | ||
There are lots of different ways to set up a realtime control environment for a robotic system. Here, we choose **Matlab simulink realtime toolbox** (xPC) as the software framework because: | There are lots of different ways to set up a realtime control environment for a robotic system. Here, we choose **Matlab simulink realtime toolbox** (xPC) as the software framework because: | ||
Zeile 151: | Zeile 157: | ||
- | # Inserted the bootable usb flash drive to the target. Boot the target from the usb stick. Then the target should run with Matlab xPC realtime kernel. If your target has a monitor, you should see something like this: | + | 1. Inserted the bootable usb flash drive to the target. Boot the target from the usb stick. Then the target should run with Matlab xPC realtime kernel. If your target has a monitor, you should see something like this: |
- | !{width: 480px}xpc-startupscreen.jpg! | + | |
+ | {{: | ||
Check your host-target communication settings in the right-bottom corner: | Check your host-target communication settings in the right-bottom corner: | ||
- | !{width: 480px}xpc-startupscreen-info.jpg! | + | |
- | Make sure they are correct. | + | {{: |
- | # For testing the configuration, | + | |
- | <pre> | + | |
- | slrttest | + | Make sure they are the same as what you configured. |
- | </ | + | |
- | in the Matlab command window | + | 2. For testing the configuration, |
- | <pre> | + | |
- | ### Simulink Real-Time Test Suite | + | slrttest |
- | ### Host-Target interface is: TCP/IP (Ethernet) | + | |
- | ### Test 1, Ping target computer ' | + | in the Matlab command window |
- | ### Test 2, Ping target computer ' | + | |
- | ### Test 3, Software reboot the target computer ' | + | ### Simulink Real-Time Test Suite |
- | ### Test 4, Build and download a Simulink Real-Time application using model xpcosc to target computer ' | + | ### Host-Target interface is: TCP/IP (Ethernet) |
- | ### Test 5, Check host-target command communications with ' | + | ### Test 1, Ping target computer ' |
- | ### Test 6, Download a pre-built Simulink Real-Time application to target computer ' | + | ### Test 2, Ping target computer ' |
- | ### Test 7, Execute the Simulink Real-Time application for 0.2s: ... OK | + | ### Test 3, Software reboot the target computer ' |
- | ### Test 8, Upload logged data and compare with simulation results: ... OK | + | ### Test 4, Build and download a Simulink Real-Time application using model xpcosc to target computer ' |
- | ### Test Suite successfully finished | + | ### Test 5, Check host-target command communications with ' |
- | </ | + | ### Test 6, Download a pre-built Simulink Real-Time application to target computer ' |
+ | ### Test 7, Execute the Simulink Real-Time application for 0.2s: ... OK | ||
+ | ### Test 8, Upload logged data and compare with simulation results: ... OK | ||
+ | ### Test Suite successfully finished | ||
==== EtherCAT slave configuration ==== | ==== EtherCAT slave configuration ==== | ||
+ | This part is well documented by Mathworks. Please find the detailed info [[https:// | ||
+ | |||
+ | |||
+ | ===== Run Simulink in Realtime ===== | ||
+ | |||
+ | In order to run the simulink in realtime (on the target machine) with EtherCAT, the EtherCAT Init block is needed. The configure file, PCI bus number, and the PCI slot number has to be configured correctly according to the setup. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In addition, the solver of the simulink model has to be configured as " | ||
- | * Connect EtherCAT slave to your host computer with ethernet cable. | + | {{: |
- | * Open ET9000 software. | + | |
- | h2. Test xPC with EtherCAT | + | And the " |
- | h3. Demo1: Digital IO | + | {{:simulinkmodelconfig1.png? |
- | !simulinkmodelconfig1.png! | ||
- | !simulinkmodelconfig2.png! | ||
- | !ethercatinitblock.png! | ||
- | h3. Demo2: Analog IO | ||
- | h3. Demo3: Motor Current Control | ||
realtime_control_environment_setup.1563983914.txt.gz · Zuletzt geändert: 27.11.2022 22:56 (Externe Bearbeitung)