Hey Basa,
Is this a national instruments instrument driver that you are using? I was trying to look for the driver so that I could take a closer look at what you were doing, but I could not find that driver. If you wouldn't mind pointing me to where you found that driver and I could take a look.
Also, one option is to run NI-SPY while you run the program and push that button. This will allow you to see exactly what commands are being sent to your instrument. If you find out where the exact problem is, we can try to fix the issue.
Scott G.
AE Specialist
National Instruments