guiGraphSetLinePoint (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400

Firmware version:

1.00.00


This function sets the value of a line graph entry.

 

Input:

graph : SYSHANDLE

The handle to the graph to set the point on.

 

line : INT (1..4) default 1

The line to set the point on.

 

x : INT (-1,1..240) default -1

The position to the entry to set the value for. When set to -1, it is put in the buffer, ready to be appended when calling guiGraphScrollNext, otherwise it is set directly on the graph. The maximum value is x_count from guiGraphCreate.

 

y : INT default 0

The value to set the point on the line to. If the value is outside the valid range of the graph, it will be truncated.

 

 

Returns: INT

0

- Success.

-1

- Interface is not open (see guiOpen).

-3

- Invalid argument.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiGraphSetLinePoint : INT;
VAR_INPUT
  graph : SYSHANDLE;
  line  : INT := 1;
  x     : INT := -1;
  y     : INT := 0;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc     : INT;
  graph  : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Set line 1 at point 1 to 32
  rc := guiGraphSetLinePoint(graph := graph, line := 1, x:=1, y := 32);
  // Set line 1 at point 2 to 20
  rc := guiGraphSetLinePoint(graph := graph, line := 1, x:=2, y := 20);
  ...
END;
END_PROGRAM;