It seems that once a task is configured for buffered counter output, it becomes impossible to re-configure the task for on-demand counter output:
Attempt 1:
Result: Conflicting properties error at 2nd start:
Attempt 2 (CO.MemMapEnable is now set to false before starting the 2nd task):
Result: Internal Error -88700 (yikes!) at 2nd start:
So it seems that in order to reconfigure a task to On-Demand I need to set CO.MemMapEnable to False, but trying to do so results in a non-descriptive "Internal Error".
For my application, the reason I want to do this is that I have a number of task parameters known during initialization (trigger source, digital filtering, output terminal, counter resource, etc.) and I would have preferred to re-use the same task and avoid re-writing all of the same information repeatedly. The reason that switching between finite and on-demand pulses is necessary for me is that finite requires at least 2 pulses, when my user may very well only wish to generate a single pulse (but the pulse output is defined at runtime so I have to be able to accomodate switching between single pulse or finite pulses).
I guess I'll have to clear and re-build my task every time my user wishes to switch between single and multiple pulse generation, but in case there is another workaround (or upcoming bug fix, I'm using DAQmx 9.5.1) that I have overlooked could somebody please let me know. Assuming this is indeed a bug, I would also be interested in the CAR ID.
Best Regards,