Call us! 512-349-0334 or (877) INDUSOFT

It’s Pi Day Again! Check out the built-in Pi function of InduSoft Web Studio

In celebration of Pi Day, InduSoft would like to highlight Pi.

Pi, often referenced as the Greek letter π, is the ratio of a circle’s circumference to its diameter

InduSoft Web Studio has a built in function Pi(). It easily returns the value 3.141593 so you don’t have to remember it.

How could you use the function Pi() within IWS? Let’s say you wanted to rotate an object on the screen. By combining the Pi() function with SIN and COS you can generate horizontal and vertical positions to move an object in a circle. Here is an example scheduler worksheet that will generate horizontal (XVal) and Vertical (YVal) tags to change the position of an object.

scada software

Every 100ms the tag “Count” increments until it gets to 60 and starts over at 0. Then Count is used along with Sin() and Cos() functions to generate numbers (XVal and YVal) that are essentially 90 degrees out of phase. By putting them in the position animation of an object, it will move in a circle on the screen.

SCADA Software

And here is the resulting animation:

scada software

Leave a Reply