MonkeybreadSoftware Posted Friday at 06:08 AM Posted Friday at 06:08 AM If you need to read RFID cards in your FileMaker solution, you can use the Phidgets functions in MBS FileMaker Plugin and a PhidgetRFID device. You may start with one of our examples, like the one for temperature sensors. There you load the phidget library for the platform you are on. The call for Phidget.Create is modified to pass "RFID" as device type. Then you may connect script triggers for attachment of the device and call Phidget.Open function to open a connection. Set Variable [ $$phidget ; Value: MBS( "Phidget.Create"; "RFID" ) ] Set Variable [ $r ; Value: MBS( "Phidget.SetScriptTrigger"; $$phidget; "Attach"; Get(FileName); "Attached" ) ] Set Variable [ $r ; Value: MBS( "Phidget.SetScriptTrigger"; $$phidget; "Detach"; Get(FileName); "Detached" ) ] # # open asynchronously Set Variable [ $r ; Value: MBS( "Phidget.Open"; $$phidget ) ] Once connected, the attached script trigger runs. There you may install the script trigger for a tag being found or lost: Set Variable [ $r ; Value: MBS( "Phidget.SetScriptTrigger"; $phidget; "Tag"; Get(FileName); "TagFound" ) ] Set Variable [ $r ; Value: MBS( "Phidget.SetScriptTrigger"; $phidget; "TagLost"; Get(FileName); "TagLost" ) ] The TagFound script runs when a card comes close to the reader. The parameter to the script is a JSON and the "tag" key contains the text read from the card. To actually receive something, you need to turn on the antenna for the RFID reader, so please set the AntennaEnabled property to true: Set Variable [ $r ; Value: MBS( "Phidget.SetProperty"; $phidget; "AntennaEnabled"; 1 ) ] We implemented this with a client last week and it works just fine.
Recommended Posts