I have just started using NI PCI 6221, and have no experience with daqmx ,
NI PCI 6221 : 16 AI -- 2 AO
My basic problem statement is to generate a sine wave give it on ao and then i have connected physically ao with ai of the pci card, then read and analyze the signal from ai.
can anybody provide a good example to do ao & then ai in the same program,
You should start by looking at the examples that are installed when you install DAQmx. Help -> Find Examples -> Hardware Input and Ouput -> DAQmx.
You should also look over the material in the Developer Zone: Getting Started with NI-DAQmx: Main Page
The DAQmx Popup for DSA seems to come from the Sound and Vibration Toolkit which I don't have. I did not see anything immediately wrong. When I remove the DAQmx Popup for DSA and ran the VI using a simulated PCI 6221 the code ran without errors. Were you trying to run it in highlight mode? If you were you'd get the -200279 error which means you weren't keeping up with available data.
Thanks for replying but the sine wave which i am producing is not generated as it is.
as well as when i use the express vis the code runs perfectly what can be the possible reason,
i am attaching the express vi below,
The VI you posted that uses Express VI doesn't have the tasks configured the same way as the code that doesn't use Express VI, so I'm not sure what you're doing anymore. Why do you have a separate Simulate Signal Express VI to create an offset as opposed to just using the "offset" input of the Simulate Signal Express VI. Did you write both VIs? Based on the coding style it seems unlikely.
I also don't understand what you mean by "but the sine wave which i am producing is not generated as it is."