Hi Kumaraguru,
There are a couple of things to try first here.
1. Open up measurement and automation explorer (MAX) and check that the 6704 card has been detected.
2. Test the resources in MAX and ensure the card is working correctly.
3. Ensure that you are passing the correct device number to the device from your example code.
Hope this helps,
Nick