LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scalability vi problem

Hi everyone,

I have a specific problem related to the scalability of a VI, and I’ll try to explain it as clearly as possible. To help illustrate the issue, I’ve attached an extract of my application.

If you open MAIN_TEST.vi, you’ll see that I’m generating two random numbers, which I’m registering in my custom VIs. There are two buttons to display the graph of each VI and an LED that blinks to indicate that the main loop is running.

Some time ago, I developed TempGraph.vi to log temperature values and perform some calculations. However, I now need to log data from two different temperature sources, so I created TempGraph_Doble.vi.

As I implemented this, I started thinking that there might be a better way to approach the problem, which is why I’m reaching out to you for advice.

The main requirements are as follows (I’ll try to explain them, as my first implementation may not have been the best option):

  1. The VI must log all values and perform the necessary calculations.
  2. The front panel of the VI should only be displayed when the user requests it.
  3. It should be easy to scale to multiple temperature channels.

The project is developed in Labview2016.

 

Thank you in advance

Jon

0 Kudos
Message 1 of 4
(103 Views)

Hi Jon,

 


@JonLert wrote:

As I implemented this, I started thinking that there might be a better way to approach the problem, which is why I’m reaching out to you for advice.

The main requirements are as follows (I’ll try to explain them, as my first implementation may not have been the best option):

  1. The VI must log all values and perform the necessary calculations.
  2. The front panel of the VI should only be displayed when the user requests it.
  3. It should be easy to scale to multiple temperature channels.

  1. You already implemented your algorithm.
  2. You already implemented your requirement.
  3. Whenever you need to apply the same algorithm on multiple values you should use an array of values and a loop!

 

On your calculations: LabVIEW has dedicated functions for Min&Max and InRangeAndCoerce…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(96 Views)

Hi GerdW and thank you for your answer.

 

I tried to do what you said, but I don't get the output that I want.

I created a new VI (TempGraph_NEW.vi) where I am creating an array and putting the graph in a loop.

In this case the two random data that I generate are considered in the graph as two values of a single data source. What I want is a graph where I can see two different data sources.

I don't know if I am explaining myself correctly...

 

Maybe the mistake is for using a XY graph, but I want to use this type of graph because I am interested in showing the timestamp as a X axe in the graph.

0 Kudos
Message 3 of 4
(75 Views)

Hi Jon,

 


@JonLert wrote:

I created a new VI (TempGraph_NEW.vi) where I am creating an array and putting the graph in a loop.

In this case the two random data that I generate are considered in the graph as two values of a single data source. What I want is a graph where I can see two different data sources.

I don't know if I am explaining myself correctly...


You need to handle the data in your shift registers correctly. As soon as the subVI acts as data buffer you need to design it more carefully…

 

Suggestion:

I only changed the shift register stuff, you need to adapt the XY graph plot creation according to your requirements…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(49 Views)