Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Question: Does renaming instruments work for DOS applications using the IBFIND command?

We are currently using an older computer running Win95 with a GPIB-PCII card to run about 12 DOS applications (written and compiled using Professional Basic). These applications communicate with six different pieces of equipment (scanner, DVM, etc.) via the GPIB card. To maintain consistency with our in-house network, we are being required to replace these computers with new computers running Win2000. However, we would like to continue using these DOS applications with minimal rework.

We have set up a test station with a new computer running Win2000 and we've installed a PCI-GPIB card along with the latest driver downloaded from your NI website. The driver software seems to work properly. After installing, the NI software can find and communicate with the instruments. Under the Tools option, I've enabled DOS support. I've also edited the config.nt file and edited the last line to unremark the "device=path\doswin16\gpib-nt.com" statement. Each of the DOS applications locate the instruments using an IBFIND(dev$,dev%) command where dev$="SCANNER" or "DVM", etc. To be compatible with the names, I've run GPIBCONF.exe and edited the GPIB0 template so that the device names match the instrument names used in the DOS applications (e.g. "SCANNER", "DVM", etc.). I've rebooted the computer after making these changes.

What I find is this:

1) If I edit the device names in the GPIB0 template using GPIBCONF.exe, then the address returned for each instrument in the IBFIND commands is -1.
2) If I run Professional Basic, load the source code, and change the instrument names used in the IBFIND statedments from "SCANNER", "DVM", etc. to the GPIB0 default names of DEV1, DEV2, DEV3, etc., then it works.

Question: Are there known issues with renaming the instruments in the GPIB template using GPIBCONF.exe for DOS applications? Do I have to use the default DEV1, DEV2, DEV3, etc. names in my DOS code?
0 Kudos
Message 1 of 2
(2,709 Views)
Hi Scott,

What driver version are you using? The problem could be with the driver if it is not NI-488.2 v. 2.3.
There is a bug in earlier versions of the NI-488.2 driver. The GpibConf.exe utility changes the GPIB.ini file which contains all the information about the templates the user has created. The utility puts quotation marks ("") around the property values and causes them not to be read correctly. Below is an example of how a template looks in the GPIB.ini file after the utility is run.

[DEV1]
Connect = "GPIB0"
DeviceName = "SIMDEV"
EOSchar = "0"
EOScmp = "7-bit"
EOSrd = "No"
EOSwrt = "No"
EOT = "Yes"
PAD = "2"
READDR = "No"
SAD = "None"
SPollTime = "1sec"
TMO = "10sec"

Below is the same template with the correct format.

[DEV1]
Connect = GPIB0
DeviceName = SIMDEV
EOSchar = 0
EOScmp = 7-bit
EOSrd = No
EOSwrt = No
EOT = Yes
PAD = 2
READDR = No
SAD = None
SPollTime = 1sec
TMO = 10sec

NI-488.2 version 2.3 has fixed this bug, so upgrading will eliminate this problem. However, if upgrading is not an option then a work around for this is to go in and manually remove the quotations after the utility has run or to enter the information manually in the GPIB.ini file.

Let me know if this helps.

JenK
0 Kudos
Message 2 of 2
(2,695 Views)