Displaying or Hiding Channels in a Trend Graph

You can display/hide the trend graph for each channel.

You do not need to display many channels on one graph all at once for checking. This is useful when you want to isolate or compare specific lines on a multiple line graph.

Example Operation

Note: To configure Data Logging settings, refer Logging Data at Constant Intervals.

Setting Workflow

  1. Add Variables
  2. Set up Parts
  3. Set up Scripts

Add Variables

Project Explorer : [Variables] ➞ [All Variables]

Add the following variables.

Variables properties :

[Name] [Data Type] [Source] [Device Address] [Initial Value]

Var1

[INT]

'Schneider Modbus Serial Equipment' 400005 -

Var2

[INT]

400030 -

Var3

[INT]

400031 -

Var4

[BOOL]

(Any) (Any)

Var5

[BOOL]

Var6

[BOOL]

Set up Parts

Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Drag and drop the following objects from the [Tool Chest] to the screen.

Trend Graph (Name: TrendGraph1) properties : A-1

Tab Sub Tab Property Value

[Function]

[Basic]

[GroupName]

[LoggingGroup1]

[Channels]

3

[Channel 1]

[Variable] [Variable] [Name]: Var1
[Use Global Range]
[Visibility] [Variable] [Name]: Var4
[Display Format] [Line]
[Mark] [None]

[Channel 2]

[Variable] [Variable] [Name]: Var2
[Use Global Range]
[Visibility] [Variable] [Name]: Var5
[Display Format] [Line]
[Mark] [None]

[Channel 3]

[Variable] [Variable] [Name]: Var3
[Use Global Range]
[Visibility] [Variable] [Name]: Var6
[Display Format] [Line]

[Mark]

[None]

[Display Mode]

[Full]

[Graph Type]

[Pen Recorder]

[Min Global Range]

0

[Max Global Range]

1000

[Interval]

1

[Unit]

Min

[Detail]

[Display Cursor]

[Display Cursor Labels]

Switch object (Name: Switch1) properties : B-1

Default value

Switch object (Name: Switch2) properties : B-2

Default value

Switch object (Name: Switch3) properties : B-3

Default value

Set up Scripts

Project Explorer : [Screen1]

Set the following script on the object.

From the [Tool Chest] drag and drop the script to the Script editor.

Switch object (Name : Switch1) script : B-1

Channel 0

 

Switch object (Name : Switch2) script : B-2

Channel 1

 

Switch object (Name : Switch3) script : B-3

Channel 2

Legend Block

1

[Triggers] [Touch] [Touch]

2

[Operations] ➞ [Value Change] [Bool Value Change]

3

[Values] [Variable]

4

[Values] [Screen Object]