Alright, I'm pulling hair out of my head trying to figure this out.
I have Data coming in through a serial port and it consists of pretty much
all numerical values except for a few begining response characters. Its
a Load Cell which spits out Tension in Pounds. I'm making a simple terminal
program with the ability to log the Incoming Data for record keeping and data
plotting. I want the incoming Tension to be displayed on the screen real time.
I can get it into a text box and have it scroll indefinetly as it updates the data,
but I'd like to keep it localized in one Label. I can display it in the Label but
it wants to scroll down as it comes in. I want to keep it refreshed in one spot if that makes any sense. Heres what I have thus far. It will put it in the Label but wants to scroll like in the textbox.
For example if I send #00F0 followed by a carriage return it replys back with whatever is displayed on the Screen
which usually is the tension.
it says "01TK 00.074 LBS" no quotes.. for a reply.
I'm assuming it needs to be stripped down to just the numeric characters first.
'here is what gets sent to the Load Cell to tell it to output data fast as it can to the serial port.
Private Sub btnTransmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransmit.Click
SerialPort1.Write("#00WI1" & vbCr)
'Here is the Serialport incoming
Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim msg As String
msg = SerialPort1.ReadExisting
lblDisplay.Text = "" & lblDisplay.Text & msg
Any input on how I can go about doing this would be greatly appreciated.