Hi Rolly
The wafgen class basically sets up the daqmx task by automatically calling configuration methods for you. So one way you can use this is the following
In your WaveformDoc.h, add the following
public:
Cwafgen aoGen;
This will setup and configure the DAQmx task for you.
Then in your document initializarion routines, you can verify the task by calling the following method.
aoGen.Control(DAQmxTaskVerify);
To see how you can use the CNiDAQmxTask class to setup an analog output operation, check out the ContGenVoltageWfm_IntClk example under < Measurement Studio folder > \DAQmx\Analog Out\Generate Voltage\ContGenVoltageWfm_IntClk. This is a dialog application, but it demos how you can setup the daq analog output operation by clicking on a button. Since you have already done the configuration using the wafgen class, you can refer to the part of the example that shows how to use the CNiDAQmxAnalogSingleChannelWriter class(or the multi channel writer class if you are writing to multiple channels)
I hope this helps
Let me know if you have any questions.
Bilal Durrani
NI