Instrument Control (GPIB, Serial, VISA, IVI)

취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Error initializing DMM with OpenDev

When initializing a Keithley 2000 DMM through GPIB using the OpenDev command it returns an invalid number.  Checking the NI instrument explorer and querying the DMM shows an active connection.  Failing code below.
 
    /*  Initialize the GPIB interface.  */
    if (bd[instrID] <= 0)  {
        if (instr_cnt <= 1)
            CloseInstrDevs ("kei2001");
        bd[instrID] = OpenDev ("kei2001", "kei2001");
        if (bd[instrID] <= 0)  {
            kei2001_err = 220;
            return kei2001_err;
        }
    }
0 포인트
1/7 메시지
4,483 조회수
Hi BlueBirdHouse,

I wanted to get a little more information from you on this.

What version of NI-VISA are you using?
What version of NI-488.2 do you have installed?
Can you see this device in MAX? Can you query this device within MAX?
What operating system are you working with?

Regards,
Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 포인트
2/7 메시지
4,467 조회수
Matt_S,
 
Thanks for your reply, I'm currently running:
NI-VISA v1.1.04
NI-488.2 v3.0
MAX sees and successfully queries the DMM
OS Win XP
 
Let me know if there's anything else you want to know.
0 포인트
3/7 메시지
4,464 조회수
Hmm, we may be having some versioning issues.

A) Uninstall 488.2 and NI-VISA
B) Install NI-VISA v. 3.3.1  from

http://digital.ni.com/softlib.nsf/websearch/CC5A993FEFA83D498625704600677AE7?opendocument&node=132070_US

C) Install 488.2 v 2.4 from

http://digital.ni.com/softlib.nsf/websearch/1DDE5C48F30C2C658625702000681295?opendocument&node=132060_US

I'm not sure why you would be seeing 4882. v3.0, version 2.4 is the latest version out.

Once you get these installed, we'll at least be sure that we're not having problems caused by old driver versions.

-Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 포인트
4/7 메시지
4,461 조회수

I'm sorry, I was mistaken.  488.2 is v2.2 and VISA is v3.1

I have a simular system with identical drivers that is currently working, but I'll install the new drivers on the non-functioning one if you still think it might help.

0 포인트
5/7 메시지
4,459 조회수
The problem has been solved, the file C:\Windows\system32\GPIB.ini had the device names set to default (DEV1, DEV2, etc.) instead of "kei2001" as specified in my code.  Correcting that solved the communications problem.
 
As a note to NI, I think the problem would have been easier to solve if I could have looked at the code for the OpenDev function, so making that code available or more easily accessible would be nice.
0 포인트
6/7 메시지
4,448 조회수

Thanks Bluebird, I was also getting errors with OpenDev.

 

As a further note to NI I think it would be helpful if a search of the LabWindows and 488.2 help for GPIB.ini actually found something. None of the documentation for OpenDev mentions that it is dependent on the GPIB.ini file.

0 포인트
7/7 메시지
4,241 조회수