Q, QL & QR — Parameter Scope
Tell the three parameter families apart and use plain Q for everyday math.
Three families share the same arithmetic. Q parameters are global and live for the whole program; QL parameters are local to a subprogram call; QR parameters are remanent — they survive a power-off. For everyday calculations you reach for plain Q, which is what this exercise uses.
Your turn
A plate is Q1 long and Q2 wide. Compute its corner-to-corner diagonal into Q10 with Pythagoras (the square root of length squared plus width squared), and its area into Q11.
The machine gives you
3 x 4 plate:
Q1 = 3Q2 = 46 x 8 plate:
Q1 = 6Q2 = 8Your program is run once for each set of conditions. It has to work for all of them.
Loading...
This is a learning simulation — always prove out a program on the actual control before you cut metal.