10-30-2013 10:46 AM
How can I trigger an event after acquiring an analog signal trigger from USB-6008? And then output this event (a sine wave pulse with prespecified number of cycles) through the USB-6008?
10-30-2013 10:52 AM - edited 10-30-2013 10:53 AM
Hi Faisal,
what kind of "event" do you want to trigger? You could use user-defined events...
To output a sine wave you have to output the values of the wave one by one in a loop as the manual says: "All updates of analog output channels are software-timed." and "Maximum update rate: 150 Hz"...
10-30-2013 11:03 AM
First of all thank you very much for your fast response sir
Second, My triggering pulse is going to be received by the USB-6008 and it is a TTL signal.
I want as soon as I receive this triggering signal to start a sine wave for lets say three cycles (the cycles are defined by the user).
To let you know I am still a beginner in LabVIEW 🙂
Many Thanks again
10-30-2013 11:07 AM
Hi Faisal,
the USB6008 supports a digital trigger input PFI0. AFAIK it only works as start trigger for the AI channels (as AO channels only support software-timed access).
So you can wait on a digital input to go to HIGH state and then start your loop to output the sine wave signal...
See the example finder for basic DAQmx example VIs...
10-30-2013 12:26 PM
Honestly speaking I didnt understand the soultion
Can you please kindly explain more?
To let you know here is the block diagram that I have made
So I am trying to aquire a triggering signal (a TTL start signal) from the USB6008 (I am using channel AI0) and then to start the Sine wave from the Simulate Signal VI. I need the sine wave to have a user defined cycles (In my block diagram I am controlling the loop to control the sine wave cycles, but it is not worknig well when the trigger signal increas in frequency).
Sorry for taking from your time. Thanks
10-31-2013 02:45 AM
Hi Faisal,
- why do you use AI0 when you have a TTL signal suitable for any digital input?
- using ExpressVIs will not be very helpful in your case, learn to use simple DAQmx functions. (There are free online courses and a lot of example VIs!)
- You current approach is not what you describe as your task! Running a FOR loop for x times will not give a sine wave with x periods...