Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP8sp1: Open Cash Drawer RJ12

Status
Not open for further replies.

Kurtwood

Programmer
Sep 7, 2002
39
BS
Hi all,

I am looking for code to open the MMF Cash Drawer Co. VAL-u Line Cash Drawers -- connected with RJ12 cable through a STAR SP300 printer. I am using Microsoft Windows 2000.

The manual indicates control code <Esc><Bel> or (07)H. I have tried ??? CHR(7) but no response from the drawer.

Any help would be appriciated.

Kurtwood
The Bahamas
 
The manual indicates control code <Esc><Bel> or (07)H. I have tried ??? CHR(7) but no response from the drawer.

I don't know anything about that cash drawer, but have you tried:

? CHR(27)+CHR(7)

* Escape + Bell


Jim Osieczonek
Delta Business Group, LLC
 
Thank you Jim. I will try that. In addition, below is the VB code to open that cash drawer. Do you know what would be the VFP equivalent?

VISUAL BASIC
Private Sub CashDrawer_Click()

' OPEN LPT1 FOR OUTPUT
Open &quot;lpt1&quot; For Output As #1

' POP CASH DRAWER
' CMD: <BEL>
Print #1, Chr$(7)

' CLOSE THE LPT1 PORT
Close #1

End Sub
 
Something like the following may work for you:

SET DEVICE TO PRINT
SET PRINTER TO
??? CHR(7) && this maybe all that is needed, other lines included just in case
SET DEVICE TO SCREEN
SET PRINTER TO

Slighthaze = NULL
craig1442@mchsi.com
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
 
I use RAWPRINT.FLL to send raw print codes directly to windows printer (bypassing the windows printer driver which can garbage up the raw codes). This utility has been 100% effective in allowing me to control dot-matrix printers. I have been dealing with POS equipment in my applications for the last 15 yrs.

Andy Snyder
SnyAc Software Services
 
Still no response.

Andy, would you kindly let me know where to acquire RAWPRINT.FLL and how to incorporate it in my app.

Thank you.
Kurtwood
 
I just checked Universal Thread (which is where I found it), and apparently the FLL version is not included anymore.... There is a VCX class library available now for it which I will be replacing the FLL version with in the next day or so...

Go to the Download area of the Visual FoxPro Zone on Universal Thread and in the Summary descriptor type RAWPRINT and press {ENTER} to start the search.

The zip file has the VCX and a readme with code examples.

Andy Snyder
SnyAc Software Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top