J
We are currently monitoring a balance (scale) that transmits 9600,8,no parity, no handshaking or XonXoff as a continuous stream of text spaced at about 0.11 seconds per transmission. We have a VB program reading that data using MSComm (under win2000 Prof). Depending on how we set a timer or counter, the database contains "skips" every 29 or 30 or so counts, each count supposedly a second.
We have flipped the skips from time errors (weight updates every count, but two seconds elapsed between counts every 30 seconds) to weight errors (time stream matches counts perfectly but weight stream repeats a reading every 30 seconds) and back several times by programing changes. The "skips" are easy to see in a spreadsheet made from the data file, as in Case one every 30 counts two seconds elapse between counts, and in Case two the "2" that showed up in the delta t column is a zero (0).
We believe that it may have something to do with buffer activity in MSComm, which essentially sleeps until the next second appears, thus is not processing the scale data in the interim. However, we poll the scale by spending "SI" when we want the data, which should bring fresh data, only 0.11 second old, at the worst, from the scale.
Can anyone tell me if we could be getting stale data from MSComm in this situation? So far MSComm is called inside the Private SUB that does the calcs and data handling
We need help!
Jim Hebbard
Florida
We have flipped the skips from time errors (weight updates every count, but two seconds elapsed between counts every 30 seconds) to weight errors (time stream matches counts perfectly but weight stream repeats a reading every 30 seconds) and back several times by programing changes. The "skips" are easy to see in a spreadsheet made from the data file, as in Case one every 30 counts two seconds elapse between counts, and in Case two the "2" that showed up in the delta t column is a zero (0).
We believe that it may have something to do with buffer activity in MSComm, which essentially sleeps until the next second appears, thus is not processing the scale data in the interim. However, we poll the scale by spending "SI" when we want the data, which should bring fresh data, only 0.11 second old, at the worst, from the scale.
Can anyone tell me if we could be getting stale data from MSComm in this situation? So far MSComm is called inside the Private SUB that does the calcs and data handling
We need help!
Jim Hebbard
Florida