Additional Functions; Ctrlo - Siemens 6ES5-424 Technical Reference Manual

Counter module
Table of Contents

Advertisement

Chapter 3
Register Details And Use
3.6.2 Additional Functions
The additional functions of the CTRL register are listed below.
It is necessary for bits 7
-
5 to set to "1" to call the additional
functions. The equivalent "BEF" titles for FBI 59 are also listed
for each of the functions.
CTRL
FBI 59
Title and Description
4 3 2 1 0
"BEF"
0 0 0 0 1
RB
Reset module; this function will per-
form an overall reset of the module. All
parameters assigned will be deleted.
0 0 0 1 0
FL
Load predefined function; this function
will load the predefined function
whose number has been previously
placed in the FNR register. See
Section 3.7 for a detailed description
of the FNR register.
0 0 0 1 1
RI
Reset interrupts; this function is used
l
to reset the interrupts in the INTl
register to "0". See Section 3.2 for a
I
detailed description on the INTl
register.
l
0 1 0 0 1
S1
step counter; this function will step
1
0 1 0 1 0
S2
the selected counter by acount of one.
l
0 1 0 1 1
S3
The counter will be incremented or
0 1 1 0 0
S4
decremented depending on the value
0 1 1 0 1
S5
of bit CM3 for the selected counter.
NOTE:
All codes not described above are illegal.
3.6.3 Counter Selection: CTRL4
-
CTRLO
The counter selection bits CTRL4
-
CTRLO, are used for those
functions described in Section 3.6.1. These bits are not used
for counter selection when the additional functions of the
CTRL register are used (see the previous section).
CTRL Bits'4 3 2 1
0
Counter
5 4 3 2 1
0
=
not selected 1 = selected
When using the functions described in Section 3.6.1, any or
all of the counters may be selected by setting the appropriate
bits. To ensure the proper operation of a particular function,
it is important to ensure that all of the registers involved
have been loaded or preset before executing the function.
For example, if you would like to perform a start operation
on counters 1 and 3, it is important to have the appropriate
values in the CM, MM, Load, and Hold registers for each of
the counters prior to the execution of the start function.
When executing a predefined function, it. is first necessary
to store in the FNR register the function number that will be
performed. Then by using the Control Register, the predefined
function may be loaded in to the counter. This was described
in the previous section. If you are using the standard software,
then the "BEF" parameter of FBI59 will be set to "R" to
perform a load of a predefined function.
The firmware for the module contain five predefined functions
(firmware version V04). These function numbers and their
meanings are described below.
FNR
Description
O O H
Test for AM 9513, counter chip
01 H
Test module RAM
02H
Test module EPROM
03H
Test for AM 9519, interrupt controller
04H
LOZl
The LOZl function will cause Counters 1-3 to be loaded from
Load register after an interrupt has occurred from the gate
interrupts 1
-
3. These gate interrupts are caused directly from
the gate inputs l
-
3 and are masked by the INTM register. See
Section 3.1 for more information about the INTM register.
The operation of the first four function of the V04 firmware can
be checked by reading the FEM register. The FEM register
is described in the next section.
3.8 FEM
-
Error Signal Register
The FEM register allows you to determine which error has
occurred when the Error bit of the INTl register is set (INTI,
bit 14).
FEM
-
Low Order Byte
Subaddress xxx3, Read
Bit
7
6
5
4
3
2
1
0
l
T
T
T
T
T
T
T
IN
NR
CO
PA
TI
R 0
RA
I
not assigned
FEM
-
High Order Byte
Subaddress xx2, Read
Bit
15
14
13
12
11
10
9
8
I
not assigned
0
=
no error l
=
error
3.7 FNR
-
Function Number Register
The FNR register is used to point the module to the predefined
function that is to be performed. These predefined functions
can be stored in a 4K byte user EPROM installed on the
module. Up to 254 function numbers can be assigned (OOH
thru FEH). There are also several predefined functions located
in the modules firmware. These functions are described below.

Advertisement

Table of Contents
loading

Table of Contents