Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Point of sale
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows '98
Database:
Visual FoxPro
Divers
Thread ID:
01074144
Message ID:
01074545
Vues:
15
*** QUOTE ****


Hello Experts
I have a couple of questions. One of our clients have bought a POS machine with the cash drawer and a pole display to display the gross amount. To display the gross amount i have to send a .txt file to the com port. My question is how to do it and how to send the Hex code to the com port to open the drawer.


*** END QUOTE ***

Let say your cash drawer is connected to COM1, to open it,
You can issue command like below:



Set Device to Print
Set print to "COM1"
??? CHR(7)
*set print to
Set device to Scree


If your client cash drawer is connected to the receipt printer's LPT port,

install GENERIC printer driver, rename to POSPRT or whatever according to your likings...

Set devi to print
set print to name "POSPRT"
??? CHR(7)
*set print to
Set devi to screen




To send display to Customer's Pole Display,
you can drop MSCOMM control to your form,
set its setting, baud rate, etc.
Or just use @ commands

*/* Check windows version
IF ALLTRIM(m.OSVER) = "Windows 5.02"
   WITH THISFORM
        .slscom.PortOpen = .T.
	.slscom.Output = Space(21)
	.slscom.Output = Space(26)
	.slscom.Output = Alltrim(Transform(nQuantity))+' @ '+"B$"+" "+Allt  (Transform(ySell,'9,999,999.99'))+CHR(11)+;
	Substr(cDescription,1,20)+CHR(11)
	.slscom.PortOpen = .F.
   ENDWITH
Else
    SET DEVICE TO PRINT
    SET PRINTER TO "COM2"
    @1,1 Say SPACE(20)
    @2,1 Say SPACE(20)
    @1,0 Say TRANSFORM(nQuantity)+' @ '+' B$ '+ ALLTRIM(TRANSFORM(ySell,'9,999,999.99'))
    @2,0 Say Substr(cDescription,1,20)
    SET PRINTER TO
    SET DEVICE TO SCREEN
Endif
Code are tested with Windows XP.
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform