LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert an array of bytes to single precision (4 bytes at a time) IEEE754

I haven't had a chance to try Lynns VI yet due to other priorities here.

I don't know about the scaling factor. The number that I get is supposed to be a voltage (in the csv file). On the instrument, the options are all for displaying the data in different ways (for example if you are using an accelerometer you have to enter the scaling factor into the instrument.

But, this is all for display only. When you read the actual data from the buffer, it will always be just a voltage reading from that particular channel. (At least that's what they tell me).
And evidenced by the fact that their Viewer works every time, I believe that they're telling me the truth. 🙂

So, if there is a scaling factor added, I would guess that information would have to be in the header somewhere.

Thanks again to everyone posting here. This has been a thorn in my side lol.

 

Jeff

0 Kudos
Message 21 of 27
(1,895 Views)
Here is a LV 7.1 version.

Lynn
0 Kudos
Message 22 of 27
(1,890 Views)
Hi Lynn,
      Thank you for the 7.1 version.  There are several gotcha's - like the file Read has no "count".  This can't be the version that produced erroneous results: it can't produce any results! Smiley Wink  Probably don't want to convert EOFs and the other (two) problems become clear if one looks at SR785Convert.vi
 
Cheers.

Message Edited by tbd on 07-25-2006 09:31 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 23 of 27
(1,875 Views)

Dear sirs,

                   Thanks for the help of yours from my side also, cos i just have got the solution in one time, by viewing this post, thanks very much.

Thanks,

Nishant

0 Kudos
Message 24 of 27
(1,838 Views)

Hey, jeff

 

I think I've faced the same problem with you. From your files I notice you've read the binary data from the capture buffer of SR785 spectrum analyzer, right?

 

I'm using the similar product SR780. The same problem happens:

 

I can get the captured buffer binary data, however I can't convert these binaries in to floating numbers.

 

I've learned from the block diagram of  sub IV "Query diaply data" and try to use the same method to convert 4-byte binary into floating numbers.

 

However it gives the wrong answer. I've tried to pass the headerlines but it doesn't helps.

 

Do you have any good solution for this probelm now? 

 

I appreciate for you giving me any suggestions.

 

Thanks!

0 Kudos
Message 25 of 27
(1,123 Views)

Sorry to say I never did solve this 😞

We simply stopped using the SRS and have moved on to using a 9234 for our sound/vibration measurements.

Good luck to you if you solve it, feel free to post the solution here!


Again, sorry I can't be of much help.

0 Kudos
Message 26 of 27
(1,008 Views)

@chiangburger wrote:

 

Do you have any good solution for this probelm now? 

 


Since this is a 10 year old thread, a lot if things have probably changed. Why don't we start over after you attach a typical received string (e.g. pasted into a string diagram constant of a simple VI) and tell us roughly what you expect as output. Typically you need to trim the right header length and then unflatten to a SGL array, possibly selecting a different byte order (little vs big endian). All this should be quite trivial once we have something to play with.

0 Kudos
Message 27 of 27
(1,002 Views)