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.