Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSComm Control and Cash Drawer KickOut
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00230938
Message ID:
00231080
Views:
19
>Mark,
>
>>I would test this myself, but I do not have access to a cash drawer and do not care to spend several hundred dollars for a 5 minute test.
>
>I don't knoe the control well enough to tell you if DoVerb() is the right thing to use. But for testing serial i/o you can hang an old dumb ascii terminal off your serial port, or hook another computer to it and run terminal or CrossTalk (is that even still a product?) to watch what comes out of the port. I've spent lots of time doing this sort of stuff in other projects.

This above is the best way to test. You would need a null modem cable ($20 purchased from Staples or CompUSA) and you can use the standard Hyperlink. What I do is first make the computers talk through Hyperlink and then I test my COMM port.

Here is sample VB code I use.

' Use COM1.
Comm1(ix).CommPort = Val(txtCommPort(ix).Text)
Comm1(ix).SThreshold=0
Comm1(ix).OutBufferSize=512
' 9600 baud, no parity, 8 data, and 1 stop bit.
' CommSetup = "9600,N,8,1"
Comm1(ix).Settings = CommSetup
Comm1(ix).Handshaking = 0

' Open the port.
Comm1(ix).PortOpen = True
' Send Stuff
Comm1(ix).Output = "ATZ" + Chr(13)

I VB I have to do DoEvents periodically. I am not sure if if you have to do this in VFP.

Costas
Previous
Reply
Map
View

Click here to load this message in the networking platform