05-29-2013 06:57 PM
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.
Solved! Go to Solution.
05-29-2013 07:16 PM - edited 05-29-2013 07:19 PM
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:
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!
05-30-2013 11:47 AM
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___
05-30-2013 01:20 PM
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?
05-30-2013 05:55 PM
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.
When it is necessary to use, there is a note to do so.
2. R&D is aware of the incorrect constants. Until it is fixed, however, you will need to use the DMM Initialize function.