LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ref. to a control on TOP VI FP.. How?

Solved!
Go to solution

I have a VI that writes text to a LOG file. The only inputs it has are ERROR IN and MESSAGE. I would like to have access to a string-control/indicator located on the top-VI front panel whose content is automatically appended to the text I pass to the Log-VI.
I want to avoid connecting a Reference or using a global variable. I then tried using Call Chain and then Invoke Node to extract the ref to a specific String-Control with a specific name. I get the error "Open VI Reference no longer matches VIs in memory by filename." How difficult should it be to get a pointer to a control? Is there any other way?

0 Kudos
Message 1 of 3
(199 Views)
Solution
Accepted by topic author Shakti211

Hi Shakti,

 

First, I must say: "Think dataflow" and use a wire to pass the string from the top-level VI to the logger VI (using input "MESSAGE" or add a new input).

 

Then, if you really want to do it without additional wiring:

 

raphschru_0-1720032681630.png

 

Regards,

Raphaël.

0 Kudos
Message 2 of 3
(186 Views)

Hi,

I agree with you about the flow. There is a flow but it would be a huge relief if I could just place a VI and draw a thread to MESSAGE where I need to log.
The solution you showed me is exactly the one I have, but as I wrote, I get an error. when it is used. I still don't know what the problem is.

 

Shakti211_0-1720034654658.png

 

Edit: No. My solution is not the same as yours. Almost but not exaclty. You use a wire for string between index array and Open VI Ref. I changed my from str (from index array) to a path. That was the problem. Now I use str wire between index array and Open ref. It works!

 

0 Kudos
Message 3 of 3
(166 Views)