Hello kima111,
If I am understanding what you are trying to do, you are doing a finite analog voltage generation of a square wave and output the wave 100 times. Then you want to be able to stop the generation on command (before the 100 cycles completes). I was able to accomplish this by slightly modifying the Gen Mult Volt Upatates-Int Clk.vi example program like this:

I changed the sample clock timing and then changed the way the vi checks when the vi is done (I use the Is Task Done.vi and a loop). This way, when you press the abort generation button, the task clears and the generation stops immediately.
If you are doing digital generation, the example titled Write Dig Chan-Ext Clk.vi does something similar.
Just as a note, you should avoid using the actual abort button (or vi). I am not sure if you are, but using this stops everything and does not release resources. This can cause strange behavior and some other issues.
I hope this helps. If this is not what you are trying to do, I would appreciate some more information about what exactly you are trying to do an how you are trying to accomplish it.
Message Edited by Neal M on
02-01-2008 01:23 PM
Neal M.
Applications Engineering National Instruments www.ni.com/support