Registers: Difference between revisions
→Equals Instruction
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 5:
When the program reaches a register instruction, it completes the math operation, overwrites the destination variable, and moves forward.
The leftmost variable in a register instruction is where the result is stored. Everything to the right of the equal sign is the equation to be performed.
{| class="wikitable"
Line 63 ⟶ 65:
|Mixed Logic
|}
A common use for Register instructions is a counter that increases the value of a register by one each time a program runs.
Example:
R[1] = R[1] + 1
This will take whatever is in R[1], add 1 to it, and store it to R[1]. Every time you run a program that contains this line, it will count up. This means a technician can walk up to a robot cell and glance at the register's contents to know exactly how many times the robot performed its task.
Below is a detailed explanation with examples of each of the register instructions from the table above.
==Equals Instruction==
Line 127 ⟶ 138:
=== When this instruction is reached ===
Line 895 ⟶ 906:
===Special Notes ===
It is easy to accidentally build a mixed logic instruction incorrectly. Unlike the default choices, mixed logic won't force you to choose valid options and variables as you build it. Extra parenthesis are a common mistake and it may take some doing to ensure you have an equal amount of opening and closing parenthesis.
__NOTOC__
|