Windmill Software Ltd
Data Acquisition Intelligence

Data Acquisition Help
January 2012

Configuring COMIML

Home
Technical Support
DAQ Catalogue
Contents

Search

Getting Started with ComDebug and 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 TCP/IP, RS232, RS422, RS485 or Modbus.

The first thing to do with COMIML is configure it for use with your instrument. You do this with the free ComDebug utility. You only need to do this once. In future you can just run your Windmill logging, charting or display programs. You can also follow these steps if you are using ComDebug on its own.

  1. From the Windmill start menu select ComDebug.

    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 the communications settings that your instrument is using. Choose the number of the COM port to which your instrument is attached, its baud rate, etc. Check your Manual for your instrument. If in doubt start with the most commonly used: 8 data bits, no parity, 1 stop bit and no flow control. See also our page of specific instrument settings for examples for Sartorius, Mettler Toledo, Modbus, NMEA, RFID, Denver, Datel Datataker, Turner and other devices.

    COM Port Settings
    Click the Help button if you are not sure of the settings to use. For more information on
    each of the settings see our Making Measurements through the COM Port page.

  4. Create Channels to hold your data. In the Main Menu select Edit the data channel details.
    Select Add Channel and type in a name. This should be unique and not be duplicated across instruments. Create a channel for each type of data: temperature, pressure, latitude, longitude, weight, etc. You will later enter instructions for extracting this data and allocating it to a channel.

  5. Choose Add a new Message from the Main Menu. This lets you send a message to your instrument and view its reply. (Make sure you DON'T select Initialisation Message instead. The Initialisation message is sent only once when the instrument is first switched on: it will not let you repeatedly collect data.)

    ComDebug Terminal Screen
    The Terminal or Message 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. If you
    are not sure of the command needed, check whether we
    have example settings for your instrument.

    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. (If you do not see any reply - see our Trouble-Shooting Serial Port Communication tips.)
  6. 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. Choose one of the channels you created earlier, or, if you haven't yet done so, add a channel now and select it.
    5. You are returned to the Reply Parser window to 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.
    6. Click Step to test the parsing. The data extracted is shown in the Value column.
    7. If this looks right Click OK. Otherwise edit your settings. See our Parse Help page if you need more information on entering instructions to extract data.
    Timings
  7. 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. With Read in Background the COMIML serial driver continually sends out messsages and gets data from the replies. This means that when Windmill requests a value it will be given the latest stored value: no need to wait for the instrument's next reply. In this mode the Instrument Idle time controls the rate at which data is requested. If your instrument sends data regularly without any prompting, you would usually choose background reading. With Read Directly the COMIML serial driver only takes readings when an application requests it. COMIML has to wait for a reply from the instrument which results in a slower response time. See the Serial Port Driver Settings page for more details.
  8. In the Terminal or Message Screen click Run to check that everything is working. If you are using ComDebug without the COMIML driver, select the File menu to save readings in a text file.
  9. Save your settings. From the Main Menu select Save .IMD file. If you just wish to use ComDebug to log data to a text file from one instrument, then you are done. If you wish to log from more than one instrument, to chart data, to send data to Excel in real-time and to perform more sophisticated data acquisition and control, read on.
  10. Repeat steps 2 to 7 for any other instruments then click OK in ComDebug's Main window.
  11. Windmill lists each instruments as a module 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

  12. If you haven't already done so, run ConfIML and add your COMIML device. You are now ready to use the Windmill SetupIML program to specify how you want to use your hardware. For example, you can set setting alarm thresholds, rename channels or change the engineering units. SetupIML creates a hardware setup file (*.ims) which the other Windmill programs—Logger, DDE Panel, etc—use. You can create several hardware setup files for different applications. In the Windmill Logger program for example, select Load Hardware Setup from the File menu and choose the *.ims file you just saved. The next time you use Windmill you can go straight to this step: there is no need to run ComDebug again unless you need to add new devices.

Further Reading

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

For more help see our Windmill 7 Technical Support page. You can fill in a form at the bottom of this to request our assistance.

Related Pages:
Technical Support Notes
Making Measurements through the COM port
Trouble-shooting Serial Port Communication
Example Instrument Settings
RS232 Handshaking


Home | Windmill Measurement Software | Data Acquisition Shop | Monitor Newsletter | Contact Us | Contents: Tutorials, Tech Support, Applications, Free Stuff, etc | Search

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