Please if someone Knows how I can open com1 and sent any kind of data to open a cash drawer. The drawer accept any type of data and performs its functions. Thank in advanced.
Gigatech,
I hope you know that this will likely NOT work on NT / 2000 / XP, and depending on configuration settings and other applications, may not work under 95 / 98 / SE / ME.
Writing directly to COM ports directly with low-level IO only works consistent when running FPD on DOS (not in Windows). Even the FPW help file states "Ports cannot be opened with low-level file functions in FoxPro for Windows and FoxPro for Macintosh."
I work with POS application under FPW26 on Windows 95/98/ME and I open cash drawers, write in Customer displays and print "in line" without problems.
I set the com port up to be a printer port and then send something to it. Like this...
************************
! mode com1 96,n,8,1 * Run once
! mode lpt3 = com1 *
************************
then.....
***************************
save sys(6) to MPRINTERWAS* To open the drawer
set printer to lpt3 *
??? "X" *
set printer to MPRINTERWAS*
***************************
You could probably just set the com port up with...
! mode com1 96,n,8,1 && run once
set printer to com1
??? "X"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.