LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Query Interrupted After Every Other Run

As I played more with the code, it doesn't seem to be the inner workings of the code that's the problem, but the initialize.vi and close.vi functions that are messing things up. When I don't have them included, I can't get the Power Supply to follow the 20V,10A or OutputOff settings in the LabVIEW code. However, when I do add them in, everything works fine but only every other time the program runs. That's when the -410 query interrupted error pops up, when I have initialize.vi and close.vi in the code. Does anybody have a good understanding of how these functions work? I can't find much useful information about it online.

0 Kudos
Message 11 of 15
(765 Views)

Try using the VISA Close vi rather than the one provided.  See if that will help.  Also, do not run this as a continuous run from the front panel as it may be running into an overlap.

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

When I used the VISA functions the power supply read that a voltage was being supplied, but using a multimeter I found that nothing was being output. I went back to the age363x initialize and close functions so that power was being output. I found that if I added "ID Query?" to initialize.vi and set it to false then the program ran repeatedly without any errors. I tried looking more into it, does "ID Query?" check if the drivers and instruments are compatible or something?

 

Thank you everybody for your help, I learned a lot of helpful LabVIEW tips and tricks!

0 Kudos
Message 13 of 15
(742 Views)

It's been awhile since I messed with this kind of driver (I once had a driver library submitted to NI that ran a power supply), but I recall that pretty much every one of them starts with an ID Query to make sure that you're talking to the instrument you think you're talking to.  If you set the VISA address incorrectly, say to some other instrument you have in your setup, you don't want to start firing off a bunch of commands to it that may make it error out or, worse, start doing unexpected things.

 

If you're going to be working with this power supply for some time, I'd recommend writing your own little library for it.  Make some little sub-VIs that handle specific tasks, like changing the voltage and so on.  That way you don't have to remember the specific command, and it makes it easier to follow a program.  That assumes the driver you've already downloaded doesn't already have these sorts of VIs included with it.  If it does, you should just use those rather than doing your own VISA Writes.

0 Kudos
Message 14 of 15
(725 Views)

Sometimes, an instrument may require an extended period of time when it performs an internal initialization.  Having it perform the ID query at start-up ensures that it has completed initialization provided that the initialization period is within the VISA timeout window.

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 15
(731 Views)