AnsweredAssumed Answered

Download arb waveform with more than 64k points using MATLAB

Question asked by etiennetonnelier on May 10, 2011
Latest reply on Jun 10, 2011 by lhornburg
Hello,
I use the arbitrary waveform generator 33522A, with MATLAB
and I am trying to load arbitrary waveforms with more than 64,000 points.

I read the topic called  " 33521A LoadArbWaveform fails with more than 64k points" and it helped me a lot.
I have read lots and lots of posts and I have not seen any binary solution for matlab.


I assume the best way is to send bytes of type 'uint32'  with the binblockwrite() function of MATLAB.

This works, but because binblockwrite() is not following the IEEE 488.2 protocol, I had to determine each bit by hand :
The bits 1 to 16 seem to be useless.
The bits 17 to 24 are the mantissa.
The bit 25 is the sign bit.
The bit 26 always generates the error : "+881 Arb: Values are out of range" when it is set.
The bits 27 to 30 must be set to have a signal with an amplitude different from zero.
The bits 31 and 32 are kind of an offset that I don't really understand.

This comes from my personal experiments.
Could you make precise what I just wrote, particularly the values of the offset ?
Do you have any official documentation on this ?
I suppose the encoding is different from an AWG to another, so do not forget my AWG is 33522A.


Here is a code segment to help you send some binary bits in MATLAB :

>>'Lets send a binary waveform'
>>set(obj1, 'EOIMode', 'off');
>>a = uint32([62 63 62 61 62 62 63 63 63 63 63 62 62 62 62 61 63 63 63 62 62 61 60 60 61 62]);
>>binblockwrite(obj1, a, 'uint32', 'SOURce1:DATA:ARBitrary Binsentwave,', '%s' );
>>fprintf(obj1, '\n');
>>pause(1);
>>set(obj1, 'EOIMode', 'on');

obj1 would be the created session of type 'visa'.
Tell me if this segment is not enough, I can send you the whole M-file if you want.
I can also send you binary->uint32 and uint32->binary  converters in M-files that I developped,  if you want to experiment.

Yours sincerely,
Etienne TONNELIER  

Outcomes