From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-22-2016 12:25 PM
Hello guys :
I've faced a probelm on converting the 4-byte IEEE binaries into floating numbers.
I've got the 4-byte binary data from spectrum analyzer SR780 capture buffer.
Fig1 Block diagram of VI "Upload Capture Buffer"
.
The description of "CGET" command in the user mannual of SR780
The captured data is 100mV 10Hz sine signal. The whole capture length is about 5 seconds.
While I've faced a probelm while I convert the 4-byte IEEE floating number into floating numbers.
Fig2 Block diagram of my VI, try to convert 4-Byte binary to floating number
The main conversion process is learned from the block diagram of another sub VI "Query display data"
(this is one of the SR780 GPIB driver sub VI) through GPIB interface.
Fig3 Block diagram of VI "Query display data"
Actually I can already see the periodic behavior of the obtained binary data. The period is 10Hz, too. However I cannot get correct waveform.
Fig4 the periodicity of the binary numbers
I just cannot figure out why I follow the same process while I get the wrong result?
The attachments are the binary data files, the string interpretation of them and my VI try to figure it out.
I'll appreciate If anyone give any suggestion.
Thank you!
03-22-2016 01:17 PM
Interesting that they are type casting 4 bytes into a Double, which is actually 8 bytes. You are type casting to a Single.
03-22-2016 10:21 PM
Hey, crossrulz:
Thank you so much for your reply.
I notice this. However it makes no difference whether I change the converting result as Single or Double.
12-30-2020 07:09 AM
Hi,
I realized it was 4 years ago but did you manage to get a proper output from the capture buffer?
I'm facing the same problem.
Thanks
Naama