【正文】
1001 then m0=0000。 else m1=m1+1。 else m0=m0+1。 if m1amp。139。039。 else w=w+1。039。 elsif fin=39。 then if k0=1001 then k0=0000。 else k1=k1+1。 else k0=k0+1。 if k1amp。139。039。 else en1=39。en0=39。 end if。cha2=c2。cha0=c0。km0=k0。039。m1。 公里數(shù)據(jù)、分鐘數(shù)據(jù)輸出 end if。process(f,start)begin if start=39。 then c3=0000。c1=0000。 elsif f39。139。 此IF語句完成對費用的計數(shù) if c1=1001 then c1=0000。 if c3=1001 then c3=0000。 end if。 end if。 end if。 end if。end process。 程序仿真圖注:1. 仿真圖中秒跟分的關系為3進制,即w為2時就歸0; 2. 出租車總行駛5公里,等待累計時間為4分鐘。出租計價器程序仿真圖2 注:等待累計時間為3分鐘時,f得到15個計價脈沖。出租計價器程序仿真圖