02-10-2010 11:05 AM
Hello all,
I'm trying to set the string control values from the gethisto.vi into sd.vi. I come across the error: error 1 invode node. I'm not sure what I'm doing wrong though all the data types are the same. Please advise.
thanks.
02-10-2010 11:19 AM
1) In the "get_histo" VI, what VI reference are you passing? You have an un-initialized shift register, which gets set to SD.vi on the execution state being "bad" (if i understand that correctly)
2) You are using WAY too many local variables. Why dont you just wire controls directly, instead of creating a bunch of local variables.
3) You could use Get_histo as a subVI, then pass all of the values out using the connector. Is there a reason you find it better to use a bunch of invoke nodes just to set the control values?
02-10-2010 11:28 AM
Cory-
Could you please provide me an example as to pass control values directly?
thanks.
02-10-2010 11:38 AM
You can simply pass the wire through the structure:
Otherwise, you are using unnecessary memory, space on your block diagram, and risking race conditions.
02-10-2010 11:40 AM - edited 02-10-2010 11:47 AM
Hi gsajja,
so you start a subVI with a while loop set to run forever and then you use vi server to stop that subVI???
You use vi server to set inputs of the subVI and also to read the result of a calculation???
Why not bundle all inputs in a cluster (typedef'ed of course), wire that cluster to SD.vi and connect the "left std" to the connector pane of SD.vi to output the result? Why not get rid of the while loop?
Does the user need to see SD.vi or is it ok to run in background? From it's front panel look I would guess the user doesn't need to see it
Btw. where exactly do you get this error?
02-10-2010 11:55 AM
Hi Gerdw-
My intention is to run the SD.vi in the background all the time and I dont have to display the panel. All the set numerical controls works as soon as I change the mode to 1, but not the string controls. The get the error after the set ctms_id string. Please provide your inputs.
thanks.
02-10-2010 12:10 PM
Hi gsajja,
as it seems you have different states in your SD.vi you should make it a proper state machine. Then you don't need to run it in the background. Do as written before...
One more note:
-never compare floats for equality! Make your "count" an integer!