I'm writing a software in VB.net to communicate with an external device with modbus
I have a problem while reading data received from the device , to put it in example , using sp1.ReadByte()
the data sent from the device is this :
05-03-04-00-00-01-9F-FE-0B
Update : to read data i used this code
Dim reponse As Byte() = New Byte(5 + (2 * nombre_registrre - 1)) {}
For i As Integer = 0 To response.Length - 1
response(i) = CByte(genvision.sp1.ReadByte())
Next
but receive this
05-03-04-01-9F-FE-0B
I want to read it byte by byte even those 00 00 ,
Thank you so much for your help