Hello J,
The first thing I would recommend is to take a look at the NI-DAQmx
text-based example programs, in order to get an idea of how to program
a pulse generation task. These examples should be installed by
the NI-DAQmx driver in the following directory on your machine:
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Counter\Generate Pulse
The DAQmx function names are the same across all text-based programming
languages. I would also recommend the NI-DAQmx C Reference Help
for descriptions of individual DAQmx functions, located at Start >
All Programs > National Instruments >> NI-DAQ.
For a triggered pulse generation, you specify a PFI line to receive the
trigger using the DAQmxCfgDigEdgeStartTrig function. When
configuring your task using the DAQmxCreateCOPulseChanFreq function,
there is an input for 'initial delay' that sounds like what you are
looking for. Take a look at the example program title
DigPulseTrain-Cont-DigStart.c for an idea of how to use these functions.
To answer your second question, you might be able to accomplish this
with the DAQmxCreateCOPulseChanTime function. This function is
used to specify the specifications of your pulse in terms of high and
low time, instead of through frequency and duty cycle as shown in the
DAQmxCreateCOPulseChanFreq function. You could specify an initial
delay for the first delay, specify a high time for your first pulse,
specify a low time for the delay between the first and second pulses,
and then your second pulse would have the same high time as your first
pulse. You might need to play with the 'idle state' parameter to
get this to work, but it seems like it should be possible to do this
all on one line.
Take a look at these resources to get started, and let us know if you
have any further questions as you go. Good luck with your
applicaiton.
Regards,
Travis G.
Applications Engineering