For graphs, you can use the Reinitialize to Default method to ensure that the default value for the graph is always an empty array.

  1. On the front panel, right-click the graph and select Data Operations » Clear Graph.
    This ensures the value of the graph is already clear.
  2. On the front panel, right-click the graph and select Data Operations » Make Current Value Default.
  3. On the block diagram, right-click the graph indicator and select Create » Invoke Node » Reinitialize to Default.
  4. Click to place the invoke node on the block diagram.
  5. To ensure that the graph reinitializes to the default consistently, wire the invoke node to execute at the beginning of the VI.
Since you set the default state an empty graph, the Reinitialize to Default method ensures the graph reinitializes to an empty graph.