Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnSetCursor

TrnSetCursor

Moves the trend cursor by a specified number of samples. If the trend cursor is disabled, this function enables it. If the cursor is enabled and the number of samples is 0 (zero), the cursor is disabled. If the cursor is moved off the current trend frame, the trend scrolls.

Syntax

TrnSetCursor(AN, Samples)

AN:

The AN where the trend is located. Set to -1 for all trends on the current page.

Samples:

The number of samples to move the cursor.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

TrnGetCursorTime, TrnGetCursorValue, TrnGetCursorValueStr, TrnSetCursorPos

Example

! For the trend at AN20
TrnSetCursor(20,1);
! Moves the trend cursor forwards 1 sample.
TrnSetCursor(-1,-40);
! Moves the trend cursor (of all trends on the current trend page) backwards 40 samples.

See Also

Trend Functions