TrnGetTime
Gets the time and date 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 rightmost 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
TrnGetTime(AN, Pen, Percent)
AN:
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
A time/date variable. 0 (zero) is returned if an error is detected.
Related Functions
Example
! For the trend at AN20
DspText(31,0,TimeToStr(TrnGetTime(20,0,0),2));
! Displays the trend current date for the focus pen.
DspText(32,0,TimeToStr(TrnGetTime(20,0,0),1));
! Displays the trend current time for the focus pen.
DspText(33,0,TimeToStr(TrnGetTime(20,0,50),1));
! Displays the time 50% along the trend for the focus pen.
See Also