Howdy Minguyen,
Assuming you use a LabVIEW development environment, I would recommend modifying a couple of examples to fit your application. First, take a look at the
Basic 2 Port Serial Write and Read.vi located in the NI Example Finder. (Access the NI Example Finder within LabVIEW by navigating to
Help»Find Examples.) With the NI Example Finder opened, you can search for
serial to bring up the aforementioned example.
Out of the box, this example shows you how to simultaneously read on one serial port while writing to another. You could expand this basic structure to include 8 ports doing whatever (writes or reads) you'd like on each port.
The second example you could combine with the first example is either
Write to Text File.vi or
Write Binary File.vi. Either of these VI's accomplish the task of writing strings to file. (Recall: The output of the VISA Read is a string.) As with the
Basic 2 Port Serial Write and Read.vi, you can access these examples through the NI Example Finder. Just search for
write.
I hope this helps!
Warm regards,
pBerg