Anil,
The best resource for programming in DAQmx is the NI Example Finder. There is an example called "Read Dig Chan.vi" that I think you should take a look at. If you go to Help>>Find Examples in LabVIEW, the Example Finder will open. Double-click on the folder labeled "Hardware Input and Output", then "DAQmx", then "Digital Measurements". You will see the Read Dig Chan example in that list. Take a look at the block diagram of it. Save a copy of it and modify it to fit your needs.
Note that in this example the DAQmx Read is the only DAQmx VI in the while loop. It is unnecessary and time consuming to create the channel and clear the channel over and over again.
--
Michael P
National Instruments