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

Can MS Access open a gate?

Status
Not open for further replies.

Nacar

Technical User
Dec 21, 2004
21
0
0
US
Hello,
Again, I need your worthy help, please.
I am working in a project in a condo. They have a vehicle barcode reader. When the car is near, the scanner (barcode reader) reads the barcode and open de gate.
The reader can work alone, but they want to generate reports and keep some control on that.
I built an application already with the reports they need and want.
Now I need MS Access gets the control and validates the barcodes and give the signal to open (or not to open) the gate.
The reader is model BA-200 from BAi company.
Somebody told me about to open a computer port.
Could you please help me on this matter?
Thank you very much.
Nacar
 
Details of scanner interface vary with the specific product, so you need to confer with the manufacturer (or at least obtain and review their documentation). MOST scanners act as a surrogate keyboard, simply 'typing' into the system whatever the bar-code represents. In this manner, no "port" is necessary.

This, hoewever, does not mean that the process is trivial. To operate in a reasonable manner, the barcode/scanner needs to be captured, and processed to verify that it represents a useful item of data for the system (sort of a V&V process). Decisions (conditional code) need to be made on how to handle the results (including 'oddities').

Even getting an application to consistiently accept the barcode/scanner input usually requires some keyboard handler routine which recognizes the input as comming from the scanner and prepares the remainder to accept the input. This, usually is dfone by having the scanner input auto-prefix its input with some 'function code' and having the handler intercept all (keyboard) input, checking for the prefix code and - when it is present - opening a form and setting the focus to the desired input field.

Many other details also need to be handled.

Not to cast aspersions or to disuade you for learning and proceeding, the simple fact of posting the question without having done the simple pre-requsite of finding and reviewing available literatuere suggests that the overall project is a bit beyond your current capability.



MichaelRed


 
Michael,
sorry for the crossed post but I was not sure which forum was the correct. At this time I am not sure yet.
I agree with you this project is beyond my current capability and I want to quit because I do not want to cause delays.
I called the scanner manufacturer and they told me I need a serial port for input/output signals.
I understand the input signals (you said surrogate keyboard) and validation (yes/no access). If it is "NO", I think nothing happens and the gate remains closed. But if the validation is OK, I need a signal through a serial port to open the gate.
Once I worked with a gun scanner for barcodes but only for quick searches with no output signal.
My question is:
Is VBA able to generate that output signal? Or I need to call some API files?
Could you please guide me in the right way? Could you please tell me what to read or what concepts I need to know?
I am about to quit if I do not see some light.
Thank you very much.
Nacar
 
at issue here is not how the scanner works because the scanner is just surrogate keyboard

the issue here is how to get access to open the gate

see the cross post for code that is if your gate opener can accept input
 
pwise said:
" ... not how the scanner works because the scanner is just surrogate ... "

Mayhap this is true for one who is experienced in the arcania of the process, however I have seen several otherwise competent "programmers" stumble over getting the interface to work - particularly in a totally unattended environment. Actually, the latter point is often true of device control software regardless or the platform and experience.

In more direct answer to the issue of output (device control), there are any number of companies which offer add-on cards for computers (including "PC's" which can be controlled via almost any program. I would suggest an on-line search ('googling'), and some careful review of the available literature to find one which provides a VB(A) sample program to illustrate its use. As an exercise, just set up a relay to switch a light on/off, and create a standalone app to operate it -perhaps initially based on a command button. Most of the manufacturers )of the "I/O' cards I have dealt with are 'anxious to please'.



MichaelRed


 
Michael,
could you please give me some specifications of that I/O Card to exercise with? That is the kind of example I need to practice, one that turn a light on/off. I began to understand serial port with its 9 pins.
Do you have some code to turn a light on/off?
Thanks for your help.
Nacar
 
NO longer in the business. A Web search (google) should be easy enough to locate much more than you need.




MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top