LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

session handle is not valid

I'm trying to read values from a Fluke 8846A Digital Multimeter, however when I run the functions to initiate the device it gives me a runtime error reading

"Timeout expired before operation completed"

 

Also, later when I try to configure the multipoints and minmax and try to read this data, I get the following runtime error:

"session handle is not valid "

 

Here is my code:

 

fl884x_init ("DMM1", VI_TRUE, VI_TRUE, &DMM1);  //Attempting to initialize the Digital multimeter, with a handle DMM1 (gives me the first error)

//All of these give me the same runtime error "session handle is not valid "

fl884x_ConfigureMultiPoint (DMM1, 1, 5000, FL884X_VAL_INTERVAL, 0.0);

fl884x_ConfigureMinMax (DMM1, VI_TRUE);

fl884x_Initiate (DMM1);

fl884x_ConfigureTrigger(DMM1, FL884X_VAL_IMMEDIATE, 0.0 );

fl884x_FetchMultiPoint (DMM1, 5000, 5000, &measurementData, &numberOfPoints);

fl884x_FetchMinMax (DMM1, 5000, &measurementDataMin, &measurementDataMax, &measurementDataAvg, &minMaxCount);   

 

I imagine that if I can fix the first error, the second will be fixed as well.

 

Thanks in advance

0 Kudos
Message 1 of 3
(4,636 Views)

I would expect that the first parameter of the function fl884x_init (,,,) is the resource name specifying the interface and address of the device (such as GPIB::14::INSTR)

0 Kudos
Message 2 of 3
(4,627 Views)

Yes, I edited the statement where I initialize the instrument to :

fl884x_InitWithOptions ("GPIB0::2::INSTR", VI_TRUE, VI_TRUE, "Simulate=0,RangeCheck=1,QueryInstrStatus=0,Cache=1", &DMM1);  

 

But I am still getting the same error.

 

Also, whenever I use the VISA test panel to run an *IDN?\n query, it gives me the same error.

0 Kudos
Message 3 of 3
(4,624 Views)