FunTest Documentation
  • What is FunTest?
  • Product Tour
    • Navigation
    • Create your first project
    • Connecting Test Equipment
    • Creating Test Sequence
    • Executing Test Sequence
    • Test Reporting
  • Creating Test Sequence
    • Test File Overview
      • TEST Sequence Tab
    • FunTest Commands
      • Operator Interface
      • Sequence Flow
      • Digital I/O
      • Test Result Export
      • Printing
      • Other Commands
    • Calling Device Plugin
    • Test Point Control
    • Using Spreadsheet Formulas
    • Variables
    • Interrupt Events
    • Online Debugging
  • FunTEST Plugins
    • Plugin Overview
  • Test Station
    • Test Station Setting
  • Other
    • Run FunTEST Externally
  • How To's
    • How To's
Powered by GitBook
On this page
  • #msg (Show a message)
  • Examples
  • Return Value
  • Command Overview
  • #dlg (Show a dialog)
  • Examples
  • Return Value
  • Command Overview
  • #status (Set test status of current panel)
  • Examples
  • Return Value
  • Command Overview
  • #resultlist (Result list operations)
  • Examples
  • Return Value
  • #userbtn (User button control)
  • Return Value
  • Command Overview
  • Examples

Was this helpful?

  1. Creating Test Sequence
  2. FunTest Commands

Operator Interface

Following commands can be used to control the operator interface to display information to the operator or request action from the operator

PreviousFunTest CommandsNextSequence Flow

Last updated 1 year ago

Was this helpful?

#msg (Show a message)

Show formatted message on operator interface

Examples

Command
Parameter

#msg

"Simple message to show..."

Display a simple tiny message with text specified above.

Command
Parameter

#msg

"Message to show...";size=medium;tsize=40;image="c:\\path\\to\

\image1.jpg";color=light-red

Display medium-sized message with a light-red colored text and image specified by path and text below of image. Set the text-size to 40pt (default is 24).

Command
Parameter

#msg

size=large;image="c:\path\to\image2.png";bg=black

Display a full-screen image only with black background.

Command
Parameter

#msg

"Text left of the image";size=medium;tpos=left;image="c:\\path\\to\

\image2.png"

Display a medium-sized message with text aligned to left side.

Command
Parameter

#msg

size=large;image="plugin://Remote"

Display a full-screen image and allow the plug-in with alias "Remote" to send the image directly to operator's interface.

Return Value

No return value

Command Overview

Command
Parameter
#msg

{<text>}{;type=[enum|string]}{;size=[enum]}{;image=[string]} {;color=[color]}{;bg=[color]}{;tsize=[int]}{;tpos=[enum]}

Parameter Description

Parameter
Type
Options

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.

#dlg (Show a dialog)

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.

Examples

Command
Parameter

#dlg

"Simple dialog to confirm..."

Show a simple confirmation dialog with one button - "OK". Return value will be always "@ok".

Command
Parameter

#dlg

"Select an item";w=100;h=100;items="one,two,three,four,five"

Show a full-screen dialog (width and height is 100%) to select one of predefined items. Return value will be one of the items.

Command
Parameter

#dlg

"Enter your name:";w=70;h=50;edit=true

Show a dialog with an edit-box. Return value will be the entered text.

Command
Parameter

#dlg

"IO paired dialog";buttons="ok,cancel";iomap="start,stop"

Show a dialog with two buttons and map OK button to "start" IO alias and Cancel button to "stop" alias

Return Value

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.

Command Overview

Command
Parameter
#dlg

{;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]}

Parameter Description

Parameter
Type
Options

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)

#status (Set test status of current panel)

Control status label of current or specified panel(s).

Examples

Command
Parameter

#status

@pass

Set status of current panel to "passed".

Command
Parameter

#status

@ready:panel=*

Set "ready" status for all panels.

Command
Parameter

#status

@test:panel=1,3,4

Set "test" status for selected panels.

Command
Parameter

#status

"Processing...":color=light-blue

Set custom status text of current panel to "Processing..." with light blue background color.

Command
Parameter

#status

panel=4:color=blue

Set panel's 4 color to blue, without any text.

Return Value

No return value

Command Overview

Command
Parameter
#status

{}{:panel=[list]}{:color=[color]}

Parameter Description

Parameter
Type
Options

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

#resultlist (Result list operations)

Control how test results are displayed in the result list

Examples

Command
Parameter

#resultlist

clear{:panel=[int]}

Clear all results or if panel parameter specified, clear selected panel's results only.

Command
Parameter

#resultlist

showerrors <or> showall

Show only error results or all results.

Command
Parameter

#resultlist

panel:<#panel>

This command allows to set current panel number. Valid numbers must be defined in the test-program.

Command
Parameter

#resultlist

reqconfirm

Shows a confirm button on the testing screen. This function blocks the executing of program until user confirms results.

Command
Parameter

#resultlist

sort:FailsOnTop

Sorts current view of result-list. The sorting is not done on-the-fly and must be called manually. Sorting cannot be reverted, once it's done the previous order cannot be restored.

Return Value

No return value

#userbtn (User button control)

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.

Return Value

No return value.

Command Overview

Command
Parameter
#userbtn

add:<id>;call=[string]{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}

#userbtn

set:<id>{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}

#userbtn

remove:<id>

Parameter Description

Parameter
Type
Options

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

Examples

Command
Parameter

#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.

Command
Parameter

#userbtn

set:print-label;enabled=true

Enable the "print-label" button - the operator is allowed to click the button.

Command
Parameter

#userbtn

set:*;enabled=false

Disable all user-buttons. An asterisk (*) used like an ID selects all buttons to modify.

Command
Parameter

#userbtn

remove:*

Remove the all user-buttons from the sidebar

The panel configuration 3x1 means 3 panels in one row as shown in the screenshot above

Page cover image