/
Trend Control Expression

Trend Control Expression

GetPenStatus()

GetPenStatus

Returns the state of the pen.

Function

Command

GetPenStatus("Object Name ", Pen Number)

Script

n = GetPenStatus("Object Name ", Pen Number)

Description

When the specified pen is visible, the function returns 1. If the pen is invisible, the function returns 0. The Pen Number starts from 0.

Example

Returns the state of the first pen in ‘YTTrend’ Trend.

GetPenStatus(“YTTrend”, 0) = n

 

 

GetTrendMode()

GetTrendMode

Returns the current Trend mode.

Function

Command

GetTrendMode("Object Name”)

Script

n = GetTrendMode("Object Name”)

Description

When the specified Trend is in real-time Trend mode, the function returns 0. If the Trend is Historical Trend, the function returns 1.

Example

Returns the current mode of the ‘YTTrend’ Trend.

GetPenStatus(“YTTrend”) = n

image-20241015-052358.png
returns 0, because it’s real-time.

 

 

NextTrend()

NextTrend

Moves to the next trend display in the Historical Trend.

Subroutine

Command

NextTrend("Object Name ", Movement Mode)

Script

NextTrend " Object Name ", Movement Mode

Description

Moves the display of the Historical Trend according to the assigned Movement Mode. If the Movement Mode is 0, the display will move to the next sampling time. If the Movement Mode is 1, the display will move to the next frame.

Example

Moves the display to the next sampling time in Historical Trend mode.

NextTrend(“YtTrend”, 0)

image-20241015-053302.png

 

 

PrevTrend()

PrevTrend

Moves to the previous trend display in the Historical Trend.

Subroutine

Command

PrevTrend("Object Name", Movement Mode)

Script

PrevTrend "Object Name", Movement Mode

Description

Moves the display of the Historical Trend according to the assigned Movement Mode. If the Movement Mode is 0, the display will move to the previous sampling time. If the Movement Mode is 1, the display will move to the previous frame.

Example

Moves the display to the previous sampling time in Historical Trend mode.

PrevTrend(“YtTrend”, 0)

 

 

SetPenStatus()

SetPenStatus

Determines the display of the pen.

Subroutine

Command

SetPenStatus("Object Name", Pen Number, Show/Hide)

Script

SetPenStatus "Object Name", Pen Number, Show/Hide

Description

Shows (1) or hides (0) the assigned pen. The pen number starts from 0.

Example

Hides the pen number 3 in ‘YtTrend’

SetPenStatus(“YtTrend”, 2, 0)

 

 

SetTrendMode()

SetTrendMode

Sets the Trend mode.

Subroutine

Command

SetTrendMode("Object Name ", Trend Mode)

Script

SetTrendMode " Object Name ", Trend Mode

Description

Sets the Trend mode as real-time Mode (1) or Historical Mode (1).

Example

Sets the ‘YtTrend’ Trend as Historical Trend mode.

SetTrendMode(“YtTrend”, 1)

 

 

TrendGetPenVal()

TrendGetPenVal

Returns the pen related data to the Trend.

Function

Command

TrendGetPenVal("Object Name ,Pen Number,Value Type)

Script

n = TrendGetPenVal("Object Name",Pen Number,Value Type)

Description

Returns the pen data according to the Value Type. Pen Number 100 represents the first pen of X-axis in XY Trend.

Value Type

Description

0

Name of the pen (String)

1

Comment of the pen (String)

2

Minimum value of the pen

3

Maximum value of the pen

4

Line style of the pen (0: None, 1: Line, 2: Step)

5

Current value of the pen in real-time Trend.

6

Current time value of the pen in real-time Trend.

7

Current value of the pen in Historical Trend.

8

Current rime value of the pen in Historical Trend.

9

Minimum value in the current display of Historical Trend.

10

Time value of the minimum value in the current display of Historical Trend.

11

Maximum value in the current display of Historical Trend.

12

Time value of the maximum value in the current display of Historical Trend.

13

Average value in the current display of Historical Trend.

Example

Returns the maximum value of X-axis in ‘XY’ Trend.

TrendGetPenVal("XY", 100, 3) = n

 

 

TrendSetPenVal()

TrendSetPenVal

Sets the Pen data.

Subroutine

Command

TrendSetPenVal(“Object Name”, Pen Number, Value Type, Set Value)

Script

TrendSetPenVal “Object Name”, Pen Number, Value Type, Set Value

Description

Sets the pen data according to the Value Type and Set Value. Pen Number 100 represents the first pen of X-axis in XY Trend.

Value Type

Description

0

Pen name (String)

1

Pen comment (String)

2

Minimum value of the pen

3

Maximum value of the pen

4

Line style of the pen (0: None, 1: Line, 2: Step)

Example

Sets the maximum value of X-axis in ‘XY’ Trend as 200.

TrendSetPenVal("XY", 100, 3, 200)

 

 

ZoomTrend()

ZoomTrend

Zooms in or out on the Historical Trend.

Subroutine

Command

ZoomTrend("Object Name ", Zoom Mode)

Script

ZoomTrend " Object Name ", Zoom Mode

Description

Zooms in or out on the Historical Trend..

Zoom Mode

Description

0

Zooms in on the Historical trend to monitor the data in detail.

1

Zooms out on the Historical trend to monitor the general tendency of data.

Example

Zooms in on the Historical Trend of “Trend”.
ZoomTrend(“Trend”, 0)