View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Convert Vector to Arbitrary Waveform

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 2.63 KB File ID: #34840 Version: 1.1
image thumbnail

Convert Vector to Arbitrary Waveform



30 Jan 2012 (Updated )

Converts Matlab array / vector to waveform file that can be used on 3352xA waveform generator

| Watch this File

File Information

The Matlab function convertToArb(data,samplerate,fName) function allows you to turn vector /
array data into a waveform format that can be loaded onto Agilent's 3352xA
function / arbitrary waveform generators (33521A one channel and 33522A
two channel)

This function converts a row or colunm vector into a 3352xA generator
format .arb file (a waveform file that can be loaded onto the 3352xA).
The input vector should contain values expressed in Volts not exeding the
output limit of the generator.

input argument 'data' is the vector containing the waveform points

samplerate is the sample rate you would like to generate the values from
the 'data' vector. The total time of your waveform is equal to:
samplerate * numberofpoints in the file

fName is the name you want to assign to the .arb file that is created, for
instance "myArb.arb"

After the conversion the function outputs a .arb file it will be stored in
the current Matlab directory. You can then transfer the waveform to a
3352xA using a USB memory stick.

MATLAB release MATLAB 7.13 (R2011b)
Other requirements Creates waveform files that can be loaded onto 33521A and 33522A function / arbitrary waveform generators
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 Feb 2014 Felipe

Felipe (view profile)

Nevermind! I had file path issues. It works. It did generated the .arb file. Now I will try it with the file I want to convert and will be back to report.

Comment only
20 Feb 2014 Felipe

Felipe (view profile)

I have been trying to make the function work on my system but I keep on getting this error:
>> Example_Waveform
Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in convertToArb (line 56)
fprintf(FID,'%s\r\n','File Format:1.10');

Error in Example_Waveform (line 12)
Any idea. I am running MATLAB 2011b

Comment only
31 Jan 2012 1.1

Added more comments to code

Contact us