Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing .csv files from a R&S Spectrum Analyzer

Solved!
Go to solution
Solution
Accepted by topic author johnjoe

Here's pictures!Querry "MMEM:DATA?" and read it all back.Querry "MMEM:DATA?" and read it all back.

 

Parse header for data block sizeParse header for data block size

 Hope that helps.

Message 11 of 13
(1,666 Views)

Thanks a lot for the pictures.  Unfortunately I've never used LabVIEW before, so I'm not sure what I'm looking at.  The version of NI-VISA that I am using does not have a query function, is this similar to a Write and Read?

0 Kudos
Message 12 of 13
(1,663 Views)

Yeah, a querry is a command sent to the instrument that will returna response.  In this case you write "MMEM;DATA?" and then you read it back.

 

To loosely translate the LabVIEW code..

1) they send query for the data.

2) they set the instrument termination char if need be

3) they parse header for the block size (that's the second image)

4) then read the data block-by-block in a while loop building up the file.until; no chars read, fewer chars than a full block, the termination character or file size is reached.

 

I'd look at their C# examples to see how they do similar.

0 Kudos
Message 13 of 13
(1,658 Views)