Thank you all,
I have go this working with the code below:
nport=val(substr(P_PORT_RECEIPT,4,1))-1
xxcode = XSioCTS(nPort)
do while xxcode=0
if qbox("Printer is not on, Please check the connection.",{"Retry","Cancel"}) == 2
return
exit
endif
enddo
it still not checking the status all the times, but when someone press the receipt button, at least the program will not freeze now.
Many Thanks
Serial Port connection check
Re: Serial Port connection check
Hello,
you forgot something
nport=val(substr(P_PORT_RECEIPT,4,1))-1
xxcode = XSioCTS(nPort)
do while xxcode=0
if qbox("Printer is not on, Please check the connection.",{"Retry","Cancel"}) == 2
return
exit
xxcode = XSioCTS(nPort)
endif
enddo
Check for ESC sequences for this printer to get a correct status.
regards
Rudolf
you forgot something

nport=val(substr(P_PORT_RECEIPT,4,1))-1
xxcode = XSioCTS(nPort)
do while xxcode=0
if qbox("Printer is not on, Please check the connection.",{"Retry","Cancel"}) == 2
return
exit
xxcode = XSioCTS(nPort)
endif
enddo
Check for ESC sequences for this printer to get a correct status.
regards
Rudolf
Re: Serial Port connection check
Thank you Rudolf,
nport=val(substr(P_PORT_RECEIPT,4,1))-1
xxcode = XSioCTS(nPort)
do while xxcode=0
if qbox("Printer is not on, Please check the connection.",{"Retry","Cancel"}) == 2
return
exit
endif
xxcode = XSioCTS(nPort)
enddo
It checks and print the receipt if the printer is on (now) and press Retry
Many Thanks

nport=val(substr(P_PORT_RECEIPT,4,1))-1
xxcode = XSioCTS(nPort)
do while xxcode=0
if qbox("Printer is not on, Please check the connection.",{"Retry","Cancel"}) == 2
return
exit
endif
xxcode = XSioCTS(nPort)
enddo
It checks and print the receipt if the printer is on (now) and press Retry

Many Thanks