Download  Print this page

Parameter Bg; Parameter Pq; Parameters 24-1 And; Parameter Bef - Siemens 6ES5-424 Technical Reference Manual

Counter module.
Hide thumbs

Advertisement

Chapter 4
Standard Software
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
0000
NAME : PER: ZST
0001
BG
:
KF+ 1 28
0002
PIQ
:
KSP only 150Sl135U (see Software
description)
0003
24-1 :
KH0001
0004
2--5
:
KHOOOO
0005
BEF
:
KSlN
0006
DBDW:
KY235,O
0007
ABIT :
KY0,O
0008
INTL :
FBI17
0009
FEML :
FB201
O O O A
PAFE :
F 191.3
O O O B
.
***
Figure 4-2 Function Block 159
4.2.2 Parameter BG
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
located. P
=
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
KHOl 00
=
Counter 3 selected
KHOOl 0 = Counter 2 selected
KHOOOl
=
Counter 1 selected
KHOOOO = Counter 1 thru 4 not selected
It is possible to select more than one counter, e.g.
KH00111
=
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.
KH0001
=
Counter 5 selected
KHOOO
=
Counter 5 not selected
4.2.5 Parameter BEF
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.
1. PA
-
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
=
11
Counter 2, DBDW
=
data block
=
xx, data word
=
18
Counter 3, DBDW = data block = xx, data word.= 25
Counter 4, DBDW
=
data block
=
xx, data word = 32
Counter 5, DBDW = data block = xx, data word = 38
2. ST
-
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 =
xx,
data word
=
42
4. LS
-
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.
5. CO
-
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.
6. SA
-
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.
7. SP
-
Stop counter. This function will stop the counter or
counters selected. The DBDW parameter value is irrelevant.
8. RB
-
Reset module. This function will reset the 242 counter
module. Resetting will delete any parameters that have been
assigned.

Advertisement

Table of Contents

Comments to this Manuals

Symbols: 0
Latest comments: