07-23-2007 10:02 AM
07-23-2007 11:21 AM
07-24-2007 05:46 PM
Hello Yin,
What DAQ board are you using? You could use a counter to generate the 1 sec pulse. (Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Generating Digital Pulses >> Gen Dig Pulse.vi) If the pulse starts out high, then you will not have a rising edge for analog acquisition. If you put an initial delay on the pulse, then you would have a rising edge for data acquisition.
The analog input task is going to be triggered off the rising edge of the counter. This can be done by changing the source of the trigger to the output of the counter. Right-click on the I/O control and select I/O Name Filtering. This should bring up a new window with a check box for advanced terminals. Once this box is selected, you should be able to select Ctr0InternalOutput as your source. This will automatically internally route the signals. Now your analog acquisition will start on the rising edge of your counter pulse.
There is a great example that demonstrates how to synchronize two different tasks. (Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Synchronization >> Multi-Function >> Multi-Function-Synch AI-AO.vi) You want to make one task a slave and the other task a master. You want to start the slave task then start the master task.