LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send text file via serial

hi

i've trying to send a text file via rs-232 but no success

 

The file contains a code for a device im dealing with, when i send the text file with labview to the device, it went ok with no errors, but when i connect the device on hyperterminal and check if the code was loaded it was not.

 

can you please give some clues to deal with this?

 

thanks a lot

 

attached example text file and LV code

Download All
0 Kudos
Message 1 of 4
(2,245 Views)
It looks like you are reading the entire file at once so the loop is pointless. You may in fact need to write a line at a time with each line terminated correctly or each command. In either case, you want to read the file once and create a string array that is indexed by s for loop.
Message 2 of 4
(2,238 Views)

Some devices are very picky with the End Of Line.  You might want to right-click on your FIle Read and deselect the "Convert EOL".

 

Or if you need to write 1 line at a time, right click on the Read Text File and select "Read Lines".  Set the number of line to read to -1 (read all) and then wire the resulting array into a FOR loop where you do the VISA Write.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(2,188 Views)

Thanks for your replies

 

it seems the for loop thing worked

 

thanks for helping

0 Kudos
Message 4 of 4
(2,175 Views)