Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 1.20, 2.00, 2.01

Question: Bar Graphs in Citect only go bottom to top and left to right. How do I get a bar graph to go top to bottom or right to left? 

If you need a bar graph to go top to bottom or right to left you can do the following: (1) Draw a box on the screen using the same colour that the bar will be. (2) Draw a bar graph that exactly covers the box. (3) Make the bar graph the same colour as the screen background. (When the bar is at 100 % nothing is seen on the screen but as the bar reduces it will reveal the coloured box and give the illusion that the bar is going top to bottom. As the variable increases the bar will grow downwards.)

If this is not the required action, you use Cicode to give you a downward growing bar for an increasing variable. Following is a simple function that will give this reverse action:

** This function will reverse the scale of a variable.
** Usage : Reverse(PV_1, 100); Where PV_1 is the variable
** and the range is 0 to 100.

Reverse(INT tagx, INT scale)
tagx = (tagx - (tagx + tagx)) + scale;
RETURN tagx;