Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using an external voltage signal to end while loop

Hi!

I would like to use an external voltage signal (generated by the user) to end current running while loop. How can I do this?

The external trigger device is a foot switch which the user presses when he wants to end the while loop. The foot switch generates a known voltage when pressed.

There are multiple while loops, each of which has to be controlled by this foot switch. Some whie loops are nested.

I am using PCI-6034 (with CB-68LP), LV-PDS 6.1, NI-DAQ 6.2

Thanks in anticipation,

Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 3
(2,726 Views)
Gurdas,
The method you use will be dependent upon the signal coming from the foot pedal. If it's a digital signal, you can compare the value using the boolean functions. With an analog signal, you can use a peak detector VI or a level detector VI. Based on whether the condition is met, you can wire in a stop to the terminal in the while loop. Good luck with your application.
0 Kudos
Message 2 of 3
(2,726 Views)
Thanks Sarah!

The method you describe is what I have in mind but I don't know how to implement it.

To be specific:

1) Which pins on my PCI-6034 should receive the signal from the footswitch? Specify for both a digital signal and analog signal. For analog, I would like to avoid using the usual AI pins. Is there a pin that is meant for just this type of requirement?

2) How do I read this signal and use it as a trigger? My vi uses AI config, start and read. I would prefer to NOT use these to read the status of the footswitch. It would be nice if there is a fucntion that only reads the status of the line/pin to which I have connected my footswitch.

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 3 of 3
(2,726 Views)