You can use local variables for this. However, I would suggest using Property Nodes instead. You can read and write to the control by accessing the Value property of a front panel control. So, it behaves like a local variables, but with one benefit (which may be significant). When you read from a local variables, LabVIEW makes a copy of that data in memory. Therefore, for every local variable you use in your program, you're using more memory. Property nodes don't do this, however, so they're a little more efficient.
To create a Property Node for a control, right-click on the front panel control and select Create >> Property Node. Then right-click on this Property Node on the Block Diagram and select the Value Property. If you right-click on that property na
me, you can set it to either read or write.
J.R. Allen