Hi,
Have you moved the code at all, it sounds like the error is being caused as the task is no longer defined on the system. The task constant on the block diagram is referring to a task set up in Measurement and Automation Explorer (MAX). Take a look in here and check under the data neighborhood section of the tree in the DAQmx Tasks and make sure that the task "MyVoltageOut0" exists and that it is all working correctly, the task can be tested from within MAX. If this is all setup correctly and no errors are reported in MAX, the LabVIEW code you posted should work fine.
Give this a go, if you have more problems, post back and I'll take a look.
Regards
Hannah
Applications Engineer
National Instruments