Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can not send over 8192 bytes to Ag33220a via ethernet

when using NI Visa and my own ethernet-based VI to send waveform data to an Agilent 33220A, the Visa Write subVI generates an error if the waveform data is larger than 8192 bytes.
when using same VI on same machine with Tektronics TekVisa, the VI works fine.  is there a byte limit with Ni Visa when transferring data over ethernet?
0 Kudos
Message 1 of 10
(4,887 Views)

Hello,

Can you post a screenshot of the error? I initially suspect one of two things here:

1. Perhaps the operation is timing out due to the large record size, in which case we can increase the timeout value (see the Timeout parameter of the VISA Open function under VISA Advanced).
2. The VISA buffer is too small, in which case we'll need to increase the buffer size (see the VISA Set I/O Buffer Size function under VISA Advanced -> Interface Specific).

Also, there may exist a driver for that instrument, which presumably will have taken these large record read/write scenarios into account. For existing drivers, the best places to search are:
a). ni.com\idnet
b). the manufacturer's website.

Ok, definitely get back to me if you continue to have trouble with this!

Thank you,


Best Regards,

JLS
Best,
JLS
Sixclear
Message 2 of 10
(4,880 Views)
If you are going to be transmitting large amounts of data I would recommend that you call VISA Set I/O Buffer Size and set the mask to 48 (this will set the receive and transmit buffer) and set the size to 8192 or the largest packet you want to write/read.

-Josh
Message 3 of 10
(4,862 Views)

well, we're tried all the suggestions regarding the settings in NI-Visa and, unfortunately, still have the same problem.

the error kicked out by the Visa write VI when trying to send more than 8k bytes of data is:

Error -1073807239 occurred at VISA Write in ag33220A-WRITE.vi->MyWaveformLoader.vi

Possible reason(s):

VISA:  (Hex 0xBFFF0079) The protocol specified is invalid.

 

i appreciate the suggestions and welcome any more anyone might have.

 

 

0 Kudos
Message 4 of 10
(4,855 Views)
Hello,
 
Please post a simple example of your code; something with a sequence of operations like:
 
1. ag33220A Initialize
2. VISA Set I/O Buffer Size
3. ag33220A Configure Measurement
4. ag33220A Take Measurement (this is the reading part)
5. ag33220A Close
 
If you get the error with something simple like this, please post the code and be sure to indicate which VI generated the error.
 
Ok, I look forward to your post so that we can get to the bottom of this!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 5 of 10
(4,852 Views)
Hi,
I'm working on the project with rfagerqu and the new circuit is attached.  It gives the same error as the old circuit: -1073807239 (this protocol is not valid)  in VISA Write.vi.
0 Kudos
Message 6 of 10
(4,846 Views)
Here is a similar discussion a few boards over:

http://forums.ni.com/ni/board/message?board.id=170&message.id=87883&requireLogin=False

Might also try another serial driver if you are currently using onboard serial ports.


0 Kudos
Message 7 of 10
(4,831 Views)
Hello,
 
That code won't take long to run in highlighted execution; does the error occur in the buffer size setting VI or the write VI?  Perhaps it occurs before that?  If it occurs in the VISA Write function, can you try writing the string (presumably a large string) in pieces?  This should be functionally the same, and may overcome the issue you are having trying to deal with such large buffer sizes.  Also, does in the instrument on the other end have the ability to use flow control (either HW or SW)?  If so, you can try using either variety to see if this resolves the error.  Perhaps the underlying driver which VISA is calling into for your serial port (windows I imagine) cannot pass the buffer overflow error appropriately.  This would not be an overflow of the VISA buffer, rather of the driver or hw buffer; as noted in the link to the other forum posted above, NI-VISA should handle buffers of 32K routinely.
 
Ok, if you can respond to any of the questions above (some by running your program, others by changing your code and possibly instrument settings - if possible) I think we'll get a better idea for what's causing this error to occur!
 
Thank you and I look forward to your reply!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 8 of 10
(4,812 Views)
I am also having this problem with my AG33220A. Was there any resolution to this issue?
 
 
0 Kudos
Message 9 of 10
(4,744 Views)

i was finally able to get the VI to send >8kb waveforms on both computers i have running with an Agilent 33220A.

the first system uses WinXP pro and all i had to do there was load the Agilent Visa with the NI Visa already loaded.  the Agilent Visa took over control and everything worked just fine.

the second system uses Win2000 and i had to completely uninstall the NI Visa, then load the Agilent Visa to get proper waveform loading.  the only side effect on both was that i can't get my aliases to show up in the VI--the full TCP/IP addresses for the 33220A are all that show up in the Visa Session window.  but other than that, everything works just fine now.

0 Kudos
Message 10 of 10
(4,729 Views)