Anand,
If you remove the while loop and write a single value to the PLC does it not maintain that value? It is possible that your very fast loop rate in you VI is causing the PLC to miss values, but I don't know why that would be converting it to what looks like the default value. I might verify that you have the OPC server set up correctly.
Here is a link to a tutorial about setting up RSLinx and connecting to that with LabVIEW.
Please let me know how this turns out! Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments