Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspTrendInfo

DspTrendInfo

Get information on a trend definition.

Syntax

DspTrendInfo( hTrend, Type, AN)

hTrend:

The name of the trend in the format <[LibName.]TrnName>. If you do not specify the library name, a trend from the Global library is assumed.

To get information on a Version 1.xx trend, specify the trend number (0 to 255). For example, if you specify trend 1, CitectSCADA obtains information from the trend Global.Trn001.

Type:

Type of trend info:

0 - Type of trend:

1 - Number of samples in trend

2 - Height of trend (in pixels)

3 - Width of trend sample (in pixels)

4 - Number of trend pens

11 - Color of pen 1. If the pen uses flashing color, the initial color used. (Use type 19 to determine the secondary flashing color for pen 1.)

12 - Color of pen 2. If the pen uses flashing color, the initial color used. (Use type 20 to determine the secondary flashing color for pen 2.)

13 - Color of pen 3. If the pen uses flashing color, the initial color used. (Use type 21 to determine the secondary flashing color for pen 3.)

14 - Color of pen 4. If the pen uses flashing color, the initial color used. (Use type 22 to determine the secondary flashing color for pen 4.)

15 - Color of pen 5. If the pen uses flashing color, the initial color used. (Use type 23 to determine the secondary flashing color for pen 5.)

16 - Color of pen 6. If the pen uses flashing color, the initial color used. (Use type 24 to determine the secondary flashing color for pen 6.)

17 - Color of pen 7. If the pen uses flashing color, the initial color used. (Use type 25 to determine the secondary flashing color for pen 7.)

18 - Color of pen 8. If the pen uses flashing color, the initial color used. (Use type 26 to determine the secondary flashing color for pen 8.)

19 - The secondary color used for pen 1, if flashing color is used.

20 - The secondary color used for pen 2, if flashing color is used.

21 - The secondary color used for pen 3, if flashing color is used.

22 - The secondary color used for pen 4, if flashing color is used.

23 - The secondary color used for pen 5, if flashing color is used.

24 - The secondary color used for pen 6, if flashing color is used.

25 - The secondary color used for pen 7, if flashing color is used.

26 - The secondary color used for pen 8, if flashing color is used.

AN:

The AN where the trend is displayed.

Return Value

The trend information (as an integer). If Pen Color (Types 11 - 18) is requested from a bar trend, the return value is -1.

Related Functions

DspTrend

Example

! get the number of samples for the main_loop trend (from the 
trends library).
nSamples = DspTrendInfo("Trends.Main_Loop", 1);
! get the number of samples for trend 3 (CitectSCADA Version 1.xx).
nSamples = DspTrendInfo(3, 1);

See Also

Display Functions