LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a status message from one vi and display in another vi

Solved!
Go to solution

Hi,

 

I am calling a vi in my main vi. In my main vi i want to display the each status/information happening in the subvi which is placed in the main vi in every next line of my status indicator which is present in the main vi. Can anybody tell me how to do this.

 

Reagrds,

Rajashekar

0 Kudos
Message 1 of 18
(4,262 Views)

Rajashekar wrote:

Hi,

 

I am calling a vi in my main vi. In my main vi i want to display the each status/information happening in the subvi which is placed in the main vi in every next line of my status indicator which is present in the main vi. Can anybody tell me how to do this.

 

Reagrds,

Rajashekar


I think you'll have to be a bit more specific about it.  What kind of status?  Something the sub-VI is generating or properties of the sub-VI?  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 18
(4,256 Views)

HI,

 

Think i am having two vis one is main vi and another is test subvi. I am calling my test vi in the main vi. In main vi i have an string indicator to display messages. whenever i run main vi it executes test vi. In test vi i will be performing 'n' no of operations and for each operation i will have message which i want to display that message in the string indicator present in the main vi. The string indicator should display message one after another without overwriting the previous message.

 

Regards,

Rajashekar 

0 Kudos
Message 3 of 18
(4,252 Views)
Solution
Accepted by topic author Rajashekar

 A few ways:

Global variable (not recommended)

Queue (good)

Notifier (also good)

 

By reference (neat and clean, here's how to do it)

 

  • Create a Reference to the String indicator on the FP.
  • Create a Control of that Reference, and put it in the sub-vi as an input.
  • Wire the reference on the main VI to that reference control on the sub-vi.
  • In the sub VI, update the String indicator with a Property Node by wiring that reference control to the prop node and set the prop to value.

 

 

Richard






Message 4 of 18
(4,239 Views)

Broken Arrow wrote:

 A few ways:

Global variable (not recommended)

Queue (good)

Notifier (also good)

 

By reference (neat and clean, here's how to do it)

 

  • Create a Reference to the String indicator on the FP.
  • Create a Control of that Reference, and put it in the sub-vi as an input.
  • Wire the reference on the main VI to that reference control on the sub-vi.
  • In the sub VI, update the String indicator with a Property Node by wiring that reference control to the prop node and set the prop to value.

 

 


Nice job.  Kudos.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 18
(4,234 Views)

Here's a quick demo. Do be careful about building arrays in loops as I have done in the sub-vi. If you have a manageable & finite amount of things to write to the indicator, you should be OK with this, but if the message can grow forever, there are better ways.

 

 

Richard






Download All
0 Kudos
Message 6 of 18
(4,230 Views)

Hi, Broken Arrow

 

 

The vi you posted is in LabVUEW 9.0 version but iam having LabVIEW 8.5 can you convert it to LabVIEW 8.5 and send me back. So i acn check it.

 

 

Regards,

Rajashekar

0 Kudos
Message 7 of 18
(4,162 Views)

Hi, Broken Arrow

 

 

The vi you send is in LabVIEW ver 9.0 but i am having LabVIEW ver 8.5 can you convert it to LabVIEW 8.5 and send me back.

 

 

Regards,

Rajashekar

0 Kudos
Message 8 of 18
(4,160 Views)

Broken Arrow wrote:

 A few ways:

Global variable (not recommended)

Queue (good)

Notifier (also good)

 

By reference (neat and clean, here's how to do it)

 

  • Create a Reference to the String indicator on the FP.
  • Create a Control of that Reference, and put it in the sub-vi as an input.
  • Wire the reference on the main VI to that reference control on the sub-vi.
  • In the sub VI, update the String indicator with a Property Node by wiring that reference control to the prop node and set the prop to value.

 

 


 

Can we give negative Kudos? Smiley Wink

 

Your way is too complicated, and any time you use references to access data values in controls you run the risk of race conditions. Simpler is better. Queues are great, but you also left out a functional global/action engine which would also work out very well.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 9 of 18
(4,156 Views)

hi, there can anybody convert the above vis to LabVIEW 8.5 and send me back so that i can check it.

 

 

 

0 Kudos
Message 10 of 18
(4,148 Views)