Owning Palette: Forcing VIs
Requires: Base Development System (Real-Time, Windows)
Forces an I/O variable or I/O alias to assume forced value until you disable forcing, reboot the target, or force the variable to assume a new forced value.
![]() |
![]() |
![]() |
variable path (URL) specifies the path to the I/O variable or I/O alias. The path can be absolute or relative. The format of the variable path is \\<TargetName>\<ModuleName>\<VariableName>. You can view the variable path for an I/O variable in the Context Help window when you hover over the I/O variable node on the block diagram. |
![]() |
forced value is the value for the I/O variable or I/O alias to assume while forcing is enabled on the target and the enable forcing input of this VI is TRUE. To ensure data integrity, you must wire a value of the same data type as the I/O variable. To verify the data type of an I/O variable, right-click the I/O variable in the Project Explorer window and select Properties to display the Shared Variable Properties dialog box. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
error out contains error information. This output provides standard error out functionality. |
To perform batch forcing on a set of I/O variables, disable forcing on the target, force each I/O variable, then enable forcing on the target.
Refer to the Programmatic Forcing.lvproj in the labview\examples\Scan Engine directory for an example of using the Force Variable VI.
Open example
Find related examples
Submit feedback on this topic.
Visit ni.com/support for technical support.