Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Classic Visual Basic (VB 6 or earlier) » COM/ActiveX » digital weighing scale monitoring problem...


digital weighing scale monitoring problem...Expand / Collapse
Author
Message
Posted 11/14/2010 4:01:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/15/2010 8:49:07 AM
Posts: 2, Visits: 3
I have a digital weighing scale I need to connect to the PC using RS232 communication port. Every time I weigh an object, automatically the result/weight will display in the the texbox control in Visual Basic Application
I use to receive data via a timer for continuous looping sequence output to a textbox. Things do goes bad, as it flicking all the way. I using a indicator from AD series which read data from load cell of a truck weight bridge. It there's any way to stop this flicking without effecting the continuous loop?
can any one help me ???
vb6 or vb.net any platform no problem please help me i want just solution
Post #29790
Posted 11/14/2010 5:56:29 PM
Forum God

Forum God

Group: Moderators
Last Login: Yesterday @ 7:09:29 PM
Posts: 1,082, Visits: 9,608
What does your timer code look like and what is the timer interval set at?
Post #29791
Posted 11/15/2010 8:52:58 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/15/2010 8:49:07 AM
Posts: 2, Visits: 3
Private Sub Timer1_Timer()
If MSComm1.PortOpen = False Then

MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True

End If
MSComm1.InputMode = comInputModeText
strabc = MSComm1.Input
text1.text= strabc

End Sub


this is my code and timer interval is 100
when i change the timer interval to 1000 it will show the full text but take delay not real time
Post #29792
Posted 11/15/2010 1:52:31 PM
Forum God

Forum God

Group: Moderators
Last Login: Yesterday @ 7:09:29 PM
Posts: 1,082, Visits: 9,608
See if this helps

Private Sub Timer1_Timer()
    If MSComm1.PortOpen = False Then
        MSComm1.Settings = "9600,N,8,1"
        MSComm1.InputLen = 0
        MSComm1.PortOpen = True
    End If
    
    MSComm1.InputMode = comInputModeText
    strabc = MSComm1.Input
    'Only update the textbox if the valus has changed
    If strabc <> text1.Text Then
        text1.Text = strabc
    End If
End Sub
Post #29793
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod, Mark, Keithuk

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 2:07am