Configuring the Serial Port Driver—Settings to Use for Data Acquisition
When configuring data acquisition software to work with your serial instrument, you must tell the serial driver exactly what settings your instrument is using. You will need to know the communications settings (baud rate, parity, etc) and any commands needed by the instrument. This page gives example settings for some of the instruments and devices which have been interfaced to a data acquisition system by Windmill's free ComDebug and Windmill 7 software. The settings will vary depending on your application, but will give you a starting point.
If you are using a USB-to-Serial converter then its COM Port Settings much also match those of ComDebug and your instrument. See the USB-to-Serial converter page for details.
See the Notes at the bottom of the page for an explanation of the terms used.
- A & D Balance
- Adam 4000 Series Modules, from Advantech
- Adam PGW Balance
- Datel Datataker
- Echo Sounder (part of the Seafloor mapping guide)
- GPS Receivers
- Garmin GPS Receiver
- Jumo TMM-45
- Mettler Toledo Balance
- Modbus Devices
- NMEA Devices
- OBD: Vehicle On-Board Diagnostics
- Ohaus Pioneer Balance
- Pinnacle Advanced Energy 6kW DC Power Supply
- Quadra-Chek 2000
- Rice Lake Balance
- RFID Reader
- Tresna Digital Indicator connected to the PC via a Win-1 Special Interface, Series:Q05
- Sartorius Balance
- Sylvac Dial Gauge
- Turner Fluorometer
- USB-to-Serial Converter
- YSI 2300 STAT PLUS Glucose & L-Lactate Analyzer
- YSI Oxygen Meter
This list is steadily growing. If you have used Windmill we would really appreciate you sending us your settings so we can help other users get started. Just attach your .imd file from your windmill setups directory and the iml.ini file from the c:\program files\windmill software\windmill\ directory. Open these with any text editor if you want to check what is in them before sending them.
If we don't yet have example settings for your instrument, and you cannot find an instrument Manual, start with these commonly used settings for serial devices...
Data Bits: 8
Stop Bit: 1 (you could also try 2: although this is less common, it will at worst only slow the message down a little)
Flow Control: None
To enable the COMIML and ComDebug programs to work with just about any serial instrument, they have several options which you can use to taylor the software to your hardware. The COMIML driver can gather data from up to 10 different instruments, each with many channels, making it a very versatile tool.
- A Carriage Return. Use the Non-print menu of ComDebug's Reply Parser window to enter this.
- A Line Feed. Use the Non-print menu of ComDebug's Reply Parser window to enter this.
- Read in the 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 Wait Time (previously called the Instrument Idle Time) controls the rate at which data is requested by the COMIML serial driver (in total the time to send request + time instrument takes to send reply + Wait Time). However, when the instrument continually supplies data without being prompted (no prompt string), the Instrument Idle or Wait Time is ignored as COMIML continually listens for data.
- Read Directly
- The COMIML serial driver only takes readings when an application (like Logger or Chart) requests it. COMIML has to wait for a reply from the instrument which results in a slower response time.
- Data Persistence
- The time that data is considered valid. Once data has been read from an instrument it is remembered by the COMIML serial driver and returned as a valid reading until the persistence time has expired. Thereafter an attempt to read the instrument will cause a new reading to be taken. This is important where messages extract several channels of data. If you set the persistence time to 0, every channel reading will cause a complete message to be executed. With a longer persistence time the message need only be executed once and all channels can be obtained from the stored data.
For instruments which continually send data, the persistence time should be longer than the rate at which the instrument sends messages.
If your instrument responds slowly to a request for data and you are reading in the Background, set the Persistence Time to longer than your logging or charting interval.
If you are reading your instrument directly, set the Data Persistence Time to less than the rate at which you want to read data.
- The time Windmill should wait for a reply from the instrument before giving up. If no reply is received in this time, the COMIML serial driver declares a reading error (eg Error 114). This prevents Windmill from waiting forever for data from instruments that never respond, or which send a reply which can never satisfy your parsing instructions. To avoid spurious timeouts set to between five and ten times the normal response time. If you don't know the response time, 5000 milliseconds should be adequate. When the instrument continually supplies data without being prompted (no prompt string), the Instrument Idle or Wait Time is ignored as COMIML continually listens for data.
- Instrument Idle or Wait Time
- In Direct Mode this is only needed if you put Wait delays in your Prompt String.
For instruments that continually send data the Idle/Wait Time is not used
For instruments you have chosen to read in Background mode as they have a slow response to data requests, the Idle/Wait time sets a time delay between the end of one reading and the start of another.
- COM Port Settings
- See our Making Measurements through the COM Port page for a detailed description of these settings.
- Prompt String
- The commands and data sent to an instrument to request data. Not all instruments need a prompt string.
- When you software extracts data from a message string it is known as parsing the message.
- Ignore Until
- A parsing instruction to ignore everything in a message until the driver reaches any one of the characters specified. The next action occurs on the found character. So if you Ignored everything until a + or - sign, and then Extracted data, the + or - sign would be included in the extracted data. Eg Ignore until +-, or Ignore until 0123456789.
- Search Until
- A parsing instruction to ignore everything in a message until the driver finds all of the characters specified. The next action occurs after the found character. So if you searched for + sign, and then Extracted data, the + sign would not be included in the extracted data.
- Extract until
- A parsing instruction to extract data until it finds any one of the characters specified. The next command then acts on this character: it will not be extracted.