Dear all,
Win7 64-bit, NIDAQmx 9.5.1., PCIe-6353
I am attempting to do very simple things with counters on a X-series board, without success. Can anyone help? Thanks a lot.
(code simplified for the sake of clarity)
1) TTL-triggered single pulse generation
What works:
After task creation, I call
DAQmxCreateCOPulseChanTicks(myTask, "Dev2/ctr2", 0, "/Dev2/100MHzTimebase", DAQmx_Val_Low, 100, 3000, 5000);
DAQmxCfgImplicitTiming(myTask, DAQmx_Val_Finite_Samps, 1);
and I start the task, no problem, one pulse is generated
What I'd like to do is to trigger the pulse repeatedly on PFI1 so I add:
DAQmxCfgDigEdgeStartTrig(myTask, "/Dev2/PFI1", DAQmx_Val_Rising);
DAQmxSetStartTrigRettrigerable(myTask, True);
I put a periodic voltage from 0 to 5V on PFI1. No triggering, the voltage amplitude falls by half. When I replace DAQmx_Val_Rising by DAQmx_Val_Falling, the pulses come out, but back to back and never synchronized with the voltage on PFI1. All function calls are successful. I must be doing something wrong, but what?
2) Buffered pulse generation. I want to use the 100MHz timebase (i.e., 10 ns / tick) to output very short pulses, most of them with a duration of 20 ns when high and 20 ns when low (when repeated, this gives a pulse frequency of 25 MHz). I load the counter with an array of values using DAQmxWriteCtrTicks. NI-DAQmx complains when the interval values in the High and Low tick buffers are equal to 2 (which is what I want, since this is the value needed to get a duration of 20 ns). Is this a limitation of NI-DAQmx, i.e., you cannot have pulse tick counts equal to 2? If this is the case, is there a way to output 25 MHz from a PCIe-6353?
Best regards.
2) TTL-triggered multiple