Solution
It is possible to reuse the same task without restarting a new one by using the DAQmx Control Task VI. After starting the task and generate the first pulse, unreserve the task will free up the DAQmx resource and the task can be restarted to generate the second pulse. The LabVIEW snippet code below demonstrates the use of DAQmx Control Task VI for on-demand pulse generation without recreating DAQmx task.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW Diagram