I'm doing some tests to decide whether or not I use this software I have not yet purchased.
I print a plain text file through the serial port.
I built the file this way:
FileOpen (c1,"arch.txt",cWrite,,cASCII)
FileWrite (c1," " & txbNumero.Text)
FileWrite (c1,"")
FileWrite (c1,"NOMBRE ")
FileWrite (c1,"")
FileWrite (c1,"")
For i=0 To grid1.rowcount - 1
dato = grid1.Cell("CODE",i)
largo = StrLength(dato)
espacio = SubString (dato,(largo+1),(10-largo))
renglon = dato & espacio
dato = Format(grid1.Cell("IMPORT",i), "N2")
largo = StrLength(dato)
espacio = SubString (dato, (largo+1), (12-largo))
renglon = renglon & espacio & dato
FileWrite(c1, renglon)
Next i
FileClose (c1)
Then send it this way:
Serial.New1
Serial.CommPort = 6
Serial.BitRate = 9600
Serial.PortOpen = True
Serial.EnableOnComm = True
FileOpen (c1,"arch.txt",cRead ,, cASCII)
r = FileRead (c1)
Do Until r = EOF
Serial.Output(r)
sum = sum + r
r = FileRead (c1)
Loop
FileClose (c1)
Serial.PortOpen = False
But I have this problem:
Starts printing, it prints the number (txbNumero.Text), then the word NOMBRE and then gives an invalid format error.
It does not respect the line break. What is the code for line break?
Why give that format error?
I tested HP directly into a PDA and also on my pc, assigning the COM port to LPT1
I appreciate any help. If I can not fix this, I can not use this software.
Greetings.
I print a plain text file through the serial port.
I built the file this way:
FileOpen (c1,"arch.txt",cWrite,,cASCII)
FileWrite (c1," " & txbNumero.Text)
FileWrite (c1,"")
FileWrite (c1,"NOMBRE ")
FileWrite (c1,"")
FileWrite (c1,"")
For i=0 To grid1.rowcount - 1
dato = grid1.Cell("CODE",i)
largo = StrLength(dato)
espacio = SubString (dato,(largo+1),(10-largo))
renglon = dato & espacio
dato = Format(grid1.Cell("IMPORT",i), "N2")
largo = StrLength(dato)
espacio = SubString (dato, (largo+1), (12-largo))
renglon = renglon & espacio & dato
FileWrite(c1, renglon)
Next i
FileClose (c1)
Then send it this way:
Serial.New1
Serial.CommPort = 6
Serial.BitRate = 9600
Serial.PortOpen = True
Serial.EnableOnComm = True
FileOpen (c1,"arch.txt",cRead ,, cASCII)
r = FileRead (c1)
Do Until r = EOF
Serial.Output(r)
sum = sum + r
r = FileRead (c1)
Loop
FileClose (c1)
Serial.PortOpen = False
But I have this problem:
Starts printing, it prints the number (txbNumero.Text), then the word NOMBRE and then gives an invalid format error.
It does not respect the line break. What is the code for line break?
Why give that format error?
I tested HP directly into a PDA and also on my pc, assigning the COM port to LPT1
I appreciate any help. If I can not fix this, I can not use this software.
Greetings.