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?
You can simply pass the wire through the structure:
Otherwise, you are using unnecessary memory, space on your block diagram, and risking race conditions.
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?
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.
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!