I've made a small application to drill some holes on a CNC machine. The output of the program is a text file. I want to transfer this file to my CNC machine by means of a serial cable. To do so, I'm using the print command
Code: Select all
open "hoekverdraaiing_HAAS.nc" for input as #HaasNC
open "com1:9600,n,8,1,ds0,cs0,rs" for random as #comm2Handle
while EOF(#HaasNC)=0
input #HaasNC, lijn$
'print #comm2Handle, lijn$
print lijn$
print #main.statusbalk, lijn$
wend
'sluit com2 poort
close #comm2Handle
'sluit HAASNC file
close #HaasNC
This is working well, except for one thing. The file contains some commas (","). During the transfer these commas are transformed in CR/LF.
How can I overcome this problem? When I'm using a dedicated transfer program, this problem does not occur.
Thanks for your input.