![background image](http://html1.mh-extra.com/html/omron/prt1-com/prt1-com_operation-manual_744566059.webp)
5-1
Section
Examples of Counter Unit Operation
47
5-1-2 Present Count Value Reading
If the following bits in the output area for the Counter Unit have been set to ON,
the set values or the present count value (count value) will always be read to
words m and m+1 in the input area.
To read set value 1:
Output area word n+2, bit 04
To read set value 2:
Output area word n+2, bit 05
To read count value:
Output area word n+2, bit 06
The simplest example of a program to commence count operation and obtain
the count value is given in the following. For details refer to
7-3 Counter Unit
.
Note
1. To execute counting, it is necessary to set the count mode. If the count mode
is changed during count operation, however, the count value will be cleared
to 0.
2. Setting and reading will not be executed if a bit with a higher priority is ON.
As shown in the following example, therefore, it is recommended that word
n+2 be used with the MOV instruction.
When execution of count value reading is indicated
(execution conditions are ON), set the following condi-
tions:
S
Word 53
Bit 03: Data code BCD
Bit 06: Count value reading
Bits 10, 11: Count mode phase difference
×
1
The count value will subsequently be sent to words m
and m+1 (353, 354) of the Counter Unit automatically.
MOV(21)
#0C40
053
END(01)
NTLP
5-1-3 Counter Setting and Execution
When the program is executed, the necessary settings for the Counter Unit will
be made, and count operation will start. During count operation, external outputs
1 and 2 of the Counter Unit will automatically switch ON or OFF, according to the
count value.
Note
It will be necessary to reset all the settings, including the set values,
present value and count mode, every time the Counter Unit is turned
ON.
Содержание PRT1-COM
Страница 1: ...Cat No W900 E2 1 PROFIBUS DP MULTIPLE I O TERMINAL PRT1 COM GT1 Series ...
Страница 2: ...PRT1 COM GT1 Series PROFIBUS DP MULTIPLE I O TERMINAL Operation Manual Produced December 1999 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 187: ...Cat No W900 E2 1 Note Specifications subject to change without notice December 1999 Authorized Distributor ...