LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807202 in vi that used to work


@Snoot wrote:

I can find the instrument in NI MAX. When I click Communicate with Instrument, I can send queries and commands that it responds to in the correct way. However, LabView keeps giving me the error.

 

RavensFan probably replied to the wrong thread...


I think I did.  Now I just need to find what thread I thought I was replying to.

 

Sorry about the confusion.

0 Kudos
Message 11 of 18
(651 Views)

Sorry but I don't know how to check that... I'm not even sure if it actually is a serial connection, the VISA name is GPIB0::12::INSTR rather than COM[number].

0 Kudos
Message 12 of 18
(643 Views)

If it is listed as

GPIB0::12::INSTR 

then it is an instrument that is being controlled via its GPIB port.  Could you post your vi?  Also, what is the command/query that you want and how are you sending that to the instrument?

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 13 of 18
(641 Views)

These are the main VI and some of the relevant subVIs. I want to control a LakeShore Model 340 and read out the temperature. I didn't include the subVIs for setting the parameters because they are only executed when you click the respective buttons. What should be mentioned is that it's originally based on the VIs you can download for the Model 350, but with some changes I got it to work with the 340. As I said, it worked fine until today.

0 Kudos
Message 14 of 18
(632 Views)

Ok, here are my observations:

  1. The code initializes the interface before entering the while loop and closes the interface connection within the loop.  Anytime you try more than a single loop expect an error.
  2. You have a Stop that is unwired and this loop only runs once with the wired boolean.
  3. If Set Control Parameters is False, none of the parameters get set
  4. If Set Setpoint is False, there is no setpoint set
  5. Not sure how Sensor Data (Single Reading) will work without anything set or configured
  6. This being an older vi.  You may need to clear the error before your close vi and then merge the output of the Sensor Data and the Close error outs.  Older code does have issues at times with a close not occurring due to an error entering the Close vi.  That will cause an error when trying to perform the next Open/Initialize.
Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 15 of 18
(628 Views)

Oh yes, I replaced the Stop button with a True constant just to prevent the error from repeating indefinitely while testing. But the fact that the initialization occurs before the loop and the close happens within it didn't cause any problems before. The error occurs immediately at the initialization step, at VISA Open. I can see that failure to close might lead to problems when opening again, but would that sill hold when I restart LabView or even reboot the computer?

0 Kudos
Message 16 of 18
(622 Views)

I checked it again in the debug mode and it turns out that Initialize.vi specifically passes "no error" into VISA Open, but it immediately returns the error. So the problem must be caused in VISA Open itself. I found the suggestion that there might be a problem with NI-VISA, and according to NI MAX, NI-VISA 16.0 is installed while I'm running LabView 2015 (no idea if that matters though). I tried installing NI-VISA 15.0.1, but that doesn't seem to work while 16.0 is installed. However, I can't find out how to uninstall 16.0...

0 Kudos
Message 17 of 18
(611 Views)

Turned out that simply repairing all the software did the trick...

0 Kudos
Message 18 of 18
(605 Views)