Ttim (Teaching Timer) - IDEC FC4A-C10R2 User Manual

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

TTIM (Teaching Timer)

TTIM
*****
Applicable CPU Modules
FC4A-C10R2/C
FC4A-C16R2/C
Valid Operands
Operand
D1 (Destination 1)
For the valid operand number range, see page 6-2.
Destination operand D1 (measured value) uses 3 data registers starting with the operand designated as D1. Data registers
D0 through D1297 and D2000 through D7997 can be designated as D1. Subsequent two data registers starting with desti-
nation operand D1+1 are used for a system work area. Do not use these two data registers for destinations of other
advanced instructions, and do not change values of these data registers using the Point Write function on
data in these data registers are changed, the teaching timer does not operate correctly.
The teaching timer instruction cannot be used in an interrupt program. If used, a user program execution error will result,
turning on special internal relay M8004 and the ERR LED on the CPU module.
Examples: TTIM
TTIM
D100
I0
ON
I0
OFF
D100 Value
The following example demonstrates a program to measure the ON duration of input I0 and to use the ON duration as a
preset value for 100-ms timer instruction TIM.
TTIM
D100
I0
MOV(W)
SOTD
I0
TIM
T0
D0
I1
While input is on, the ON duration is measured in units of 100 ms and the measured
D1
value is stored to a data register designated by destination operand D1.
The measured time range is 0 through 6553.5 sec.
FC4A-C24R2/C
Function
Measured value
When input I0 is turned on, TTIM resets data register D100 to zero and starts to store the
D1
ON duration of input I0 to data register D100, measured in units of 100 ms.
When input I0 is turned off, TTIM stops the measurement, and data register D100 main-
tains the measured value of the ON duration.
0
D1
S1 –
D1 –
REP
D100
D0
« FC4A M
22: D
FC4A-D20K3/S3
I
— — — — — — D0-D7997
1500 ms
15
While input I0 is on, TTIM measures the ON duration of input I0
and stores the measured value in units of 100 ms to data regis-
ter D100.
When input I0 is turned off, MOV(W) stores the D100 value to
data register D0 as a preset value for timer T0.
When input I1 is turned on, 100-ms timer T0 starts to operate
with a preset value stored in data register D0.
S
U
'
M
ICRO
MART
SER
S
ANUAL
/ T
T
UAL
EACHING
IMER
FC4A-D20RK1/RS1 & FC4A-D40K3/S3
X
Q
M
R
T
C
»
I
NSTRUCTIONS
D
Constant
. If the
WindLDR
22-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents