Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

interupt

All,

I am using a M-Series DAQ.

I am outputting a function f(t) to an analog out (AO2). This function takes about 12 seconds to run and I am wondering that if the machine that I'm controlling goes into an fault condition how do I interupt the vi outputting this signal so that I can kill the vi and take action on the fault condition. So far I have two ideas:
1. Break up the function into little chunks and poll for my error conditions, and
2. Design a hardware solution.
Both of these solutions have pluses and minuses, do any of you have ideas that might work for this app?

Regards,
Rick
0 Kudos
Message 1 of 5
(2,712 Views)
How are you outputting this function? which vi are you using ?
You probably are using the basic AO function in a while loop, and for each iteration you output the next value of f(t).
In this while loop, you can monitor the fault condition at the same time (may be a digital-in of a relay switch). When the fault is detected, just exit the loop and output a zero(safe value) voltage.
Hardware implementaion will also work. It is going to be faster, probably more reliable, and may be more costly.
0 Kudos
Message 2 of 5
(2,705 Views)
How are you outputting this function? which vi are you using ?
You probably are using the basic AO function in a while loop, and for each iteration you output the next value of f(t).
In this while loop, you can monitor the fault condition at the same time (may be a digital-in of a relay switch). When the fault is detected, just exit the loop and output a zero(safe value) voltage.
Hardware implementaion will also work. It is going to be faster, probably more reliable, and may be more costly.

No I am not using the AO function in a while loop. I am using a modified vi from the All Functions >> Waveforms >> Analog Waveforms >> Waveform Generation Palette similar to the Triangle Waveform.vi to generate a waveform that is used by the DAQmx Timing.vi and the DAQmx Write.vi. I tried the looping a incrementing DC level and the output was distincly not what I wanted . . .

Perhaps it would be better to break my waveform up and do fault checking at strategic intervals and dealing with the discontinuity with some code that will bring my waveform back into shape. There will be discontinuities, but it would save me hardware development and test time. Hm, . . . time to experiment.

I'm still open to ideas . . . 🙂

Rick
0 Kudos
Message 3 of 5
(2,698 Views)
since you are outputting a waveform say for 12 seconds, look at the examples that ship with LabView
under DaqMx--analog genration---voltage---cont Gen Volt wfm-int clk--non generation.vi
In the whle loop, the software keep checking if the generation is done. You can monitor a relay switch state in this same loop.
0 Kudos
Message 4 of 5
(2,694 Views)
Thanks, I will check that out first thing in the morning. 🙂
0 Kudos
Message 5 of 5
(2,686 Views)