By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,190 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,190 IT Pros & Developers. It's quick & easy.

CAS scale indicator programming

P: 1
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
Expand|Select|Wrap|Line Numbers
  1. Private Sub receivedtext(ByVal txt As String)
  2.         If Me.screen.InvokeRequired Then
  3.             Me.Invoke(New settextcallback(AddressOf receivedtext), txt)
  4.         Else
  5.             Dim parts = txt.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
  6.             If parts.Length > 3 Then
  7.                 screen.Text = parts(3).Replace("kg", "")
  8.             End If
  9.         End If
  10.  
  11.     End Sub
May 20 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.