Chapter 3 Counter function of the PI918
6F8C1370
16
3.1.3. Application as a gate on timer with alarm
Thepulsewidth(ONTIME)ofthesignalappliedtothegateinputis
measuredusinginternalreferencepulses. Apulsewidthoveracertain
periodcanbedetectedbasedonachangeintheinterruptstatusby
settinganalarmvalue.
Condition:
Parameter
setting
EP AL SP SV
0 1 0 0
External
input
Pulseinput Gateinput
Notrequired
Connectionofpulsestobe
measured. Gatebatch
permissionsettingisnot
available.(GEN=‘0’)
Operation:
(1) Theonpulsewidthofthegateinputismeasured. Aninversionof
theinterruptstatusbitoccurswhenthecountreachesthealarm
value. Foralarmvaluesof8001htoFFFFh,nointerruptcondition
occurs. Foranalarmvalueof8000h(32768),aninterruptoccurs
at"0"count.
(2) Thecountervalueistransferredtotheholdregisterwhenthegate
inputconditionincludingcommandchangesfromONtoOFF.
Figure 3.1.3. Example of gate on timer with alarm operation
Gateinput
(Measuredpulse)
Internal
referencepulse
Countvalue
Alarmvalue(1to32768)
Interruptstatus
Command
Holdvalue
A
B
C
A
B
C
t
A
t
B
t
C
ONONON
0
0
(32767)
Gatepulsewidthtx=Holdvalue
÷
Internalreferencepulse(Hz)
(Inversion)