LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic VI for data acquisition monitoring

Hello there,

 

I'm currently working in a project that the data acquired from the sensors should have been monitored in a test panel. 

 

I got the front panel design and i also made this vi re enterant.

 

Now I need a solution to pass sensor data continuously to a dynamic vi? Is it possible to make it by using set.control.value node within a for loop, or is there any elegant and safer approach?

 

thank you

0 Kudos
Message 1 of 6
(2,822 Views)

Why is a simple monitoring VI re-entrant?

 

You can pass data to a parallel loop via a Queue -- if nothing new comes in, it will just output the "old" values.  As always when running parallel loops, you need to give some thought about how to shut them down properly.

 

Bob Schor

 

0 Kudos
Message 2 of 6
(2,796 Views)

Hi Ademirel, I recommend you to check out User Events or Queues for this task. 

 

I wrote a quick example to demonstrate one way on how you can achieve this. Run Sensors.vi first and then Read Sensors.vi  and see how the process communication is handled by the unitary lossy queue. Any VI that lives in the same memory space as your main will be able to access the queue reference and get the sensor data.

 

The example was written in LV 2015.

 

Hope this helps.

 

 

Luis CT
0 Kudos
Message 3 of 6
(2,794 Views)

@Ademirel wrote:

 

I'm currently working in a project that the data acquired from the sensors should have been monitored in a test panel. 

 

 

Now I need a solution to pass sensor data continuously to a dynamic vi? Is it possible to make it by using set.control.value node within a for loop, or is there any elegant and safer approach?

 

thank you


What do you mean by "to pass sensor data continuously to a dynamic VI"?

 

What exactly are you trying to do?

 

Also see below...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(2,781 Views)

Sorry for the late reply,

 

I'm trying to monitor my data in a monitoring loop by streaming them in real time.

Due to the circumstances, i may call the monitor loop in different times with different channels, therefore 'Im trying to do it by using dynamic call.

0 Kudos
Message 5 of 6
(2,750 Views)

I've done this two different ways.  In one situation, I was monitoring multiple analog channels, all sampled at the same time (e.g. 16 channels at 1kHz), but displayed at a much slower rate (20 updates/sec, so about 30 seconds scrolled across the screen).  All of the data were streamed to the Host PC, but controls on the Chart enabled me to select which one (or ones) of the Channels to view.  We typically looked at 3-5 at the same time, and largely ignored the others.

 

The other example was monitoring 24 behavioral stations, each of which was acquiring data at 10 points/sec and displaying it on a Graph showing the last 5 minutes, last 25 minutes, or last 125 minutes of data.  We actually had 24 "clones" (identical VIs called with Start Asynchronous Call), each of which had a Graph as its entire visible Front Panel.  If we wanted to view Station 5, say, instead of Station 9, we sent Station 9 a signal saying "stop updating your Graph, we don't need to see it" (which saves lots of time) and told Station 5 to "start updating your Graph".  We also (in the Main) removed Station 9 from the sub-Panel and connected Station 5.  So the Front Panel decided which Station it wanted to view, told the Station to display its data, then viewed the Station's Front Panel in a sub-Panel.  No moving parts, and (I think, though I'm not 100% certain of the terminology) no Dynamic Calls.

 

Bob Schor

Message 6 of 6
(2,733 Views)