Graphs

SUMMARY

It is described how to set up graphs.

CONTENTS

  1. Task formulation
  2. General information about a graph.
  3. Defining a graph
  4. Scaling of the Time-Axis
  5. Automatic start of the Graph
  6. Displaying values stored in the Buffer
  7. Hints & Tips

Task formulation

A continuous sinus (Peak amplitude ±1; period 90 sec) should be recorded.

General information about a graph.

A graph is a rectangular area wherein a sequence of numerical values displayed as a polygon or a series of dots in dependency of the time. (y=f(t))

A graph got a buffer (ring-buffer in the memory) of a defined size. The measuring value is checked every second, but only changes are saved.

Note:
If a value change falls in-between that time-grid (e.g. a spike) it is not captured !


In the graph the values are displayed in equal time distances of one second.

A graph may run to the right, left, up or down.

It is possible to position several graphs above each other.

Defining a graph

Size of the graph

Select the item "Graph" via the AbvEditor pull-down menu Insert.
With the mouse pointer which has changed to a hair-cross pull up the wanted size for the graph.

Parameterizing of the Graph

Via AbvEditor_PDM Edit "Attributes sequential" the following categories have to be defined:

Scaling of the Time-Axis

Time displays along the X-Axis

Select the item "Digital Meter" via the AbvEditor pull-down menu Insert . With the mouse pointer which has changed to a hair-cross pull up the wanted size for the digital meter.

Parameterizing of the Digital Meter

Via "Attributes sequential" the following categories have to be defined:

Automatic start of the Graph

In the AbvBrowser Pull-down menu 'File' - item 'Global events' for the System event:

the following actions have to be defined:
Obj_TickOn(TSTART,180); Obj_SetSts(TSTART,1)

Means:
The System-Object "TSTART" is set to the value of the actual time minus 180 (seconds, the scaling range).

The status of the System-Object "TSTART" is set to 1.
(Status "1" signalizes ‘Graph is running’, "0" signalizes ‘Graph has stopped’; this information is used to manage the operability of the control buttons, see next chapter.)

Displaying values stored in the Buffer

The graph area shows the measuring values stored in the buffer for the past 3 minutes.
To display earlier values stored in the buffer:

Button 'stop'

(When starting the runtime this is the only button accessible.)

Via AbvEditor_PDM Edit "Attributes sequential" the following categories have to be defined:

Button '<<'

(In runtime only accessible if the graph has stopped.)

Via Edit "Attributes sequential" the following categories have to be defined:

Button '>>'

(In runtime only accessible if the graph has stopped.)

Via Edit "Attributes sequential" the following categories have to be defined:

Button '>'

(In runtime only accessible if the graph has stopped.)

Via Edit "Attributes sequential" the following categories have to be defined:

Hints & Tips

Different Data-Objects connected to the same graph

It is possible to use the same graph to show the value trend of different Data-Objects, as far as the defined scalings do fit. The Data-Objects in question may be referenced statically when creating the project or dynamically in runtime.

See thereto: Referencing to Data Objects

A graph connected to Data Objects saved in the Long Term Archive

A Graph usually displays measuring data read from the Short Term Archive (described above), but it is also possible to supply it with data out of the Long Term Archive.

See also: Archiving Data

The definition from which archive the measuring values should be read is done via the <ApplyGroup>.
To the category "Action" of the graph an entry for "Apply group" is added. The Name defined for "Apply group" is arbitrary, it merely relates graph and archive.

The connection graph to archive type is done via a button with the following action:
"Grfx_SetVarHist(<ApplyGroup>,n)"

Example:
Grfx_SetVarHist(SINUS,1)		
(The graph with the Apply Group "SINUS" is switched to the Long Term Archive)

Grfx_SetVarHist(SINUS,0)		
(The graph with the Apply Group "SINUS" is switched to the Short Term Archive)		
		

Bound to a Digital Meter the following function:

"Grfx_GetVarHist(<ApplyGroup>)"

returns information about the archive actually shown in the graph.