If is send this(11 00 00 00 B6 00 00 00 C7) hexadecimal data to the machine with the program COM port toolkit, then i get the hexadecimal code that I want. But this program doesnt want to read.
It says: Overload resolution failed because no accessible 'Read' accepts this number of arguments
this error is in the error list.
I use Visual Basic 2010
Public Class Form1
Private Sub btnread_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnread.Click
Try
soladin.Open()
Catch ex As Exception
MessageBox.Show("Controleer of de Soladin verbonden is met de computer zijn seriële poort COM 1", "Fout!")
End Try
Try
Dim soladinTX As Byte() = {&H11, &H0, &H0, &H0, &HB6, &H0, &H0, &H0, &HC7}
soladin.Write(soladinTX, 0, soladinTX.Length)
[COLOR="red"][U]txtread.Text = soladin.Read(Int32.Parse(9))[/U][/COLOR]
MessageBox.Show(soladin.ToString)
soladin.Close()
Catch ex As Exception
MessageBox.Show("Fout", "fout")
End Try
End Sub
End Class
I hope tou can help me with my problem, thanks.
Edited by egetunks, 18 February 2011 - 04:27 AM.


Sign In
Create Account

Back to top









