Difference between revisions of "EA09 realtime tools"

From RobotinoWiki
m (Example 1 (Robotino View and EA09 View))
(How to use EA09View over WLAN)
 
(30 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
! style="text-align:left; width:20em; background-color:#dddddd"|
 
! style="text-align:left; width:20em; background-color:#dddddd"|
 
=== Package links ===
 
=== Package links ===
[[downloads#EA09 realtime tools|EA09 Com binary package]]
+
[[downloads#Robotino tools|Robotino tools binary package]]
  
[[downloads#EA09 realtime tools|EA09 View]]
+
[http://doc.openrobotino.org/download/EA09/help/index.html Online Help]
 
|}
 
|}
  
 
== EA09 I/O Board ==
 
== EA09 I/O Board ==
[[Image:EA09_IOBoard.png|right|thumb| EA09 I/O Board]]The EA09 I/O board facilitates the physical connection with Robotino's sensors and motors. The I/O board carries a [[Media:LPC2377_Datasheet.pdf|NXP LPC 2378]] micro-controller. The micro-controller's main loop runs at 1kHz. Within this loop the motors' PID controllers are updated.  
+
 
 +
[[Image:EA09_IOBoard.png|right|thumb| EA09 I/O Board]]
 +
The EA09 I/O board facilitates the physical connection with Robotino's sensors and motors. The I/O board carries a [[Media:LPC2377_Datasheet.pdf|NXP LPC 2378]] micro-controller. The micro-controller's main loop runs at 1kHz. Within this loop the motors' PID controllers are updated.  
 
The micro-controller receives, for instance, the set point values at a rate of about 100Hz from the PC104 via a serial link (RS232). The PID controllers obtain the motors' speed set points (from the PC104) and drive the motors such that the motors' actual velocities equal the speed set points.
 
The micro-controller receives, for instance, the set point values at a rate of about 100Hz from the PC104 via a serial link (RS232). The PID controllers obtain the motors' speed set points (from the PC104) and drive the motors such that the motors' actual velocities equal the speed set points.
 +
 +
=== EA09Com Package ===
 +
{|cellspacing="20" cellpadding="10"
 +
|- style="vertical-align:top"
 +
| The EA09Com package contains the necessary files required to communicate with the EA09 I/O Board. Download the executable and run the installer to install the package.
 +
|}
 +
 
== EA09 MATLAB Support ==
 
== EA09 MATLAB Support ==
 
[[Image:Architecture_matlab.png‎|right|thumb| EA09 I/O Board and MATLAB]]
 
[[Image:Architecture_matlab.png‎|right|thumb| EA09 I/O Board and MATLAB]]
  
MATLAB drivers for the EA09 I/O Board can be downloaded and installed. These MATLAB drivers consist of m-files which contain functions to send and receive data from the EA09 I/O Board. Simple to understand examples have also been provided to illustrate the use of the MATLAB functions.
+
{|cellspacing="20" cellpadding="10"
 +
|- style="vertical-align:top"
 +
| MATLAB drivers for the EA09 I/O Board can be downloaded and installed. These MATLAB drivers consist of m-files which contain functions to send and receive data from the EA09 I/O Board. Simple to understand examples have also been provided to illustrate the use of the MATLAB functions.
 +
|}
 +
 
 +
=== Using the EA09Com MATLAB Drivers ===
 +
The installation sets an environment variable 'EA09COMMATLAB_DIR' which points to the 'EA09ComMatlab' dir. Change the working directory to 'EA09ComMatlab' by simply entering the following in MATLAB's Command Window
 +
<pre>
 +
cd ( getenv('EA09COMMATLAB_DIR'))
 +
</pre>
 +
You will also need to add the 'toolbox' directory in the 'EA09ComMatlab' folder to MATLAB's search path. This can be done as follows
 +
<pre>
 +
addpath( strcat( getenv('EA09COMMATLAB_DIR'), '/toolbox' ) );
 +
</pre>
 +
or you could also just run the 'startup.m' file in EA09ComMatlab folder to add the directories to MATLAB's search path.
 +
 
 +
=== Online Documentation ===
 +
 
 +
An online version of the documentation for EA09ComMatlab can be viewed [http://doc.openrobotino.org/documentation/EA09/EA09ComMatlab/html_Home.html here].
 +
 
 +
=== Examples ===
 +
 
 +
Examples have been provided which illustrate the usage of EA09ComMatlab drivers. They can be viewed [http://doc.openrobotino.org/documentation/EA09/EA09ComMatlab/html_Examples.html here].
  
 
== EA09View ==
 
== EA09View ==
[[Image:EA09View_RobotinoView_Output_Small.png|left|thumb| EA09View]]
+
{|cellspacing="20" cellpadding="10"
 +
|- style="vertical-align:top"
 +
| EA09View is a simple tool to monitor and control all aspects of the motors via a direct connection to the EA09 I/O board on Robotino. Download the executable and run the installer.
 +
|}
 +
[[Image:EA09View_RobotinoView_Output_Smaller.png|left|thumb| EA09View]]
 
[[Image:Architecture_ea09view.png‎|right|thumb| EA09 I/O Board and EA09View]]
 
[[Image:Architecture_ea09view.png‎|right|thumb| EA09 I/O Board and EA09View]]
  
The EA09View is a simple tool to monitor and control all aspects of the motors via a direct connection to the EA09 I/O board on Robotino.
+
 
  
 
The rate of 100Hz by which the PC104 reads data from the EA09 I/O Board through the RS232 serial link is too slow to monitor the functioning of the micro-controller on the EA09 I/O Board running the PID controllers. Therefore the I/O Board is equipped with an Ethernet link which allows the micro-controller to transmit all relevant data concerning the PID controllers via UDP to an external PC. The default Ethernet network configuration of the EA09 I/O Board is as follows:
 
The rate of 100Hz by which the PC104 reads data from the EA09 I/O Board through the RS232 serial link is too slow to monitor the functioning of the micro-controller on the EA09 I/O Board running the PID controllers. Therefore the I/O Board is equipped with an Ethernet link which allows the micro-controller to transmit all relevant data concerning the PID controllers via UDP to an external PC. The default Ethernet network configuration of the EA09 I/O Board is as follows:
Line 36: Line 71:
 
EA09View can be used in parallel with Robotino® View. Since Robotino® View connects with the PC104 on Robotino via WLAN (or LAN) and the PC104 sends the motor speed set-points to the EA09 Board via the serial link (RS232). To  use Robotino® View with EA09View make sure the following settings are true for EA09View:
 
EA09View can be used in parallel with Robotino® View. Since Robotino® View connects with the PC104 on Robotino via WLAN (or LAN) and the PC104 sends the motor speed set-points to the EA09 Board via the serial link (RS232). To  use Robotino® View with EA09View make sure the following settings are true for EA09View:
  
Speed Set-point reception is set via Serial line
+
*Speed Set-point reception is set via Serial line
For Motors 0,1 & 2, Motor Monitoring is checked and Motor Control is set to Internal PI Controller
+
*For Motors 0,1 & 2, Motor Monitoring is checked and Motor Control is set to Internal PI Controller
  
 
Create a simple program in Robotino® View, for example the one shown below.
 
Create a simple program in Robotino® View, for example the one shown below.
Line 44: Line 79:
  
 
In the program above, an arbitrary waveform generates a sine wave and the values are fed directly to the motors as Speed Set-points. Start the simulation in Robotino® View and you should see an output similar to the one below in EA09View.
 
In the program above, an arbitrary waveform generates a sine wave and the values are fed directly to the motors as Speed Set-points. Start the simulation in Robotino® View and you should see an output similar to the one below in EA09View.
[[File:EA09View_RobotinoView_Output_Small.png]]
 
  
==Example 2 (Simulink and EA09 matlab)==
+
[[Image:EA09View_RobotinoView_Output_Smaller.png| EA09View]]
 +
 
 +
===How to use EA09View over WLAN===
 +
The Micrcontrollers IP address in Robotino3 is 172.27.254.254. You can connect the Microcontrollers ethernet connector to Robotino's ethernet connector. Than you can use EA09View on Robotino directly.
 +
 
 +
When you are connected to Robotino via WLAN you can not access the subnet 172.27.0.0. To do so you need to forward port 8809 to the Microcontroller.
 +
<pre>
 +
sysctl -w net.ipv4.ip_forward=1
 +
iptables -t nat -A PREROUTING -p udp --dport 8809 -j DNAT --to-destination 172.27.254.254:8809
 +
iptables -t nat -A POSTROUTING -p udp --dport 8809 -j MASQUERADE
 +
</pre>

Latest revision as of 11:03, 27 March 2014

Introduction

Robotino ea09 icon 64.png Robotinos motor-control board EA09 is capable of sending sensor readings and receiving set point values in realtime at a frequency of 1kHz.

Package links

Robotino tools binary package

Online Help

EA09 I/O Board

EA09 I/O Board

The EA09 I/O board facilitates the physical connection with Robotino's sensors and motors. The I/O board carries a NXP LPC 2378 micro-controller. The micro-controller's main loop runs at 1kHz. Within this loop the motors' PID controllers are updated. The micro-controller receives, for instance, the set point values at a rate of about 100Hz from the PC104 via a serial link (RS232). The PID controllers obtain the motors' speed set points (from the PC104) and drive the motors such that the motors' actual velocities equal the speed set points.

EA09Com Package

The EA09Com package contains the necessary files required to communicate with the EA09 I/O Board. Download the executable and run the installer to install the package.

EA09 MATLAB Support

EA09 I/O Board and MATLAB
MATLAB drivers for the EA09 I/O Board can be downloaded and installed. These MATLAB drivers consist of m-files which contain functions to send and receive data from the EA09 I/O Board. Simple to understand examples have also been provided to illustrate the use of the MATLAB functions.

Using the EA09Com MATLAB Drivers

The installation sets an environment variable 'EA09COMMATLAB_DIR' which points to the 'EA09ComMatlab' dir. Change the working directory to 'EA09ComMatlab' by simply entering the following in MATLAB's Command Window

cd ( getenv('EA09COMMATLAB_DIR'))

You will also need to add the 'toolbox' directory in the 'EA09ComMatlab' folder to MATLAB's search path. This can be done as follows

addpath( strcat( getenv('EA09COMMATLAB_DIR'), '/toolbox' ) );

or you could also just run the 'startup.m' file in EA09ComMatlab folder to add the directories to MATLAB's search path.

Online Documentation

An online version of the documentation for EA09ComMatlab can be viewed here.

Examples

Examples have been provided which illustrate the usage of EA09ComMatlab drivers. They can be viewed here.

EA09View

EA09View is a simple tool to monitor and control all aspects of the motors via a direct connection to the EA09 I/O board on Robotino. Download the executable and run the installer.
EA09View
EA09 I/O Board and EA09View


The rate of 100Hz by which the PC104 reads data from the EA09 I/O Board through the RS232 serial link is too slow to monitor the functioning of the micro-controller on the EA09 I/O Board running the PID controllers. Therefore the I/O Board is equipped with an Ethernet link which allows the micro-controller to transmit all relevant data concerning the PID controllers via UDP to an external PC. The default Ethernet network configuration of the EA09 I/O Board is as follows:

  • IP Address: 172.26.254.254
  • Port: 8809

The EA09View connects to the EA09 Board via the Ethernet link.

EA09View and Robotino® View (Example)

EA09View can be used in parallel with Robotino® View. Since Robotino® View connects with the PC104 on Robotino via WLAN (or LAN) and the PC104 sends the motor speed set-points to the EA09 Board via the serial link (RS232). To use Robotino® View with EA09View make sure the following settings are true for EA09View:

  • Speed Set-point reception is set via Serial line
  • For Motors 0,1 & 2, Motor Monitoring is checked and Motor Control is set to Internal PI Controller

Create a simple program in Robotino® View, for example the one shown below.

EA09View RobotinoView Program.png

In the program above, an arbitrary waveform generates a sine wave and the values are fed directly to the motors as Speed Set-points. Start the simulation in Robotino® View and you should see an output similar to the one below in EA09View.

EA09View

How to use EA09View over WLAN

The Micrcontrollers IP address in Robotino3 is 172.27.254.254. You can connect the Microcontrollers ethernet connector to Robotino's ethernet connector. Than you can use EA09View on Robotino directly.

When you are connected to Robotino via WLAN you can not access the subnet 172.27.0.0. To do so you need to forward port 8809 to the Microcontroller.

sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p udp --dport 8809 -j DNAT --to-destination 172.27.254.254:8809
iptables -t nat -A POSTROUTING -p udp --dport 8809 -j MASQUERADE