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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using MSCOMM with swipe card machine

Status
Not open for further replies.

vdeveloper

Programmer
Aug 5, 2000
42
IN
Hi All

I have a requirement for an app which will read entry/exit data from an door access card reader hooked up to a PC. I believe the MSCOMM control can be used for this. Could someone please guide me as to using MSCOMM with this type of machine? is there a standard command set to be used for interfacing ? I have looked up the various threads on MSCOMM but was unable to get a clear picture.

Thanks

Ravi
 
Ravi,
MSCOMM is used to read the serial port (COM1:, etc.), if your door access card reader puts out standard RS-232 signals, then you are set. Otherwise, you'll need to find another Active-X control (OCX) that can interface to your device. Does the manufacturer provide any documentation or sample code?

Rick
 
To use the control, drop it on a form after adding it to your list of controls in Tools->Options->Controls.
In the properties, set:
'CommPort' to the number of your serial port. Ex. 1
Set the 'Settings' to the comm settings. Ex. 9600,n,8,1
Now when you run the form, it will open the port and wait.
If you need to send something, you use something like this in a click event of a command button:
ThisForm.Object.output("Something")
To receive something, you add something like:
ThisForm.Object.input(ThisForm.cInBuffer)
in the 'CommEvent' event.

But like Rick said, you may need some more coding depending on how intelligent your card reader is. You may have to tell it you're waiting for something.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks Rick & Dave

The machine & its interface is actually proprietory to the people who had installed it and are now not prepared to spend any more time on the site. The problem is that the software provided by them is very unfriendly and cumbersome hence the need to develop a new software.

Will update this thread if any solution is found, for the benefit of others.

Ravi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top