LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AI triggering DO

Hi all,

 

I may have been posting this in the wrong section before. Anyway, I'm fairly new to labview and I have a pretty basic problem which I'm hoping you could help me with.

My problem:

Aquire a analog signal which will slow down in frequency (from ~60 to 50 Hz). When the frequency reach 50 Hz, I want to send a digital out. It is important that the whole process is very fast, it can maximum take 0.1 ms from when the signal has reached 50 Hz to when the digital is triggered.

I thought I would ask here before I try to do something that probably won't work anyway 🙂

Does anyone know if there's an example VI close to this? I've searched the forum and the example search but haven't found any.

 

My setup: cRIO 9076, 9401 and the analog in is not yet bought.

0 Kudos
Message 1 of 4
(2,336 Views)

I may be wrong about this, but I think you are "trying to do the impossible".  Here's an argument --  Assume you are working with an absolutely noise-free system, and you want to know when the signal changes from a 50Hz pure sine wave to a 40 Hz pure sine wave.  I chose those frequencies to make the math easier.  The 50 Hz sinusoid will have a peak every 20 msec, while the peak for the 40 Hz sine wave will be 25 msec.  Suppose you sinple detectt peaks and measure the difference.  The time between Peak 1 and Peak 2 is 20 msec, between 2 and 3 is 20 msec, and between 3 and 4 is 25 msec.  Question -- when did the frequency change?  Answer -- sometime between peak 3 and 4, a range of 25 msec.

 

Another thing you could try (that also probably won't work) is to sample the signal for a while (like a second), estimate its parameters (offset, gain, phase, frequency), then build a model and ask "When does the real signal differ from my model?".  This could tell you when the signal changed from 50 Hz, but now you want to know when it reaches 40 Hz.  For this, you need a "model" of the 40 Hz wave (i.e. you need to know offset, gain, phase, freq).  Maybe your physical system can give you this, but it sounds like a very intractable problem to me.

 

0 Kudos
Message 2 of 4
(2,311 Views)
Thank you for the answer.
Hmm, ok. I see your point. Maybe thats why i didn't find any examples 🙂
any other suggestions? I think i've seen equipment for this somewhere before and hope this could be done in labview.
0 Kudos
Message 3 of 4
(2,298 Views)
It should be added that the frequency change probably is quite slow, if it could be assumed constant over a few periods then it could work right?
0 Kudos
Message 4 of 4
(2,294 Views)