LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

erro when update a variable from sub VI to master VI

Solved!
Go to solution
I get this error when i try to update a vairable using the reference variable from a sub VI to a Master VI. The variable is updated in the loop of the sub VI. When i try to place the main VI in that loop to input the server reference variable  i get this error. I would be helpful if any one can outline the steps to create a reference variable and pass it to a master VI fromt he sub VI.
Labview 8.2
Learner
Message 1 of 10
(3,664 Views)

you are trying to place the main.vi in a subvi of the main.vi.Smiley Happy  This will result in main.vi calling itself within the subvi which results in recursion and hence the error is popped up.

 

Clarify the activity you are trying to do. are you trying update a control in mainvi from subvi using the referance of the control? post the vi if possible.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 2 of 10
(3,662 Views)

HI JK,

 

Well to be specific and simple, the problem is as follows: i want to update an indicator in the main VI from a sub VI. The subVI is running a loop and variable within that loop has to be returned to mainVI. Please let me know how this can be done.  

Please post the solution for lavbiew 8.2 version. 

Message Edited by ravi kumar on 05-13-2009 05:07 PM
Labview 8.2
Learner
Message 3 of 10
(3,656 Views)

ravi kumar wrote:

 

i want to update an indicator in the main VI from a sub VI. The subVI is running a loop and variable within that loop has to be returned to mainVI.


Pass the reference to the indicator in the Main VI into the SubVI thro' the conbnector pane. And use a generic property node [Value property] wired to this input refnum, thats it... It ll do the job you want.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 4 of 10
(3,644 Views)

I dont have LV in my PC, so cant post an example.

 

Search the Example finder for Update Waveform using Property Node, you ll get what I meant...

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 5 of 10
(3,643 Views)

i have attached a simple example demonstrating the functionality.

Hope it helps.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Download All
0 Kudos
Message 6 of 10
(3,616 Views)

JK,

 

I am using LV8.2. Please post the vi for that version..Smiley Happy

 

cheers 

Labview 8.2
Learner
0 Kudos
Message 7 of 10
(3,605 Views)

It is better to mention your LV version in the que/first post itself.

 

Maybe you can add that in your signature itself.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 8 of 10
(3,602 Views)
Solution
Accepted by chravikumar

Vi's attahced in LV 8.2

cheersSmiley Happy

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Download All
0 Kudos
Message 9 of 10
(3,584 Views)

Dear JK,

 

Thanks for the VIs.

 

I have a few doubts regarding them.

 

Please outline the steps involved in creating the VIs

 

1. We place the control/indicator in the main VI and create a reference.

2. Then we create a value property for that control/indicator and place in the block diagram of the sub VI.

3. Now how the gauge control is placed/created that refers to the control/ indicator in the main VI? 

 

Regards

Ravi Kumar 

Labview 8.2
Learner
0 Kudos
Message 10 of 10
(3,575 Views)