Navigation: Filtering & Collection > Event Subscription >

Scripts

Still need help? Create a Support Ticket with Stratum Support

Send comments on this topic.

← Previous Next →

 

Tag Reader Scripts

 

The purpose of this function is to allow you to create scripts using the TagNet RCL (Reader Control Language). RCL allows you to control execution behavior for a given physical reader within a given schedule (as described below). Note: there could be multiple physical readers for a given logical reader and as such, each reader can have its own scripts.

Important Note:  Failure to assign minimal scripts to an active reader on a schedule will incur inconsistent behavior and may cause memory leaks in the JSM (Java Server Manager).

Input Sensors – enables you to specify what type of trigger is used to start a read cycle such as a motion detector or photoelectric cell and what input they are attached to on the GPIO (General Purpose Input-Output).

Signal lights – enables you to specify what color lights turn on and for how long based on read event logic.

Reader options – enables you to override which antennas are to be used, antenna power levels as well as tag type (class 0, 1, etc.) to name a few. Note: this is only available for readers which can support this feature.

The scripting language is somewhat intuitive but does take some time to become fully conversant with all its capabilities. To help streamline the scripting, TagNet provides use case level scripting Templates that can be modified to suit. Refer to Appendix A for a detailed users’ guide of RCL command syntax as well as typical reader specific examples.

Reader Location Parent

Attributes of the Parent Reader Location

 

Physical Reader

The Linked Physical Reader and all the associated RCL scripts

 

Action Links

These hyperlinks perform the following functions for each Schedule

 

Pre-Processor

enables change mode of the scripts executed prior to read events

Post-Processor

enables change mode of the scripts executed after a given read event

End-Schedule

enables change mode of the scripts executed after schedule has ended normally

Return back to List

Click this button to return back to Subscription List

 

 

 

Schedule Scripts

The purpose of this function is to allow you to create scripts using RCL (Reader Control Language). RCL allows you to control execution behavior for a given physical reader within a given schedule (as described below):

Input Sensors – enables you to specify what type of trigger is used to start a read cycle such as a motion detector or photoelectric cell and what input they are attached to on the GPIO (General Purpose Input-Output).

Signal lights – enables you to specify what color lights turn on and for how long based on read event logic.

Reader options – enables you to override which antennas are to be used, antenna power levels as well as tag type (class 0, 1, etc.) to name a few. Note: this is only available for readers which can support this feature.

The scripting language is somewhat intuitive but does take some time to become fully conversant with all its capabilities. To help streamline the scripting, TagNet provides use case level scripting Templates that can be modified to suit. Refer to Appendix A for a detailed users’ guide of RCL command syntax as well as typical reader specific examples.

Figure ES1 shows the initial scripting page with scripting commands already built

                                 Figure ES1.  Tag Reader Scripts

There are three levels of Scripts that can be applied to a reader schedule:

Pre-Processor – these are instructions that initiate communications to the GPIO system as well as the PEV session (when configured). These instruction  TagNet when to trigger a read cycle based upon what input sensor (if any) and what light condition(s) to indicate that the schedule is running (if any).

Post-Processor – these are instructions that tell the GPIO what output port to activate or deactivate based on the tag event’s business logic condition such as no tag read (if any). This can be a signal light; a PLC, a magnetic lock or just about any external device that can receive a signal and act upon it.

End-Schedule – these are instructions that instruct the GPIO to shut down all outputs and close communications to the GPIO system after a schedule has ended.

Reader Scripts List Display Fields

Listed below is a description/explanation of each display field in the Reader scripts list:

Tag Reader Identifier: – The physical reader associated with the logical location reader. There could be many

Description: – user defined from the Physical Reader definition

Command to execute: – The actual sequenced RCL script commands (explained later on in Script maintenance section).

Status: – The current status of the Script Record.

Action Links – These hyperlinks perform the following functions:

oPre-Processor – enables change mode of the scripts executed prior to read events

oPost-Processor – enables change mode of the scripts executed after a given read event

oEnd-Schedule – enables change mode of the scripts executed after schedule has ended normally

Note: there could be multiple physical readers for a given logical reader and as such, each reader can have its own scripts

When one of the action links described above is selected, the reader script for that section is now maintainable as shown below in Figure ES3.

Reader Script Templates

Figure ES2 below shows how to build a script from a template. When there is no script present (as with a new Schedule), the [Generate from Template] button is displayed along with a dropdown of Script templates specific to the physical reader associated with that Logical Reader location. Select the Template type and then select the [Generate from Template] button and this will populate the list with script commands that can be modified as shown in Figures ES3, ES4, and ES5 below:

Figure ES2.  Generate Scripts from Template

 

 

Figure ES3.  Pre-Processor Script Maintenance

Pre-Processor Reader Script Maintenance

Listed below is a description/explanation of each attribute in the Event Bindings Add mode:

Seq No: – The sequence assigned to the given script command. Note: these can be changed to reorder the command list to suit where required

Command to Execute: – This is the actual RCL command set

Action Links – These hyperlinks perform the following functions:

oChange – enables change mode of the command script

oMove – enables the script command to be re-sequenced

oDelete – deletes the selected Script command

Note: there could be multiple physical readers for a given logical reader and as such, each reader can have its own scripts

 

 

Figure ES4.  Post-Processor Script Maintenance

Post-Processor Reader Script Maintenance

Listed below is a description/explanation of each attribute in the Tag Reader Scripts Post Processor mode:

Command Sub Type: – the resulting condition that the script is to apply 

oMATCH – this condition is sent back from the binding function indicating that the tag(s) all meet a ‘matching’ condition. What exactly is a matching condition is determined by the business logic in the binding function. This could be as simple as ‘all the tags map to a specific object ID’, or as complex as comparing cases read against a bill of lading to ensure all were placed on a trailer or pallet. The permutations are limitless.

oNOMATCH – this condition is sent back from the binding function indicating that some or all of the tag(s) did not meet the business logic criteria in the binding function.

oNOTAG – this condition is sent back from the binding function indicating that no tag was read during the read event cycle.

oERROR – this condition is sent back from the binding function indicating that the binding function failed for whatever reason (e.g. comms, target server, API, etc.)

oAUXILARY 1-3 – these special conditions are set based on the binding function and can control unique light conditions.

Seq No: – the sequence assigned to the given script command. Note: these can be changed to reorder the command list to suit where required

Command to Execute: – This is the actual RCL command set

Action Links – These hyperlinks perform the following functions:

oChange – enables change mode of the command script

oMove – enables the script command to be re-sequenced

oDelete – deletes the selected Script command

Note: there could be multiple MATCH/NOMATCH/NOTAG conditions.

Figure ES5.  End-Schedule Script Maintenance

End-Schedule Reader Script Maintenance

All the functioning and capabilities shown in pre-processor mode apply here. This script is used to control logic after the schedule period has ended. Why and when would I use this? To turn off GPIO lights (or other output) indicating Schedule is finished.

Note: v4.0 of TagNet only supports scripting for readers on Server based control. TagSmart has it own scripting commands within its properties file. These commands are covered in the TagSmart User’s Guide.

 


Copyright © 2024 Stratum Global, Inc.