From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

can I generate a trigger with counter out put?

Hello David,

 

Thankl you very much for your reply.

As per you advice I changed my samples per channel to 90 samples.

I did that by decreasing my Frequency to 11.11K.

My oscilloscope outputs look better than before but not exactly the single pulse sine wave.

The channel one is sine pulse.

The rest of the channels are not.

Please help.

 

capture12.PNGIMAG0083.jpg

0 Kudos
Message 31 of 36
(3,081 Views)

Hi Puspa,

 

I'm sorry if I didn't make myself clear.  You CANNOT resolve this issue by changing your frequency.  The number of samples you write to your "Samples per channel" terminal on your DAQmx timing VI needs to equal the sum of "#s" and the longest array of zeroes. In other words, your "Samples per channel"  CANNOT be equal to "#s" as is currently the case in your code.  This additive relationship must hold true regardless of your frequency.

 

1.  Change your frequency back to whatever it was before you changed it to 11.11k.  

2.  Delete the small orange jumper wire circled below that currently feeds into your "Samples per channel" terminal.

3.  Wire in a constant to your "Samples per channel" terminal that is equal to the sum of "#s" and your longest array of zeroes.  If "#s"=50 once your change your frequency back and your longest array still equals 40, wire in a constant of 90.  Do not change any other parameters.

 

Untitled1.png

 

Regards,

 

David R
Systems Engineer
National Instruments
0 Kudos
Message 32 of 36
(3,074 Views)

Hello David,

Thank you very much for your reply.

 

You were very clear in your explanation the first time, My apologies I could not understand better. This time I made change in my sample not in my frequency Smiley Happy and the output is perfect. The four single sine pulse from four channels. Picture attached.

 

I am very grateful to your help so far and I need a little more push to complete this task.

 

So far I am achieving following output successfully

 

AO Channel 1: DATA

 

AO Channel 2: -----50us wait-----DATA

 

AO Channel 3: ---------------100us wait---------------DATA

 

AO Channel 4: --------------------------150us wait-------------------------DATA

 

and this is triggered with Trigger A ( A is a 0-5V DI using PFI0)

 

But I need to use another trigger (Trigger B, trigger B is a 0-5V DI using PFI1) and reverse my output sequence.

 

final output should do following .

 

Trigger A results to…

 

AO Channel 1: DATA

 

AO Channel 2: -----50us wait-----DATA

 

AO Channel 3: ---------------100us wait---------------DATA

 

AO Channel 4: --------------------------150us wait-------------------------DATA

 

Trigger B results to...

 

 AO Channel 4: DATA

 

AO Channel 3: -----50us wait-----DATA

 

AO Channel 2: ---------------100us wait---------------DATA

 

AO Channel 1: --------------------------150us wait-------------------------DATA

 

In other words the output signal and delay sequence is reversed.

 

I hope my explanation is clear.

 

 best regards,

Puspa

 

0 Kudos
Message 33 of 36
(3,066 Views)

Image of current output

 

IMAG0087.jpgCapture87.PNG

0 Kudos
Message 34 of 36
(3,064 Views)

Hi Puspa,

 

There is no way to accomplish this in hardware, as only one line can be routed to the internal analog out trigger terminal. We also cannot write the data to the buffer and then later assign which channel will actually output the data.  We should be able to accomplish this in software with a pair of digital tasks and change detection events, but this would induce some delay (probably on the order of tens of miliseconds) between receiving the trigger and seeing the output signal.  If you need finer timing, then you could potentially use a second card with AO channels, an R-series/FPGA card, external switch circuitry, or some other solution.

 

Regardless, I would encourage you to make a new forum post at this point since the original question has been resolved and this triggering question could get more community exposure from being on a new thread.

 

Best,

 

David R
Systems Engineer
National Instruments
0 Kudos
Message 35 of 36
(3,054 Views)

Hello David,

Thank you very much for all your help. Your explanations were very clear and provided me a great learning experience.

As per your advice I will post my trigger problem in new forum post. And also see my alternatives hardware options.

Once an again thank you very much.

Best,

Puspa kunwor

0 Kudos
Message 36 of 36
(3,036 Views)