User guide
110
6000 Series Programmer's Guide
BCD Program
Select
(INFNCi-B)
General-purpose inputs (not trigger inputs) can be defined as BCD
program select inputs. This allows you to execute defined programs
(DEF command) by activating the program select inputs. Program
select inputs are assigned BCD weights. The table to the right
shows the BCD weights of the controller's inputs when inputs 1-8
are configured as program select inputs. The inputs are weighted
with the least weight on the smallest numbered input.
Input #
Input 1
Input 2
Input 3
Input 4
Input 5
Input 6
Input 7
Input 8
BCD Weight
1
2
4
8
10
20
40
80
If inputs 6, 9, 10 and 13 are selected instead of inputs 5, 6, 7 and 8, then the weights would be
as follows: Input #6 = 10
Input #9 = 20
Input #10 = 40
Input #13 = 80
If, for example you defined 100 programs, a maximum of 8 inputs are required to select all
possible programs.
The program number is determined by the order in which the program was downloaded to the
controller. The program number can be obtained through the TDIR command (see
programming example below) — The number in front of each program name is the BCD
weight you need to achieve in order to execute the program.
If the inputs are configured as in the above table, activating inputs 2 and 3 will execute program
#6. Activating inputs 1, 4, and 6 will execute program #29.
To execute programs using the program select lines, enable the INSELP command. Once
enabled, the controller will continuously scan the input lines and execute the program selected
by the active program select lines. To disable scanning for program select inputs, enter
!INSELPØ or place INSELPØ in a program that can be selected.
Once enabled (INSELP1), the controller will run the program number that the active program
select inputs and their respective BCD weights represent. After executing and completing the
selected program, the controller will scan the inputs again. If a program is selected that has
not been defined, no program will be executed.
The INSELP command also determines how long the program select input must be
maintained before the controller executes the program. This delay is referred to as debounce
time (but is not affected by the INDEB setting). The examples demonstrate how to select
programs via inputs.
Example
RESET ; Return controller to power-up conditions
ERASE ; Erase all programs
DEF PROG1 ; Begin definition of program PROG1
TPE ; Transfer position of encoders
END ; End program
DEF PROG2 ; Begin definition of program PROG2
TREV ; Transfer software revision
END ; End program
DEF PROG3 ; Begin definition of program PROG3
TSTAT ; Transfer statistics
END ; End program
INFNC1-B ; Assign input 1 as a BCD program select input
INFNC2-B ; Assign input 2 as a BCD program select input
INFEN1 ; Enable input functions
INSELP1,50 ; Enable scanning inputs, levels must be maintained for 50ms
TDIR ; Display number and name of programs stored in memory
; response from TDIR should be similar to following:
☞
The number in front
of each program
name is the BCD
weight required to
execute the program.
; *1 - PROG1 USES 6 BYTES
; *2 - PROG2 USES 18 BYTES
; *3 - PROG3 USES 99 BYTES
; *32877 OF 33000 BYTES (98%) PROGRAM MEMORY REMAINING
; *500 OF 500 SEGMENTS (100%) COMPILED MEMORY REMAINING
You can now execute the programs by activating the correct combination of inputs:
• Activate input 1 (BCD weight of 1) to execute program #1 (PROG1)
• Activate input 2 (BCD weight of 2) to execute program #2 (PROG2)
• Activate inputs 1 & 2 (BCD weight of 3) to execute program #3 (PROG3)










