You must use a local variable.
A local variable allow you to write to a control or read from an indicator, which is something you can't normally do with the regular terminals of an object. Locals have two modes: read and write. A local variable terminal can only be in one mode at a time, but you can create a second local terminal for the same variable in the other mode. Understanding the mode is pretty straightforward: in read mode, you can read the value from the local's terminal, just as you would from a normal control; in write mode, you can write data to the local's terminal, just as you would update a normal indicator.