Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample a microsecond pulse (analog input) to generate an analog output trigger of millisecond pulse

Hi all,

 

I have a daq 6361 with bnc connector, I and wondering if can sample the analog input pulse of 4.5 usec pulse and -0.1v to generate an analog out put pulse of square wave of 3 ms and 2 v. I tried to use "Gen Mult Volt Updates-Int Clk-Retriggerable" example but was not succesfull in getting the analog input pulse detected by the daq board.

I want to generate the analog output trigger when the analog input pulse is present.

0 Kudos
Message 1 of 9
(5,489 Views)

AnkitG,

 

When you say that you were not successful in getting the analog input pulse detected do you mean that you were unable to use it to trigger your output pulse or that you unable to measure it entirely?

 

What rate are you sampling at? 

What shape is the input pulse? How long is the pulse at -0.1V?

What voltage level are you using to trigger your output pulse?

 

With a little more information hopefully we can figure out why you aren't able to detect the input pulse.

 

Regards

Carli S.
Troubleshooting & Maintenance Digital Business Manager - NI
0 Kudos
Message 2 of 9
(5,443 Views)

@SeaSick wrote:

AnkitG,

 

When you say that you were not successful in getting the analog input pulse detected do you mean that you were unable to use it to trigger your output pulse or that you unable to measure it entirely?

 

What rate are you sampling at? 

What shape is the input pulse? How long is the pulse at -0.1V?

What voltage level are you using to trigger your output pulse?

 

With a little more information hopefully we can figure out why you aren't able to detect the input pulse.

 

Regards


I was unbale  to use the analog input pulse to generate the output pulse.

 

Input pulse is a square wave of 4.5 microsecond

 

Voltage level is -5 to +5 v,  

 

I am using the example  "Gen Mult Volt Updates-Int Clk-Retriggerable" I used APFIO input with voltage level -0.1v in the analog trigger selection

 

When I use the input pulse of 1.3 millisecond I was able to generate the output trigger, but not with the 4.5 microsecond pulse, will it be because of daq card couldnt detect microsecond pulse?

 

thanks

0 Kudos
Message 3 of 9
(5,441 Views)

 

What did you set as your trigger for your ao task?   I think you'll want to use the "AnalogComparisonEvent" signal.  To find it, you may need to right click on the 'Trigger Source' control and select "I/O Filtering" then check the box for "Include Advanced Terminals".   You can then left-click the control, and pick "Browse..." from the very top of the list.  Search through there for your AI device and its corresponding "AnalogComparisonEvent" signal to use as a trigger for your AO task.

 

BTW, if you'd like the "Advanced Terminals" to be visible and available by default, go add your voice here.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 9
(5,418 Views)

@Kevin_Price wrote:

 

What did you set as your trigger for your ao task?   I think you'll want to use the "AnalogComparisonEvent" signal.  To find it, you may need to right click on the 'Trigger Source' control and select "I/O Filtering" then check the box for "Include Advanced Terminals".   You can then left-click the control, and pick "Browse..." from the very top of the list.  Search through there for your AI device and its corresponding "AnalogComparisonEvent" signal to use as a trigger for your AO task.

 

BTW, if you'd like the "Advanced Terminals" to be visible and available by default, go add your voice here.

 

 

-Kevin P


Hi Kevin,

 

I using waveforme generation buffer .

Attached is the example i am using. 

Trigger input is coonected to PFI0 and analog output is ao 0. The pulse is a 4.5 microsecond pulse with -0.1v amplitude.

All i want is whenever that input pulse is detected , generate an output square wave of 2v so that I use it to trigger my device.

 

How should I use " AnalogComparisonEvent" , do I have to use different Analog input? my daq device is USB 6361 with bnc connector.

 

Capture47.PNG

0 Kudos
Message 5 of 9
(5,413 Views)

AnkitG,

 

What analog input are you using for the trigger? Can you provide a screenshot of your front panel as well so that we can see the channels selected.

 

 

Regards

Carli S.
Troubleshooting & Maintenance Digital Business Manager - NI
0 Kudos
Message 6 of 9
(5,387 Views)

It looks like you're using a shipping example with few if any modifications.  That's a good place to start, we can assume it's fundamentally sound.  However, it's not *quite* gonna cover your needs.  Here's the main change I think you need to make:

 

analog trigger event.png

 

 

The analog signal you're triggering off of needs to be wired to an APFI input (you mentioned APFI0 in an earlier post).  You will need to have a retriggerable Analog Input task set up to use this signal as an Analog Start Trigger (the version of the vi shown in your last pic, but you show it for your AO task).  When the analog triggering conditions are detected, the AI task is triggered *AND* an internal digital pulse known as the "Analog Comparison Event" is generated.  Your AO task needs to be set up for a DIgital Start Trigger that triggers off of this internal digital pulse.

 

Note that if your finite-sampling AI task will not re-arm itself for the purpose of re-triggering until it completes all the specified AI samples.  Similar for the AO task.  Just something to watch for to make sure both are ready in time.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 9
(5,376 Views)

@Kevin_Price wrote:

It looks like you're using a shipping example with few if any modifications.  That's a good place to start, we can assume it's fundamentally sound.  However, it's not *quite* gonna cover your needs.  Here's the main change I think you need to make:

 

analog trigger event.png

 

 

The analog signal you're triggering off of needs to be wired to an APFI input (you mentioned APFI0 in an earlier post).  You will need to have a retriggerable Analog Input task set up to use this signal as an Analog Start Trigger (the version of the vi shown in your last pic, but you show it for your AO task).  When the analog triggering conditions are detected, the AI task is triggered *AND* an internal digital pulse known as the "Analog Comparison Event" is generated.  Your AO task needs to be set up for a DIgital Start Trigger that triggers off of this internal digital pulse.

 

Note that if your finite-sampling AI task will not re-arm itself for the purpose of re-triggering until it completes all the specified AI samples.  Similar for the AO task.  Just something to watch for to make sure both are ready in time.

 

 

-Kevin P


Hi Kevin,

 

Thank you, Can you clear out little bit more. So I should create another an anolog input (AI physical chanel) and create a task for it ? or should I just change the vi as you mention to " digital trigger with analogcomparisonevent"

 

attached is the front panel of the vi

0 Kudos
Message 8 of 9
(5,368 Views)

 

I don't have hw to test on, but my understanding is that YES, you will need to have an AI task running in order to activate the analog triggering circuitry and generate the "Analog Comparison Event" which in turn is needed to act as a digital start trigger signal for your AO task.

 

You may want to make a "dummy" AI task that takes a minimum # of samples at a high rate on a single channel so it can be ready for retriggering again ASAP.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 9 of 9
(5,364 Views)