Serial Port connection check

This forum is for eXpress++ general support.
Message
Author
ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

Re: Serial Port connection check

#11 Post by ampandya »

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

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Serial Port connection check

#12 Post by c-tec »

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
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

Re: Serial Port connection check

#13 Post by ampandya »

Thank you Rudolf, :clap:

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 :dance:

Many Thanks

Post Reply