Omron CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 Reference Manual page 58

Script language
Table of Contents

Advertisement

OMRON
Rotate
Syntax
objectname.rotate (angle, context, fixed, xcoord, ycoord)
Remarks
Argument
objectname
angle
context
fixed
xcoord
ycoord
Typical Examples
rotate (45)
The current object to which this example applies is rotated by 45°.
RECTANGLE_1.rotate(tilt, @USERDEFINED, 0, -100, 10)
The object 'RECTANGLE_1' is rotated by the value of 'tilt', about a point –100, 10 relative to the
objects current position.
rotate (a * sin(b))
The current object is rotated based on the result of an arithmetic expression involving points named
'a and 'b'.
Revision 2.0
This is the name of the object. Where a script is directly attached to an
object, objectname is not required.
The angle of rotation can range between 0 to 360 in a clockwise direction.
Points alone, or as part of an arithmetic expression may be used as an angle.
This argument is not required and may be omitted. May be one of:
@TOPLEFT – rotate around top left of object
@TOPCENTRE –rotate around top centre of object
@TOPRIGHT – rotate around top right of object
@CENTRELEFT – rotate around centre left of object
@CENTRE – rotate around centre of object
@CENTRERIGHT – rotate around centre right of object
@BOTTOMLEFT – rotate around bottom left of object
@BOTTEMCENTRE – rotate around bottom centre of object
@ BOTTOMRIGHT – rotate around bottom right of object
@USERDEFINED – user defined point specified in xcoord and ycoord.
This argument may be omitted. If this boolean value is true, the rotation
origin is fixed to the screen, even if the object is moved. Otherwise, the
rotation origin is relative to object position.
Only required if @USERDEFINED is specified. These integer variables
specify the rotation origin in pixels
CHAPTER 6 – Functions and Methods
Description
Page 45

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents