
11-11-5.Ringcountfunction
COUNTER1and2havearingcountfunctionforuseincontrollingarotatingtable.
SetC1PM=1,C1S0to2=000,andC1C0to1=00inRENV4andCOUNTER1willbeintheringcount
模式。然后在PCL可以执行以下操作。
-Countvalue=CountupfromthevalueinPCMP1untilreaching0.
-Countvalue=Countdownfrom0untilthecountequalsthevalueinPCMP1.
SetC2PM=1,C2S0to2=000,andC2C0to1=01inRENV4andCOUNTER2willbeintheringcount
模式。然后在PCL可以执行以下操作。
-Countvalue=CountupfromthevalueinPCMP2untilreaching0.
-Countvalue=Countdownfrom0untilthecountequalsthevalueinRCMP2.
SetCOUNTER1toringcounteroperation<setC1RM,C1D0to1,C1S0to2,and
C1C0to1inRENV4>
10000000:操作计数器1的环网柜。
SetCOUNTER2toringcountoperation<setC2RM,C2D0to1,C2C0to1in
RENV4>
10000001 :操作COUNTER2作为环网柜。
[RENV2]
(写)
[RENV2]
(写)
15
8
nnnnnnnn
EvenifthevalueforPRMVoutsidetherangeof0tothevalueinRCMPn,thePCLwillcontinueto
执行定位操作。
Whendrivingarotatingtablewith3600pulsesperrevolution,andwhenRCMP1=3599,MOD=41h,
andRMV=7200,thetablewillrotatetwiceandthevalueinCOUNTER1,whenstopped,willbethe
同样作为起始前的值。
注意:要使用环网柜的功能,设置和0的计数值RCMPn的价值。如果
值超出上述范围时,在PCL将不能正常工作。比较器设定条件
(C1S0to2,C2S0to2)whenusingacounterasaringcounterto"000."
设置示例
RENV4=XXXXXX80h---COUNTER1isinringcountermode(C1RM=1,C1S0to2=000,
C1C0to1=00)
RCMP1 = 4 ---计数范围: 0 4
-125-