Treść książki

Przejdź do opcji czytnikaPrzejdź do nawigacjiPrzejdź do informacjiPrzejdź do stopki
CHAPTER1EXERCISEL1:PCSEQUENTIALCONTROL
WeidentifythefunctionthatdetectsrisingedgesofasignalasP(·)andthefunction
thatdetectsfallingedgesasN(·).Withthisnotation,wecouldsimplifythemachineby
removingstateS8andtransitioningfromstateS7toS8(i.e.,c87)andfromstateS8toS1
(i.e.,c18).Inexchange,weneedtomodifythetransitionfromstateS7tostateS1andgive
itnewcontent:c17=(RG)P(G).Thisconditionmeanstheresetbuttonworkswhen
thegateisclosed.Whenthegateisopen,regardlessofthevalueoftheresetbutton,the
transitiontotheinitialstatecannottakeplaceuntilafterthegatecloses.Thecorrected
machineisshowninFig.1.4.
Thepossibilityofdetectingedgesremovesassumptionthatbuttonsgeneratesingle
impulses.Classicmomentarybuttonsusuallygenerateavalueof0whenreleasedand1
whenpressed.Thelengthofthisimpulsedependsontheuser’sreactiontime.Inthis
example,thebutton’svalueisnotimportant,unlikethedetectionoftheedge,specifically
therisingedge,i.e.,themomentthebuttonispressed.Thismeansthattheconditions
relatedtothebuttonsshouldlookasfollows:
c21=P(Bo)
c42=P(Bo)P(B1)
c64=P(Bo)P(B1)
c43=P(B1)
c65=P(Bo)
c31=P(B1)
c53=P(Bo)
c75=P(B1)
c12=c13=c14=c15=c16=P(R)
c17=(P(R)G)P(G)
1.2.3
Timedelays
(1.8)
Lastly,thebuttonresettingthestateofthecipherlock,inpracticalimplementations,
wouldbeinconvenienttouse,andamoreintuitiveapproachwouldbetoapplyatime
delaytotransitionbetweenselectedstates.Inparticular,cancelingcodeentrycouldoccur
afterabout5seconds,afterwhichitcouldbeassumedthattheuserhasabandoned
enteringthecodeforunknownreasons(perhapsrealizingthattheyhavemadeamistake).
Similarly,thetransitionfromstateS6tostateS1shouldoccurafterashorttime,e.g.,1
second.Thissoundshouldonlyindicatetheacceptanceoftheenteredcombinationand
anunsuccessfulverification.Otherwise,itwouldbedifficulttoassesswhetherthedevice
isworkingcorrectlysincethegatewouldnotopen,andtherewouldbenoothersignsof
thesystemoperating.Programmablecontrollersareequippedwithvariousmechanisms
allowingtimedelaysinthegeneratedsignalstobeconsidered,suchastheon-delaytimer.
1.2.4
TimerTON
TheTONtimerusestheinputsignalE(enable)andgeneratestheoutputsignalQ
(outputQreplacesOtoavoidtheriskofconfusionwithzero).Additionally,thistimer
isconfiguredtocountapredeterminedamountoftime.SettingtheEsignalactivatesthe
timer,andresettingitcausesthetimertobereset.ThetimerresetseveniftheEsignalis
setto0foronlyoneclockcycle.ThesettingofEto1startscountingfromthebeginning.
16