RFID Tags

Using smart attributes to read RFIDs.

GuiXT WS offers you the ability to read RFID tags and utilize the information contained therein within SAP transactions. This ability can be used with both Mobile and with the Offline solution when the Mobile client is used in conjunction with that product. the syntax is similar to the other RFID tags and is as follows:

inputfield ([7,14], "Material", [7,20], {"size":16, "smartattributes":"rf_rfid=SYNTRUE"});

The above script is for a WS script used in Mobile, Desktop, or Server. However, the syntax is slightly different when used with Offline. An example of an Offline script is as follows:

{type: SCR_EDIT, label: "RFID Tag", position: {row: 5,col: 1,edcol: 15,edlen:30},style:EDIT_STYLE_NORMAL,maxtextlength:40, fieldname:"g_rfid", smartattributes:"rf_rfid=SYNTRUE"},

Required File

For use with the Mobile client, you must also have one additional file, which is as follows.

SynFRUI.dll

THis file contains the libraries that you will need to successfully activate RFID tag reads. It should be installed on the client device, in the same directory as the Mobile client files. THe Mobile directory on the client is typically as follows: \Program Files\GuiXTMobile

GuiXTMobile.sy3

You must also make a change to the 'General' section of the GuiXTMobile.sy3 configuration file in order to successfully use RFID. Currently, there are two possible devices that can be used, which are as follows:

Intermac

To use an Intermac device, please add the following line to the GuiXTMobile.sy3 file:

RFIDLib=Intermac/EPCC1G2
TransCore

To use a TransCore device, please add the following line to the GuiXTMobile.sy3 file:

RFIDLib=TransCore/XXX

The ID following the forward slash specifies the type of tag the user wishes to read. TransCore devices do not require a tag type, so this can be designated with 'XXX' instead of an actual tag type.

Note: Individual entries must be added to the GuiXTMobile.sy3 file for each device.

A sample GuiXTMobile.sy3 file containing the Intermac RFID entry is shown below:



TReading RFID Tags

To demonstrate RFID tag reading, please do the following:

  1. Using a handheld device that supports RFID, navigate to any GuiXT-created field that has an RFID tag. You can also create a new field with anRFID tag using the following code:

    inputfield ([7,14], "Material", [7,20], {"size":16, "smartattributes":"rf_rfid=SYNTRUE"});
  2. If you are using a scangun, press the trigger. You can also create either a pushbutton or a toolbar button and associate it with an RFID smart attribute that will be explained later in this document.

  3. If there is a single RFID tag, the entry for that tag will automatically appear in the field on the device.

  4. If there are multiple RFID tags, a list box will appear and the user must select the desired RFID tag. Users can select multiple RFID tags for input although due to the character limitations in inputfields, we recommend only doing this in long text fields.

  5. Select an RFID tag. Once your device reads the tag, the data from that tag will be entered into the appropriate fields in the table.

Note: You can also type '/rfid' into the transaction field in the device in order to force a RFID read.

Using RFID With Other Screen Elements

The RFID functionality is not limited to inputfields. You can use the transaction code /rfid with pushbuttons, toolbar pushbuttons, or menus to activate the RFID functionality. When you click a button with this tcode attached, an RFID read will occur. The behavior will be the same as if the user had pressed the device trigger, and this tcode actually will call the SynRFUI_CreateRFLIstWnd function which not only performs the actual RFID read but it also subsequently populates the edit field where your cursor resided when the RFID read was triggered.

To use this new tcode with Mobile pushbuttons or menus, you can use the same syntax as before. You just need to add the new tcode to a pushbutton or menu option. In the following Offline example, we created a script entitled 'rfid.sjs', wherein we have defined a new transaction object. To this object, we have added a function that calls the method do perform the RFID read. The code is shown below:

In the following example, we will implement the RFID capability into an Offline script. What will happen is that when you press the onscreen pushbutton,. a function will be called that will trigger the RFID read operation. The code is as follows.

var _objectRFID = new SR3TransactionObject("rfid");

_objectRFID.addScreen([
{type:SCR_CAPTION, label:"Scan RFID"},
{type: SCR_EDIT, label: "RFID Tag", position: {row: 5,col: 1,edcol: 15,edlen:30},style:EDIT_STYLE_NORMAL,maxtextlength:40, fieldname:"g_rfid", smartattributes:"rf_rfid=SYNTRUE"},
{type: SCR_PUSHBUTTON, label: "@2S@ Scan", position: {row:8,col:1,width:10,height:1},fieldname:"g_push_rfid",fcode:"/rfid"},
{type: SCR_ONAPPKEY, keyid:F8,keylabel:"@2S@RFID Scan",  keytooltip:"Scan RFID Tag",callback:scanRFID }, //F8 is reserved for RFID
{type:SCR_ONFKEY,keyid:EVENT_FKEY_EXIT,keytooltip:"Log off",  callback:SR3GenericFunctionKeySHIFTF3LogOff}
]);

function scanRFID()
{
	// API call to read RFID tags
	this.m_RealTimeScreen.Send();
}