LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

-1074130544 The session handle is not valid.

Solved!
Go to solution

I am using LabView 2011 on Win7.

I am trying to work my way through the "Verification Procedure" part of the "NI PXI-4071 Calibration Procedure".  Step 3 of the Verification Procedure states "Call the niDMM Reset VI." and displays Figure 1. The Device, NI PXI-4071, displays OK in NI-MAX (Figure 2) and works OK with the "NI DMM Soft Front Panel" program. When I run what I think is the correct code, the error -1074130544, "The session handle is not valid." is displayed. The BD and FP are shown in Figure 3.  

Download All
0 Kudos
Message 1 of 5
(10,604 Views)
Solution
Accepted by topic author Ed___

Hi Ed,

 

If you want to call niDMM Reset, you will need to provide an instrument handle rather than an instrument descriptor.  

 

To start a session to your DMM and generate an instrument handle that you can use with other NI-DMM functions, you will first need to call niDMM Initialize or niDMM Initialize with Options.  You can wire the "Dev1" to the "Instrument Descriptor" pin and the function will return an instrument handle.  You can then wire the "instrument handle out" pin to the "instrument handle" pin on the niDMM Reset VI.  Whenever you initialize a session to an instrument, it is also good practice to close out the session by wiring the instrument handle to a niDMM Close function.  The snippet of code below shows what I've described:

reset.png

 

I also included a Simple Error Handler VI to report any errors that occur.

 

Also, it looks as if you are calling niDMM Reset with Defaults instead of niDMM Reset.  If you haven't assigned any user-defined default values to your device's logical name then the two calls should be functionally equivalent.  

 

If you make these changes you should no longer generate the error.

 

Good luck!

Regards,

Jared R.
Precision DC Product Support Engineer
National Instruments
0 Kudos
Message 2 of 5
(10,601 Views)

Hello Jared,

I tried the suggested code with the indicated response in Figure 4. As mentioned in the previous comment, " The Device, NI PXI-4071, displays OK in NI-MAX (Figure 2) and works OK with the "NI DMM Soft Front Panel" program." Do you have any suggestions to solve this new error?

Thank you,

Ed___

0 Kudos
Message 3 of 5
(10,567 Views)

Hello Jared,

Cancel the previous reply. I reset my computer and the PXIe-1062Q and the code now runs as you suggested.

However, that leaves two questions.

1) Why doesn't the "Verification Procedure" part of the "NI PXI-4071 Calibration Procedure" indicate the code that you provided instead of the code in Figure 1?

2) Why when right-clicking the Instrument Handel of the niDMM Reset icon produce a constant with incorrect properties?

0 Kudos
Message 4 of 5
(10,552 Views)

Hello Ed_______, 

 

1. I know it is not very obvious, but the information is in the manual. On page 6, it introduces the niDMM_init function. 

 

IMAGE$48D9801D75D965ED.jpg

When it is necessary to use, there is a note to do so. 

IMAGE$64DA33C4AA1419DB.jpg

 

2. R&D is aware of the incorrect constants. Until it is fixed, however, you will need to use the DMM Initialize function. 

Maggie
National Instruments
Applications Engineer
ni.com/support
0 Kudos
Message 5 of 5
(10,533 Views)