Hello Shabu,
Thank you for contacting National Instruments.
To obtain real-time response while the test stimulus is being sent to the unit under test (UUT), you should place a single point Analog Output (AO) and Digital Input (DI) in the same while loop. In this configuration, you will be sending an AO to the UUT and reading the resulting DI for each iteration.
If this doesn�t solve your problem, please respond with more information. I would also be happy to take a look at your existing code and offer further ideas.
Have a great day.
Sean C.
Applications Engineer
National Instruments