LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I trigger an event after acquiring an analog signal through USB-6008? And then output this event through the USB-6008?

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?

0 Kudos
Message 1 of 6
(3,868 Views)

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"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,867 Views)

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

0 Kudos
Message 3 of 6
(3,863 Views)

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,858 Views)

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

untitled.JPG

 

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  

0 Kudos
Message 5 of 6
(3,845 Views)

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,825 Views)