sorry, that I missed to mention where you can find the VIs I have used. This was my first post. I hope this was nevertheless helpful to solve your problem.
one question: I think the collection of variant VIs in vi.lib directory are very useful. I wonder why these VIs do not appear in Labview when I search for them in the functions palette?
It is a pity that there are so many functions within labview which we do not use because we do not know they are there...