LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please HELP for a simple formulation

Solved!
Go to solution

I am currently running a project for a heat exchange process with a simple formula Q=m*DH but variable m (mass flow rate).

 

I am new in LabVIEW and I am trying to create a graph of Q related to time. I have attached a file with my VI while also the time and the variable m. I am struggling to put 'm' as a variable and then plot Q against the defined time (45.5 hours).

 

Can anyone help me with this kind of problem?  I have already made this calculation in a spreadsheet file which was easy but i would like to present it in LabVIEW. 

 

Thanks for your help.

0 Kudos
Message 1 of 11
(3,107 Views)

Hey Chris,

 

Looks unclear to me where is your "m", "time" or "Q". I can see the calculation but it only operates on one value. Can you please be more specific on what is what and what is your goal ? Maybe add some comments in your VI 🙂

 

Thanks.

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 2 of 11
(3,100 Views)

Hello ML927,

Thanks for your reply.

 

I am struggling to create a variable 'm' with respect to time rather than having a simple controller that operates only once. So in equation Q=m*(H1-H2) I would like:

m= variable

H1,H2= constant

 

So my goal is to plot Q in respect to time as attached in the png file. Q is the output.

Please see the attached files. I made some comments to the VI file as well.

 

Thanks a lot, 

Chris

Download All
0 Kudos
Message 3 of 11
(3,084 Views)
Solution
Accepted by topic author Chris12341234

Copy that. Would something like that work for you ?

 

Chris.png

 

Steps :

  1. Convert your strings to numeric arrays (need to index the 2D array created)
  2. Use a For Loop to run through all the values of "m"
  3. Do the calculation you want inside the loop.
  4. Index the output of the loop so taht you get all the calculated values in a new array
  5. Bundle the time (x) et Q (y) arrays to display on a XY Graph

 

Do all those steps sound familiar or do you need me to go into more details ?

CLAMaxime -- Kudos are a great way to say thank you
Message 4 of 11
(3,077 Views)

Thanks very much this was helpful.

I have completed your guidance but I cannot get the data in a chart form. Check the attached file.

0 Kudos
Message 5 of 11
(3,043 Views)

You forgot to index the Q1 output on the loop. Right-click the orange output tunnel and select Enable Indexing.

As for the chart, there is a specific indicator on the front panel called XY Graph. Just drop it there and wire the bundle function to it.

 

By the way, on the Index Array VI you wired the line index and not the column one. So you don't get all the values...

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 6 of 11
(3,038 Views)

Your guidance helped me a lot. I really appreciate that. It worked everything is fine!!! I have attached the file so you can have a look.

I have 2 more questions.

Is there any way to make the graph with smoother lines (like in the png file in the previous comments)?

Also, is it possible to use a time delay while the graph appears? I would like to run it like a simulation.

For example, do the loop every 1 second and present the result both in the graph and output cluster every 1 second and not rapidly. This is just to enhance the user's interface. Smiley Very Happy

Thanks 

0 Kudos
Message 7 of 11
(3,019 Views)
Solution
Accepted by topic author Chris12341234

Hey Chris,

 

Happy that it helps. Just a quick example of what you can do :

 

Chris_time.png

 

 

If you are not comfortable with what I did, please tell me.

CLAMaxime -- Kudos are a great way to say thank you
Message 8 of 11
(2,996 Views)

Thanks for your help.

Can these calculated values appear in an indicator while the simulation is running?

For example, run the simulation and appear instantly each result as attached in the picture.

 

0 Kudos
Message 9 of 11
(2,942 Views)

If you use the property node to reference your arrays, you can change the index value to the value you need :

 

Chris_index.png

 

More info on property nodes :

http://zone.ni.com/reference/en-XX/help/371361N-01/glang/property_node/

https://blog.digilentinc.com/using-property-nodes-in-labview/

 

From the discussion so far, I think you need to get used to four things which will help you in the future : manipulating arrays, loops, references and property/invoke nodes 🙂

 

 

CLAMaxime -- Kudos are a great way to say thank you
Message 10 of 11
(2,938 Views)