Hi,
I am using a NI 6052E card with Matlab 2020 (with Data Aquisiotin and Instrument Control Toolbox) and would like to use the Ctr0 as pulsegeneration TTL output (e.g. f1=1MHz) and then trigger this frequency with a second counter output (Ctr1, f2=200kHz) so that Ctr0 only generates pulses when Ctr1 is high.
This way I want to generate pulsetrains, in this example 5 TTL pulses, then pause, 5 pulses, pause, etc.
My code is at the moment around:
d = daq("ni");ch1 = addoutput(d,"Dev1", "Ctr0" ,"PulseGeneration");
ch2 = addoutput(d,"Dev1", "Ctr1" ,"PulseGeneration");
ch1.Frequency = 1000000;
ch2.Frequency = 200000;
trig = addtrigger(d,"Digital","StartTrigger","External","Dev1/Ctr0Gate");
start(d, 'Duration', seconds(10));
I connected the output Ctr1out via cable to Ctr0Gate. However Ctr0 is generating TTL signals all the time, ignoring this trigger input at the gate channel and I don't know why.
Any help is appreciated,
Michael S