Monitor - ISSN 1472-0221
The Newsletter for PC-Based Data Acquisition and Control
Issue 190, May 2014
Welcome to Monitor. I hope you find it useful. Should you wish to remove yourself from our mailing list however, go to Monitor Newsletter
You can download Monitor as a pdf file from https://www.windmill.co.uk/monitor/monitor190.pdf
Debugging Serial Communications
When collecting data from serial instruments, sometimes the readings don't appear like you think they should. To help you identify the communication problem the Windmill ComDebug software (available free to subscribers) now has a "Debug Screen", which shows messages from the universal serial device driver, ComIML.
The ComIML driver grabs readings from measurement instruments and sends them to the other software applications like Windmill Logger and Chart. ComIML also sends out information about exactly what messages receiving from the instruments and what it is doing with them.
To see this information, open ComDebug and choose Windmill Debug Screen.
ComDebug scrolls info line-by-line. Each line starts with a number: the time lapsed in milliseconds from the start of the message sent by your instrument. You can thus see any delays in instrument replies. ComDebug shows you stuff like:
- Start of Parse Attempt
- When setting up your instrument you can specify a Timeout, so the the software doesn't get stuck waiting indefinitely for a reply from your device. The timeout begins at this Start of Parse Attempt.
- Channel + Num + Value
- When ComIML extracts a value, it allocates it to a channel. So a data value from a balance would go, for example, to the weight channel. A temperature reading might go to the temperature channel. If you don't name a channel its number will be used. This line shows the channel name, its number and the data value that ComIML has extracted and sent to it.
- Parse OK
- ComIML has successfully finished parsing the message. If the readings are not what you expect there might be a mistake in the parsing instructions which specify what data will be extracted. See https://www.windmill.co.uk/parse.html for help with parsing.
- Parse Timeout
- This means that the instrument hasn't sent its message in time. It may be that the Timeout is too short - to change the Timeout, from ComDebug's Main Menu select Edit the Instrument Timings.
- The message sent by the instrument.
- Channel + Num + Read / Channel + Num + Persist
- ComIML can either query the instrument directly and extract data from its reply, or can extract data from a stored message. Which is does depends on your persistence time setting. If the persistence time has expired a new reading will be taken and Channel name, Number and Read will be shown. Channel name, Number and Persist means that ComIML has extracted data from a saved reading.
- Flush Serial Buffer
- This can be a very useful bit of information. Just before ComIML starts a new message, it reads and discards anything remaining in the serial buffer. These are displayed in the Flush Serial Buffer line. It lets you see if anything useful is being missed. If so you can adjust your parsing instructions in ComDebug. No message is displayed if there are no discarded bytes. To be sure of no bytes being discarded, finish your parse string (set in ComDebug) by jumping to the end of the message
- Start of Wait Command
- Some instruments can become overloaded if instructions arrive too quickly. To prevent this you can tell ComIML to wait (in ComDebug). The end of the waiting is shown by the next action specified by the message.
Differences between Direct and Background readings (set in ComDebug's Instrument Timings)
When a direct reading is being made, ComIML waits for either the reply from the instrument or timeout to elapse. In Background mode, ComIML does not wait for replies to be received. Instead it allows other messages to be implemented (on different COM ports). Whenever it returns to a Background reply it makes a fresh attempt to parse it. This means that you might see the early channels parsed several times before finally a complete parse is obtained.
In Background mode the idle time delay is enforced between the end of one read of the module and the start of the next. This appears as a Wait message.
Question: What is the meaning of Byte, Char, Hex?
Please advise how to set up ComDebug? What is the meaning of Byte, Char, Hex?
When using ComDebug to send messages to serial instruments, you can enter data either as ASCII characters (Char) or in hexadecimal format (Hex).
Data is sent to the instrument one byte at a time. Each byte might represent one character - a letter, a number, a symbol or a special character like a return. The screen shown below shows the letter "S" followed by a carriage return (013) and linefeed (010) being sent as a command to a measuring instrument. Enter letters, numbers and symbols simply by typing into the Char column. For special characters like carriage return, linefeed and escape use the NonPrint menu. They are shown as their "character code". We've a table of characters codes, ASCII characters, control codes and hexadecimal values at https://www.windmill.co.uk/monitor183.html#ASCII which you may find helpful.
When you type something into the char column, its equivalent hexadecimal value is shown. You could instead type directly into the hex column. This is mostly used when communicating with Modbus instruments.
For more information on setting up ComDebug, see Getting Started with ComDebug and the COMIML Serial Driver at https://www.windmill.co.uk/comiml_ts.html
Welcome to our round-up of the data acquisition and control news. If you would like to receive more timely DAQ news updates then follow us on Twitter - @DataAcquisition or Google+ - https://plus.google.com/107072683025496630222/
Tyres which tell you when they need changing
In future tyre sensors will read pressure, load and tread depth and alert drivers as to when tyres need changing, according to Continental.
Robotic submarines make waves in the oil and gas sector
The quality of the data they can gather is driving the use of autonomous underwater vehicles (AUVs). Able to fly metres above the seabed - or close to subsea installations - AUVs enable operators to rapidly deploy a range of high-frequency sonar systems, cameras and sensors to gather detailed subsea data.
Source: The Engineer
Sensors help farmers protect crops from insect damage
Inexpensive wireless sensors which can identify species of insect with 99 percent accuracy are expected help fight insect-borne diseases like malaria and prevent crop damage.
Source: University of California, Riverside
Automotive Sensor Market worth $35.78 Billion by 2022
According to a report by MarketsandMarkets, the automotive sensor market expected to grow at a CAGR of 8.6% from 2014 to 2022. The demand for sensors is continuously growing in diverse automotive applications.
* Copyright Windmill Software Ltd
* Reprinting permitted with this notice included
* For more articles see https://www.windmill.co.uk/
We are happy for you to copy and distribute this
newsletter, and use extracts from it on your own web
site or other publication, providing the above notice
is included and a link back to our website is in place.
For previous issues by subject see https://www.windmill.co.uk/monitorindex.html
FREE DATA ACQUISITION SOFTWARE
As a thank you for subscribing we offer you the ComDebug data logging and Com port trouble-shooting software for free. Log data over RS232, RS422, RS485 or Modbus. Also included is a free month's trial of the Windmill 7 logging, charting and control programs.
SUBSCRIBING OR CANCELLING SUBSCRIPTION Visit https://www.windmill.co.uk/newsletter.html and add or remove your e-mail address.
Windmill Software Ltd, PO Box 58, North District Office,
Manchester, M8 8QR, UK
Telephone: +44 (0)161 833 2782
Facsimile: +44 (0)161 833 2190
E-mail: [email protected]
Subscribe to Monitor
Tip: For a speedy response, when using Google+ comments alert us by adding +Windmill Software