LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI continues to send voltage after stop is pressed

I have written a simple VI to send analog out voltage thru a NI 9263.  It seems to send the signal fine.  But, when I press the stop button the voltage continues.  I am using a multimeter to confirm this.  What am I missing?
 
Jason
0 Kudos
Message 1 of 9
(3,510 Views)
You are missing a DAQmx write to set the voltage to 0 when stop is pressed. Doing a Clear Task is not enough. Just add the DAQmx Write before doing the clear task.
0 Kudos
Message 2 of 9
(3,504 Views)
two things:
 
1) as long as the DAQ card is not reset, it will continue to output the last commanded voltage. so if you want to bring back to zero, either you reset the card, or more simply, in the 'stop' event, send a '0' signal to the card before quitting
 
2) put the event structure in a while loop, with the stop button in the 'stop' event, linked to the 'stop while loop'.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 9
(3,501 Views)
and Dennis was already here....it is who draws the LV wire faster... Smiley Very Happy
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 9
(3,499 Views)

Thanks for the quick response.

While running the VI I can change the input voltage value on the control but it dosen't change that actual voltage signal being sent. How can I accomplish this?

0 Kudos
Message 5 of 9
(3,499 Views)
I modified your vi to have an event when the numeric is changed.  By changing the numeric value, the event will cause the new value to be written to the DAQ.  Also modified the Stop event to write 0 to the DAQ when you press the stop button.  I put it in a loop so that you can change the numeric continuously until you press stop.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 9
(3,487 Views)
If that's your real VI, it doesn't make any sense. You can click all day long on the front panel numeric but you have no code to execute a DAQmx Write when it changes. All you've got is an event structure that is just waiting for the stop button to be clicked. Why don't you put a while loop around the event structure, use a value change event for the numeric and in that event, do a DAQmx Write. In your stop event, do the DAQmx write of 0 volts.
0 Kudos
Message 7 of 9
(3,485 Views)

Thanks to All that replied,

 

Dennis,

I have taken the Basics 1 & 2 course from NI in July then I was completly away from the software until last week.  Did I stay away too long and lose what was taught in the classes or are my questions beyond what they taught in the classes.  I really appreciate all the help from everyone.

 

Thanks Again,

 

Jason

0 Kudos
Message 8 of 9
(3,478 Views)
I can't say what is taught in the Basics 1 & 2 classes. I would imagine that any discussion of an event structure would mention putting it in a while loop though. It's certainly covered in the on-line help. Right click on the event structure and select help. One of the first things it has is a mention to 'review the caveats and recomendations for using events' and the last is a link to read. The first recomendation is to avoid using an event structure outside a loop. I would also think that the classes would cover basic dataflow theory, but again, I can't speak from experience.
0 Kudos
Message 9 of 9
(3,473 Views)