Simulation Mode

NI Signal Generator

Simulation Mode

NI signal generators support simulation. Simulating a device enables you to perform the following tasks:

  • Protect your devices by first testing settings and configurations on simulated devices.
  • Verify device behaviors under a wide variety of operating conditions.
  • Start or speed up application development before you have the hardware.
  • Optimize designs and determine ideal design parameters.

Enabling simulation allows you to verify that you have correctly configured the device. For example, if a parameter is set to an invalid value for the device, NI-FGEN returns the same error it would for a real device. While simulation is useful for verifying your configuration, there are some areas where simulation is not sufficient to verify that your configuration is correct. For example, no errors will be returned for configurations that involve or depend upon external signals, such as configuring an external Sample clock or routing signals. Also, the amount of time a generation takes to complete will be ignored in simulation mode; a finite generation will finish immediately after it is initiated, regardless of how much data is downloaded and how fast it is generated.

Simulation in LabVIEW

In LabVIEW, simulation is enabled with the Option String parameter of the niFgen Initialize With Options VI. Enable simulation (Simulate=1) and specify the device you want to simulate with the option string input.

The following example enables simulation of the NI PCI-5421 with 256 MB of onboard memory:

For more information, see the niFgen Initialize With Options VI.

Simulation in LabWindows/CVI

In LabWindows/CVI, simulation is enabled with the niFgen_InitWithOptions function. Enable simulation (Simulate=1) and specify the device you want to simulate with the option string parameter.

The following example enables simulation of the NI PCI-5421 with 256 MB of onboard memory:

niFgen_InitWithOptions (Resource, VI_ON, VI_ON, "Simulate=1, DriverSetup=Model:5421;BoardType:PCI;MemorySize:268435456",&vi );

For more information, see the niFgen_InitWithOptions function.