Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

QuickBasic GPIB PCII Help

Hi-

I'm new to QuickBasic and the world of GPIB but I'm not new to programming. I need help on something I'm completely stumped on. I have a feeling this is an easy and quick fix. I'll try to provide as much information as possible.

I have a Windows 98 SE (yuck!) machine with a NI GPIB ISA/AT card in it. Connected to the card is a Sony RTD710 Digitizer. I created a QuickBasic program with the code that came in the manual and it doesn't seem to be working. The only thing it does is return the ID of the digitizer. However, when I use the Interactive Control (in the Measurement and Automation Explorer), I can successfully communicate with the machine.

Here is my code:

REM $INCLUDE: 'QBDECL.BAS'
DIM READING AS STRING * 30
CALL IBDEV(0, 7, 0, 10, 1, 0, RTD710%)
CALL IBCLR(RTD710%)
CALL IBWRT(RTD710%, "ID?")
CALL IBRD(RTD710%, READING$)
PRINT READING$
CALL IBONL(RTD710%, 0)
END

This is what I'm doing in the Interactive Control:

ibdev 0, 7, 0, 10, 1, 0
ibclr
ibwrt "ID?"
ibrd 50
ibonl 0

The QuickBasic code compiles with no errors. The variable RTD710% returns as -1 and the variable READING$ does not return anything. In the Interactive Control, the variables are inputed one by one when prompted. When calling the ibrd function, the ID of the machine is returned "SONY TK/RTD710 ....." as it should.

I also noticed that when I used the NI Spy program, I can see the functions being logged when using Interactive Control but I don't see the functions being logged with the compiled QuickBasic program.

I followed the instructions here: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DE7556A4E034080020E74861&p_node=DZ52353&p_source=external

Again, I'm very new to GPIB and I tried searching the forums to see if this topic has been covered before. But I don't know what to search for. So, I apologize if this has come up before. Any help would be greatly appreciated.
0 Kudos
Message 1 of 3
(2,963 Views)
You mentioned that you are new to QuickBasic, but QuickBasic is a very old application that dates back to the days of DOS.

You didn't happen to mention which version of NI-488.2 that you have installed on Win 98. From the problem you describe, it seems as if you have a Win 32 version installed. With a Win 32 version of the driver, by default, it does not have DOS support enabled (for applications such as QuickBasic). This type of problem is described in:

http://digital.ni.com/public.nsf/allkb/D8AFF54234E2788486256A760070FB2E

If this is the case, it is very easy to enable DOS support with the Win 32 driver. Please refer to this KnowledgeBase article:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c293f23d6b87992c86256ab6000afbeb?O...

Hope this information helps. If not, please report back with additional information about which NI-488.2 driver you have installed.
0 Kudos
Message 2 of 3
(2,943 Views)
YES! That was the exact problem. It's now working. Thank you for your help!
0 Kudos
Message 3 of 3
(2,935 Views)