Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems sending I-Q data to Agilent ESG over GPIB

I am fairly new to Labview and need some help...

I am trying to use an Agilent E3644B ESG to generate a signal from I-Q data arrays.  I am having trouble getting the ESG to accept the I-Q data that I try to download to it. 

The ESG manual calls for unsigned, offset (binary) format.  Each data point have to be a 2-byte integer (each data point uses 14 bits or 2 bytes, with 2 bits unused, and have a value of 0 (negative ESG full scale output) to 16383 (positive ESG full scale output).  The ESG needs a minumum of 16 points (32 bytes of data) to play the waveform.  The I and Q arrays are sent separately.

I keep getting either of these two errors at the ESG:
1)  invalid block data
and
2)  invalid separator

I believe the problem is caused by converting the I or Q byte arrays to strings when writing to the GPIB Write function.  I am thinking the data is being changed during the conversion.  Does anybody know what exactly needs to be done before sending the data to the GPIB Write vi?
0 Kudos
Message 1 of 8
(4,050 Views)
Would you mind posting your code, or at least the part that deals with the conversion?  The code will answer most of the questions I have.

Thanks,
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,020 Views)
Here is the program.  I-Q data is simulated by creating two arrays of random data and then scaled to be between 0 and 16383, as called for by the ESG manual.   You can also manually input the I-Q data as a string in the VISA Write command.  The ESG model is E4436B, not E3644B...sorry about the typo.
Message 3 of 8
(4,020 Views)
Have you looked in the driver here for some clues. A quick look didn't find anything specific to writing I-Q values but there is one function called hpesgdxx Data Load that takes an I16 array and writes it to memory that might be similar to what you need.
Message 4 of 8
(4,012 Views)
It looks like you are doing the conversion correctly.  You can view the output strings in either "hex" or "'\' codes" display to better see what data values are being sent in the arrays.  We do have an existing LabVIEW driver for your instruments, as Dennis pointed out.  It may be beneficial to use what's already been written instead of having to rewrite it yourself.  In either case, looking at the code for the driver will be most helpful in writing your own code.

Good luck,
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 5 of 8
(3,998 Views)
Thanks for the help, the Data Load driver had some code that pointed me in the right direction.  I can get it to download data now with no errors.  Thanks!
0 Kudos
Message 6 of 8
(3,991 Views)
gtu89rx7,
 
Does your problem arise because your instrument doesn't like CR LF?  I'm curious.
0 Kudos
Message 7 of 8
(3,986 Views)
No, i was not having any problems with carraige returns or anything like that (as far as i know...), the attached program from the hpesgd driver answered my question about what kind of data the ESG is expecting.
0 Kudos
Message 8 of 8
(3,970 Views)