CAS scale indicator programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mustafa1990
    New Member
    • May 2017
    • 1

    CAS scale indicator programming

    hello
    I hope my message find you well
    I have problem with programming code by visual basic 2005 to make a program to read the data that come from the serial port of the scale weight indicator the code below split the data as I want only one time.
    Can you help me please with additional code to make the reading update from the indicator all of the time.
    below the picture for the serial port reading.
    https://ibb.co/d2xqav
    please help me if you can
    Code:
    Private Sub receivedtext(ByVal txt As String)
            If Me.screen.InvokeRequired Then
                Me.Invoke(New settextcallback(AddressOf receivedtext), txt)
            Else
                Dim parts = txt.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
                If parts.Length > 3 Then
                    screen.Text = parts(3).Replace("kg", "")
                End If
            End If
    
        End Sub
Working...