Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program VC++ with AT-GPIB-TNT

I am a student in Taiwan and a beginner user in GPIB.
I am writing a control program in Visual C++(console) on Win98 (by N.I. GPIB-TNT
board).
I need to control two devices one is Laser interferometer for measurement,

another is PZT(piezo actuator).
When I execute a simple read and write program,
it always shows " can not read ".
I am so confused.
Can you help me to overcome this problem
and show me a new simple program?!
Thank you very much.....

I am so appreciate for your help.

best regards
Andrew
0 Kudos
Message 1 of 3
(4,143 Views)
Andrew,

There might be several reasons as to why you cannot read information back
from the instrument. Below is a link to a KnowledgeBase article that might
help you determine the problem:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/a80dbfccac36ebde862562c80058856e?OpenDocument

Also, there is a Web page that contains information about how to write a
Win32 Console Application for GPIB using Visual C++. It also contains links
to download sample programs. You can find the link at:

http://zone.ni.com/devzone/explprog.nsf/webmain/D91577E670752B11862568FF0055C511?opendocument

--Liz

"Andrew Chen" wrote:
>>I am a student in Taiwan and a beginner user in GPIB.>I am writing a control
program in Visual C++(con
sole) on Win98 (by N.I. GPIB-TNT>board).>I need
to control two devices one is Laser interferometer for measurement,>>another
is PZT(piezo actuator).>When I execute a simple read and write program,>it
always shows " can not read ".>I am so confused.>Can you help me to overcome
this problem>and show me a new simple program?!>Thank you very much.....>
>I am so appreciate for your help.> >best regards>
Andrew> >
0 Kudos
Message 2 of 3
(4,143 Views)
Andrew,

From the bottom of http://www.ni.com/support/trouble/gpib/max/ibic.htm, there is
a link to "Solutions to Common Errors." If you follow that link, the next page will
have an entry for the EABO error code (and several other error codes). These tips
are the suggestions that our support staff would make to you if you were to speak
with them. I suggest checking that link out. I have posted this message to the
newsgroup for the benefit of all readers.

Regards,
Rich
NI


**************
Thanks for your help.
After receiving your mail, I try to follow the step.
But when I use "ibrd", it has the error code as follow
--------------------

iberr = EABO

EABO indicates that an I/O operation has been canceled, usually due to a
timeout condition after a GPIB read.
Before reading from the instrument, verify that the GPIB command you are
sending is understood by your device
and instructs it to place data in its output buffer.
--------------------
device data as follow

Board: GPIB0 AT-GPIB/TNT
Device: Name Type
Value Description
instrument0 Instrument is not 488.2 compatible pad=2 GPIB
instrument
instrument1 Zygo, VMEbus control board pad=3 GPIB
instrument

My goal just want to read the measuring data from laser device by
AT-GBIP/TNT board.
Need your help again thanks.
Andrew

> Andrew,
>
> What you may want to do, instead of starting off with straight
coding, is
> to see if you can establish communication with the instrument using
"IBIC," our
> interactive diagnostic tool for instrument control. This program comes
> installed with your 488.2 driver.
>
> To find out more about this, visit
> http://www.ni.com/support/trouble/gpib/max/ibic.htm . If you can achieve
> communication with your instruments with this program, you're well on your
way.
> If you cannot, the website has solutions to common errors that one can see
while
> using this tool.

> ps. "threads" refer to the number of processes running at once. For
example,
> if you can do two separate math operations simultaneously in your program,
> that's a multithreaded application.


> "andrew" on 04/24/2000 03:51:13 AM
> I am a student in Taiwan and a beginner user in GPIB.
> I got your e-mail address from your post on N.I. user newsgroups.
> I am writing a control program in Visual C++(console) on Win98 (by N.I.
GPIB-TNT
> board).
> I need to control two devices one is Laser interferometer for measurement,
> another is PZT(piezo actuator).
> When I execute a simple read and write program,
> it always shows " can not read ".
> I am so confused.
> Can you help me to overcome this problem?
> And show me a new simple program!
> Thank you very much.....
>
> I am so appreciate for your help.
>
> best regards
> Andrew
>
> Ps.what is singlethreaded and multithreaded?
0 Kudos
Message 3 of 3
(4,143 Views)