LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set string control: error1 invoke node

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.

Download All
0 Kudos
Message 1 of 7
(2,938 Views)

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?

Cory K
0 Kudos
Message 2 of 7
(2,934 Views)

Cory-

 

        Could you please provide me an example as to pass control values directly?

 

thanks.

0 Kudos
Message 3 of 7
(2,929 Views)

You can simply pass the wire through the structure:

 Directly.PNG

Otherwise, you are using unnecessary memory, space on your block diagram, and risking race conditions.

Cory K
0 Kudos
Message 4 of 7
(2,925 Views)

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 Smiley Wink

 

Btw. where exactly do you get this error?

Message Edited by GerdW on 02-10-2010 06:45 PM
Message Edited by GerdW on 02-10-2010 06:47 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(2,922 Views)

 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.

0 Kudos
Message 6 of 7
(2,907 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,897 Views)