11-18-2024 05:39 AM
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):
The project is developed in Labview2016.
Thank you in advance
Jon
11-18-2024 05:59 AM
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):
- The VI must log all values and perform the necessary calculations.
- The front panel of the VI should only be displayed when the user requests it.
- It should be easy to scale to multiple temperature channels.
On your calculations: LabVIEW has dedicated functions for Min&Max and InRangeAndCoerce…
11-18-2024 06:32 AM
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.
11-18-2024 07:47 AM - edited 11-18-2024 07:47 AM
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…