RFID Toys Homepage
Holy crap, check out the Dangerous Things store!
Forum Home Forum Home > Projects and such > Book Projects
  New Posts New Posts RSS Feed - DooRFID project VB2008
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DooRFID project VB2008

 Post Reply Post Reply
Author
Message
a00166763 View Drop Down
Newbie
Newbie


Joined: 27 January 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote a00166763 Quote  Post ReplyReply Direct Link To This Post Topic: DooRFID project VB2008
    Posted: 07 April 2009 at 4:42pm
When I run the executable dooRFID that I got from the site, it works fine. I converted the VB source code to Visual Studio 2008, I would rather work with VB6 but that isn't available to me because it was created in VB6 so I know it works with VB6. When I converted the code the program only reads one tag every time I run the program. Where as the executable I got from this site reads a tag every 4 seconds like it is supposed to. I was wondering if there was a fix for this? 
Back to Top
amal View Drop Down
Admin Group
Admin Group
Avatar

Joined: 22 November 2005
Location: United States
Status: Offline
Points: 2063
Post Options Post Options   Thanks (0) Thanks(0)   Quote amal Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2009 at 8:33am
Post your VB2008 source files
Amal ;)
www.amal.net
Back to Top
a00166763 View Drop Down
Newbie
Newbie


Joined: 27 January 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote a00166763 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2009 at 3:29pm

2009-04-14_152816_Copy_of_Copy_of_DoorRFID_NET_Carlos_2008.z ip

Here is my source code files and thanks again for taking a look at it.

Back to Top
amal View Drop Down
Admin Group
Admin Group
Avatar

Joined: 22 November 2005
Location: United States
Status: Offline
Points: 2063
Post Options Post Options   Thanks (0) Thanks(0)   Quote amal Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 6:23am
I'm at a conference until the middle of next week, but I'll take a look at it then.

What version of Phidgets do you have? The damn people over there keep changing the hardware around just like they do the software library. It might be something as simple as you have the wrong library for your hardware version.

Basically, I don't know of any good way to tell hardware version just looking at it. But, you can tell at least what version family it is by describing it. Is it dark with a hole in the middle or is it light colored with the word PhidgetRFID silkscreened in the middle?
Amal ;)
www.amal.net
Back to Top
a00166763 View Drop Down
Newbie
Newbie


Joined: 27 January 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote a00166763 Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 4:30pm

Its the dark model with the hole. and i believe I am using the Phidget Library 2.1.6.20090302. The code I posted isn't just the straight coverted code to 2008. I tinkered with it because after the straight conversion didn't read tags at all and gave me a runtime error whenever I hit the manage tags button. So I tinkered it with it a bit a got it to read at last once. I will post the straight conversion code also. I also have another variation of the same code where the phidget will read a tag 20 times a second and the program will display all 20 times that it read the tag.

Here is the untouched converted code:

2009-04-16_162927_DooRFID.NET_2008.zip

Here is the program that reads a tag 20 times in one second:

2009-04-16_163022_Copy_of_Copy_of_Copy_of_DoorRFID_NET_Carlo s_2008.zip

Back to Top
amal View Drop Down
Admin Group
Admin Group
Avatar

Joined: 22 November 2005
Location: United States
Status: Offline
Points: 2063
Post Options Post Options   Thanks (0) Thanks(0)   Quote amal Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 4:39pm
The software version that spits out the tag ID 20 times is the working model. This is a major change in the firmware's functionality that Phidgets put forward with one of many hardware changes. It's up to you to decide what to do with each event (dump duplicates, log, etc.).
Amal ;)
www.amal.net
Back to Top
a00166763 View Drop Down
Newbie
Newbie


Joined: 27 January 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote a00166763 Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2009 at 10:09am
I would like to dump the duplicates but I have not figured out how to do that.
Back to Top
amal View Drop Down
Admin Group
Admin Group
Avatar

Joined: 22 November 2005
Location: United States
Status: Offline
Points: 2063
Post Options Post Options   Thanks (0) Thanks(0)   Quote amal Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2009 at 10:35am

Create a static or global variable that holds the last read tag ID. This variable could be called strLastTag or something similar. When the next read event fires, check first to see if the ID matches the last one read. If so, dump out of the event routine without doing anything.

If you want to get fancy, you can create a sort of timer so the old tag ID will be cleared out after a certain amount of time... say 5 seconds? To do this, create another static/global variable that holds the date and time the tag ID was put into the strLastTag variable. This variable could be called datLastTagTime and should be populated with the date and time, like so;

datLastTagTime = Date & " " &  Time

Then the next time the tag ID even fires, check the date and time stored in the datLastTagTime variable against the current date and time using DateDiff. If the difference is over 5 seconds, clear the datLastTagTime and strLastTag variables and process the tag ID event as normal.

You might be asking "Why put the date in as well as the time if I'm only looking for a 5 second difference?", well the reason for that is the midnight factor. It's just good habit to get into to put both date and time into your time differencing checks because if an event were to occur within 5 seconds of midnight, the time differencing routine may not account for the fact it's midnight and the time clock just flipped to the next day. You would either end up waiting for 24 hours for the differencing check to clear, or in some cases it will never clear because the same thing would happen on the next round. By including the date, the time differencing routine knows that 11:59:59 PM and 00:00:00 AM are only one second apart. Without the date it would assume those two times are 86399 seconds apart.

Amal ;)
www.amal.net
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.578 seconds.