02-17-2006 03:25 AM
The bytes do not represent numeric ASCII characters (0,1,2....9,A,B,....F) so you cannot use the string to number conversion VIs.
There is no way that we can tell how to interpret your binary data without a proper description of what each byte represents - it would be futile to even guess.
Again - surely you must have a manual for the device you are workiing with? If not, I would suggest contacting the manufacturer/supplier.
I'm not sure it helps at all, but I've attached a short program with which you can load the data file into LabVIEW and display each byte element in different formats (string,hex,decimal,binary).
Mark.
02-17-2006 07:38 AM
02-17-2006 07:50 AM
It sound like you have half an idea of whats in the binary data.
Do you have a protocol document that defines the information found in the binary data stream? If you do have that then please attach it if not too big.
02-17-2006 08:07 AM
02-17-2006 09:13 AM
02-17-2006 09:26 AM
If you want someone to tell you how to do the conversion, post the details on the protocol. This has been requested several times. There is no single "binary" format so the protocol information has to be provided in order for the conversion to make sense.
If you want to do it yourself, use the typecast function. Feed a string into the input. Wire a numeric constant to the type input. Pick a data type (i.e. U8) for this constant. See what comes out. If it makes sense, you are done. If it doesn't, try another data type. You've got a lot of data types that may or may not work. Do you understand now why providing the protocol is important?
02-17-2006 09:27 AM - edited 02-17-2006 09:27 AM
For ther last time......
There is no standard function that you can just pass 36 bytes to and generate a decimal number.
Computers usually store floating point numbers in 4 bytes (single precision), 8 bytes (double precision) and 16 bytes extended precision, or 1,2,4 or 8 byte integers - none of these binary formats is 36 bytes long.
Even if your 36 bytes represented several numbers, 36 does not appear to be an exact multiple of 8, or 16, etc.
Message Edited by Mark H on 02-17-2006 03:32 PM
02-17-2006 09:31 AM
Hi Dennis,
Just thought to mention - "protocol" is a term I would normally associate with comunication IO.
Data storage format, or representation, might be a better term, to avoid confusion?
Mark.
02-17-2006 09:56 AM
02-17-2006 10:48 AM