Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HP 33120A Arbitrary Waveform OutputBufferSize error

Hi,

I am trying to download 15000 (limit is 16000) data points onto the HP 33120A function generator as an arbitrary waveform. (via KPIB.m, a variation of GPIB.m).

I created the 15000-point waveform in MATLAB as a vector ranging between 1 and -1, and I am using the command "DATA VOLATILE, vector" where 'vector' is in the format '1,.75,...,-.35,-.9'. (correct syntax...checked it)

It works well with vector sizes less than about 400, but for some strange reason, if I create the vector any bigger, MATLAB gives me an error message:

??? Error using ==> icinterface.fprintf at 146
The number of bytes written must be less than or equal to OutputBufferSize-BytesToOutput.

The user manual tells me that I can supply from 8 to 16000 points per waveform, but apparently I can't get it to work...What could be the reason?
If OutputBufferSize is limited, how can I increase it?

Thank you.

Message Edited by jykim on 08-24-2007 02:20 PM

0 Kudos
Message 1 of 5
(5,717 Views)
Hi jykim,

It doesn't look like the problem is in the interface, but rather in the .m file.  Are you using any NI products in this setup?  I'd be happy to help troubleshoot those, but I'm afraid I won't be much help on the MATLAB side!
Chad B. » National Instruments » ni.com
0 Kudos
Message 2 of 5
(5,692 Views)
Hi,

I just figured it out. All I had to do was manually increase the OutputBufferSize (default is set to 512 from the MATLAB control toolbox) in the GPIB (KPIB.m) file (set io.OutputBufferSize = 16000;) to a value greater than 16000 to receive bigger blocks of data.

Thanks anyways for your concern.

Message Edited by jykim on 08-27-2007 05:04 PM

Message 3 of 5
(5,687 Views)

Hi,

 

I use a generator HP33120A and I want to use it with Matlab.

 

I want to create a burst of 5 cycles (sinusoidal) with a frequency of 300 kHz and an amplitude of 10 V.

I use kpib.m but I don't find the function "Burst"... Have you any idea ?

 

Regards.

 

Damien

 

 

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

Damien,

This thread is really old (the last post was 3 years ago), so most people probably will not see your posting.  I would recommend starting a new thread for your question.  Also, this forum is dedicated to National Instruments hardware and software, and it doesn't sound like you are using any NI products, so you might have better luck getting answers if you posted to a Matlab forum.  

 

Cheers,

 

- Christina

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