![]() | Download Help (Windows Only) |
Owning Palette: Nonlinear Systems Functions
Requires: Control Design and Simulation Module
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.
Dialog Box Options |
Block Diagram Inputs |
Block Diagram Outputs |
Parameter | Description |
---|---|
Polymorphic instance | Specifies whether this function is Scalar or Vector. The default value is Scalar. |
Parameters | Lists 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. |
Preview | Displays a graphical preview, if available, of the function output or configuration. |
Parameter Information | Contains 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 source | Specifies 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 type | Specifies when this function resets the ODE solver. Note that if you wire an array to the input parameter of this function, the trigger type you specify is applied to all the signals in the array. However, if you wire an array to the input parameter and you need to specify more than one trigger type, you must configure a trigger type for each signal in the array. You can choose from the following options:
|
offset | Specifies the value around which this function detects a crossing. This function detects a crossing if the following equation is true:
sgn(u(t–1)–offset(t)) ≠ sgn(u(t)–offset(t)) |
Parameter | Description |
---|---|
trigger type | Specifies when this function resets the ODE solver. Note that if you wire an array to the input parameter of this function, the trigger type you specify is applied to all the signals in the array. However, if you wire an array to the input parameter and you need to specify more than one trigger type, you must configure a trigger type for each signal in the array. You can choose from the following options:
|
input | Specifies the signal to which you want to apply the function. |
offset | Specifies the value around which this function detects a crossing. This function detects a crossing if the following equation is true:
sgn(u(t–1)–offset(t)) ≠ sgn(u(t)–offset(t)) |
Parameter | Description |
---|---|
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. |
All input/output pairs of this function have direct feedthrough behavior.
Refer to the SimEx detect zero crossing VI in the labview\examples\Control and Simulation\Simulation\Nonlinear directory for an example of using the Detect Zero Crossing VI.