User`s guide
Switches
System switches govern various features of the V+ system. The switches are described
below. See the V+ Language Reference Guide and the V+ Operating System Reference
Guide for more detailed descriptions of the keywords discussed here.
As with system parameters, the names of system switches can be abbreviated to the
minimum length required to identify the switch.
Viewing Switch Settings
The SWITCH monitor command displays the setting of one or more system switches:
SWITCH switch_name, ..., switch_name
If no switches are specified, the settings of all switches are displayed.
Within programs, the SWITCH real-valued function returns the status of a switch. The
instruction:
SWITCH(switch_name)
returns TRUE (-1.0) if the switch is enabled, FALSE (0.0) if the switch is disabled.
Some switches are organized as arrays and may be accessed by specifying the array index.
Setting Switches
The ENABLE and DISABLE monitor commands/program instructions control the setting of
system switches. The instruction:
ENABLE BELT
enables the BELT switch. The instruction:
DISABLE BELT, CP
disables the CP and BELT switches. Multiple switches can be specified for either instruction.
Switches can also be set with the SWITCH program instruction. Its syntax is:
SWITCH switch_name = value
This instruction differs from the ENABLE and DISABLE instructions in that the SWITCH
instruction enables or disables a switch depending on the value on the right-hand side of the
equal sign. This allows you to set switches based on a variable or expression. The switch is
enabled if the value is TRUE (nonzero) and disabled if the value is FALSE (zero). The
instruction:
SWITCH CP = SIG(1001)
enables the continuous path (CP) switch if input signal 1001 is on.
Switches
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 159










