Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

[Solved] Weighing software using VB.Net

Status
Not open for further replies.

carlo00002

Novice
Advanced Member
Messages
34
Reaction score
0
Points
26
Good Day po sa lahat! :salute:


Need ko po ng help dito sa ginagawa kong program na feature sa aming gagawing big software. Im using VB2013.

Im using Weight Sensor & Controller by e-Gizmo, Here's the actual hardware that i am using:


View attachment 204537 View attachment 204540


Kung need nyo po ng manual tungkol sa device, dito lang po: https://docs.google.com/file/d/0BxdLxDCD6HidMEs4ZVBRRWN0WVU/edit


Ngaun, eto po ang problem ko:
Nakukuha ko naman ung data from device thru RS232, ang problema ko lang po ay napakadami ng data na lumalabas. Saka gusto ko dn po tanggalin ung ES na nasa last nung digits​


Here's a simple program i made with the problem:

View attachment 204541

Ang gusto ko po gawin ay mag input ng data from the device tapos mag aauto change ung label to the outputted data.
Parang ganito po ung goal ko na gawin:


Eto po ung code ko:

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
.Close()
.PortName = "COM3"
.BaudRate = 9600
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.DtrEnable = True
.RtsEnable = True
.ReceivedBytesThreshold = 1
End With
SerialPort1.Open()
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


Nasa Attachment po ung program kung gusto nyo makita.

Hopefully po may makatulong sakin, Thanks in Advance! :)



 

Attachments

  • 4co1dVT.jpg
    4co1dVT.jpg
    935.2 KB · Views: 3
  • gG7uYFO.jpg
    gG7uYFO.jpg
    579.1 KB · Views: 3
  • 1.png
    1.png
    5.7 KB · Views: 11
  • Program.zip
    78 KB · Views: 14
Last edited:
Status
Not open for further replies.
Back
Top Bottom