03-07-2016 07:44 PM
I would like labview to hang until it recieves a digital trigger and then execute a section of code, and then hang again. Seems straight forward, but everything I can find online is about triggering an acquistion with a digital trigger, not a section of code. The triggers are coming in too fast to restart a triggered analog acquisition everytime.
03-07-2016 08:17 PM
03-08-2016 07:01 AM
I'm going to make some assumptions here, which may be totally wrong, but you haven't given us much to go on. I'm assuming that you have a device with a Digital I/O port that can be read very quickly (i.e. to read the port takes very little time, say a few microseconds). [Note -- I don't have a specific device in mind, but assume they exist]. I'm also going to assume that a 1KHz "clock" is adequate, i.e. a millisecond "delay" between a digital line transition and your action is acceptable.
With these assumptions, here's one way to handle this:
For this to work, in addition to the previous assumptions, the Digital signals need to stay High long enough to be read by the DIO port, and need to go low long enough to reset the Clock's DIO state. This means the DIO line needs a high and low state of at least 1 msec, so the fastest you would fire off events would be 500 Hz (or every 2 msec).
Now, this is doing all of the work using an ordinary DIO port. There are also counter/timer devices on many NI DAQ systems that might have modes that work with triggers (rising edges) directly -- you'd need to read the manuals and see if you can come up with something clever. My method is slightly "brute force", but can certainly work (if the DIO transitions are "slow") ...
Bob Schor
03-08-2016 10:46 AM
Thanks for the excellent and very helpful reply! All of your assumptions were spot on. The digital "on" has a 1-5% duty cycle and is "on" for 2 ms.
After posting the question last night, I fiddled around somemore and this is what I came up with. It seems similar to your solution, but a little less advanced. I was unaware of "notifications" and I'll have to look into that.