Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Communications (http://www.xtremevbtalk.com/-net-communications/)
-   -   Weighing software (http://www.xtremevbtalk.com/-net-communications/327502-weighing-software.html)

Hyadain 02-22-2015 01:40 AM

Weighing software
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:

Imports System.IO
Imports System.IO.Ports
Imports System.Threading
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
End With
Label1.Text = SerialPort1.ReadExisting() 'Dito po ung reading ng data from serial port

Timer1.Interval = 1000
Timer1.Enabled = True
sec = 0

End Sub

Private Sub readport()
Label1.Text = SerialPort1.ReadExisting() 'declaration po para ma call sa time tick
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Call readport()
sec = sec + 1
Label2.Text = sec
End Sub
End Class

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~!

All times are GMT -6. The time now is 04:41 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.