LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite analog output - digital trigger


@dave6k wrote:

, I set the duration to 2 ms and the samples per channel to 2.1 ms with a 50 Hz trigger and it is OK, but not if both are 2 ms.


Samples per channel is an integer and it represent the number of samples produced by one channel.  It is not a timing number.  So you cannot set samples per channel to 2.1 and the units are not in ms.  There are no units.  So try to explain again what you are doing.  Or attach a snippet of your new code.

 

To output a pulse on every trigger edge, set the counter for finite samples, number of samples to 1, and frequency to 1000 for a 1ms pulse or 500 for a 2ms pulse.  this should procude a pulse every 20ms or 50 pulses per second.

 

How are the AO and the counter related.  Is your AO clock source the counter output?  If not, then the AO is not related to the counter at all.  What is your intention?

- tbob

Inventor of the WORM Global
0 Kudos
Message 11 of 13
(637 Views)

I have set the AO rate to 10000 samples/sec and I have a 21 sample data array, therefore it is 2.1 ms.

 

AO clock source is the counter output.

 

Here's the new code.18997i950498B5F087AFBC

0 Kudos
Message 12 of 13
(629 Views)

So your counter should produce a pulse every 20mS and your AO outputs for 2.1mS.  It should work if you set the counter frequency to 1000.  But you have it wired to the same as the AO which is 10000.  This will produce a very short pulse, but that may be OK.  Set samples per channel to 1 for the counter.  You only want the counter to produce one pulse per trigger.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 13 of 13
(618 Views)