03-30-2018 09:43 AM
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.
Solved! Go to Solution.
03-30-2018 09:53 AM
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.
03-30-2018 10:45 AM
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
03-30-2018 11:06 AM - edited 03-30-2018 11:07 AM
Copy that. Would something like that work for you ?
Steps :
Do all those steps sound familiar or do you need me to go into more details ?
03-30-2018 06:10 PM
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.
03-30-2018 06:49 PM - edited 03-30-2018 06:51 PM
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...
03-31-2018 04:15 AM
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.
Thanks
03-31-2018 01:26 PM
Hey Chris,
Happy that it helps. Just a quick example of what you can do :
If you are not comfortable with what I did, please tell me.
04-01-2018 11:20 AM
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.
04-01-2018 11:42 AM
If you use the property node to reference your arrays, you can change the index value to the value you need :
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 🙂