Have a look on the examples of LabVIEW...
For DAQmx you can find it here: C:\Programme\National Instruments\LabVIEW 7.1\examples\DAQmx\
An example for a digital trigger is located in this folder: C:\Programme\National Instruments\LabVIEW 7.1\examples\DAQmx\Analog In\Measure Voltage.llb\Acq&Graph Voltage-Int Clk-Dig Start.vi
Our E and M Series devices don't have any built-in functionality specifically designed for telling you when a task starts. But there are several options.
1. You can poll the Total Samples Acquired (probably not the exact name) for input or Generated for output. When it starts to increment, the task has started.
2. You can connect the trigger to a digital line and poll that.
3. You can use the trigger as the source of an edge counting task and poll the number of counted edges. When it goes from 0 to 1, you have your trigger.
4. My favorite, you can use the trigger as a timing source for a timed loop. This only works in LabVIEW. When the trigger arrives, any code you have in the timed loop (light your led) will execute.