4.2.1 Explanation of FBI 59
The listing in Figure 4-2 illustrates FBI 59 as it will appear when
it is called on the programmer. Also listed is an explanation
of each within the function block.
FBI 59 PER:ZST
NAME : PER: ZST
KF+ 1 28
KSP only 150Sl135U (see Software
O O O A
O O O B
Figure 4-2 Function Block 159
4.2.2 Parameter BG
This parameter specifies the module's peripheral address, i.e.
128. The address range is from 128 to 240. Switch S1 on the
module is used to select this address.
4.2.3 Parameter P/Q
PIQ: (only 150Sl135U)
This parameter specifies which peripheral area the module is
Normal peripheral area. Q = Extended peripheral
area. The KS format is used.
4.2.4 Parameters 24-1 and 2-5
Counter selection. The user must identify which counter this
FB call will enable. The bit definitions are as follows: KH4321.
KH1000 = Counter 4 selected
Counter 3 selected
KHOOl 0 = Counter 2 selected
Counter 1 selected
KHOOOO = Counter 1 thru 4 not selected
It is possible to select more than one counter, e.g.
Counter 1, 2, 3 is selected.
This parameter is used in conjunction with 24-1. By setting
bit zero counter 5 is selected. Bits 1 thru 3 have no meaning
and should be set to zero; i.e., KH0005.
Counter 5 selected
Counter 5 not selected
4.2.5 Parameter BEF
Function selection parameter. This parameter allows you to
select the function assignments that the function block call
will be performing. Remember that you must call FBI59 each
time a different function is to be performed. Below is a list
and explanation of the 17 different functions available for the
6ES5 242 module.
Parameter assignment. When this function is used the
function block will transfer the values of five data words,
which are defined in DBDW, to the counter module. The
counter you have selected will determine which data word
will be pointed to in DBDW. Below is a list of the DBDW values
for each counter. For an explanation of meanings of each of
the five data words, refer to the next section.
Counter 1, DBDW = data block = xx, data word
Counter 2, DBDW
xx, data word
Counter 3, DBDW = data block = xx, data word.= 25
Counter 4, DBDW
xx, data word = 32
Counter 5, DBDW = data block = xx, data word = 38
Start counter. This function will start the counter or
counters which have been selected. The value in the DBDW
parameter is irrelevant.
3. L 0
Load counter. This function will load the counter or
counters selected, with the values found in the DB selected
in FBI 58 and the DWs for the particular counter. Below is a
list of data word locations that must contain the values to be
loaded for each counter. Again, the value in the DBDW
parameter is irrelevant.
Counter 1, data block = xx, data word = 14
Counter 2, data block = xx, data word = 21
Counter 3, data block
xx, data word = 28
Counter 4, data block = xx, data word = 35
Counter 5, data block =
Load and start. This function combines the L 0 and the
ST functions. The same rules apply for the load portion of
this function as they do for the LO-function.
Copy H register into the E register. This function will
copy the contents of the hold register (H) to the result of
counter register (E) for the counter or counters selected.
The counter should be stopped when this command is used
to prevent the transferred value from being changed.
Save counter value in the H register. This function will
read the value of the counter or counters selected without
modifing the value in the counter, and place the value in
the H register. To read the value stored in the Hold register,
you must first use a CO command to transfer the contents
of the Hold register to the E register. Then you must use
an LE command to read the value of the counter into the
data block. Note that the counter should be stopped when
the last commands are executed.
Stop counter. This function will stop the counter or
counters selected. The DBDW parameter value is irrelevant.
Reset module. This function will reset the 242 counter
module. Resetting will delete any parameters that have been