"R_TRIG_DB_3"(CLK := "DD".LOU[1 ],
Q => "DD".P[1 ]);
IF "DD".P[1 ] THEN
"DD".樓層隊(duì)列[1 ] := "DD".隊(duì)列數(shù) + 1;
"DD".隊(duì)列數(shù) := "DD".隊(duì)列數(shù) + 1;
;
RETURN;
END_IF;
上面一段可以通過(guò) "DD".LOU[1 ] 的上升沿做加一計(jì)數(shù),求助我想寫(xiě)一個(gè)一組數(shù)據(jù)通過(guò)循環(huán)判斷上升沿來(lái)計(jì)數(shù),但是數(shù)量一直累積,沒(méi)法做到上面的單個(gè)效果,大佬們幫忙分析分析,給各位大佬們拜個(gè)早年!
FOR "DD".NUM := 1 TO 10 DO
;
"R_TRIG_DB_3"(CLK := "DD".LOU["DD".NUM ],
Q => "DD".P["DD".NUM ]);
IF "DD".P["DD".NUM ] THEN
"DD".樓層隊(duì)列["DD".NUM ] := "DD".隊(duì)列數(shù) + 1;
"DD".隊(duì)列數(shù) := "DD".隊(duì)列數(shù) + 1;
;
RETURN;
END_IF;
END_FOR;