![Tecomat TC600 Series Manual Download Page 83](http://html1.mh-extra.com/html/tecomat/tc600-series/tc600-series_manual_1072620083.webp)
Technical equipment of TC600 PLC
83
TXV 138 08.02
LD
1
UWF
LD
Period
MUF
cons2
DIF
WR
Frequency
;frequency = 1 / period
E 0
Measurement of the phase shift is used for signals with the same fre-
quency. The time difference between descending edges of two different sig-
nals connected to inputs DI1 and DI0 of BM is measured. The measured
number of cycles of the clock signal then reaches values of 1 to
.
For conversion of the number of cycles of the internal clock signal to the
time value, the following relationship holds:
t
F
[µs]
= n x 30.5175
t
F
phase shift of signals at inputs DI1 and DI0 of BM
n
contents of two bytes of the scratchpad determined by the parame-
ter
Xn
of directive
#unit
In the case of measurement of phase shift of alternating signals, it
is necessary to rectify the signals in single wave.
#program phase
;
#unit 0, 0, Digit_600, 2, 2, X0, Y0, On ;binary inputs
#unit 0, 0, Period_600, X2, X_On
;phase meter
;
#def Time XW2
;signal phase shift in clock
cycles
#def cons1 30.5175
;const. of conversion cycles -> µs
;
#reg float Phase
;signal phase shift in µs
;
P 0
LD
1
WR
Y0.0
;phase shift measurement
;
LD
Time
UWF
MUF
cons1
WR
Phase
;phase shift in µs
E 0
Reading of the immediate value of the meter of frequency and phase
shift can be done by reading with the physical address:
LD
UW$5000
;reading of the value of the meter
;of frequency or phase shift
Phase shift
measurement
Example of the phase
shift measurement
Physical addressing