The #Button object is used for user inputs. It makes a large number of actions available in order to interact with the system.
See also
General actions
Alarm actions
AlarmList actions
Authent actions
DataLog actions
RemoteControlServer actions
Recipe actions
Recipe list actions
Trend actions
General actions
Parameters
Object
Column A
|
M/O
|
Default
|
Description
|
#Button
|
M
|
|
Touch/mouse active area for interaction
|
Text/File
Column B
|
M/O
|
Default
|
Description
|
|
O
|
|
If no image or text is entered, this is a touch active field, such as within a graphic. The field is inverted on actuation if transparent is used as Backcolor.
|
<text1>[,<text2>]
|
O
|
|
Text to be displayed (also multiple line)
Variant1: <text1>
<text1> is displayed for states not actuated/actuated
Variant2: <text1>,<text2>
<text1> is displayed in non-actuated state
<text2> is displayed in actuated state
Positioning of text:
Text is centered, however, the option pos=<alignment> also allows horizontal alignment.
Examples
Text/File
|
State
|
Result
|
Text1,Text2
|
Not actuated
|

|
Text1,Text2
|
Actuated
|

|
|
<image0>[,<image1>]
|
|
|
Image file(s) to be displayed as icon (<image0>) or for the non-actuated (<image0>) and actuated (<image1>) state
Positioning of images:
If a border is defined, the display of the images is centered.
If no border is defined, the images are positioned in relation to the top left.
Example
hand.pcx
|
Not actuated
|

|
|
Font
X, Y, DX, DY
Color
BackColor
Format
Column J
|
M/O
|
Default
|
Description
|
Format
|
O
|
No frame
|
Type of frame
|
Invisible
|
O
|
|
Object not visible
|
Action
Column K
|
Description
|
<Action>
|
Action is executed on button actuation, irrespective of the variable value
|
<Action1>&<Action2>...
|
Multiple actions can be defined with &.
Action1 AND Action2,... are executed on button actuation, irrespective of the variable value
|
<Action0>,<Action1>,...
|
Action is executed on button actuation, depending on the variable value.
Example
Action: #Page=Value0,#Page=Value1
...Change to screen page “Value0” if the variable value is 0
...Change to screen page “Value1” if the variable value is 1
|
The Switch= option enables also value ranges to be defined for the individual actions.
Example
Action
|
#Page=Range0,#Page=Range1,#Page=Range3
|
Option
|
Switch=<0:0..5:>5
|
Change to screen page “Range0” if the variable value is < 0
Change to screen page “Range1” if the variable value is in the range 0 to 5
Change to screen page “Range2” if the variable value is > 5
Action (general actions)
Column K
|
Description
|
#Page=<name>
|
Open page with name <name>
|
#Page=<name>:animation={topin¦bottomin¦leftin¦rightin}[(<duration>)]
|
Animated page change:
To open a page with an animation append :animation= to the page name, followed by type of animation:
|
animation=topin
|
shift the page into the display from top to the destination position
|
|
animation=bottomin
|
shift the page from into the display botton to the destination position
|
|
animation=leftin
|
shift the page from left into the display to the destination position
|
|
animation=rightin
|
shift the page from right into the display to the destination position
|
Sample:
#Page=pw:animation=topin
Optionally it's possible to define the duration of the animation. Default ist 600ms.
Sample:
#Page=pw:animation=topin( 400 )
|
PageHome
|
Open start page
|
PageBack
|
Open the last Page (similar to web-browser functionality Back)
|
Close
|
Close the highest or last opened page (window)
|
Close=<name>
|
Close the page (window) with the name <name>
|
EjectVolume( Drive;#page=<eject_failed>;#page=<eject_succeeded>)
|
Dismounts a store Wechselspeicher, e.g. memorystick oder SD-card.
#page=<eject failed> : Page to open in case of an error ( optional)
#page=<eject succeeded> : Page to open in case of success ( optional, implies #page=<eject failed)
Sample:
EjectVolume( /StorageCard2 )
EjectVolume( /StorageCard2; #page=eject_failed )
EjectVolume( /StorageCard2; #page=eject_failed;#page=eject_succeded )
|
Exit
|
Exit program (back to operating system)
|
FileCopy( src=<filepath1> dst=<filepath2> [#page=<error> [#page=<ok>]] )
|
Copy file <filepath1> to <filepath2>
Optional:
1. Page #page=<error>: is opened on copy error
2. Page #page=<ok>: is opened after the copy operation was successfully completed
Examples
filecopy( src=\Epam4\log\f1.log dst=\StorageCard2\dat\fi.log)
filecopy( src=\Epam4\log\f1.log dst=\StorageCard2\dat\fi.log #page=copy_err)
filecopy( src=\Epam4\log\f1.log dst=\StorageCard2\dat\fi.log #page=copy_err #page=copy_ok)
|
IPparam:Get
|
Loads the IP parameters (EthernetAdapter 0) in the system variables:
|
IPparam:Set
|
Sets the IP parameters (EthernetAdapter 0) according to the system variables
|
Key=<keycode>
|
Sends the character <keycode> received from a #Variable object in Input mode (focus).
Is required for creating keyboard pages.
Characters can be defined as follows:
|
Example:
|
Ascii/Unicode characters
|
key=A
|
Hexcode
|
key=\x41
|
Key name
|
key=Enter
|
See also
Key name
|
Language=<name>
Language=default
|
Language change to <name> or default language (Language=default)
Change to language <name>.
Set /S/APP/Language to <name>
varpool:sysvarsave is executed implicitly
|
PlcCmd=/<Drv>/<Host>:CreateBootProject
|
Send command to PLC on channel /<Drv>/<Host>: Create boot project
|
PlcCmd=/<Drv>/<Host>:ResetCold
|
Send command to PLC on channel /<Drv>/<Host>: Cold reset
|
PlcCmd=/<Drv>/<Host>:ResetOriginal
|
Send command to PLC on channel /<Drv>/<Host>: Reset original
|
PlcCmd=/<Drv>/<Host>:ResetWarm
|
Send command to PLC on channel /<Drv>/<Host>: Warm reset
|
PlcCmd=/<Drv>/<Host>:Start
|
Send command to PLC on channel /<Drv>/<Host>: Start
|
PlcCmd=/<Drv>/<Host>:Stop
|
Send command to PLC on channel /<Drv>/<Host>: Stop
|
PWL=<level>
|
Sets the #Password level to <level>
/S/SYS/Pwl can also be set directly
|
Reboot
|
Restart the system
|
SetDateTime
|
Sets the system time (and date), in which the time set is formed from the following system variables:
/S/SYS/tm_Hour
/S/SYS/tm_Min
/S/SYS/tm_nSec
/S/SYS/tm_Year
/S/SYS/tm_Mon
/S/SYS/tm_Day
/S/SYS/tm_IsPm
/S/APP/tm_UseAmPm
On Windows Vista and above the user needs appropriate privileges (SE_SYSTEMTIME_NAME) to change the system time.
Seee: Assigning Privileges to an Account
|
System=<excutable> [options]
|
Any executable file including parameters can be an <executable>.
Paths with blanks must be set between double quotation marks.
The following options can be stated between square brackets:
-d <working directory>
Example
system="c:\Program files\viewer\viewer.exe" myfile [-d d:\my documents]
Executing a batch file under WinCE
system=/windows/cmd.exe /c /storagecard/my.bat
|
Touch_calibrate
|
Calibration of the resistive touch is called
Depends on the device, touch type and manufacturer
|
TipVar=<value>
|
VarValue <value> is set as long as the #Button is pressed, VarValue is then set to 0.
|
Unit=<index>
|
Unit system conversion, for which <index> must be an integer >= 0.
(see Unit systems)
|
Varpool:[<driver>][<host>].export
|
Saves the variables of the host to: <PATH_DAT>/<drv>-<host>.csv.
|
Varpool:sysvarsave
|
Saves the persistent system variables in <PATH_INI>/<Host>.INI.
|
Action (PlcCmd actions)
Via PlcCmd Aktionen können die Betriebszustände der SPS gesteuert werden.
Column K
|
Beschreibung
|
PlcCmd=/<Drv>/<Host>:CreateBootProject
|
Send command to PLC on channel /<Drv>/<Host>: Create boot project
|
PlcCmd=/<Drv>/<Host>:ResetCold
|
Send command to PLC on channel /<Drv>/<Host>: Cold reset
|
PlcCmd=/<Drv>/<Host>:ResetOriginal
|
Send command to PLC on channel /<Drv>/<Host>: Reset original
|
PlcCmd=/<Drv>/<Host>:ResetWarm
|
Send command to PLC on channel /<Drv>/<Host>: Warm reset
|
PlcCmd=/<Drv>/<Host>:Start
|
Send command to PLC on channel /<Drv>/<Host>: Start
|
PlcCmd=/<Drv>/<Host>:Stop
|
Send command to PLC on channel /<Drv>/<Host>: Stop
|
Not all commands are supported by all communication drivers, see table below:
Command / Driver
|
PlcH Arti
|
PlcH Gateway3
|
RS7
|
ADS
|
OPC
|
CreateBootProject
|
|
|
√
|
|
|
ResetCold
|
|
|
√
|
|
|
ResetOriginal
|
|
|
√
|
|
|
ResetWarm
|
|
|
√
|
|
|
Start
|
√
|
|
√
|
√
|
|
Stop
|
√
|
|
√
|
√
|
|
Action (SetVar actions)
Column K
|
Description
|
SetVar=<constant>
SetVar=<variable>
|
The constant <constant> is assigned to the VarValue.
The value of <variable> is assigned to the VarValue.
<variable> must be of the same data type as VarValue, i.e. VarType!
|
SetVar=NotVar
|
Invert variable value (0/1)
|
SetVar:<variable1>=<constant>
SetVar:<variable1>=<variable2>
|
The constant <constant> is assigned to <variable1>.
The <variable2> is assigned to <variable1>.
<variable1> and <variable2> must be of the same data type!
|
SetVar+<constant>
SetVar+<variable>
|
The VarValue is incremented by the constant <constant>.
The VarValue is incremented by the value of <variable>.
<variable> must be of the same data type as VarValue, i.e. VarType!
|
SetVar<constant>
SetVar<variable>
|
The VarValue is decremented by the value of constant <constant>.
The VarValue is decremented by the value of <variable>
<variable> must be of the same data type as VarValue, i.e. VarType!
|
Action (actions for #Alarm)
Column K
|
Description
|
Alarm:delete
|
Deletes the alarm buffer of the #Alarm object of type /S/APP/Alarm:Type
|
Alarm:[<type>].delete
|
Deletes the alarm buffer of the #Alarm object of type <type>
Example:Alarm:[MyAlarm1].delete
|
Alarm:export={csv¦xml}
|
Exports the alarm buffer of the #Alarm object of type /S/APP/Alarm:Type as csv or xml to PATH_DAT
All alarms are exported in the order in which they are located in the buffer.
|
Alarm:[<type>].export={csv¦xml}
|
Exports the alarm buffer of the #Alarm object of type <type> as csv and xml to PATH_DAT
All alarms are exported in the order in which they are located in the buffer.
Example:alarm:[MyAlarm1].export=xml
|
Alarm:quitall
|
Acknowledges all unacknowledged alarms of the #Alarm object of type /S/APP/Alarm:Type
|
Alarm:[<type>].quitall
|
Acknowledges all unacknowledged alarms of the #Alarm object of type <type>
Example: Alarm:[MyAlarm1].quitall
|
Alarm:type=<type>
|
Specifies the alarm type, required as soon as several #Alarm objects were configured.
Sets /S/APP/Alarm:Type to <type>.
|
/S/APP/Alarm:Type only has to be set if several #Alarmobjects were configured
Action (actions for #AlarmList)
Column K
|
Description
|
AlarmList:quit
|
acknowledges the selected alarm
|
AlarmList:sort=FiFo
|
Sort in descending order by AlarmOn (oldest alarm at top)
Set sorting: FiFo = oldest alarm first, i.e. in ascending order by AlarmOn
LiFo = newest alarm first, i.e. in descending order by AlarmOn
Priority = ascending by AlarmNo
|
AlarmList:sort=LiFo
|
Sort in descending order by AlarmOn (newest alarm at top)
|
AlarmList:sort=Priority
|
Sort in ascending order by AlarmNo (lowest alarm number at top)
|
AlarmList:filter=all
|
Display all alarms
|
AlarmList:filter=activ
|
Only display active alarms
|
AlarmList:filter=activ|notquit
|
Display only active or unacknowledged alarms
|
AlarmList:filter=activ+notquit
|
Display active and unacknowledged alarms
|
AlarmList:filter=notquit
|
Display only unacknowledged alarms
|
AlarmList:info=<n>
|
The page <n> configured in the Alarm definition at Alarm lnfo action of the selected alarm is opened. (1. Action=1, 2.=2,...)
|
AlarmList:[<name>].<action>
|
Execute <action> on the #AlarmList designated by <name>. <action> can be one of the actions listed above. (e.g. quit, sort,..). Thereby it isn't necessary to set /S/APP/AlarmList:Type.
|
Actions are executed in response to the first active #AlarmList object or, if /S/APP/AlarmList:Type is set, in response to the #AlarmList object of the designated type.
Action (actions for #Authent)
Column K
|
Description
|
Authent:login
|
Log in user with /S/SYS/Authent:User and /S/SYS/Authent:Pwd
|
Authent:logout
|
Log out the logged in user
|
Authent:changePwd
|
Change the password of the logged in user to /S/SYS/Authent:Pwd .
|
Authent:addUser
|
Create user S/SYS/Authent:User
(not assigned to a role)
|
Authent:addUserToRole=<Role>
|
Create user S/SYS/Authent:User and assign to the role <Role>.
|
Action (actions for #Datalog)
Column K
|
Description
|
Datalog:[<name>].save
|
Copies the log file of the #Datalog object of type <name> to PATH_DAT
|
Datalog:[<name>].delete
|
Deletes the log file of the #Datalog object of type <name>
|
Datalog:[<name>].export
|
Exports the log file of the #Datalog object of type <name> to PATH_DAT
The target filename may be specified with the #Export parameter in the Datlog-Definition table.
|
Datalog:[<name>].export=<path>
|
Exports the log file of the #Datalog object of type <name> to path
The target filename may be specified with the #Export parameter in the Datlog-Definition table.
The path maybe, fully or partially, specified with a variable. eg:
Datalog:[dl1].export=/storagecard2/%/S/TMP/myDir%
|
Datalog:exportall=<path>
|
Exports the log files of all #Datalog objects to <path> with extension ".csv".
The path maybe, fully or partially, specified with a variable. eg:
Datalog:[dl1].export=/storagecard2/%/S/TMP/myDir%
|
Action (actions for controlling the #RemoteControl server)
Column K
|
Description
|
RemoteControl:connection.drop
|
The connections to all clients connected to the local remote server are dropped
|
RemoteControl:input.enable
|
Enables remote control with keyboard or mouse
|
RemoteControl:input.disable
|
Disables remote control with keyboard or mouse
|
Action (actions for #Recipe)
Action (actions for #RecipeList)
Column K
|
Description
|
RecipeList:delete
|
Delete the selected recipe in the #RecipeList
|
RecipeList:load
|
Load the selected recipe in the #RecipeList
|
RecipeList:csave
|
Save the selected recipe in the #RecipeList.
If the file already exists, the file is not overwritten but a runtime error is displayed, or, if configured at the #Recipe object, the action #Page=<name> is executed.
|
RecipeList:save
|
Save the selected recipe in the #RecipeList.
The file will be overwritten if it already exists.
|
RecipeList:sort=file
|
Sort the #RecipeList in ascending order by file column
|
RecipeList:sort=name
|
Sort the #RecipeList in ascending order by name column
|
RecipeList:sort=time
|
Sort the #RecipeList in ascending order by time column
|
Action (actions for #Trend)
Column K
|
Description
|
Trend:online
|
The #Trend is switched online (after cursor, or scrolling).
|
Trend:[<name>].online
|
|
Trend:ShiftCursor<offset>
|
The #Trend cursor is shifted by the number <offset> of data points.
A positive <+offset> shifts in the direction of the future
A negative <-offset> shifts in the direction of the past
|
Trend:[<name>].ShiftCursor<offset>
|
|
Trend:ScrollGrid<offset>
|
The #Trend curves are shifted by <offset> * grid in the current resolution (Zoom)
A positive <+offset> shifts in the direction of the future
A negative <-offset> shifts in the direction of the past
|
Trend:[<name>].ScrollGrid<offset>
|
|
Trend:ScrollPage<offset>
|
The #Trend curves are shifted by <offset> * Page of the current resolution (Zoom)
A positive <+offset> shifts in the direction of the future
A negative <-offset> shifts in the direction of the past
|
Trend:[<name>].ScrollPage<offset>
|
|
Trend:ScrollEnd
|
The #Trend curves are shifted to the end, the oldest data is visible
|
Trend:[<name>].ScrollEnd
|
|
Trend:ZoomXGrid<factor>
|
The X axis or the XRange is zoomed:
XRange = XRange + <factor> * Grid
<factor> must be a positive or negative integer constant
|
Trend:[<name>].ZoomXGrid<factor>
|
|
Trend:ZoomXPage+1
Trend:ZoomXPage-1
|
The X axis or the XRange is zoomed:
trend:ZoomXPage+1 => XRange = XRange * 2
trend:ZoomXPage-1 => XRange = XRange / 2
|
Trend:[<name>].ZoomXPage+1
Trend:[<name>].ZoomXPage-1
|
|
Trend:ZoomXReset
|
The XRange is then reset to the original or configured value
|
Trend:[<name>].ZoomXReset
|
|
Action (actions for #UserList)
Column K
|
Description
|
UserList:disable
|
The selected user account becomes inactive
|
UserList:enable
|
The selected user account becomes active
|
UserList:remove
|
The selected user account is deleted
|
UserList:resetpwd
|
The password of the selected user account is reset
Depending on the setting in the Authent definition to:
|
Limit1
Limit2
ActionLimit1, ActionLimit2
VarValue
Column P
|
M/O
|
Default
|
Description
|
<variable>
|
O
|
|
Variable to set and or to display
|
VarType
VarState
Column R
|
M/O
|
Default
|
Description
|
<variable>
|
O
|
|
|
Option
Column S
|
M/O
|
Default
|
Description
|
NoBeep
|
O
|
Beep
|
Disable touch beep. Is normally used with stacked (overlaid) buttons.
|
Pos={Center¦Left¦Right}
|
O
|
Pos=Center
|
Horizontal alignment of text or image
|
centered
|
|
left aligned
|
|
right aligned
|
The vertical alignment is centered per default.
|
VPos={Top¦Bottom}
|
O
|
|
Vertical alignment of text or image
|
top aligned
|
|
bottom aligned
|
|
|
|
Switch=<range0>:<range1>:...
|
O
|
|
The Switch option allows to enumerate value ranges.
range0 -> 0
range1 -> 1
...
If VarValue is matching the first range it is taken as 0, if VarValue is matching the second range it is taken as 1,...
The ranges are separated by a colon.
Ranges can be defined as follows:
<n
|
|
All values less than <n>
|
>n
|
|
All values greater than <n>
|
i..n
|
|
All values greater or equal than <i> and less or equal than <n>
|
n
|
|
Exactly <n>
|
|
|
|
Sample.:
Switch=<1:1:2..5:>5
Range
|
Index
|
Description
|
<1
|
0
|
all less than 1
|
1
|
1
|
1
|
2..5
|
2
|
from 2 to 5
|
> 5
|
3
|
greater 5
|
|
|
|
|
Transparency=<color>
|
O
|
|
The <color> specified in an image file is interpreted as transparent.
Is only required for image formats that do not support transparency, e.g. PCX
In EPAM4 it is better to use the PNG image format instead of this option.
|
Timeout=<sec>
|
O
|
inactive
|
After a delay of <sec> seconds, the action is executed every <sec>. Exception: timeout=0 triggers immediately but only once.
|
PWL=<level>
|
O
|
0
|
Required password level for enabling (see #Password).
|
VarStateOnOffInverted
|
O
|
|
Inverts the On / Off functionality of the VarState Variable:
VarState = 0 -> Off
VarState = 1 -> On
|
ActionOnVarValueUpdate
|
O
|
|
Executing Action in initialisation and any update of VarValue
|
Init, Exit
Columns U, V
|
M/O
|
Default
|
Description
|
<action>
|
O
|
|
The same actions are available as described for the Action parameter
|
Screen keypad
The action Key=<keycode> is used to create screen keyboards. If the mouse or touch activated field is actuated, the corresponding key code is generated so that the keyboard is simulated.
See also keyboard table with key designations
Example: Key=a ...simulates the key a
Multilingual applications
The Language=name or Language=Default action enables online language selection for any language. Other languages are stored in appropriate subdirectories. <name> designates the relevant subdirectory.
To create a multilingual application, define a new language with Add Language. A directory with the entered name is created, and two new columns for Text/File and Font are added at the end to all language-dependent worksheets.
Important!
The name in the first line of these columns corresponds to the directory name and is stored as a comment "Language" (designation of the language columns!). These designations must not be removed!
You can now define all language-dependent definitions in the appropriate language columns (the language-independent definitions can be left empty, these are then configured automatically from the default language). You can also define other fonts if required.
All language-dependent files (*.TXT, *.FNT, *.IMG ) must be saved in the appropriate subdirectory.
The next time that theSimulation is called in order to launch the interpreter, all language files will be created automatically.
Difference to EPAM3
• | Touch-active fields such as on an image, must be defined in EPAM4 with a transparent background color. |
• | The following actions are currently not supported: See also Actions |
• | Option Scroll no longer required, see also #Scrollist |
• | Option Key=<keycode> currently not supported |
|