LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best graph model?

Hi,
 
I am writing a program which sends commands and receives information from a Masterflex pump, which dispenses media to a cell culture. I need to have a trend which records the cumulative volume actually dispensed by the pump periodically and also plots the predicted trend of cumulative volume for the duration of a week that updates each day, given the current conditions of the culture and user inputs.
 
As shown in the attached graphic, actual volume is always being trended and is variant. However, notice that the trend for the predicted volume at day 1: it was plotted for the entire week given the conditions at the beginning of day 1 (in black), but as conditions changed, a new trend for predicted volume was plotted for the remainder of the week at the end of day 1/start of day 2 (in brown), and the outdated predicted trend is deleted. My question is, what would be the most effective graph set-up to fulfill my requirements?
 
I have also attached the graphing part of my program. I am currently using multiple plots with the "Build XY Graph" Express VI. I understand that graphs are usually plotted at once and charts may be updated as time passes. It seems that the express VI I am using also can behave like a chart. Any suggestions? Thanks!
 
Adam  
Download All
0 Kudos
Message 1 of 8
(3,599 Views)
Any ideas?
0 Kudos
Message 2 of 8
(3,564 Views)
Hey Adam,
    I'm not sure I completely understand your question.  Are you wanting the trend for day one to stop recording at the end of day 1?  Why not keep one trend line and update it's path at the end of day 1?
Brian B
Account Manager
National Instruments
0 Kudos
Message 3 of 8
(3,511 Views)
Hi Brian,
 
Thanks for posting. Well...at this point, I am not too concerned with the details of what the graphing represents, but need to find the best possible graphing model/structure to make the programming as easy and flexible as possible.
 
I discussed my issue with another guy in my group, and he said that it would be wise to continually update an array every time a new value is to be plotted, then continously exporting the updated array to an XY graph. This way, should I desire to manipulate the graph display (from day to day), it would be relatively easy to manipulate the array at that given time. What do you think?
 
Adam
0 Kudos
Message 4 of 8
(3,486 Views)
Hey Adam,
    I guess I am still having trouble understanding what functionality you are trying to accomplish.  Basically my question now is what do you want to do different from your current method shown in the pictures you attached?  Are you just trying to provide flexibility for future code development, or are you actually wanting to change the way the data appears on the graph?
Brian B
Account Manager
National Instruments
0 Kudos
Message 5 of 8
(3,451 Views)
The main priority is to provide maximum flexibility for editing later down the road. At least right now, it seems that the array-building method I sketched out in the last post fulfills that. Do you have any alternative suggestions? Thanks!
0 Kudos
Message 6 of 8
(3,428 Views)
Hey azaibi,
    Building your own arrays and writing them to XY graphs definitely provides flexibility in the future.  However, a chart handles building an array internally, so all you would have to do is write single values, or small arrays at a time, to the chart and it would handle putting them all together for you.  If you want to maintain the ability to change the historical data, keep using the method that you have.  However, if not, a chart would handle all of the array manipulation for you, and make your block diagram cleaner.

Brian B
Account Manager
National Instruments
0 Kudos
Message 7 of 8
(3,407 Views)
Gotcha, thanks Brian!
0 Kudos
Message 8 of 8
(3,371 Views)