Hi Ankit,
Just as a peice of advice, more people will see your discussion forum post if you post it under the correct category. You posted this question under the VME VXI section of the forums, but it doesn't seem as if your question is related to VXI. You will tend to get a lot visibility on your post if you post under the correct section.
I do have some clarification questions that might be good to include when you repost this issue in the right section.
You mentioned that you are using DAQ, but then you talked about making VISA Open and VISA close calls. Are you using third party instruments, or are you using DAQ hardware, or both? It might be good to tell us what type of hardware you are using.
Additionally it is a little hard for me to visualize your code. By either attaching a screenshot or your code, I believe that we would be able to clear up some confusion. Providing a screenshot of the error would be helpful as well!