Programming Manual
PHYTEC Messtechnik GmbH 2008 L-720e_0
129
P
ro
g
ra
m
m
in
g
M
a
n
u
a
l
the application software to determine event some time later,
whether the event had happend or not
To reset the event, the function
ResetEvent()
must be called.
Otherwise, the next call of
WaitForSingleObject()
would return
immediately, because the signal is still active.
ActivateFieldInterrupt()
should therefore be called only when the
grabber is not running. It might be advisabe to call
ResetEvent()
after that, to reset any older active signals, which might have been
created in the meantime.
•
To determine, which field had been digitized, the
DataPresent()
–
function should be called immediately after the event had been
signaled. In case of continuos digitization this is done by
evaluatiing the state of the
T_EVEN
/
T_ODD
– flags. Care must be
taken to read out this flags immediately, because their state will
only persist for 20 after the end oft the field. (This is, because 20
ms later, the next field digitization is completed and therefore the
flags are updated).
Hint:
An exclusive-or – combination of
T_EVEN
and
T_ODD
will
result the parity of the field (1=ODD, 0=EVEN):
field_ready
:=T_EVEN
^
T_ODD;
•
The event is created by the grabber driver with a very short time
delay. Please notice, that the delivery to the applicatin by the
operation system might last a noticable (and variable) time.