From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a diagram automatically?

A graph can be delete (manually) via the options-menu
"Dataoperation->Delete Graph"...

How can I do this automatically (this operation is
not available for a reference) ?
0 Kudos
Message 1 of 10
(2,852 Views)
Hi,
create Property node of chart, change Properties to History data. Properties of node to write and ignore all internal error. On Property node create constant with zero values.
Good luck.
Petr
Message 2 of 10
(2,852 Views)
Are you sure you want to delete the graph or do you really want to clear it? What's under the Data Operations menu is clear - there is no delete. Programatically clearing a graph is easily done by writing an empty array to the graph and is explained in the shipping example called "how to Clear Charts & Graphs". If you really do want to delete an indicator, there is no way to do this and I would have to ask why you would want to.
0 Kudos
Message 3 of 10
(2,852 Views)
It looks like a good old hack
and it work's! Thank you.

...but I thought LabVIEW can this
in a clean manner.
0 Kudos
Message 4 of 10
(2,852 Views)
If you want to measure the power of a
test person, store this power-time-course
into a file and measure the next one,
you really do not want the old graph
to be displayed (better is to delete all
measured values of a given object and
re- initialize it to default values)...
0 Kudos
Message 5 of 10
(2,852 Views)
I understand that. What I didn't understand was you wanting to delete a graph (or diagram as your subject said) as opposed to the graph's data. There's a big difference. The example I pointed you to does exactly what the other poster said.
0 Kudos
Message 6 of 10
(2,852 Views)
Hello!
So I guess my problem is equal to your problem.
There is a diagram (Signalverlaufsdiagramm) which I want to clear when I start a new measurement.
Your advice was to write an empty array to the diagram.
I formed a cluster of two DBL-values (zero an zero) and put them into an array, then I wrote them to the property Historydata (Hitoriedaten).
The result is a new diagram-plot with one value of zeros. But when I start the next measurement, the data of the two zeros will be part of my plot!?
Is there a better possibility?
Thanks
Lukas
[LabVIEW 8.2]
0 Kudos
Message 7 of 10
(2,588 Views)
Hi ping1,
connect only an empty cluster of your type to your history data. The easiest way to get it, is to create the history property node, right click on it and select create constant. If you do it and don´t change anything on this constant, then you will have what you want.
 
Mike
0 Kudos
Message 8 of 10
(2,581 Views)
Hi Lukas,

can you attach a (stripped down version) of your vi to show the problem? Usually using "history data" property should allow for clearing a chart.

Wait:
Did you wire an EMPTY array to the property node? When you wire an array containing (atleast) an element you will not get an empty chart...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(2,578 Views)
Thank you very much..  Smiley Happy
The problem is gone..
Lukas
[LabVIEW 8.2]
0 Kudos
Message 10 of 10
(2,572 Views)