06-29-2012 02:42 PM
Hello:
I have an existing code (screen shot attached) where I need to make some modifications. In the timed loop, currently the case structure is executed every time a external trial( Trigger In) is sent in. Instead, I want the loop to execute for every other trigger (alternate trigger).
What would be the best way to do it? Any help would be highly appreciated.
Thanks
07-01-2012 09:40 PM
Can you clean up your code? You've got wires running backwards and with crazy bends. It is hard to tell the source of some of the wires particularly the boolean wire.
You have a boolean shift register. What information is it storing? If you have a boolean shift register that keeps track of whether the last trigger fired the case structure or not, and just NOT that one and store it, you should be able to determine whether you need to fire the case structure or not.
07-02-2012 04:36 AM
All in all, there are several things which do not make (much) sense.
First of all, DAQ Assistant+Time Delay within a timed loop:
Regarding to the settings in the DAQ Assistant (we dont see them in your screenshot), it is possible that you already have waiting times in there (e.g. waiting for trigger, {finit} acquisition of a given number of samples at a certain rate, ...). Adding an additional wait time (depending on a single DI value) could easily break the configured timing of the timed loop.
Secondly, what do you understand with "every trigger"? How do you define this?
How does trigger, after all, match to a polling (with e.g. 1s cycle time)?
Norbert