#MvImg

Top  Previous  Next

This #MvImg object enables the rotation and moving of images. As the background can be set to be transparent, it is possible to overlay several of these objects.

 

Parameters

Object

Column A

M/O

Default

Description

#MvImg

M


Rotating and moving images

Text/File

Column B

M/O

Default

Description

<image0>,<image1>,...

O


Any number of images can be defined if they are separated by commas. The index determines which image is displayed, apart from the first image, which is used as the background and is drawn in all cases.

X, Y, DX, DY

Columns D-G

M/O

Default

Description

Integer constants

Variable of type INT

O

Autom. positioning

Position and dimension

BackColor

Column I

M/O

Default

Description

Color

O

Current background color

Background color

VarValue

Column P

M/O

Default

Description

<variable>

M


Array with control information for displaying the images

 

The data is exchanged with the PLC via a word array of length of 5 ( WORD[5] ).

 

Variable

Name

Description

WORD[0]

Control

Flags:

0 Active

1 Redraw

WORD[1]

Index

Index of the image to be drawn

WORD[2]

X

Offset X of the image

WORD[3]

Y

Offset Y of the image

WORD[4]

Angle

Clockwise rotation angle in degrees

Word[0] - control flags

The Active flag is set as soon as the object is instantiated. If the object is deactivated, the Active flag is reset.

The Redraw flag is used by the PLC to initiate a redraw. The flag is reset if it was detected by Epam.

Word[1] - index of the image to be drawn

The individual files are listed under Text/File, separated by commas. This parameter specifies which of these files are to be drawn. In this case, the index 0 stands for the second image as the first image is used as the background and is always output.

Word[2], Word[3] - position X and position Y

The position of the file to be drawn can be defined here with the coordinates. X and Y define the position of the top left corner of the image. If Pos=Center is specified under Option, the center of the file is positioned at this point.

Word[4] - rotation angle

This parameter defines the number of degrees by which the image is to be rotated clockwise. The rotation point is always located at the center of the bitmap.

VarType

Column Q

M/O

Default

Description

WORD[5]

M


Array of WORD[5]

VarState

Column R

M/O

Default

Description

<variable>

O


See VarState column

Option

Column S

M/O

Default

Description


 

Image center

Rotation point is center of the image

Pos=Center

O

 

Rotation point is center of the object

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=<Value>

O


Sets VarVal to <Value>