whywhywhy,
If you are trying to do PWM, you may want to look at the following example:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DE27921DB53A4D8DE034080020E74861&p_node=201198&p_source=External
To do what you suggest, I would track the amount of time since the
start of the output while loop (perhaps using the "Get Date/Time In
Seconds" VI). Afterwards, stop the task and then wait 5 seconds. You
can put everything from the start task to the stop task in a while loop
and this process will continue until you stop the outermost while loop.
Good Luck!
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments