![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bg15b.png)
FX Series Programmable Controllers Points Of Technique 10
10-7
10.9.2 A 0.1 msec timer pulse measurement
This is a ver
accurate measurin
process for pulse
inputs. The use of a standard timer is not accurate
enou
h in this case as the hi
hest resolution is
1msec. Therefor, this example shows how the
special hi
h accurac
devices M8099 and D8099
are used to capture the 0.1 msec resolution pulse
data.
Explanation:
The incomin
pulse is captured between two
interrupt routines. These routines operate
independentl
of each other, one on the risin
ed
e
of the pulse input and one on the fallin
ed
e of the
same input. Durin
the pulse input the contents of
special re
ister D8099 are continuall
moved into
data re
ister D0. Once the pulse has completed the
contents of D0 can be viewed at leisure.
Please note for this hi
h speed/accurac
mode to
be active for D8099, the correspondin
special
auxiliar
bit device M8099 must be driven ON in the
main pro
ram.
10.10 Using The Execution Complete Flag, M8029
Some of the applied instructions take more than one pro
ram scan to complete their operation.
This makes identification of the current operatin
state difficult. As an aid to the pro
rammer,
certainappliedinstructionsidentif
theircompletionb
settin
anoperationcompletefla
, M8029.
Because this fla
can be used b
several different instructions at the same time, a method
similar to the followin
should be used to trap the M8029 status at each of the instructions
usin
it:
Explanation:
The M8029 'trappin
’ sequence takes advanta
e of
the batch refresh of the FX famil
of PLC’s. As the
pro
ram scan passes each instruction usin
M8029
the status of M8029 chan
es to reflect the current
status of the instruction. Hence, b
immediatel
resettin
(or settin
) the drive fla
for the instruction
the current operational status of the instruction is
trapped. So when the batch refresh takes place
onl
the completed instructions are reset. The
example above uses a pulse to set the drive fla
s
so that it is eas
to monitor and see when each
instruction finishes (if the instructions are
continuousl
driven it will be difficult to see when
the
finish!).
General wiring-pluse
to be measured is
connected to both X0
and X1
Pulse to be
measured
EI instruction
MUST be
included in main
program
Pulse has been
measured
Special device
D8099
Measured time
stored inD0
FEND
X10
X10
RST D8099
RST M 0
IRET
X10
D 0MOV D8099
SET M 0
IRET
END
X 10
S (X0, X1)
I001
I100
M8099
X 0 X 1
M8002
X0
D 0MOV
D2
K 32766
MOV
K 0
M100PLS
M100
Y5SET
K100
K10PLSY
Y0
Y5
M8029
Y5RST
M101PLS
M101
Y6SET
Y6
M8029
Y6RST
X1
D2D0
RAMP
D3
K8000
Trapped
instruction
Trapped
instruction