Hi Arun,
You should be able to read and write from two separate loops or VIs using the DataSocket functions. However, I would suggest using two separate data items for the cross communication between the loops/VIs. In that case you wouldn't have to take into account that you might be reading the string that you just wrote from the same loop/VI.
It will be helpful it you could post the VI that gives you the trouble, thanks.
- Philip Courtois, Thinkbot Solutions