Non visual components provide functionality that does not necessarily have a visual component. They are not visible in OI runtime.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
triggerTag | tag | Component will watch this tag to determine whether to trigger an action. See triggerOnEvent property. |
triggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
tagList | list of tags | List of tags used to write values. See component details for more information. |
indexTagOffset | int | Offsets the index tag for tag copy. Helpful to use -1 so that indexTag=1 will copy the first item (tag-copy starts at index 0). |
indexTag | tag | When set, only the nth set of tag-copy items will be executed. |
indexChangeUpdatesDst | true, false | When true, changes to the indexTag will trigger copy events, when false a trigger is needed to execute. |
The tag copy component copies the values of one tag to another tag. The list of tags is specified in the tagList and allows multiple tag copy expressions separated by a semi-colon.
An example of multiple tag copy expressions showing different possible expressions:
sourceTag1 > dstTag1;
dstTag2 < sourceTag2;
sourceTag3 <> dstTag3
Value | Description |
---|---|
sourceTag# |
The source-tag that will be copied. |
dstTag# |
Destination tag. |
Specifies direction tag copy will execute. |
|
< |
OIB will change this to a > and reverse the tags to be functionally equivalent. |
<> |
Specifies bi-directional copy. When triggered, the tags will exchange with each other. If not using a triggerTag, the values will be synchronized on changes to either. |
Tag copy is triggered in one of three ways:
when no triggerTag is specified, any change in the value of one of the source tags will trigger a change in the corresponding destination tag.
when triggerTag is specified, changes in the source tags are ignored until triggerTag is triggered.
when indexTag is set and indexChangeUpdatesDst is true, then whenever the indexTag changes values the tag copy at the new index location is executed.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
triggerTag | tag | Component will watch this tag to determine whether to trigger an action. See triggerOnEvent property. |
triggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
tagList | list of tags | List of tags used to write values. See component details for more information. |
isDoneTag | tag | Tag specifies where the component will write its status to. See details for each component. |
fileName | string | Name of file to use for read or write operation. |
fileLocation | USB_Flash, HardDrive, InternalFlash | Specifies where the file should be stored. |
fileNameTag | tag | When set, file operations will use the value of this tag for the filename. |
indexGroupToReadTag | tag | When set to non-zero, offsets which rows to read in the file by this tags value times number of tags in the taglist. |
indexGroupReadTag | tag | Writes the number of tags read to this tag. |
The File Read and File Write components provide the ability to read and write from the filesystem. Data is stored in a limited CSV file format:
tagValue, tagName
tagValue, tagName
tagValue, tagName
Tags are specified in the tagList property. Multiple tags separated by semicolon are supported:
tagName1; tagName2, tagName3
Files can be written to or read from 3 different hardware locations:
Location | Description |
---|---|
USB_Flash |
USB storage device (not the Data card used for OI applications). If no USB device is found, then an error is displayed. |
HardDrive |
Internal harddrive (must be formatted for OI usage). |
InternalFlash |
The USB data card used for application storage (in older OI versions this was a compact flash card - newer OI terminals use a specially formatted USB stick.)* |
*See OI Runtime > Terminal Setup > Hardware Status and Configuration for more information.
File locations are stored within an "appdata" directory.
If you want the file to be saved outside the "appdata" directory, prepend your filename with "../"
OI supports only up to 65,535 lines in the file.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
triggerTag | tag | Component will watch this tag to determine whether to trigger an action. See triggerOnEvent property. |
triggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
tagList | list of tags | List of tags used to write values. See component details for more information. |
isDoneTag | tag | Tag specifies where the component will write its status to. See details for each component. |
fileName | string | Name of file to use for read or write operation. |
fileLocation | USB_Flash, HardDrive, InternalFlash | Specifies where the file should be stored. |
fileNameTag | tag | When set, file operations will use the value of this tag for the filename. |
appendTag | tag | When the value of this tag is 1, write operations will append to the file. When 0, the file is overwritten. |
totalTagsWrittenTag | tag | The number of tags that have been written is recorded to this tag. |
See full description under CSV File Read component.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
triggerTag | tag | Component will watch this tag to determine whether to trigger an action. See triggerOnEvent property. |
triggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
isDoneTag | tag | Tag specifies where the component will write its status to. See details for each component. |
scriptUrl | string | URL for script to run. Can be remote request (http://www.example.com/script.html), or application script relative to the application ___httpscripts folder ( script.php?t=xxx&d=yyy ). |
executeOnStartup | true, false | When true, the script will be executed once on application start. No input tags are passed into the script when executed on startup. A parameter named _STARTUP_ is passed to the script with value 1 ($_POST['_STARTUP_']==1 is true). |
inputTags | list of tags | Semicolon separated list of tags that will be sent to the script. Each entry can be a tag, a tag mapped to a separate name (tag > script_tag), or a constant (“text” > script_tag). |
outputTags | list of tags | Semicolon separated list of tags that will be read from the script. Each entry can be a tag, or a script tag mapped to an oi tag (oi_tag < script_tag). |
The HTTP Script component allows execution of any script running on a remote or local HTTP server. Only one script at a time can run, and the previously executed script has to be finished.
The script is executed by HTTP POST request.
Any response other than 200 from the script is considered an error.
While the HTTP Script is intended to run scripts included with the application, it can interact with remote scripts on other screens or servers.
isDoneTag
If triggerOnEvent is ZeroToNonZero:
isDoneTag is set to 0 at the moment triggerTag is set to zero from nonzero
isDoneTag is set to 1 at the moment the script has been completed
If triggerOnEvent is AnyChange:
isDoneTag alternates between 0 and 1 at the moment the script has been completed.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
triggerTag | tag | Component will watch this tag to determine whether to trigger an action. See triggerOnEvent property. |
triggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
isDoneTag | tag | Tag specifies where the component will write its status to. See details for each component. |
executeOnStartup | true, false | When true, the script will be executed once on application start. No input tags are passed into the script when executed on startup. A parameter named _STARTUP_ is passed to the script with value 1 ($_POST['_STARTUP_']==1 is true). |
inputTags | list of tags | Semicolon separated list of tags that will be sent to the script. Each entry can be a tag, a tag mapped to a separate name (tag > script_tag), or a constant (“text” > script_tag). |
outputTags | list of tags | Semicolon separated list of tags that will be read from the script. Each entry can be a tag, or a script tag mapped to an oi tag (oi_tag < script_tag). |
script | string | Filename of script to run – will only run scripts in the application script directory ___shellscripts. |
The Shell Script component allows any executable program to run. The component is intended to function with only shell scripts (php and bash have been tested). Components can launch only one script at the time, the previously launched script has to be finished.
The script executed is terminated in case of OI application reload or OI exit.
The script is executed using POSIX function popen which internally runs 'sh -c' and waits for finish. The popen call is in separate OI thread so it doesn't block OI main loop.
Scripts can be written that call other scripts in the background. Those scripts will not be terminated and care should be taken with any such arrangement.
isDoneTag
If triggerOnEvent is ZeroToNonZero:
isDoneTag is set to 0 at the moment triggerTag is set to zero from nonzero
isDoneTag is set to 1 at the moment the script has been completed
If triggerOnEvent is AnyChange:
isDoneTag alternates between 0 and 1 at the moment the script has been completed.
Property | Values | Description |
---|---|---|
name | string | Provide a name for the component. This can be helpful when using the "Used Components" tool in the tag editor. |
description | string | A space to provide a description of the current component, useful for documenting intent. |
geometry | x, y, width, height (ints) | Sets the visible geometry of the component: x and y from top left corner, and width/height. Editing these values can be useful when positioning/sizing finer than grid snap is needed. |
statusTag | tag | Tag specifies where the component will write its status to. See details for each component. Database components write 1 for error, 0 otherwise. |
openTriggerTag | tag | Component will watch this tag to determine whether to trigger an action. See openTriggerOnEvent property. |
openTriggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
closeTriggerTag | tag | Component will watch this tag to determine whether to trigger an action. See closeTriggerOnEvent property. |
closeTriggerOnEvent | ZeroToNonZero, AnyChange | Determines when a change in the triggerTag will be used to trigger an action. ZeroToNonzero will trigger only when the tag value goes from zero to a non-zero value, and anyChange will trigger on any change in value. |
executeTemplate | User_Specified, Windows_Chrome | OIB Functionality only – when set will auto-populate fields based on the template. |
executable | string | The command line program that will be executed with this component. |
execArguments | string | Additional arguments that will be added to the end of the execution string. |
hasCloseButton | true, false | When true, a close button is overlayed which will close the application being run. |
hasRaiseOIButton | true, false | When true, a button labeled OI is shown in the bottom left that, when pressed, will return OI as the currently displayed application. The application will still be open. |
The Generic Run component provides the ability to run any arbitrary Windows programs.
If the external program is still running, triggering this component again will send the OI application to the bottom of Window's application stack.
A use case for this behavior is launching a browser to log into an MRP system. Once logged in, the operator can switch back to OI. Then, later switching back to the MRP system the operator will not need to log in again.
To prevent this type of use start the browser in kiosk mode (-k argument for iexplore.exe) and set hasCloseButton to true.
Generic Run will only execute on OIWindows installations.