SETDT_LINEOBJ action


Function
The action connects an object to a graph.
Declaration
SETDT_LINEOBJ graph, lineNr, newObj, [retCode
], [axisNr], 
[
bSilent
]
 
or
 
 HI_SETDT_LINEOBJ graph_RefId, lineNr, newObj, [axisNr], [bSilent]

Parameters
graph in Reference to object of Graph type.
graph_RefId in Value of reference variable associated to graphic object of Graf type.
lineNr in Identifier of Int type.
newObj in Reference to object or reference to one value of historical value.
axisNr in Int type - number of axis associated to given process. If number is not specified (or its value is -1), number of axis will not be changed in graph configuration.
retCode out Optional identifier of Int type - return code.
bSilent in Optional identifier of Bool type.

SETDT_LINEOBJ action:
If it is not written or it is @FALSE, the system informs the running processes of D2000 HI about the change. The processes open graph again according to new configuration.
If the parameter is @TRUE, the change of graph configuration will be done without this automatic update.

HI_SETDT_LINEOBJ:
If the parameter is @TRUE only the setting in graph will be done without calling the values of progress from archive. If it is not written or it is @FALSE, the setting is done and data are required from archive.


Description
The action will connect the object (or structured archive item) given by the parameter newObj, to the given flow (line) in the graph. The modified flow must exist, because the action is not able to increase their number.

If the parameter retCode is not used, the action generates only the request for a change and does not wait for its real execution. If it is used, it is possible to test the action success (_ERR_NO_ERROR).

The action can be of two versions:

  • SETDT_LINEOBJ - the graph change in configuration of application. The changes are saved into the configuration database and they are lasting. The action can be used in object of Event type and in script of picture.
  • HI_SETDT_LINEOBJ - the change of opened graph which is displayed in displayer of Graph type in picture. In this case, it is determined by the value of the first parameter. The changes are temporary and they will be taken off when the graph (picture) is closed.

Warning:
The configuration change by SETDT_LINEOBJ without waiting on result of the operation can collide with following script commands for graph.

For example:

 SETDT_LINEOBJ D.Test, 1, Min 
 %HI_SetGraphTimes(_Graph, _BT, _ET, @TRUE)

can caused that time is set before coming the configuration change which sets time according to graph definition.


Example
The example assumes existence of the object D.Graph of GRAPH type.

 
INT _retCode
SETDT_LINEOBJ D.Graph, 2, Sec, _retCode
 ; Action success test
 IF _retCode = _ERR_NO_ERROR THEN
     ; Change executed
 ELSE
     ; Error
 ENDIF

 ; Disconnecting the object
 ALIAS _empty
 SETDT_LINEOBJ D.Graph, 2, _empty

 ; Connecting of object Sec on the third process in graph T.Graf, where the number of axis is 5 
 ; The action do not wait on its real executing 
 SETDT_LINEOBJ T.Graf, 3, Sec,, 5 
 
; The action waits on its real executing, configuration change is made inconspicuously
 SETDT_LINEOBJ T.Graf, 3, Sec,  _retCode, 5, @TRUE  

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .