TrnGetBufEvent
Gets the event number of a trend at an offset for a specified pen. This function only operates on an event-based trend.
Syntax
TrnGetBufEvent(AN, Pen, Offset)
AN:
The AN where the trend is located.
Pen:
The trend pen number:
0 - The pen currently in focus
1...8 - Pen1. . .Pen8
Offset:
The trend buffer offset, in samples. The number of samples can range from 0 to the maximum number of samples that can display on the trend - 1.
Return Value
The event number. If Offset is not within boundaries, 0 (zero) is returned. If AN or Pen is invalid, 0 (zero) is returned and an error code is set.
Related Functions
TrnGetEvent, TrnSetEvent, TrnGetCursorEvent
Example
! For the trend at AN20
DspText(31,0,TrnGetBufEvent(20,0,10));
/* Displays the trend event at offset 10 for the pen currently in focus. The event will display at AN31. */
See Also