I have been trying to use the SerialEx DLL to download data from a proprietary datalogger. I have done it in the past to a PC but after a couple of hours of floundering in the dark, I have come to the conclusion that it needs a better man than I to get the thing going on a device.
The data is sent in binary form. The relevant bits from the datalogger manual are: "After receiving an S from the PC, the instrument will transmit 32 signed integers as 64 bytes and wait for the next character S from the PC. .... All data are output in binary (signed integer) format, 2 bytes per integer, MSB first."
I know I can get data, I send an S and see 'stuff' on the device - but it is not in a format that I can equate to the description in the manual or past experience with the same data on a PC. I have attached a screenshot of my test program showing what comes in.
Somewhere at the very start of this datastream must be the integer 32700 followed by 1, 1, 20, 0, 100.
The lines in the screenshot are produced by:
I would be most grateful to anyone who can make any useful suggestions about how I can read this data.
David.
The data is sent in binary form. The relevant bits from the datalogger manual are: "After receiving an S from the PC, the instrument will transmit 32 signed integers as 64 bytes and wait for the next character S from the PC. .... All data are output in binary (signed integer) format, 2 bytes per integer, MSB first."
I know I can get data, I send an S and see 'stuff' on the device - but it is not in a format that I can equate to the description in the manual or past experience with the same data on a PC. I have attached a screenshot of my test program showing what comes in.
Somewhere at the very start of this datastream must be the integer 32700 followed by 1, 1, 20, 0, 100.
The lines in the screenshot are produced by:
B4X:
Buffer()=com.InputArray
For i = 0 To ArrayLen(Buffer())-1
ReceivedString=ReceivedString & Chr(Buffer(i))
Next
ReceivedString=ReceivedString & " - "
For i = 0 To ArrayLen(Buffer())-1
ReceivedString=ReceivedString & Asc(Buffer(i))
Next
listbox1.Add(ArrayLen(Buffer()) & "[" & ReceivedString & "]")
David.