- Messages
- 34
- Reaction score
- 0
- Points
- 26
Good Day po sa lahat!
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
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:
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
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
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!
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
Last edited: