Home > Software engineering >  About VB continue to obtain electronic scale data and display in the text box
About VB continue to obtain electronic scale data and display in the text box

Time:09-19

Electronic scale should be sending data automatically and continuously,
Electronic scale with serial debugging assistants received data is as follows:

How can the lable control used in continuous display weight below:


I write my own program like all ST 8.447 g data access to all come over, what I want is only a 8.447

Please everyone help me to write the program, and thank you very much



CodePudding user response:

Try this if you want to
 
As the String Dim a, b As String
A="ST 0008.447 g
"B=Format (Trim (Replace (Replace (a, "ST", "")," g ", ""))," 0.000 ")
MsgBox b

CodePudding user response:

 Dim a, b 
A="ST 0008.447 g
"B=Val (Mid) (a, 5, 8)
MsgBox b

CodePudding user response:

 Dim As a String 
A="ST 0008.447 g
"Label1=Val (Mid (a, 5))

CodePudding user response:

The building Lord you do get all the data so can stick source it for me
  • Related