ā06-16-2014 09:25 AM
Their driver has the string simply reversed and type-casted into a long integer, and it's output doesn't seem to be accurate.
ā06-16-2014 10:07 AM
The manual isn't very clear as to what the data should look like. Since it has some character commands, and ends with a CR LF has a terminator, I'm going to assume that the data is sent as 8 hexadecimal characters (letters "A"-"F" digits "0" - "9") rather than has a hex byte where 4 bytes make up the integer in a normal binary format. When there is a chance that the ASCII characters of CR (hex 0D) and linefeed (hex 0A) would show up in the data and be misinterpreted as the termination characters.
Do you have an example of what a string actually looks like?
Try using Hexadecimal string to number on two hexadecimal characters at a time. Reverse the resulting array, and the typecast it to an I32.
ā06-16-2014 10:17 AM
Here's a screen shot of how the output looks like.
ā06-16-2014 10:40 AM
The screenshot is missing.
ā06-16-2014 10:48 AM - edited ā06-16-2014 10:49 AM
@rosh wrote:
Their driver has the string simply reversed and type-casted into a long integer, and it's output doesn't seem to be accurate.
Actually, the string is reversed twice in the driver. I'm not asking why. but the string data is read, reversed sent to the next subvi and reversed again cast to U32 and multplied by 1e-16.
ā06-16-2014 11:43 AM
Here's the screenshot of the string outputs
ā06-16-2014 11:46 AM
Can you post it as a VI, or a screen shot with hex display turned on?
This is getting more confusing because it looks like you have a total of 8 bytes there after all. (And they do look like actual binary values rather than the HexCharacter representation. Which would be a bad idea for a communication protocol that relies on the ASCII characters of CR and LF to terminate a string.
ā06-16-2014 01:09 PM
Bill, They do some fairly odd things in the driver to account for those \r (It really isn't robust)
ā06-16-2014 02:12 PM
Here's the vi. According to the manual the output is in hex format.
ā06-16-2014 02:15 PM