06-20-2012 08:58 PM
Hello,
I would like to read use the "Scan From File" to load or set a control with a specific value when I press the run button to start the program.
Once the program is running, the user can change the control to another number.
The constant in the file read by "Scan From File" should not change.
For instance, I would like to wire the first "DBL" output from "Scan From File" to the Voltage Interval control.
I have the "Scan From File" set up, but when I try to wire an output from the "Scan From File" to my conrtol, it gives the error "Wire connected to a unidirected tunnel"
Should I use "Select" to do this? It's will be messy though becasue I have a bunch of constants I want to set. Any other ideas? Or a solution to my main question?
Cheers
Solved! Go to Solution.
06-20-2012 09:03 PM - edited 06-20-2012 09:05 PM
You need to wire to either the local variable, or the value property node, of the control that you want to programmatically set the value for.
(The message is "undirected tunnel".)
06-22-2012 02:30 AM
Thanks for the tip. It worked perfectly.
I made local variables for each control I had. I put my "Scan From File" and all control local variables outside of my main while loop, so when I first press run, the constants from my text file are loaded into the controls. Then, while the program runs, I can change the control values, while still keeping the constants safe for when I rerun my program again later.
Thanks again!