06-25-2018 05:22 AM
Hi there, I found this information in NI Support and it works propertly, but I don't know how to wire the "true" section of the chart history case.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P82GSAS
I attach my subVI where I have completed the clear graph true case.
Thanks in advice
06-25-2018 11:44 AM
A couple of notes:
In LabVIEW a "chart" and a "graph" are different things. As it seems like you know, the chart has a history, and adds data to it. The graph will only display what you most recently wrote to it. In your example VI, it is a functional global to make a graph behave more like a chart.
The connector pane for your SubVI is very weird. You should keep inputs on the left and outputs on the right.
When clear graph is set to True, it will load up the shift registers with empty arrays for next iteration. The value written to the graph still has all previous data until the next generation is run.
If you are calling this as a SubVI (as your file name implies), then please attach your top-level code.
06-25-2018 12:09 PM
@Gregory wrote:
A couple of notes:
In LabVIEW a "chart" and a "graph" are different things.
The "build xy graph" express vi does have an optional history, but it is fixed at infinite size. 😮
06-25-2018 02:42 PM - edited 06-25-2018 02:45 PM
I have attached an example of an XY graph with an option to clear (initialize) the graph. It is one of five XY graphs in a larger program to monitor a grid tie inverter system. My program resets the graph every night at midnight and it holds 24 hours of data.
Here is how they are used in my main program, after appending a timestamp a numeric array of measurements is fed to each graph sub-vi
I attached on of my sub-vi's for you too
06-25-2018 03:24 PM
@epm12 wrote:
I attach my subVI where I have completed the clear graph true case.
Some generic comment on your coding:
06-25-2018 03:38 PM
@altenbach wrote:
Some generic comment on your coding:
- You can use a single complex (CDB) array to hold the data,
Here's one possibility (simplfied to show the idea)
06-27-2018 03:13 AM
Thank you, I know that about the "clean graph", but it works, I don't know why, but it cleans all the graph area and when you add data it starts from clean.
I attach my VI.
06-27-2018 12:52 PM
@epm12 wrote:
I don't know why, but it cleans all the graph area and when you add data it starts from clean.
Please be clear. Is that what you want or what you don't want? If you don't want that, what do you want instead?
You did not include the subVI, so we cannot test.