04-20-2009 10:37 AM
Apologies if this has been answered elsewhere. if it has, I can't find it!
I'm trying to use an analogue TTL voltage (generated using an external signal generator and acquired using a DAQmx task) to control a case structure. I want the case structure to run the 'True' case when the TTL signal goes high and to run 'False' when the TTL signal goes low. I have managed to get it working in a roundabout way by continuously reading the voltage and comparing it to a threshold in order to generate a Boolean value to control the case structure (see below (the contents of the case structure is just an example in this case)). However, the execution of the case structure is not very periodic in time using this method i.e. it doesn't always keep up with the TTL signal.
Is there a way to use the DAQmx Triggering.vi to wait for either a rising or falling edge and then execute the appropriate case of the case structure when it finds one? Or is there a better way to synchronise my case structure to theTTl signal?
Thanks
Paul
04-22-2009 07:15 AM
You might get what you already have to work if you speed up your sampling rate. Open up your DAQ Assistant and check the settings. As long as your TTL signal isn't faster than the loop rate & computer capability, then it should be able to keep up.