Cicode Programming Reference > Cicode Function Categories > Display Functions > DspBar

DspBar

Displays a bar graph (on a graphics page) at a specified AN. To scale a tag into the correct range, use the EngToGeneric() function.

Note: This function is only used for V3.xx and V4.xx animations, and was superseded in later releases.

Syntax

DspBar(nAN, Bar, Value)

nAN:

The AN where the bar graph will be displayed.

Bar:

The name of the bar graph to display in the format <[LibName.]BarName>. If you do not specify the library name, a bar graph from the Global library displays (if it exists). To display a Version 1.xx bar graph, specify the bar definition (1 to 255). For example, if you specify bar 1, Citect SCADA displays the bar graph Global.Bar001.

Value:

The value to display on the bar graph. The value needs to be from 0 to 32000 to give 0 to full-scale range on the bar.

Return Value

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

Related Functions

EngToGeneric

Example

DspBar(25,"Bars.Loops",320);
/* Displays a value of 320 (that is 10%) on the loops bar (from the bars library) at AN25. */
DspBar(25,3,320);
/* Displays a value of 320 (that is 10%) on bar definition 3 (Citect SCADA Version 1.xx) at AN25. */
DspBar(26,"Loops_Bar",EngToGeneric(Tag1,0,100));
/* Displays Tag1 on the loops_bar (from the global library) at AN26. Tag1 has an engineering scale of 0 to 100. */

See Also

Display Functions

Published June 2018