08-06-2018 09:09 AM
Stumped here, i have a digital pulse train it's (4) pulses per revolution and A and B phase for direction. I'm not really interested in the number of pulses I just want to trigger the data capture to start once the pulse train ends. Is there a simple way to do this?
I currently am using the IMPLIES function to detect when the signal goes from High to Low depending on the situation, I just can't think of a way to use this for the whole batch of pulses. The only other thing i can think of is to throw a delay in there because i know the pulse train lasts for (15) seconds. Would not be the best fix however the encoder is based on motion, if the velocity is changed the time will change.
Any thoughts on this or direction would be appreciated. I'm using a cDAQ 9174 with an NI 9423 DI card. Works great for single pulses.
08-06-2018 09:12 AM
First thing that comes to my mind is some kind of time out.
If a pulse is not received before the timeout expires
Then trigger
Else reset timeout and wait for next pulse
08-06-2018 11:53 AM
Finding the start of a signal is easy, finding the end is a lot trickier and more ambiguous (how do you define "the end"?). However, if you are talking about a Digital Pulse Train, you have a reasonable possiblity -- count the pulses. Note that you don't need to know how many pulses there will be in the Train at the beginning of the Train, you only need to know the count before the end of the Train, i.e. before the last Pulse.
Here's how it works:
I used this scheme to capture an AVI from a video camera, starting the Video one second before a Start Event (defined by monitoring an analog signal) and ending a second after an End Event (monitoring the same analog signal). In this case, I was counting Video Frames -- my initial End Frame was set to -1, and as soon as the End Event occurred, I added 1 second's worth of Frames to the current Frame and set that as the End Frame. Worked like a charm.
Bob Schor