From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-22-2011 09:44 AM
You are using the string subset function. Good. Except your values should be 8 and 8 because the index is zero based (so #9 in your image is actually byte #8).
Then you are using Decimal string to number. Perhaps you want to use Fractional string. But you shouldn't be coercing it into a U8 indicator because that is not big enough to hold whey might be 8 decimal digits. And for your waveform chart, you want to wire that from the value coming from the Decimal string conversion, not before that. And you do not want the string array to U8 function.
08-22-2011 09:44 AM
You are doing most things incorrectly. First, you are not writing the hex commands correctly. You are sending the characters '0', 'x', '2, and '7'. Right click on the constant and select 'Hex Display'. Second, you are not converting correctly. The function you want is probably a typecast.
08-22-2011 10:40 AM
Here's what I have now. Not sure what you mean about the typecast - I'm attaching the vi. Thanks again.
08-22-2011 10:46 AM
Your VI doesn't match your latest screenshot.
08-22-2011 11:07 AM
Sorry - too many balls in the air.
08-22-2011 11:15 AM
So how is it working now?
Why are you taking the 10th, 11th, 12th, byte of your raw string (string subset 9 3) and sending that to the Write to Spreadsheet file?
08-22-2011 11:29 AM
There is a 3-byte string that represents the units (e.g. - lbs) - currently just a placeholder, until I find out how to utilize the string. I'm still wrestling with the data piece - currently displaying a value of 0 (meanwhile, the scale is reading 45.785g on the scale's display).
08-22-2011 11:42 AM
First, attach the manual for the instrument. There is just guessing going on about how to convert your data. Second, run the VI until you see something in the raw data indicator. Select Edit>Make Current Values Default. Save the VI. Attach the saved VI along with the reading of the instrument. Need that to test the conversion of the VISA Read string.
An frankly, I don't see how you could ever have 405 bytes actually read. You have the termination character enabled and according to that small section of the manual, the instrument is appending a CR/LF as a term character. Aside from the very first read, you should always have 22 bytes - no more and no less.
08-22-2011 12:00 PM
Thanks Dennis,
The value read on the instrument is 45.770g. I've attached the saved vi (following the Edit\Make Current Values Default selection), and instrument manual.
08-22-2011 12:03 PM - edited 08-22-2011 12:03 PM
Ignore. Was a bit late posting it.