and sorry if this is not the correct place for this post.
If so, please redirect me to the appropriate place.
now to my problem.
I've been trying to read data from a device just like the one on the link http://www.tylertool.com/mi540to5diin2.html but i'm not getting anything from it, i'm using visual studio 2005 and serialnet, and the device connected to the com1 port.
I've been using this code to try to connect and get a read from the device:
while debugging the the following code the onread event doesn't do anything, it doesn't trigger at all
Code: Select all
Dim WithEvents PSTESTE As New SerialNET.Port Private licence As New SerialNET.License dim rsbuffer As String dimbuffermitu As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load PSTESTE.ComPort = 1 PSTESTE.BaudRate = 9600 PSTESTE.BufferSize = 8 PSTESTE.StopBits = SerialNET.StopBits.One PSTESTE.Parity = SerialNET.Parity.No licence.LicenseKey = "key" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try PSTESTE.Enabled = True Catch ex As Exception End Try End Sub Private Sub psteste_OEventMitu(ByVal Data As String) Handles PSTESTE.OnRead Try rsbuffer += Data If rsbuffer.IndexOf(vbNewLine) > 0 Then Analisadados(Me) End If Catch ex As Exception End Try End Sub Private Sub Analisadados(ByRef pf As Form1) Try Dim strbuffer As String = "" buffermitu = rsbuffer Catch ex As Exception End Try End Sub
help would be appreciated
thanks in advance