LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1073807346

I am using Labview 8.5.1 and a Keithley 2611A smu with a GPIB connection and a VISA session. I am loading a script to the smu, running the script, and reading the measurement results to a file. The error ocurrs after the "Read to File" vi. Nowhere in my script or LabVIEW code do I command to abort the scrip. When I run the code with the "Highlight Execution" button selected, I do not receive the error; however, at all other times, I do. I have increased the VISA timeout to various degrees and the "Close VISA Automatically" checkbox has never been selected. I am at a loss, so any input would be appreciated. 

0 Kudos
Message 1 of 8
(5,036 Views)

Error code -1073807346: "The given session or object reference invalid".  I'm guessing you have a race condition where a reference is getting closed before an operation.  Care to share some code and show exactly what function is causing the error?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(5,035 Views)

I added some annotated bits of code. Hopefully this is helpful.

0 Kudos
Message 3 of 8
(5,029 Views)

When you write the strings, do they need a line feed character or carriage return at the end of the commands?

 

Unfortunately, your VI isn't going to help anyone figure out ther problem.  All you have is some snippets of code disconnected from anything else.  We would need to see the entire VI to have a sense why a reference is going invalid.

0 Kudos
Message 4 of 8
(5,025 Views)

I have attached the entire vi. In thinking back, I would also like to make sure that I state my problem clearly; I don't think I did. The LabVIEW error occurs before I run the vi as an executable. When I run it from LabVIEW or the loaded script from the Keithley, I receive the "Script Aborted by User" Runtime Error. I assumed they were related when I originally posted; maybe I should not have done so. I have tried all kinds of combinations of waits and delays. 

0 Kudos
Message 5 of 8
(5,006 Views)

So you are not getting Error -1073807346 like your message subject says?

 

A couple things I see.

1.  Don't reopen the VISA port on every iteration of the while loop.  Do it just once before the while loop.

2.  I don't understand why you are setting such large VISA timeouts in your VI, and doing it so frequently.

3.  In cases 1 and 2, you do have some single line VISA write commands.  It still seems to me like they need a new line character at the end of them to terminate the command you are writing.

4.  In case 0, you have a while loop to write out our script line by line.  Perhaps you need a wait statement in there.  Right now, it sends out the data very quickly.  Maybe the device doesn't have time to react and process each of those lines.

 

The error of script aborted by user sounds like it is something with the script you are sending the device and isn't a LabVIEW problem.  Try taking a closer looking at what you are sending to the device.  There are a lot of long and complicated commands in there.

0 Kudos
Message 6 of 8
(4,999 Views)

ok 

 

This is what I have.

 

Cheers

0 Kudos
Message 7 of 8
(4,905 Views)

What does your post have to do with this messge thread?

0 Kudos
Message 8 of 8
(4,895 Views)