Operator Interface
Following commands can be used to control the operator interface to display information to the operator or request action from the operator
Last updated
Following commands can be used to control the operator interface to display information to the operator or request action from the operator
Last updated
Show formatted message on operator interface
#msg
"Simple message to show..."
Display a simple tiny message with text specified above.
No return value
{<text>}{;type=[enum|string]}{;size=[enum]}{;image=[string]} {;color=[color]}{;bg=[color]}{;tsize=[int]}{;tpos=[enum]}
text
[string]
Text to display. If test-file localization is loaded, the text is automatically translated.
type
[enum | string]
Message type and text position if both displayed • auto - determine the type based on 'text' and 'image' arguments ('text' only = type text, 'image' only = type image, both 'text' and 'image' = both)
-or-
• im or image - show image
• t or text - show text in default position
• tt - show text on the top
• tb - show text on the bottom
• tl - show text on the left side
• tr - show text on the right side
Type as a combination of 1-2 type string above, using plus '+' character, i.e.:
"im" (image only), "im+t" (image and text), "im+tt" (image and text on top)
Default: auto
size
[enum]
Message size (area of operator screen):
• tiny - small box for 1-2 lines of text
• medium - medium-sized box, about one-half of the operator screen
• large - full-screen message on operator screen (excluding top and right-side menus)
Default: tiny
image
[string]
Image to display.
Required when type is specified to display an image. Supported image formats: JPEG, PNG, GIF, and BMP
• path to file on a hard drive (i.e. "c:\path\to\image.png") • device plug-ins from version 2.0: "plugin://<device- alias>"
When image source is set to plug-in, the plug-in can render a custom image to the operator's screen independently.
Default: (none)
color
[color]
Color of message text Default: black
bg
[color]
Color of message text Default: white
tsize
[int]
Text size in points Default: 24
tpos
[enum]
To specify the position of the text when 'type' argument is not used or set to 'auto' and both image and text are displayed.
Valid positions:
• top (above the image) • bottom (below the image)
• left
• right
If the 'type' argument is specified, this argument is ignored Default: bottom
Use #msg | push
to save last shown message (including all parameters) to memory. This commands requires any previously shown message. The memory is shared across all threads - the message can be stored in one thread and restored in another thread.
Use #msg | pop
to restore last saved message from the memory. This commands requires previously saved message using push. Calling this command will not delete the saved message, so it's possible to call it repeatedly.
Show an overlay dialog with formatted message on operator screen. This function blocks executing the program until one of dialog button is pressed or item is selected.
#dlg
"Simple dialog to confirm..."
Show a simple confirmation dialog with one button - "OK". Return value will be always "@ok".
If no items are passed to the dialog and no edit-box is shown, the return value is the name of button pressed with a "@" character at first place ("@ok", "@cancel", "@retry", etc..). Otherwise, the return value is the selected item or user-entered text.
{;type=[enum|string]}{;w=[number]}{;h=[number]}{;image=[string]} {;color=[color]}{;bg=[color]}{;tsize=[number]}{;items=[list]} {;edit=[bool]}{;input-text=[string]}{;input-mask=[bool]}{;buttons=[list]} {;tpos=[enum]}{;iomap=[list]}
text
[string]
Text to display. If test-file localization is loaded, the text is automatically translated.
type
[enum | string]
Message type and text position if both displayed • auto - determine the type based on 'text' and 'image' arguments ('text' only = type text, 'image' only = type image, both 'text' and 'image' = both)
-or-
• im or image - show image
• t or text - show text in default position
• tt - show text on the top
• tb - show text on the bottom
• tl - show text on the left side
• tr - show text on the right side
Type as a combination of 1-2 type string above, using plus '+' character, i.e.:
"im" (image only), "im+t" (image and text), "im+tt" (image and text on top)
Default: auto
w
[number]
Dialog width, percent of operator screen. Range: 20 - 100
Default: 80
h
[number]
Dialog height, percent of operator screen. Range: 20 - 100
Default: 80
image
[string]
Image to display.
Required when type is specified to display an image. Supported image formats: JPEG, PNG, GIF, and BMP
• path to file on a hard drive (i.e. "c:\path\to\image.png") • device plug-ins from version 2.0: "plugin://<device- alias>"
When image source is set to plug-in, the plug-in can render a custom image to the operator's screen independently.
Default: (none)
color
[color]
Color of message text Default: black
bg
[color]
Color of message text Default: white
tsize
[int]
Text size in points Default: 24
tpos
[enum]
To specify the position of the text when 'type' argument is not used or set to 'auto' and both image and text are displayed.
Valid positions:
• top (above the image) • bottom (below the image)
• left
• right
If the 'type' argument is specified, this argument is ignored Default: bottom
items
[list]
A comma-separated list of text items. One of them can be selected in the dialog. When no buttons, text and image is passed, the result is the dialog with only the list of items to select. Default: (none)
edit
[bool]
If true, the edit-box is shown on the dialog.
Default: false
input-text
[string]
The default text to be prepared in the edit-box.
input-mask
[bool]
Mask the text by a standard system password character. Default: false
buttons
[list]
A comma-separated list of buttons to show.
Possible values are:
• ok
• cancel
• yes
• no
• retry
If edit box is shown or item values to select are passed, the "ok" button should be shown, because it confirms the typed text.
Default: ok (if no items and iomap are passed, otherwise no button is shown)
iomap
[list]
Mapping buttons to specified IO (inputs only) aliases from test station's IO mapping system.
Comma-separated list in following possible formats:
• Inputs aliases only: inbutton(0),inbutton(1),...,inbutton(N)
(buttons to pair depends equals to order in the buttons argument)
-or-
• Specified button(s) to specified alias(es): io0>button0,in1
button1,...,inN>buttonN
(buttons are paired to inputs directly)
-or-
• Combination of both formats: inbutton(0),inbutton(1),io2 button2,...,inN>buttonN
(first two buttons are paired by buttons argument position and others are directly paired) Default: (none)
Control status label of current or specified panel(s).
#status
@pass
Set status of current panel to "passed".
No return value
{}{:panel=[list]}{:color=[color]}
status
[string]
custom text of the current panel or one of the predefined values below:
• @ready
- Ready/In queue
• @pass
- Test passed
• @fail
- Test failed
• @test
- Testing in progress
Default: no text
panel
[list]
Specify panel(s) to change status label at once. Format: comma separated panel numbers or asterisk (*) to select all existing panels. Default: current panel
color
[color]
Background color of specified panel when the custom text is used. The "@ready/pass/fail/test" will have always fixed colors (gray/green/red/yellow). Default: light-yellow
The panel configuration needs to be defined using #panel command or defined in the Head File
Control how test results are displayed in the result list
#resultlist
clear{:panel=[int]}
Clear all results or if panel parameter specified, clear selected panel's results only.
No return value
This command enables to add/modify/remove the user button(s) on operator's interface sidebar. Click the button performs the asynchronous function call to the specified label.
No return value.
add:<id>;call=[string]{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}
set:<id>{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}
remove:<id>
id
[string]
The unique ID(s) of the button(s). ID is used to identificate the button in another functions. An asterisk (*) used like an ID identificates all existing buttons - this cannot be used when adding buttons.
call
[string]
Target label of the function which will be asynchronously called by clicking the specified button.
param
[string]
Optional parameter to pass to the target function. If exists, the value will be written in to the "Return Value" column on the line, where the function label is declared.
caption
[string]
Caption of the button. This parameter is not required, but recommended.
enabled
[bool]
If true, the button is disabled, if false the button is disabled. Default: false
image
[path]
Picture of the button. This parameter is not required, but recommended. Source picture can be in the PNG/JPEG/BMP/ GIF format, highly-recommended is the PNG format with the resolution of 64x64 pixels.
Once the function is called, it is not possible to call it again until it finishes, otherwise an error message is thrown. It's recommended to disable the button using the set:;enabled=false command immediately after asynchronous function is called and enable the button at the end of the function. The error message is shown also in the case, that the target label does not exist
#userbtn
add:print-label;call=print-label-event;caption="Print label"; image="$project-dir$\print-icon-64.png"
Add a new user-button labeled "Print label". The button is identified by ID "print-label" and click the button calls the "print-label-event" labeled function in the test-file. By default, the operator is not allowed to click the button (is disabled). The "$project-dir$" is a funTEST's internal variable, which will be replaced by the directory of currently active project.
The panel configuration 3x1 means 3 panels in one row as shown in the screenshot above