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.
- From the Windmill start menu select comDebug. This
utility lets you configure COMIML. (You can try comDebug for free.)

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

The Main Menu.
- 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.

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.
- Choose Add a new Message from the Main Menu. This
lets you send a message to your instrument and view
its reply.

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.
- 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.
- If your instrument does not need to be sent any commands then leave the Prompt grid blank.
- Select Send. The instrument’s reply is shown in the
Reply grid.
- Extract the relevant data from the
instrument's reply. Click the Parse button.

Extracting Data from the reply: parsing the message.
- Click Add Action to search for or ignore characters.
- Type the characters to search for, or the number of characters to ignore, into the Parameters box.
- Click over the next row then select Extract. The Channel Details box appears.
- You now need to create a channel to store the data which you are extracting. In the Channels Details box click Add Channel.
- Click this channel in the grid and select it.
- 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.
- Click Step to test the parsing. The data extracted is shown in the Value column.
- If this looks right Click OK. Otherwise edit your settings.
- 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.
- Save your settings. From the Main Menu select
Save .IMD file.
- Repeat for your other instruments then click OK.
- 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.

- Run the Windmill ConfIML program and add the
COMIML Serial Instrument Handler.
- 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.
- 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).
|