Table Of Contents

Multirate Diagram Simulation

Last Modified: April 22, 2016

After you create code on a Multirate diagram, you can test the code to make sure it works properly by running diagram simulations.

In most real applications, a Multirate diagram executes continuously, as long as data is available, because the Multirate diagram processes streams of data. To imitate behavior in a real application, the Multirate diagram can simulate multiple iterations of the diagram code without the use of loops or other structures.

LabVIEW runs a simulation of the diagram code when you click the Run button on the document toolbar.

Input Port Configuration

To run a Multirate diagram simulation, you must configure input ports to provide simulation data. Input ports provide the following data source options in the Item tab:

Manual

Streams the data you specify in the Data text box to the diagram. You must separate data values by commas.

If you select Manual, make sure to specify enough data values to simulate the number of iterations you want the diagram to complete.

CSV File

Imports data values from a comma-separated values (CSV) file that you specify in the CSV File pull-down menu and streams the values to the diagram.

If you select CSV File, make sure the CSV file contains enough data values to simulate the number of iterations you want the diagram to complete.

Random

Streams random data values between -1 and 1 to the diagram.

If you select Random, LabVIEW automatically generates enough data values to simulate the number of iterations you specify in the document toolbar. If you select Consume All Data on the document toolbar, the input port provides enough data to simulate only one iteration.

spd-note-note
Note  

If you change the data type of an input port that contains data you specify with Manual selected, LabVIEW converts the data values using default numeric conversion behavior. If you import values from a CSV file, LabVIEW converts the values from the CSV file to the data type of the input port using default numeric conversion behavior.

Simulation Options

Use the options in the document toolbar of a Multirate diagram to configure a simulated diagram execution:

Iterations Runs the Multirate diagram for a set number of iterations that you specify. The entire diagram executes once for every iteration. To run a simulation with Iterations selected, each input port must provide at least as many data values as the number of times the input port executes per diagram iteration times the number of iterations you set. The number of input port executions per diagram iteration appears beneath each input port when you enable Execution Properties.
Consume All Data Runs the Multirate diagram for as long as data is available. To run a simulation with Consume All Data selected, each input port must provide at least as many data values as the number of times the input port executes per diagram iteration. The number of input port executions per diagram iteration appears beneath each input port when you enable Execution Properties.
spd-note-note
Note  

You can enable Execution Properties by selecting Annotations on the document toolbar to display the number of times each node executes. On a Multirate diagram targeted to an FPGA, enabling Execution Properties also displays the design throughput and estimated throughput for each node.


Recently Viewed Topics