Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

TrnGetMSTime

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the time (in milliseconds from the previous midnight) of the trend (plotted by a specified pen) at a percentage along the trend, using the time and date of the right-most sample displayed. The time associated with the right-most sample displayed is known as the end time. The start time is the time of the left-most sample displayed. Percent 0 (zero) will correspond to the end time, and Percent 100 will correspond to the start time

Syntax

TrnGetMSTime(nAN, Pen, Percent)

nAN:

The AN of the chosen trend.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

Percent:

The percentage of the trend from the time and date of the right-most sample displayed (end time), from 0 to 100.

Return Value

The number of milliseconds since the previous midnight. Zero (0) is returned if an error is detected.

TrnGetTime

Example

! For Pen 1 at AN20

STRING timeStr;

STRING msecStr;

timeStr = TimeToString(TrnGetTime(20,1,100),2) + " ";

msecStr = TimeToString(TrnGetMSTime(20,1,100),6);

DspText(31,0,timeStr + msecStr);

Returns:

"23/02/01 10:53:22.717"

See Also

Trend Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in