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

Switch (Simulation Module)

LabVIEW 8.2 Simulation Module Help
September 2006

NI Part Number:
371894A-01

»View Product Info

Switches the value of the output between input 1 and input 2 based on the value of the control input. 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.
thresholdSpecifies the point at which the output switches between input 1 and input 2. The LabVIEW Simulation Module compares the value of the control input to the value of the threshold to determine the value of the output. The default value of threshold is 1.

Block Diagram Inputs

ParameterDescription
thresholdSpecifies the point at which the output switches between input 1 and input 2. The LabVIEW Simulation Module compares the value of the control input to the value of the threshold to determine the value of the output. The default value of threshold is 1.
input 1Specifies the signal that this function returns when the value of the control input is greater than the threshold.
control inputSpecifies the signal that this function compares against threshold to determine which input to select as the output.
input 2Specifies the signal that this function returns when the value of the control input is less than or equal to the threshold.

Block Diagram Outputs

ParameterDescription
outputReturns the signal that results from applying the function to the input signal.

Switch Details

The following equations define the output of this function.

where y is the output.

Feedthrough Behavior

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

Example

Refer to the switch VI in the labview\examples\simulation\Getting Started\Nonlinear directory for an example of using the Switch VI.

 


Resources


 

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