LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger and Gate question

To all LabVIEW experts,
 
I am in desperate need for explanation on Trigger and Gate Express VI.  Attached is an VI that does nothing and means nothing other than experiment with Trigger and Gate Express VI.  I have two signals, one is a sine wave and the other is triangle wave.  The two are then put into array and fed into a For-loop where it is then fed into Trigger and Gate Express VI.  The trigger and Gate Express VI is set to trigger when it sees Falling (5) and rising (-1).  My expectation is that the trigger will return a V-shape triangle from the Triangle wave and a U-shape from the Sine wave all the time.  But it is not the case.  If you let it run long enough, The V-shape will turn into U, and the U will turn into V-shape.  It is best to run the VI and it will become clear what I'm talking about. 
 
If I run the Trigger and Gate Express VI independently (without using For-loop), then the result is exactly what I expect.  So I think I may have done something wrong in setting up the For loop, but I can't figure out what.  Please help, I really need to use the Trigger and Gate inside a For loop.  THanks in advance for the help.
0 Kudos
Message 1 of 3
(2,779 Views)
Peter,

I think that somewhere inside of the Trigger and Gate Express VI there is some data getting transfered from one iteration to the next.  When you run it in a For Loop like this, it moves that data from one waveform to the other.  This seems to be a BUG.  NI should create a CAR on this.  I have looked through the code a bit and I don't see where the problem is, but it is something that NI should look at.

Hope that this helps,
Bob Young

P.S.  A side note to NI: Doug, feel free to ask Jeff for help; the Trigger and Gate started out as his.
Message 2 of 3
(2,770 Views)
Thank you for the reply, Bob.  I've forwarded this thread to NI support.  Let's see if I'd get a reply.
0 Kudos
Message 3 of 3
(2,754 Views)