谁可以帮我解释下这MCGS程序?最后三个ENDIF怎么理解?和那段程序一起看?IF T1GMXW = 1 THEN IF T1C2 = 1 THEN '由T1C1前往 T1C2T1C1XW = 0 IF T1C1 = 0 AND ( T1C2 = 1 OR T1S2 = 1 ) AND T1C3 = 0 AND T1C4 = 0 AND T1C1XW = 0 THEN 定

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/06 08:56:10
谁可以帮我解释下这MCGS程序?最后三个ENDIF怎么理解?和那段程序一起看?IFT1GMXW=1THENIFT1C2=1THEN''由T1C1前往T1C2T1C1XW=0IFT1C1=0AND(T1C

谁可以帮我解释下这MCGS程序?最后三个ENDIF怎么理解?和那段程序一起看?IF T1GMXW = 1 THEN IF T1C2 = 1 THEN '由T1C1前往 T1C2T1C1XW = 0 IF T1C1 = 0 AND ( T1C2 = 1 OR T1S2 = 1 ) AND T1C3 = 0 AND T1C4 = 0 AND T1C1XW = 0 THEN 定
谁可以帮我解释下这MCGS程序?最后三个ENDIF怎么理解?和那段程序一起看?
IF T1GMXW = 1 THEN
IF T1C2 = 1 THEN '由T1C1前往 T1C2
T1C1XW = 0
IF T1C1 = 0 AND ( T1C2 = 1 OR T1S2 = 1 ) AND T1C3 = 0 AND T1C4 = 0 AND T1C1XW = 0 THEN
定时器启动16 = 1
定时器复位16 = 0
IF 计时时间16 > 0 AND 计时时间16 < 4 THEN
CZYDL1 = CZYDL1 - 1
ENDIF
IF 时间到16 = 1 THEN
定时器复位16 = 1
定时器启动16 = 0
T1C2 = 0
T1C2XW = 1
T1C1ZS = 0
T1C2ZS = 1
ENDIF
ENDIF
ENDIF

谁可以帮我解释下这MCGS程序?最后三个ENDIF怎么理解?和那段程序一起看?IF T1GMXW = 1 THEN IF T1C2 = 1 THEN '由T1C1前往 T1C2T1C1XW = 0 IF T1C1 = 0 AND ( T1C2 = 1 OR T1S2 = 1 ) AND T1C3 = 0 AND T1C4 = 0 AND T1C1XW = 0 THEN 定
一个IF必须对应一个ENDIF,你前面有3个IF,所以最后有三个ENDIF!这个程序好像是单片机的,我不太懂!