In this video, you will see the square function of 32-bit real and integer numbers, by Step7 software, and from Siemens PLCs.
Follow me to the end of this video and subscribe and like PLC channels.
To program a square of a number, double-click on the "SQR" function from the Floating point function folder.
I type "MD0" in front of the input, and "MD4" in front of the output.
I save, download and monitor the program.
In the simulation window,
In the input, I put the value 3.
As you can see, the output value is equal to the input square, that is, the number 9.
At the input, I put the value 3000.
As you can see, the output value is equal to the input square, which is 9,000,000.
At the input, I set the value to 5.25.
As you can see, the output value is equal to the input square, which is 27.5625.
See the FBD language of this program.
See the STL language of this program.
If you like this video, subscribe and like PLC channels.