11-19-2015 02:08 PM
So I know this has been discussed before but I have a unique situation. I will be downloading code to Arduinos using the Labview Compiler for Arduino toolkit. I would like to programmatically set some default control values on each Arduino using a Labview GUI. The Arduino toolkit I am using has a compile VI that takes a VI, compiles it, and then downloads it to the Arduino. How can I change the default value for the VI's controls before it's compiled and downloaded?
Solved! Go to Solution.
11-19-2015 03:06 PM
If it is a LabVIEW VI, set the Controls as you want them to be, right-click the Edit Menu (while viewing the Front Panel), and choose "Make Current Values Default". Note that if you've selected a Control, the message will read "Make Selected Values Default".
Bob Schor
11-19-2015 04:06 PM
Thanks but I want to do this programmatically without having to open the VI. I will have a GUI that will download the program to multiple Arduinos and the control values will be different for each one.
11-19-2015 04:57 PM
Have you tried using property nodes to set the values and then method nodes to "make current default" and save the VI?
11-20-2015 07:08 AM
That worked!! You rule. I had to add an error handler because I kept getting an error message from the Set Values as Default block saying that the target VI was not in edit mode, even though it was. Anyway it set the control default values successfully so I just ignore the error. Thanks for the help!
11-20-2015 09:32 AM - edited 11-20-2015 09:33 AM
Not sure why you would be getting that error, but I'm glad it's working for you. And since we're on the subject, a simpler alternative way is to use the Ctrl Val.Set method:
12-20-2017 11:39 PM - edited 12-21-2017 12:03 AM
Hi to all,
I don't know why i get the error message like "vi is not in edit mode"?, cn you explain me this? and also is that possible to visualise the modified values in user panel? bcoz everytime i need to see the values befor i set in the user panel
12-22-2017 10:23 AM
hi paulrobinson,
Are you running the program and getting the error using the example program linked earlier to this post?
Since this forum hasn't been active for 2 years and a solution has been marked, I would recommend you starting a new post to get more insight on what you are seeing!
best,
Cici Z.
Applications Engineer
National Instruments
12-29-2017 04:56 AM
Hi cici.z,
First of all thanks for your reply, and i got a slution for this problem by using get and set values.
Regards,
paul
01-22-2018 01:55 AM
Hi cici,
Here i have attached a vi to read and write the data in a same ini. file but when i write the data in a same section it is not appending instead of that it creating a new section how can i do this part?
Regards,
Paul