Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

sending text files over serial port

I am trying to send a text file to a device over the serial port. I am able to send the file with another program, but not with LabVIEW. I have been using the serial compatability vi's. Any suggestions?
0 Kudos
Message 1 of 3
(3,179 Views)
That would, in part, depend on the size of the text file. If the text file is not too large, then you can use the Read Lines From File.vi and just feed the string output from that vi directly to the Serial Port Write.vi. If the text file is very large, you may have to read it in chunks and send each piece separately.

You may want to try the VISA VIs, but this does not work with all computer/IO card combinations.

Rob
0 Kudos
Message 2 of 3
(3,179 Views)
In the old days...

You used to be able to do a

copy FileName com1

from the dos prompt.

You should be able to use the Exec to pull this off.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(3,179 Views)