149
Using with CS1-series PCs
Appendix D
Programming
Changing Set Values and Starting Counter Operation
Example: Linear/Circular Modes
• With ON for SW1 or OFF for SW2 as the input condition, the Data Transfer Command Bit (word n, bit 03) in
the words allocated from the CIO Area is turned ON using OUT or another instruction.
• With the Data Transfer Completion Flag (word n, bit 14) as the input condition, the Start/Stop Command Bit
(word n, bit 00) is turned ON using the OUT instruction. At the same time, the Enable External Output
Command Bit (word n, bit 07) is turned ON using the OUT instruction.
Program Examples
First Cycle Flag
(Turns ON for one cycle.)
If SW1 is ON or SW2 if OFF, "a"
turns ON for one cycle. ( "a" is used
as a switch for data transfer.)
Start/Stop Command Bit
(word n, bit 00)
Bits a to d initialized to OFF.
MOV (021)
#0000
a to d
DIFU (013)
a
200003
DIFU (013)
b
DIFD (014()
c
d
A20011
SW1
a
200614
a
200000
SW2
SW2
200000
c
b
SW1
d
d
Data Transfer Completion Flag
(word n+6, bit 14)
Data Transfer Command Bit
(word n, bit 03)
If "a" is ON, and the counter is stopped,
data is transferred.
Start/Stop Command
(word n, bit 00)
The Start command is not executed while
"d" is ON (i.e., data is being transferred).
When "d" turns OFF, it is executed.
200007
Enable External Output
Command Bit (word n, bit 07)
The Enable External Output Command Bit
is turned ON at the same time.
"b" turns ON for one cycle with the
rising edge of the Data Transfer
Completion Flag (word n+6, bit 14).
"b" turns ON for one cycle with the
falling edge of the Data Transfer
Completion Flag (word n+6, bit 14).
"d" turns ON during transfer of data.
Содержание C200H-CT021
Страница 1: ...C200H CT021 High speed Counter Unit Operation Manual Revised December 2000 ...
Страница 2: ...iv ...
Страница 4: ...vi ...