Dealing with Devices that Output Data Continuously

There are two main types of instruments that transmit data: continuous transmission and burst transmission. In continuous transmission, data is sent constantly, while in burst transmission, multiple data values are sent in quick succession over a short period of time.

For instance, older electronic balances were designed to continuously transmit data to a digital display, allowing users to observe the changing weight readings. These balances typically transmit up to 10 weight values per second and don’t offer a way to stop the data flow. However, newer balances can be configured to transmit data only when prompted through the serial port or by pressing a “Print” button. This method is recommended when using a balance with WinWedge. Additionally, there are other devices such as tensile strength testers or friction peel testers that transmit a large number of data values during a test conducted over a short period of time.

Although you may not be able to configure the device to send less data, you may be able to configure WinWedge to ignore enough of the readings so that you are not overwhelmed with data.

To achieve this, you could configure WinWedge to treat multiple data records as a single long record with multiple fields, then ignore unneeded fields. Most electronic balances simply transmit a weight reading followed by a carriage return and a line feed character. Normally, you would define the “Input Data Record Structure” with “Carriage Return or CrLf Received” as the “End of Record Event.” But to configure WinWedge to send multiple weight readings in a single record, you might select “Multiple Delimited Data Fields” as the “Record Structure” and set the Carriage Return (ASCII 13) as the delimiter. Then if you were to specify 30 as the “Maximum Number Of Data Fields” and selected “Ignore This Field” as the filter for Fields 1 through 29, WinWedge would filter out 29 out of every 30 data readings transmitted by the balance. If the balance sends ten readings per second, WinWedge will only pass a single reading to another application once every three seconds.

Another way to control continuous data is to configure WinWedge so that it is initially suspended when you first activate it (select the “Activate Initially Suspended” option from the Activate menu). If WinWedge Activated but is suspended, it will continue to input serial data into its input buffer however it will not pass any data to another application until you resume it. Next, you could define one hot key that resets WinWedge and then define another hot key that resumes WinWedge for one data record. You can even assign both hot key actions to the same hot key keystroke so that both the reset and the enabling for one record is accomplished with the same keystroke. After you activate WinWedge it will not do anything until you press your hot key. When you press the hot key, WinWedge will reset itself (causing it to flush its input buffer) and then it will enable itself for one data record. After the next record is received, WinWedge will suspend itself again.

If you use the above technique, make sure that you select a “Start of Record Event” that will reliably determine the beginning of each data record (i.e. do not select “Any Character Received” as the Start of Record Event) . The reason for this is because if the device is in the middle of transmitting a data record when you press your hot key, the reset hot key action causes WinWedge to clear out its input buffer thus chopping off the first half of the data record being received. If you had “Any Character Received” selected as the Start of Record Event, the second half of the data record would be received as if it were a complete record. Choosing “Special Character Received” as the Start of Record Event and using the Line Feed (ASCII 10) as the “Special Character” would be a good choice in this situation. Since the device is transmitting a continual stream of data records with a carriage return and a line feed at the end of each data record, you could just as easily think of the line feed as the start of each record and the carriage return as the end. To remove the line feed and the carriage return from each record, you can use either the “Pre-Transfer Character Translation Table to translate them to “Nul” or you can apply a “Numeric Data Only” filter to the field(s) in WinWedge that contains them.

Contact Us