Resetting or Caching Output Values Between Statechart Iterations (Statechart Module)

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

You can configure whether a statechart resets or caches the output data between statechart iterations. The behavior you configure depends on the purpose of the statechart.

For example, consider a statechart that implements logic similar to a programmable logic controller (PLC). This statechart might read input data, execute an action, and then return output data. The output data from one iteration does not depend on output data from any previous iteration. In this situation, you can configure the statechart to reset the output data between iterations. Resetting output data frees up memory for other uses.

Conversely, consider a statechart that implements logic similar to a proportional-integral-derivative (PID) controller. PID controllers must take into account the history of the error. In this situation, you can configure this statechart to cache the output data between iterations. Storing output data requires memory in which LabVIEW stores the data.

Complete the following steps to specify either behavior.

  1. Launch the Statechart Code Generation page of the Project Library Properties dialog box.
  2. To specify that the statechart resets output values between iterations, place a checkmark in the Reset output values after each iteration checkbox.

    To specify that the statechart caches output values between iterations, remove the checkmark from this checkbox.
  3. Click the OK button.

The new setting takes effect after you generate code for the statechart.

WAS THIS ARTICLE HELPFUL?

Not Helpful