| | |
|
|
|
Cash Drawer Connection |
| message from JimJam on 16 May 2004 |
We have obtained a M-S KLIC cash drawer and have an
existing MS Access database we want to use to open the
drawer using a comand button (OnClick event). We have the
drawer connected to the computer serial port. Dip switches
in the drawer can adjust the baud rate (1200 baud; Factory
Setting) and the drawer open character (Control G, ASCII7:
Factory Setting). the instructions say to use: even
parity, 7 transmit data bits, 1 stop bit,ignor clear to
send (CS) and ignor data set ready (DS). I think I
remember these parameters from BASIC, but cannot find any
refernce to them in VB.
|
| Arvin Meyer replied to JimJam on 16 May 2004 |
Pretty much the same in VB/VBA
Here is an old function that I cannot retest now (I don't have a cash
register handy):
Function Write2ComPort()
Dim i As Integer
Dim j As Integer
i = OpenComm("COM1", 10, 10)
j = Writecomm(i, "U", 5)
j = CloseComm(i)
End Function
|
| JimJam replied to Arvin Meyer on 17 May 2004 |
Thanks Arvin,
the
switches
Factory
ASCII7:
any
have a cash
|
| anonymous replied to JimJam on 24 May 2004 |
Arvin,
Sorry about not getting back, it is the end of school year
and everything goes nuts. I am still getting an error
message"File not found, 'User'". I can send you screen
captures of my code if that would help.
Jim .... captainjim@hotmail.com
don't
|
| anonymous replied to Arvin Meyer on 17 May 2004 |
Hey Arvin,
I must be missing a DDL or a reference somewhere, I got an
error, compile error, sub or function not defined, and
the
switches
Factory
ASCII7:
any
have a cash
|
| Arvin Meyer replied to anonymous on 17 May 2004 |
Declare Function OpenComm Lib "User" (ByVal lpComName$, ByVal wInQueue%,
ByVal wOutQueue%) As Integer
Declare Function CloseComm Lib "User" (ByVal nCid%) As Integer
Declare Function WriteComm Lib "User" (ByVal nCid%, ByVal lpBuf$, ByVal
nSize%) As Integer
Watch out for line wrapping
|
|
Archived message: Cash Drawer Connection (Microsoft Access)