Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset Control Values

I am wondering if there is a way that when a reset button is pressed, the default values appear in the control field. 

 

I am currently brute forcing my way to this behavior, but it still isn't quite right.  When the reset button is pressed, the default values are sent to the power supply, but the control field remains whatever the previous value was.  I've included my VI in case my explanation isn't very clear.  

 

0 Kudos
Message 1 of 6
(3,466 Views)

First, this question has nothing to do with multifunction DAQ. It's a LabVIEW question.

 

Second, all that you need to do is place that method inside a case statement or event. An event structure will be much better since you would have one event for a voltage/current value change and one event for the reset. As it is now, you are swamping the GPIB bus constantly even when the voltage or current does not change.

0 Kudos
Message 2 of 6
(3,461 Views)

I apologize, I was sure I put this question in the general LabVIEW category.

 

I figured an event structure would be best, but I am confused by them.  I was able to find an example to a case structure, which I am content with, but would you be able to further explain how I'd be able to achieve this using an event structure?

0 Kudos
Message 3 of 6
(3,450 Views)
0 Kudos
Message 4 of 6
(3,443 Views)

That's great!  Thank you so much.

 

The VI I had included was just a small part of my overall VI.  Is there a reason you chose to have the VISA session and errors outside of the while loop?  That would create a lot more wires in the original VI.

0 Kudos
Message 5 of 6
(3,427 Views)

Adapt to what you need. I imagined that before running any loop, you would initialize the instrument so my code would make more sense.

0 Kudos
Message 6 of 6
(3,424 Views)