E-box

From Control Systems Technology Group
Revision as of 18:17, 9 November 2012 by S100932 (talk | contribs)
Jump to navigation Jump to search

This is the project page of E-box and related projects (E-scope)

DEVELOPERS

This section contains necessary information for the developers and programmers who use E-Box in their projects.

E-Box Programming

The user manual for the E-box and other EhterCAT slaves can be found here: User manual

The manual for installing a realtime linux system with EtherCAT support can be found here:Install manual and Frequently Asked Questions

Programming instructions

Manual EtherCAT library


News / Changes

This section contains the important changes and news to the software

  • 2011/11/14 Matlab R2011b is supported from revision (218)
  • 2011/08/27 Changed Timer_posix to Timer_posix_AK from revision (142)
  • 2011/07/17 SVN is working again
  • 2011/07/12 Beckhoff EL3104 will be supported from next revision (106)

References

[1] Jeroen de Best and Roel Merry, Real-Time Linux for Dummies, DCT2008.103 PDF

[2] Jeroen de Best and Koen Meessen, Realtime Linux, Realtime_Linux

[3] Simple Open EtherCAT Master SOEM website





STUDENTS

E\Boxes are used in some of the courses. In this section, students can find the necessary information regarding to these courses.

Common Information

The information and manuals presented in this section is used for all courses. The steps given below should be followed before conducting the experiments of 4G031-Printer Casus and 4K410-Digital Motion Control. The courses specific information is given in 4G031-Printer Casus and 4K410-Digital Motion Control sections.

Installation of Ubuntu with Wubi

WARNING: This installation will only work on a normal installation of the Windows Operating System as it depends on the Windows Boot loader. If you use another operating system or if you are unsure please contact one of the course supervisors.

Wubi is a linux installer for Windows which can install and uninstall Ubuntu in the same way as any other Windows application in a simple and safe way. Ubuntu will be installed within a file in the Windows system ebox_root.disk. This file is seen by Ubuntu as a real hard disk.

The installation of Ubuntu used for this course takes up 30 GB of free-space. Therefore, it is recommended to install Ubuntu by connecting to TU/e network via an ethernet cable. Using VPN or wireless is strongly discouraged!

The wubi-installer can be obtained from the TU/e network share: \\ai-stosrv02\EBox. Install by opening the executable "wubi_dd-mm-yy-time". Because the installation is quite large this will take some time, especially creating the virtual disk, so please be patient. Connected to gigabit network the installation will take approximately 15 minutes, on a 100 mbits network connection it will take about an hour.

When you have installed Ubuntu with Wubi, you can start ubuntu by rebooting your computer. A menu will appear during startup which allows you to choose whether to run Windows and Ubuntu. When you choose Ubuntu in this menu, you will go to a new bootloader called GRUB. Here you can choose which version of Ubuntu to run as well as alter the start-up commands for running Ubuntu. Unless you are having problems starting up, you should just select the default version by pressing enter. When prompted for account information use the following:

  1. Username: ebox
  2. Password: ebox123

You can change the password if desired.

Installing software for experiments

Activating Matlab

The version of Matlab installed on Ubuntu needs to be activated. To do so, start matlab from a terminal window with

  1. sudo su
  2. matlab

and follow the instructions and use the activation key linked on the campus software site. Matlab activatie

If the student activation key doesn't work, take the employee activation key

Update to the latest experiment software

The software to perform experiments is already present, but possibly outdated. To update the software and simulink models used, you have to checkout the latest stable revision from the SVN (subversion) server. This can easily be done using the svn_update script:

  1. Open a terminal (via the icon on the desktop)
  2. Type svn_update

If you are experiencing any problems (bugs/errors) with the experiment software, then first make sure you have checked out and installed the latest software revision from the SVN by repeating steps Update to the latest experiment software and Compiling and installation the software. Since this update will also update the simulink templates used in the experiments, it is recommended to save any changes made to these files with a different filename and/or in a different location, preferably on your harddisk.

Compiling and installation the software

First start matlab from a terminal (if not done already):

  1. Open a terminal
  2. Type sudo matlab

To obtain a fresh copy of the latest version:

  1. Run svn_update according to subsection Update to the latest experiment software in a terminal window.
  2. Change the Matlab current directory to /home/ebox/svn/trunk/src/E-box
  3. Run make_all_clean in matlab
  4. Run make_all_install in matlab, answer yes to TU/e toolboxes installation question

Preparation prior to performing experiments

Connecting the E/BOX, changing ethernet index number

Connect the power supply to the E/BOX. Use a network cable to connect your laptop to the In-port of the E/BOX. Since the index number of the Ethernet port you are using can vary for different pc's, the right number has to be set:

  1. Open a terminal
  2. Type sudo geteth (returns the right port number, only when the E/box is connected)
  3. Start matlab (type sudo matlab)
  4. Type changeeth(x) in the matlab command window where x is the port number found with geteth.

These commands set the right ethernet index number, this needs to be done each time a new software revision is checked out.

Save data

To be safe, you should save the data you obtain via experiments outside of Ubuntu. This means that it will not be deleted if Ubuntu is uninstalled. You can save it to your Windows hard disk or use a web service such as Dropbox or Box. The partition of your hard disk on which you have installed Ubuntu can be found under \host, any other partitions can be found in \media or in the places menu from the taskbar.


4G031 - Printer Casus

4K410 - Digital Motion Control [DMC]

Frequently Asked Questions

Ubuntu start niet
Boot onder windows en controleer de grootte van de ebox_root.disk file. Deze moet 31.188.844.544 bytes groot zijn (zie properties/eigenschappen). Is dit niet het geval, dan kun je de ebox_root.disk handmatig kopieren van de server.
Tijdens compilen krijg je een error of een conflict in sampling tijden (0.001 en 1/2048)
Update en installeer de software (vanaf r355 is dit opgelost) Update to the latest software en Compiling and installation the software. Start vervolgens vanaf een nieuwe kopie van het printer01 model
Tijdens compilen krijg ik errors met "undefined function or variable ref_part"
Dubbelklik op het ref3 blok en klik op accept voor het builden
svn_update werk niet
Voer het volgende commando uit in een terminal
   svn checkout https://e-box.wtb.tue.nl/svn/e-box/trunk/src/E-box/ /home/ebox/svn/trunk/src/E-box/
In de terminal waar de executable draait komt repeterend
   Error occurred getting packet header.
   Error occurred in rt_PktServerWork.
   Disconnecting from host!
   
Error occurred getting packet header. Error occurred in rt_PktServerWork. Disconnecting from host!
te staan. Dit is een bekende Linux gerelateerde bug die meestal op te lossen is met een reboot van de pc, of door een andere pc gebruiken.
De scope in Simulink laat alleen het laatste stuk meetdata zien
Gebruik "To Workspace" blokken. Voor een model met naam printer_01.mdl wordt er een printer_01.mat file aangemaakt. Daarin staan de gemeten signalen, bijvoorbeeld rt_simout. De naam van het signaal simout kan je wijzigen, dubbelklik op het "To workspace" blok!