Do I need to create a GPIB object before connecting to a function generator?

조회 수: 8 (최근 30일)
Hi, I am trying to connect to a function generator via GPIB cable but when I try to click "connect" on the function generator in Instruments Control Toolbox, it does not work. I followed all the steps precisely for connecting to the function generator, so I'm not sure why it still does not connect.
So I'm thinking I need to create a GPIB objected first. I followed the steps and when I type in this code I get this error:
fopen(g)
Error using icinterface/fopen (line 83)
Unsuccessful open: GPIB: NI: A device was not found at the specified primary address.
Which is funny because on instruments control toolbox it says that the primary address of the gpib IS 12! Please Help! Thanks!

채택된 답변

Lokesh Ravindranathan
Lokesh Ravindranathan 2013년 6월 25일
Could you be more specific about the object g. How did you create it? Its possible that the address is incorrect.
Also, make sure the instrument is connected before using the command fread. If not, there is no device at the other end to read from!
  댓글 수: 1
Z
Z 2013년 6월 26일
It turns out that I had not configured it. But your answer will suffice.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Instrument Connection and Communication에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by