Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set the interface select code to 7 for PCI-GPIB?

I am running TransEra HTBasic runtime version 7.2. I am porting a piece of code that was on an old HPBASIC computer. I need the "select code" of the interface to be "7", not "0". This used to be easier with older versions of NI software. I see no way to do this anymore. Any suggestions?
0 Kudos
Message 1 of 5
(4,105 Views)
If by "select code" you mean "primary GPIB address", you can use the ibpad function to programatically change the GPIB address.
0 Kudos
Message 2 of 5
(4,105 Views)
No,
In the old HPBASIC world, there were "select codes". 1 was the output (the screen), 2 was the keyboard. Device 7 was always the [HG]PIB. The addresses on the GPIB were created as follows: Multiply the select code (7) by 100 and add the device address to it. They had standards which were that the hard drive was at 700, the printer at 701, plotter at 705. The controller was at 721. The number you are referring to is the equivalent of my numbers 0, 1, 5, and 21 above. I have no access to the ibpad function. In old versions of the NI software,one could set this value. It is now missing. I have looked at the htbasic website to no avail yet. Stay tuned. I will post the answer when I find it out.
0 Kudos
Message 3 of 5
(4,105 Views)
Russ,

What driver version are you using? What version of the driver were you using before? I'm not sure that you will be able to change your select code setting; I would assume that this would depend on the driver. Also, note the following link that discusses hardcoded select codes for NI GPIB controllers. Hope this helps. Post here if you need more assistance and I can find this information out for you.

http://digital.ni.com/public.nsf/websearch/F05D7A6B34921DFF8625649200004167?OpenDocument

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(4,105 Views)
I have stumbled on a way to achieve this. Here is a sample H[PT}BASIC line of code that loads the driver:

10 LOAD BIN "GPIBNI;ISC 7" ! Set select code as well as load the GPIB board support.

This is poorly documented by TransEra. It is only in their install manual and NOT in their on-line help. Older versions just worked. I am glad to post this in case someone else asks.

Thank you very much for responding.
0 Kudos
Message 5 of 5
(4,105 Views)