Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Detect Zero Crossing (Simulation Module)

LabVIEW 8.2 Simulation Module Help
September 2006

NI Part Number:
371894A-01

»View Product Info

Detects a zero crossing according to the trigger type you specify. A zero crossing occurs when the input signal you specify crosses the x-axis. This function detects a zero crossing for both fixed and variable step-size ordinary differential equation (ODE) solvers. For variable step-size solvers, this function also forces the ODE solver to evaluate the simulation and update the simulation output when the signal crosses zero. If this function detects a zero crossing in the direction the trigger type parameter specifies, this function resets the ODE solver. Details  Example

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies whether this function is Scalar or Vector. The default value is Scalar.
ParametersLists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box.
PreviewDisplays a graphical preview, if available, of the function output or configuration.
Parameter InformationContains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box.
Parameter sourceSpecifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the simulation diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the simulation diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the simulation diagram. You then must set the value for this parameter inside the configuration dialog box.
trigger typeSpecifies when this function resets the ODE solver. You can choose from the following options:
  • rising—The ODE solver resets when the input crosses zero with a positive slope.
  • falling—The ODE solver resets when the input crosses through zero with a negative slope.
  • either—The ODE solver resets when the input crosses zero with either a positive or negative slope.
  • none—(Default) The ODE solver does not reset.

Block Diagram Inputs

ParameterDescription
trigger typeSpecifies when this function resets the ODE solver. You can choose from the following options:
  • rising—The ODE solver resets when the input crosses zero with a positive slope.
  • falling—The ODE solver resets when the input crosses through zero with a negative slope.
  • either—The ODE solver resets when the input crosses zero with either a positive or negative slope.
  • none—(Default) The ODE solver does not reset.
inputSpecifies the signal to which you want to apply the function.

Block Diagram Outputs

ParameterDescription
crossed?Returns TRUE if the input signal crossed zero in the direction that the trigger type parameter specifies, depending on the type of ODE solver. For fixed step-size ODE solvers, crossed? returns TRUE if the input signal crossed zero during the last time step. For variable step-size ODE solvers, crossed? returns TRUE when the input signal reaches zero. crossed? returns FALSE in all other situations.

If crossed? is TRUE, the ODE solver resets.

Detect Zero Crossing Details

Feedthrough Behavior

All input/output pairs of this function have direct feedthrough behavior.

Example

Refer to the detect zero crossing VI in the labview\examples\simulation\Getting Started\Nonlinear directory for an example of using the Detect Zero Crossing VI.

 


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit