Windmill Software Ltd
Windows Engineering Software

Parallax BASIC Stamp
August 2005

Interfacing a Parallax BS2-IC BASIC Stamp

Home
Newsletters
Catalogue
Search

Windmill software lets you interface Parallax BASIC Stamps, and other instruments with an RS232 serial port, to a PC running Windows. Our new Windmill COMIML software is very easy to use and you can try before you buy. Alternatively, subscribers to the Monitor newsletter (ISSN 1472-0221) can download an earlier version for free.

This page helps you get started with the free Windmill 4.3 and LabIML software. (Configuration is similar with COMIML, but you use the comDebug program instead of the ConfIML program). There are three basic steps.

  1. Run the Windmill ConfIML program and enter your Stamp's communication settings.
  2. Run the Windmill SetupIML program and choose names and units for your Stamp's data.
  3. Run the Windmill DDE Panel, Logger or Chart program to save or display data from your Stamp.

After you have entered your configuration settings with ConfIML and SetupIML, you don't need to use these again and can go straight to the logging and display programs. More details on entering the configuration settings are below. If you wish you can transfer data in real-time to other programs like Excel.

The BASIC Stamp is already noted for the ease it has brought to resolving control technology problems. Its use of the BASIC language with inbuilt control instructions can dramatically shorten industrial development time. The Windmill software can read ASCII data and can be configured to pass it directly to an application such as Excel. The BS2-IC debug statement is additionally useful here because it makes it easy to format ASCII data in a manner that's both applicable to both Windmill's and Excel's requirements. Exploiting the situation to the full turns the BS2-IC into a Windmill multi-channel datalogging instrument. For details how a Parallax BASCI Stamp and Windmill have been used in a teaching environment, see our application story.


Run the Windmill ConfIML program

This detects and saves a record of the hardware you want to use. You need to add the LabIML ASCII instrument handler and enter your Stamps's communication settings. To do this

  1. Press the Add button.
     
  2. Select LabIML RS232 ASCII Instrument Handler.
     
  3. Type a name for the Stamp, a description and enter how many channels of data you will be collecting. The name and description can be anything you like. Each channel holds one type of data item: for example temperature measurements. Press OK.
     
  4. Enter your instrument's settings. If your Stamp program regularly sends data, these settings should work:
    • Reading Protocol: Continuous
    • Data Persistence: 10000
    • Instrument Idle Time: 0
    • Returned Message Length: Count how many characters are in the Stamp's message - this depends on your Stamp's program.
    • Instrument Initialisation String: Leave blank.
       
  5. You now need to define how to extract data. To do this press the Channels button. What you enter here depends on your Stamp program. Let's assume that the BS2-IC produces an output of ASCII strings that range from "-55.0" to "+120.0" with a leading sign character, a trailing carriage return to mark the end of data and a maximum length of seven characters. In this case to extract the data you could ignore characters until meeting a "+" or "-", then extract everything until the carriage return. This looks like:
    \I"+-"\E"\C013"
     
  6. The next step is to enter your communications settings.
    Baud rate: 9600
    Data bits: 8
    Parity: none
    Flow control: none.
  7. Save your settings and close ConfIML.

Now Run the Windmill SetupIML program

Here you can name your channel, set its units, any alarms and so on.

  1. From the Device menu select LabIML.
  2. Your data channel will be shown as a number like 10000. Double click this channel.
  3. Type name for your channel and make sure Enable for Input is checked. If you want to change the units enter an appropriate scale and offset.
  4. Save your settings in a *.ims file and close SetupIML.

Open Windmill DDE Panel

  1. From the File menu select Load Hardware Setup and choose the *.ims file you just saved.
  2. Connect your Stamp channel. You should see the correct data in DDE Panel.
  3. Proceed similarly for the Logger and Chart programs.

Getting the data into Excel

You can use the Windmill Logger program to collect data, and after collection has finished import it into Excel. Alternatively, you can collect data with Excel in real-time by writing an Excel macro to read data from the Windmill DDE Panel. For more details see our Excel page.


Success?

Have you successfully used Windmill with your Stamp? Let us know about your project.

Details of how you are using Windmill:

Name:          
Organisation:  
E-mail:        

Home | Windmill Programs | Monitor | On-Line Shop | Free Literature and Software Demos | Contents | Search

Copyright Windmill Software Ltd 2004
PO Box 58, North District Office, Manchester, M8 8QR, UK.
E-mail, Tel: +44 161 833 2782
http://www.windmill.co.uk/sartorius.html
Data Acquisition News Feed (RSS) Free measurement news feed...
Designed by Studholme.net
Related Topics: