Arguments & EMPTY
Read a value passed into a subprogram and default it when the caller left it out.
A subprogram reads its inputs as local variables. Name one with a leading P — like PA12 — and you can ask whether the caller actually supplied it: IF [PA12 EQ EMPTY] GOTO N10 jumps when the argument is missing. That's how one routine serves both “use my value” and “use a sensible default” callers.
Your turn
Your subprogram reads a chamfer size in the argument PA12. If the caller left it out (EMPTY), fall back to a default of 0.5; otherwise use what they passed. Put the chosen value in VC1.
The machine gives you
PA12 = 3PA12 = 1.25Your program is run once for each set of conditions. It has to work for all of them.
This is a learning simulation — always prove out a program on the actual control before you cut metal.