Windmill Software Ltd
Windows Engineering Software

Data Acquisition Help
February 2010

Configuring COMIML

Home
Newsletters
Catalogue
Contents

Search

Getting Started with the COMIML Serial Driver

COMIML lets Windows software read and control serial devices connected to the PC's COM port. These include such diverse equipment as electronic balances used in a laboratory, GPS receivers used in the field and data loggers used in process plant. The COMIML device driver can communicate over RS232, RS422, RS485 or Modbus.

The first thing to do with COMIML is configure it for use with your instrument. You only need to do this once. In future you can just run your Windmill logging, charting or display programs.

  1. From the Windmill start menu select comDebug. This utility lets you configure COMIML. (You can try comDebug for free.)

    comDebug
    The opening screen.

  2. From the opening screen select Create a new Windmill Instrument File. The main menu appears.

    Main Menu
    The Main Menu.

  3. Choose Edit COM Port Settings and enter your instrument's communications settings. Click the Help button if you are not sure of the settings to use, or see our Making Measurements through the COM Port page.

    COM Port Settings
    Choose the number of the COM port to which your instrument
    is attached, its baud rate, etc. These
    settings must match those used by your instrument. If in doubt try 8 data bits, no parity and 1 stop bit.

  4. Choose Add a new Message from the Main Menu. This lets you send a message to your instrument and view its reply.

    comDebug Terminal Screen
    The Terminal screen lets you send commands and data to the instrument,
    and view the reply. For those instruments that require it,
    you can send an acknowledgement when the reply is received.

    1. If your instrument needs to be sent a command to return data, then type this command into the Prompt grid. If you need to enter characters not available from the keyboard, such as Returns or Linefeeds, you can
      • Use the NonPrint menu, or
      • Enter the Hexadecimal code into the Hex column, or
      • Press the Num Lock key and, using the numeric keypad, enter the decimal code into the Char column.
    2. If your instrument does not need to be sent any commands then leave the Prompt grid blank.
    3. Select Send. The instrument’s reply is shown in the Reply grid.
  5. Extract the relevant data from the instrument's reply. Click the Parse button.

    Parsing the message
    Extracting Data from the reply: parsing the message.

    1. Click Add Action to search for or ignore characters.
    2. Type the characters to search for, or the number of characters to ignore, into the Parameters box.
    3. Click over the next row then select Extract. The Channel Details box appears.
    4. You now need to create a channel to store the data which you are extracting. In the Channels Details box click Add Channel.
    5. Click this channel in the grid and select it.
    6. You are returned to the Reply Parser window and enter an Extract parameter. For instance, if you chose "Extract N Bytes" then type the number of bytes (characters) which you want to save as data.
    7. Click Step to test the parsing. The data extracted is shown in the Value column.
    8. If this looks right Click OK. Otherwise edit your settings.
  6. Choose whether you want to continually take readings from your instrument in the background, or to take readings only when requested to do so. In the Main Menu choose Edit the Instrument Timings. If you have an instrument that sends data regularly without any prompting you would usually choose background reading.
  7. Save your settings. From the Main Menu select Save .IMD file.
  8. Repeat for your other instruments then click OK.
  9. Windmill lists all your serial instruments as modules within a COMIML Device. In the opening screen click Edit Windmill Device. Press the Add button and select your instrument files.

    Creating a Windmill Device

  10. Run the Windmill ConfIML program and add the COMIML Serial Instrument Handler.
  11. Run the SetupIML program. This lets you specify how you want to use your instrument. Select COMIML from the Device menu and double-click your channels to choose names, units, ranges and alarm levels.
  12. You are now ready to use the Windmill logging, charting, display and control programs. The next time you use Windmill you can go straight to this step.

To order Windmill 6 with the COMIML Serial Driver go to http://www.windmillsoft.com/comiml.html


Further Reading

The comdebug.hlp file contains full instructions on using COMIML. Press the Help button during configuration then go to the Overview topic.

Issue 47 of Monitor used a real-world example of how to configure COMIML for use with a custom PLC.

Our Making Measurements through the COM port page goes into detail about communications settings: baud rate, parity, etc. If you cannot pursuade your instrument to send a reply then see the Trouble-shooting Serial Port Connections page.

Our FAQ answers your questions on using COMIML (comDebug).



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

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