MATLAB Answers


How to connect to a function generator?

Asked by Z
on 23 Jun 2013
Accepted Answer by Z

Hi guys, I am using a GPIB cable to connect to a function generator and I am aware of all the articles out there that explain how to create wave forms and what not, but I'm not sure how to start.

For instance, I don't know what "Read" and "Write" mean on the Instruments Control Toolbox! i'm not sure the data type, format, or even where to put the code if I want to create a waveform on a function generator.

I clicked on 'Connect" only, but the MATLAB workspace says I have not connected.

Thank you.


on 25 Jun 2013

"...why can't I click anything in the "Communicate" section? Is it because it has not connected?"

Like Walter, I've never had access to the Instrumentation Toolbox having used standalone coding for all the GPIB interfacing I've done but...

One possibility is that you have the instrument in GTL (Go To Local) mode in which case it's ignoring the external commands.

The first thing in getting going w/ GPIB interfacing on any new (to you) instrument is to start w/ the documentation for it and first get familiar w/ how to operate it manually to do the operations you wish so you do then know what commands you're needing to send over the bus.

Then, read the GPIB programming sections for the instrument to learn how to find out its instrument address and how to get it to respond to the remote controller.

on 25 Jun 2013


on 26 Jun 2013

Your comments would make good answers^^ Maybe put ti down there so I can accept it.

1 Answer

Answer by Z
on 28 Jun 2013
 Accepted answer

Use the command connect(f) when f is the variable indicating fgen.


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!