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

Turnstile 2

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
578
PH
Hi experts, just wondering, Is it possible to program using vfp turnstile gate?
 
are you talking about an access control program?

Recording arrivals and departures and opening turnstiles?

At any rate, this has been done in VFP - I've even seen it in FoxPro on an accommodation vessel
keeping a track of who is on the 'boat' and who is working on the drill rig it was connected to by a bridge

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
I don't think much has changed since you asked that already in thread184-1821219

Chriss
 
Mandy, you had several answers to the same question in your April 2023 thread (mentioned by Chris, above), but you never came back to let us know if any of them were useful.

To avoid us all wasting our time, I suggest that you review that thread before we go any further.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thank you griff and chriss… yes Mike… sorry i was not so sensitive… i won’t do it again… thank you everyone… Godbless…
 
Mandy, it's okay if you have an old question, that's not the point, no reason to apologize.

The old thread had no result, at least from what I can see, so it's okay to come back to that point, but I can't give any new answers. But others might.
When you pick up an old question, it's just good style to refer back to your old thread, so everyone knows what was already contributed.

What I would perhaps pick up is have you contacted vendors of turnstyle systems whether they offer them with an interface for programming. I would assume such "hardware", as it's more of a secure entrance system, does only come including a software and not just a programming interface, as any normal company or organization would just buy a turnstyle entrance system that's operational from the getgo without needing to program it. But I might miss an open standard existing for that. If you ask vendors, don't specifically ask about FoxPro though. Ask about a hardware and software interface that is open to program individual solutions instead of only being capable to use the turnstyle with the vendor provided software and cards, if it's a card activated system, for example.

Chriss
 
If you are interested...


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Yes Chriss I've ask some of those who are using turnstile, and they've mention about API… which i do not have so much knowledge about… thanks Chriss and Griff…
 
Hi Mandy,
The answer to your question is yes. But what your not asking is, what is the difficulty involved, and then HOW do you make it work.
We don't have enough detail to solve the problem. So first question is, what is it specifically you want to control? You mention RFID, which is just a type of near field device, and can activate if it's in close enough proximity. This part isn't really that important, nor where the magic is.

Here is the technical overview of the problem (as I see it, we can use this as a starting point, and you can give us more information as we go).
There is a turnstile that provides some kind of access control, or access monitoring (maybe we don't need or care about credential, we're using it as a method to count entrants and exits). But I'm going to assume your intent here is access control.

As the authorized person approaches the turnstyle, when in the right vicinity/proximity to the turnstyle, their access is checked. (That could be, do we detect an access control event). So first question is, is that detection managed by the device itself (expect it is, in the same way that a scanner is responsible for image capture, it's in the hardware). BUT, that hardware will detect some information. What happens next is, that information has to be authenticated against an access control. This is where VFP comes in. VFP has to be sitting in a state where it is constantly looking for an access request. Easy enough to do, but that data (let's call it a "packet" of information) has to be either pulled or pushed. It doesn't really matter which it is, but need to be aware of how it will do it.
This is where the "interface" (or API, or "driver") comes into play. The question here is, is there a driver that can be installed at the PC that allows the PC to control that access, and if so, then how can the data collected from it be processed/managed by VFP, and this is where the API comes in. An API doesn't have to be built specifically for VFP, but that makes it easier. If there is an API available, then you need to understand how that API can communicate both TO VFP and FROM VFP back to the device.
Continuing, assuming that you get the API to communicate with VFP (best example if this I can give is for things like OCR and Image Capture, which I do all the time... the turnstyle is just another bit of hardware to talk to), then VFP takes the data, and authenticates it. Is this a valid RFID, or just some random tag from someone's stolen shirt? VFP would then use whatever business logic to authenticate the person. It may also be time sensitive, i.e. they can enter from 8am to 8pm, but not before or after. Once your business logic has processed and decided that this person is authorized to enter, then, you send a command back to the turnstile that would engage the motors to open the gates. You may also need to pass a timer for how long to keep them open if noone is detected coming through, but that might be part of hardware defaults. There are many types of turnstyle/flapper gates for access.
After that, I would suggest having the hardware send a success or failure back to VFP, which it would log along with the time, was it an entry or an exit, are you using specifica logic to prevent credential passback?

So the technical issues here are that you have some aspects controlled by the hardware, and some by VFP. You have to work out which has which capability. Then determine how the device sends and receives commands and communication, what data it can pass. You may have to be more in control of that.

As a side note Mandy, do you mind my asking what country you are in? It doesn't change my answers, but it informs them, as I have a broad range of experiences and some hardware is more readily available in some locations than others. It also informs my responses based on what security is expected and cultural norms. For instance the cultural norms in Japan differ from those in say, the US or Saudi Arabia.


Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD

"I try to be nice, but sometimes my mouth doesn't cooperate.
 
Thanks Scott... but im sure it will be difficult for me...
 
Well, the question then is, does the benefit outweigh the difficult?
If it were easy, then anyone could do it.
You are not just anyone, and you are smart, capable and tenacious.
We're here to help you along the road.


Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD

"I try to be nice, but sometimes my mouth doesn't cooperate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top