#Switch

Top  Previous  Next

The #Switch object is used for switching various states. e.g. Off, On

With every actuation the next state is switched. Once the last state has been reached, the first state is restored.

 

Parameters

Object

Column A

M/O

Default

Description

#Switch

M


Switch for switching different states

Text/File

Column B

M/O

Default

Description


 

Empty string

Only the background is displayed accordingly if text/image are not defined

<text0>,<text1>,...

O


Text strings for states 0,1,... separated by ‘,’, also on multiple lines

 

Positioning of text:

Text is centered, however, the option Pos=<alignment> also allows horizontal alignment.

 

switch_0switch_1

 

<image0>,<image1>,...

O


Name of image files for states 0,1, separated by ‘,’.

 

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.

 

switch_icon0switch_icon1 switch_img0switch_img1

Font

C Font column

M/O

Default

Description

<Fontname>.FNT

O

Current font

Font for displaying text

X, Y, DX, DY

Columns D-G

M/O

Default

Description

Integer constants

Variable of type INT

O

Autom. positioning

Position and dimension

Color

Column H

M/O

Default

Description

Color0,Color1,...

O

Current foreground color

Font color of the text for states 0,1,...

BackColor

Column I

M/O

Default

Description

Color0,Color1,...

O

Current background color

Background color of the switch for states 0,1,...

Format

Column J

M/O

Default

Description

Format

O

No frame

Type of frame

Action

Column K

M/O

Default

Description


 

SetVar+1

When the #Switch object is actuated, the variable value is automatically incremented by 1 and the corresponding image/text information is displayed. The value 0 is set if the actual value is greater than the number of defined states - 1

Limit1

Column L

M/O

Default

Description

 

<constant>

<variable>

O

VarType-Min

Lower limit value

...Numerical constant

...Variable of type VarType

Limit2

Column M

M/O

Default

Description

 

<constant>

<variable>

O

VarType-Max

Upper limit value

Numerical constant

Variable of type VarType

ActionLimit1, ActionLimit2

Columns N,O

M/O

Default

Description

<action>

O


The standard LimitActions are available.

VarValue

Column P

M/O

Default

Description

<variable>

O


Value of the switch.

Default behavior if no limits and limit actions have been defined:

If the variable contains a value > (number of defined states - 1), the last state is displayed.

If the variable contains a value < 0, the first state is displayed.

VarType

Column Q

M/O

Default

Description

Numerical data types

O


All numerical data types are supported

VarState

Column R

M/O

Default

Description

<variable>

O


See VarState column

Option

Column S

M/O

Default

Description

Pos={Center¦Left¦Right}

O

Pos=Left

Horizontal text, image alignment

 

Pos=Center

centered

Pos=Left

left aligned

Pos =Right

right aligned

 

The vertical alignment is centered per default

VPos={Top¦Bottom}

O

 

Vertical alignment of text or image

 

VPos=Top

top aligned

VPos=Bottom

bottom aligned



Transparency=<color>

 

 

If an image file was configured, the specified color is interpreted as transparent.

PWL=<level>

 

 

Required password level for enabling (see #Password).

VarStateOnOffInverted

O

 

Inverts the On / Off functionality of the VarState Variable:

 

VarState = 0 -> Off

VarState = 1 -> On

 

Init, Exit

Columns U, V

M/O

Default

Description

SetVar=<constant>

SetVar=<variable>

O


The SetVar= actions are available