To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2799
2798  |  2800
Subject: 
RCX program editor review (second version)
Newsgroups: 
lugnet.robotics
Date: 
Thu, 14 Jan 1999 20:04:04 GMT
Original-From: 
Denis Cousineau <decousin@STOPSPAMMERSindiana.edu>
Viewed: 
1399 times
  
Hi guys,

I continue my survey on the RCX program editors.  In response to
the first version of this message, I received a lot of response,
thanks to you.  It also helped me deepen my understanding of the
various factors that makes a program editor a good one, and
clarify the software requierements that comes with the RCX.
You'll find this update profoundly modified, and greatly extended.

Again, I would like you to review it, and send any comment/
corrections that are required.  If this overview is adequate, I
will try to find a site to put it.
PLEASE SEND BY E-MAIL your comments or corrections that are needed
to COUSINED@INDIANA.EDU
Thank for your collaboration.


//////////////////////////////////////////////////////////////////////
PART 1: OVERVIEW
//////////////////////////////////////////////////////////////////////

What the RCX graphic interface program editor should bring:
1- An editor
2- A syntax checker/compiler
3- A download utility

Obviously, we want a graphic interface to be friendly-user, and
integrating all the required tools in one place.  The 3 requirements
listed are to my opinion essentials, and cannot be omitted from
the program editor, otherwise, it is not convenient/usefull.

What the language should bring:
1- A complete language
2- A symbolic language
3- Interactions with on-computer programs

A good language for programming must be complete, i.e. offerings all
the commands that makes the RCX capable of completing any computation.
Of prime importance therefore are the operations Addition,
Multiplication...
which are not present on the LEGO RIS software that you bought with
the kit.  (Technically, a complete language is said to be Turing-machine
equivalent, a label that assures you that you will always find a way
to compute whatever you are trying to compute).

Also, a good language should be symbolic, e.g. we should be able to
give arbitrary names to variables, tasks, and other components that
can be adressed in a computer.  Otherwise, we have to use addresses.
Using only addresses can make good programs, but forget about
readability!
and the debug time is multiplied a large number of times.

Finally, the RCX is a computer of its own.  As most companies now knows,
using a network is much more powerfull than using only stand-alone
computers.  That way, data can be shared, or located on computers having
a larger capacity, tasks can be modularized (print servers are good
example of this), etc.  In order to realize this, the RCX and the
computer
must agree on a way to interact on each other.  In the present case,
clearly,
the computer can alter the RCX (just ask to close the RCX), but the
other
way around is a totally different question: Your RCX cannot ask your
computer to shut-down (at least not with the LEGO program editor).

These six points will be used to evaluate the different capabilities
of the program editors available on the net.  I mostly concentrate
on Graphic-interfaced program editors, but the third section covers
some of the non-graphical alternatives.


//////////////////////////////////////////////////////////////////////
PART 2: SOFTWARE REVIEW
//////////////////////////////////////////////////////////////////////

Table 1 presents a review of the 6 currently known to me Graphic
interface program editors.  They are abbreviated, but you can look at
the last part, using the number, for a complete name of the software,
with authors, and web site.

Table 1: completedeness of the package
=======================================================================
   Graphic Interface Langage
----------------------- -----------------------
editor syntax download complet symbol computer
------ ------- ------- ------- ------- -------
A.1 lego RIS x x x NO NO NO
A.2 RCXCC x x x x x NO
A.3 BotCode x x x x x NO
A.4 BCommand x x x x x -
A.5 Mcontrol NO x x x x NO
A.6 GordonBP x x x x x NO
=======================================================================
- currently being programmed; check for next beta version.

You may notice first that the LEGO interface fails in all respect
to provide an adequate language.  It is clearly not a recommanded
interface for serious (or moderate) RCX applications.

Second, the MindControl does not offers an editor.  In order to
create programs, you have to call notepad (or any other text processor),
(dont forget to) save, and then ask for a download.

Most of the software do not implement in any way RCX-computer
interaction
with the noticable exception of Brick Command.
With Brick Command, the RCX will be able to ask the computer to perform
complex operations (provided you have made a .EXE program with the
computer-programming language of your choice that can perform that
operation), and receive a response, or even a new program.


Table 2 looks at other aspects of the graphic interface.  These aspect
are not as crucial, but may help you make a choice.

In this table, I also mention what library the editor relies on for
its normal functioning.  The name "library" refers to a set of
procedures that are needed to established the communication with the
RCX, and to download programs (among other things).  The library is
intended only for your computer, not the RCX (but the RCX must be able
to understand request send through the IR tower-this is the role of
the RCX firmware; see Part 3).

Table 2: other quality of the integrated environements
=======================================================================
Help Library other comments (+good, -bad, --very bad)
------- ------- ------- -------------------------------
A.1 lego RIS x SPIRIT 1 --interface slow and too large
+visual editor
A.2 RCXCC no NQC 1 -relies on SPIRIT for some operations.
A.3 BotCode x SPIRIT 1
A.4 BCommand no SPIRIT 1,2
A.5 Mcontrol no SPIRIT 1
A.6 GordonBP x SPIRIT 1 +visual editor
=======================================================================
1: also provides an immediat test of the commands: motor outputs and
    sensor readings
2: also provides memmap/poll/datalog readings that get back to the
computer

Most editors relies on the SPIRIT.ocx library provided by LEGO corp.
This does not mean that the language that you see on your editor IS
the same as the name of the procedures available in the SPIRIT.OCX.
BotCode for example provide a language that is only roughly inspired
by the SDK documentations of the library SPIRIT.OCX

LEGO RIS and GordonBP both have a visual editor in which the notion of
syntax is no longer a concern.

Finally, RCXCC is the exception: it does not use SPIRIT.OCX at all
(well, it seems that it uses it for some download operation?). It uses
a language defined by Dave Baum, which is a kind of cross-over between
c and SPIRIT.OCX.

Since most of the programs are relying on SPIRIT.ocx, the absence of
help is
a sad thing, but the SDK document is available at:
http://www.LEGOMindStorms.com
For RCXCC, the NQC language implemented in the editor is fully described
at:
http://www.enteract.com/~dbaum/lego/nqc/nqcc.html


//////////////////////////////////////////////////////////////////////
PART 3: TECHNICAL ISSUES
//////////////////////////////////////////////////////////////////////

In order to be able to use and program the RCX, two software are
required:
  a) an operating system (OS): this is the equivalent of DOS on old-time
computer.  Without DOS, the computer could not use its input/output
(such as the keyboard of the terminal).  The same is true for the
RCX: without an OS, it does not know how to communicate with a computer,
how to run a downloaded program. The OS is for the RCX only.
The OS is also called firmware by the lego corp. (Also, it can be ROM
-the cybermaster brick- or downloadable -the RCX brick-)

  [Technically, the OS of the RCX is double: on part is ROM and is
concerned with receiving and starting an OS, the second part is the
received OS; without OS, the RCX still can use its IR-receiver, but
only to receive one program, which will automatically be its OS).]

  b) a set of communication procedures (called improperly "library" in
this text) are also required.  They are used by the computer to
send information to the RCX or retrieve data from it.  The library
is for the computer only.  The library can be composed of a kit of
executable files (.EXE), or stored in dll or activeX (.OCX) files.
Formally, the library must be able to send/store/retrieve
information/prg
to and back from the brick.

  Although the OS and the library are meant for two different computers
(the RCX and your PC computer), they must be compatible so that they can
communicate.  For instance, the SPIRIT library requires that the
OS/firmware firm0309.lgo provided by lego corp. be loaded on the RCX.
The converse is not true however: Other libraries can be compatible with
the OS/firware firm0309.lgo, as seen in Table 3.

Table 3: compatibility between the OS and the libraries
=======================================================================
Libraries (on the remote computer)
Operating System -----------------------------------------------
(on the brick) (size) spirit NQC** compiler* other comment
--------------- ------- ------- ------- ------------ ---------------
firm0309.lgo (16 kb) x x

legOS** (5 kb?) x -good knowledge
of UNIX required
=======================================================================
*: The only compiler that can be configure to H8 opcode to my
knowledge is the GNU compilers (c and fortran).  That's fine
since it is freeware, and of a very good quality (yet text based).
**: NQC and LegOS are not Win32-based software; they can or are
also available for Mac (NQC), and a variety of UNIX computer (NQC and
LegOS).

As seen, the only alternative library (the NQC) is also meant to
communicate with a RCX under the lego OS (firmware firm0309.lgo).

LegOS is in a totally different cluster, it uses text-based compiler,
a program-downloader (also text-based).  However, the new OS allows
programming with pointer (true c language), memory managment, etc.

As you can notice by the size of the firm0309.lgo, it is a rather
huge OS compared to the total memory size available on the RCX.
[Technically, on the display, when uploading the OS, each increment up
to 1740 or so is 10 byte long.  The firmware binary image is exactly
16K counting the zero padding at the end.  If you use firmdl.c,
you don't send the zero bytes at the end, and you end up downloading
around 15.5K, saving 0.5 kbytes. -Kekoa].  If memory is a concern,
you definitely need an alternative OS.


//////////////////////////////////////////////////////////////////////
PART 4: REFERENCES
//////////////////////////////////////////////////////////////////////

A- Graphic Interface Program Editors

  A.1-RIS LEGO program editor
    version 1.0
    Written by Lego corporation
    http://www.legomindstorms.com

  A.2-RCX Command Center
    version 1.0
    Written by Mark Overmars
    using NQC from Dave Baum
    markov@cs.uu.nl
    http://www.cs.ruu.nl/people/markov/lego/rcxcc/index.html

  A.3-BotCode
    Version 1.1
    Written by ?
    marty@desktopmusic.com
    http://www.desktopmusic.com/botcode.htm

  A.4-BrickCommand
    Version 1.0
    Written by Brian Cwikla
    iguano_design@yahoo.com.
    http://www.geocities.com/Area51/Nebula/8488/lego.html

  A.5-Mind Control
    version 1.0.2
    written by Eric Brok
    http://homepages.svc.fcj.hvu.nl/brok/legomind/robo/
    brok@fcjsvc.hvu.nl

  A.6-GORDON'S BRICK PROGRAMMER
    Version 1.3
    written by Malcolm S Powell (not Gordon)
    http://www.umbra.demon.co.uk/gbp.html
    msp@umbra.co.uk

B- Non-integrated, non-graphic Program Editor or Library

  B.1-SPIRIT.OCX (comes as a ActiveX library)
    version 1.0
    written by lego corp.
    http://www.legomindstorms.com

  B.2-NQC and RCX Utilities (comes as a set of EXE files run in a DOS
window)
    version 1.0 b4
    written by Dave Baum (with contributors for RCX utilities)
    http://www.enteract.com/~dbaum/lego/nqc/
    dbaum@enteract.com

C- Replacement OS (firware)

  C.1-LegOS
    Version 0.1.4
    written by Markus L. Noga
    noga@inrialpes.fr
    http://www.multimania.com/legos/


--

Denis Cousineau,                   ****************************
Cognitive psychology               *                          *
Indiana University                 * Niaisez pas avec le pok! *
Psychology Building                *       (latin maxime)     *
Bloomington, 47405                 ****************************

Office: (812) 856-5217             Fax:    (812) 855-1086
E-mail: decousin@indiana.edu
http://Prelude.PSY.UMontreal.CA/~cousined
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
11 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR