First steps

From Mca2
Jump to navigationJump to search

First steps in MCA2

Please step into the section that considers your favorite operating system.

Linux

Download

Get the newest version of MCA2 on sourceforge:

 [~]$ tar -xzf mca2.4.0.beta.tgz<br/>
 [~]$ mv mca2.4.0.beta.tgz mca2<br/> 
 [~]$ cd mca2

Build

  • Configure MCA2 for your system:
  [~]$ scons configure=yes
  • Set environment variables:
  [~]$ source script/mcasetenv
  • Compile everything:
  [~]$ scons

Executables are installed in $(MCAHOME)/export/$(TARGET)/bin
Libraries and plugins in $(MCAHOME)/export/$(TARGET)/lib

MCAHOME is your MCA2 directory. TARGET is created automatically depending on your operating system and CPU. Example: mca2/export/i686_Linux_debug/

Test

There are several test programs already built:

  • reply_values
  • pass_values
  • time_test
  • blackboard_test

They serve as examples for coding and execution. Start reply_values:

  [~]$ reply_values 4 &

Then start mcabrowser:

  [~]$ mcabrowser &

A treeview appears. Expand the treeview by clicking on the '+' symbols. If you click onto any name, a corresponding window with additional information appears. If a graph with modules and edges appear, click on any of them to get more information. Try also to access the IO-interfaces of modules and groups. As you can see, the module ReplyValues submits 4 values on ControllerInput and SensorOutput sides. The mcabrowser is a tool that enables to analyze and debug existing mca control programs.

Start mcagui now:

  [~]$ mcagui &
  • Change the size of the window.
  • Then create a slider (click on the corresponding tool button or select 'Slider' from menu 'Actors').
  • Press <ctrl> button and click with right mouse button on the appeared slider widget: Change the size of the slider.
  • Press <ctrl> button and click with left mouse button on the slider widget: Change the position of the slider.
  • Press <ctrl> button and click with middle mouse button on the slider widget: A new configuration window appears.
  • Select the 'Actor' Tab and select "actor 0" as IO Channel and "Port No. 0" as Widget Port.
  • Press "-->" button to establish the connection. Your Slider is now connected to the ControllerInput "actor 0" of the reply_value program.
  • Close the configuration window "Edit".
  • Create an LCD widget (click on on the corresponding tool button or select 'LCD' from menu 'Sensors').
  • Change Size and Position of this new widget, too.
  • Press <ctrl> button and click with middle mouse button on the LCD widget.
  • Select the 'Sensor' Tab and select "sensor 0" as IO Channel and "Port No. 0" as Widget Port.
  • Press "-->" button to establish the connection. Your LCD is now connected to the SensorOutput "sensor 0" of the reply_value program.
  • Close the configuration window "Edit".
  • Use the slider: LCD value will change, too.
  • Have a look at the console output of reply_values.
  • Have a look at the IO-values in mcabrowser (use auto-update)

Windows

Download

Get the newest version of MCA2 on sourceforge:

Please have a look at README_WIN32 as long as this section is not updated.

MAC/OS X

MAC/OS X support is not available for MCA version 2.4.x so far.