LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

process referenced values

Hello,

I have a sligth issues with processing referenced values obtained from a sub VI.

The values from sub VI are referenced to be able to control and read values in a main VI. However, I would like to further process them in the main VI.

I could not find intuitive way to do it. As a very simple example I have attached Main and sub VI, where I would like to further process signal obtained on ind 1 (for example to pass it to ind 2).

 

Thanks for your help !

 

Download All
0 Kudos
Message 1 of 6
(3,779 Views)

Instead of using references and writing to property nodes, you might have better luck using a Queue, or User Event, or even a Global Variable.  You might want to better describe what your main and subVIs are actually doing and what exactly you are trying to do so that we can help direct you in a better way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,766 Views)

H, thanks for your reply.

I think you can consider this post as a very generic question.

How can I process referenced values ?

0 Kudos
Message 3 of 6
(3,754 Views)

@BB_King wrote:

I think you can consider this post as a very generic question.

How can I process referenced values ?


And my very generic answer is that you have a very bad architecture.

 

Do you need to process all of the generated values or do you only care about the latest value at any random point in time?  How often are you processing the data?  What type of data are you processing?  Why type of processing are you doing with the data?

 

My very general take on this is that you should use User Events from your subVI to your main VI (which should have an Event Structure) and then your main Vi can doing any GUI updates from the new value.  I have never seen a program work well when references are passed around for updates.  It just turns into a complete nightmare to track what is happening.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,744 Views)

Could you present some specific examples ?

 

Imagine you are having a big project which utilises PXI where you are using several slots for data acquisition, control, etc. The main VI is large and to reduce a clutter you would like to put things in sub VI e.g. counter which lives on one of the PXI's slots, where data from sub VI can be used for further processing in the main VI.

 

I think question is rather clear and if somebody can provide answer that would be great, without criticizing an architecture or approach.

 

Thank you !

 

0 Kudos
Message 5 of 6
(3,716 Views)

@BB_King wrote:

Imagine you are having a big project which utilises PXI where you are using several slots for data acquisition, control, etc.


Even more reason to have a good architecture.  What I do is make "modules".  Each module is a parallel loop that handles one specific task: data logging, read DAQ, read counter, read digital inputs, write digital outputs, oscilloscope control, control loop, state machine loop, etc.  Then these modules communicate via queues and/or user events.  This setup greatly reduces clutter and makes it simpler to debug since you know exactly where to look.

 

As far as an example, I just quickly put this together.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(3,689 Views)