1 / 22

RFID App Development James Peternel Software Engineer Lead

RFID App Development James Peternel Software Engineer Lead. Overview. Developing an RFID application in C# VS 2005 Basic functions and event handlers Focus on IF61 reader. Create Basic Project in C#. Select Windows Application. RFID References. Add RFID class references to your project.

guido
Download Presentation

RFID App Development James Peternel Software Engineer Lead

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RFID App DevelopmentJames PeternelSoftware Engineer Lead

  2. Overview • Developing an RFID application in C# VS 2005 • Basic functions and event handlers • Focus on IF61 reader

  3. Create Basic Project in C# • Select Windows Application

  4. RFID References • Add RFID class references to your project

  5. RFID References • using Intermec.DataCollection.RFID;

  6. Now lets add the basic features to your app • Create reader object • Add Event Handlers • Add Tag Handlers

  7. Create RFID Object • LocalHost • string tConnection = "TCP://" + "127.0.0.1" + ":2189"; • Defaults brdr = new BRIReader(null, tConnection); • With Options • Read buffer size • Event buffer size BRIReader.LoggerOptionsAdv LogOp = new BRIReader.LoggerOptionsAdv(); LogOp.LogFilePath = ".\\IDLClassDebugLog.txt"; LogOp.ShowNonPrintableChars = true; brdr = new BRIReader(this, tConnection, 22000, 2000,LogOp);

  8. Create Event Handlers private int AddEventHandlers() { //********************************************************************* // Add the event handler to handle the tag events and trigger pulls. // Not all of these are used but added as samples of what are available. //********************************************************************* try { this.brdr.EventHandlerRadio += new Radio_EventHandlerAdv(brdr_EventHandlerRadio); this.brdr.EventHandlerTag += new Tag_EventHandlerAdv(brdr_EventHandlerTag); this.brdr.EventHandlerGPIO += new GPIO_EventHandlerAdv(Form1_EventHandlerGPIO); } catch { return -1; } return 0; }

  9. Tag Event Handler this.brdr.StartReadingTags(null, "COUNT ANT", BRIReader.TagReportOptions.EVENT); void brdr_EventHandlerTag(object sender, EVTADV_Tag_EventArgs EvtArgs) { //********************************************************************* // This function process any tag that is returned as an event. // This function is in use when you send a READ with REPORT=EVENT //********************************************************************* bool bStatus = false; RspCount = 1; RspMsgList[1] = EvtArgs.DataString.ToString(); bStatus = CheckIfTagIDIsInDBase(RspMsgList[1]); }

  10. Polling For Tags (Report=No) this.brdr.StartReadingTags(null, "COUNT ANT", BRIReader.TagReportOptions.POLL); bStatus = brdr.PollTags(); foreach (Tag tt in brdr.Tags) { RspCount++; RspMsgList[RspCount] = tt.ToString(); if (tt.TagFields.ItemCount > 0) { foreach (TagField tf in tt.TagFields.FieldArray) { RspMsgList[RspCount] += " "; RspMsgList[RspCount] += tf.ToString(); } } }

  11. Add GPIO Event Handler void Form1_EventHandlerGPIO(object sender, EVTADV_GPIO_EventArgs EvtArgs) { //process gpio trigger events if (EvtArgs.TriggerNameString.Equals("ENTER_ON")) { //your code here } else if (EvtArgs.TriggerNameString.Equals("EXIT_ON")) { //your code here } }

  12. How to Install App on IF61 • Create .zip file with your .exe and any dll files. • Create userapp.conf file • AUTOSTART=false • RUNAFTERINSTALL=false • CMDLINE=./ConsoleApplication2.exe • Add userapp.conf file to the .zip file • For Java you will need to add full path information

  13. IF61: Network Configuration Menu • Select Common link

  14. IF61: Network Configuration->Common • Add Syslog Destination (IP or localhost)

  15. IF61: Network->Services • Make sure you have FTP server enabled

  16. IF61: Edgeware Applications • Go to Edgeware Applications and select Application Control link

  17. IF61: Edgeware Applications-> Application Control • Check the Redirect output from user applications to the system log box

  18. IF61: Edgeware Applications -> Install User Application • Select .zip or .tar file to upload

  19. IF61: Edgeware Applications -> Application Control • To run your application just click ACTION

  20. IF61: Edgeware Applications -> Application Control • To update your application, click Uninstall and then install the new zip file

  21. Run app on IF61 • Can monitor your application using an app such as KLog.exe or TcpipWin32.exe, both shareware, use at your own risk. • Make sure you kill your firewall. It may block this.

  22. Thank you.

More Related