We have a C++ application that has been in use for a long time. One of the things this application does is interface with a Rice Lake UMC555 scale. Recently, we have upgraded one of the computers this applications runs on and have started seeing intermittent problems. Here is a description of the problem:
Occasionally, when the user clicks the "Scale" button, the application reads and displays an "old" data value from the COM port (this is typically the prior weight that was on the scale). The scale display shows the correct weight on the scale's display. If the user clears the value and clicks "Scale" again, then the correct value is read and displayed.
Here is a summary of how the application is reading from the port:
When the "Scale" button is pressed, the application reads up to 255 bytes from the COM port. Then another method parses the buffer to extract the weight.
I am not sure how COM ports work. Does old data get buffered?