LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spectrum Analyzer (Keysight PXA) get Trace using binary format

Solved!
Go to solution
  1. The drivers uses ASCII format. I need binary format. Many points and many traces.
  2. Several posts touch upon this subject but don't give a good answer.
  3. I've attaced my code.
  4. Visa read binary block data. vi was lifted from another post but I can't find it to give credit.
  5. Byte array to trace.vi has default data that was taken from my PXA spectrum analyzer. I stole the basic idea but made it much more pretty. It needs to convert 8 bytes to a double but it doesn't.
  6. Because I am using Windows I am using ":FORM:TRAC:DATA %s;:FORM:BORD SWAP;" where %s is real,64 to get the binary data. Don't know if SWAP is required.
  7. I have a general idea how this works but the details escape me. MSB, LSB swapped and normal. My eyes are glazing over.

Thanks for any good help.

 

Norm

 

0 Kudos
Message 1 of 5
(4,270 Views)

Hi Norm,

 

What sort of problem are you running into in your code? Are you receiving an error, or unexpected data somewhere?

Tom D.
Staff Software Engineer
NI
0 Kudos
Message 2 of 5
(4,228 Views)
Solution
Accepted by topic author Viper

Try this. It works well for me.

Download All
Message 3 of 5
(4,221 Views)

You can save a little processing time if you delete the "String to Byte Array" from the SubVI and the correstponding "Byte Array to String" in the main VI. Just leave the binary block as a string, then Typecast to SGL, then convert to DLB.

0 Kudos
Message 4 of 5
(4,217 Views)

@jamiva wrote:

You can save a little processing time if you delete the "String to Byte Array" from the SubVI and the correstponding "Byte Array to String" in the main VI. Just leave the binary block as a string, then Typecast to SGL, then convert to DLB.


Thanks for your help, It's working great and it did save some time. I have reposted here in a single vi with conversion to a trace [(x,y)].

 

Thanks jamiva!

 

Norm

0 Kudos
Message 5 of 5
(4,200 Views)