User guide
Configuring an Application www.controltechniques.com 67
Figure 94: Selector View
The selector helps to minimize the required number of
inputs and outputs to initiate different actions. The selector
limits the I/O by using a conversion from binary to decimal.
Figure 95 shows a block diagram of the Selector Object.
Figure 95: Selector Block Diagram
The Selector is configured by using a series of Sources
and Destinations on the Assignments view. The inputs to
the selector are Selector.Select# and
Selector.SelectorInitiate. These inputs to the Selector can
be found under the Selector group of Destinations on the
Assignments view. The outputs from the selector are called
Selector.Selection#, and can be found under the Selector
group of Sources on the Assignments view.
In most cases, hardware inputs are assigned to the
Selector.Select functions.
Based on the status of the binary select lines, a
selector.selection source will be active when the
Selector.SelectorInitiate destination is activated.
At the top of the Selector view (see Figure 94), the Selector
Input Destinations field defines how many Select lines will
be used. The number of Selector.Selection outputs is a
direct result of the number of Select lines. The formula is
as follows:
# of Selection outputs = 2
n
(where n is the number of Select
inputs)
The maximum number of Select lines is eight.
Once you have determined how many select lines you
want, the assignments to these Selector.Select lines is
then made in the Assignments view.
For example, if the user enters 2 for the number of Selector
Input Destinations, we would have 4 Selection lines
(Selector.Selection0 through Selector.Selection3). The
Selector.Selection number that activates is determined by
the status of the Selector.Select lines when the
Selector.SelectorInitiate bit is activated. Each select line
has a specific binary value.
The binary value is determined as follows:
Sn x 2
n
where Sn = Status of Selector.Select line n
Sn = 0 if Selector.Select line n is inactive, and
Sn = 1 if Selector.Select line n is active
The sum of all the binary values determines which
Selector.Selection line will be active.
The following examples demonstrate how to determine
which Selector.Selection will activate based on the
Selector.Select lines.
Example 2:
If Selector.Select2 is active, Selector.Select1 is inactive,
and Selector.Select0 is active, then the total binary value is
as follows:
S2 = 1, S1 = 0, and S0 = 1. Therefore,
Total Binary Value = (1 x 2
2
) + (0 x 2
1
) + (1 x 2
0
)
Total Binary Value = 4 + 0 + 1
Total Binary Value = 5
Therefore, when Selector.SelectorInitiate activates,
Selector.Selection5 will activate.
Example 2:
If Selector.Select2 is inactive, Selector.Select1 is active,
and Selector.Select0 is active, then the total binary value
would be as follows:
S2 = 0, S1 = 1, and S0 = 1. Therefore,
Total Binary Value = (0 x 2
2
) + (1 x 2
1
) + (1 x 2
0
)
Total Binary Value = 0 + 2 + 1
Total Binary Value = 3
Therefore, when Selector.SelectorInitiate activates,
Selector.Selection3 will activate.
The Selector.Select lines can change without any action
until the Selector.SelectorInitiate destination is activated.
Selector.Select0
Selector.Select1
Selector.Select2
Selector.Select3
Selector.Selection0
Selector.Selection1
Selector.Selection2
Selector.Selection3
Selector.Selection4
Selector.Selection5
Selector.Selection6
Selector.Selection7
Selector.Selection8
Selector.Selection9
Selector.Selection1
0
Selector.Selection1
1
Selector.Selection1
2
Selector.Selection1
3
Selector.Selection1
4
Selector.Selection1
5
S
elector.SelectorInitiate
Selector Object