02-22-2015, 01:40 AM
Join Date: Feb 2015
Good Day to everyone!
I was developing a digital weighing scale for the additional features for our thesis. Now i am having a problem in my program, the serial port was working just fine but i receive many data from it. I am using an RS232 Weighing Sensor by e-Gizmo. Documentation about the hardware is here: https://docs.google.com/file/d/0BxdL...BRRWN0WVU/edit
Here's the actual hardware that i have:
In my simple program (just to see what my device is sending me) im having this output:
I just want the label consistently change when i recieve data from my device like on this video:
Now Here's my code:
Public Class Form1
Dim incomingByte As String = ""
Dim sec As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With SerialPort1 'Connection ko po sa serial port
.PortName = "COM3"
.BaudRate = 9600
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.DtrEnable = True
.RtsEnable = True
.ReceivedBytesThreshold = 1
Label1.Text = SerialPort1.ReadExisting() 'Dito po ung reading ng data from serial port
Timer1.Interval = 1000
Timer1.Enabled = True
sec = 0
Private Sub readport()
Label1.Text = SerialPort1.ReadExisting() 'declaration po para ma call sa time tick
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
sec = sec + 1
Label2.Text = sec
I am using Visual Basic 2013 for my program.
I hope someone can help me, im so desperate to finish this program.
Thanks in Advance~!
Last edited by Flyguy; 02-23-2015 at 01:46 AM.