PMAC Product Guide I10). Third, PMAC does not pre-compute upcoming moves (and the program lines before them during the DWELL) ; it waits until after it is done to start further calculations, which it performs in the time specified by I11 or I12. Use of any DWELL command, even a DWELL0 while in external time base, will cause a loss of synchronicity with the master signal. Examples: DWELL250 DWELL(P1+P2) DWE0 ELSE Function : Start false condition branch Type : Motion program (PROG only), PLC program Syntax :
ELSE (Motion or PLC Program) ELSE {action} (Motion Program only) This statement must be matched with an IF statement ( ELSE requires a preceding IF , but IF does not require a following ELSE ). It follows the statements executed upon a true IF condition. It is followed by the statements to be executed upon a false IF condition. With nested IF branches, match the ELSE statements to the proper IF statement. In a motion program, it is possible to have a single-line IF statement ( IF({condition}) {action} ). An ELSE statement on the next program line is matched to this IF statement automatically, even if it should be matched to a previous IF statement.
To match a specific IF statement, place a non- ELSE statement in between. ELSE lines can take two forms (only the first of which is valid in a PLC program): With no statement following on that line, all subsequent statements down to the next ENDIF statement will be executed provided that the preceding IF condition is false. ELSE {statement} [{statement} ...] ENDIF With a statement or statements following on that line, the single statement will be executed provided that the preceding IF condition is false. No ENDIF statement should be used in this case ELSE {statement} [{statement}...] This single-line ELSE branch form is valid only in motion programs.
If this is placed in a PLC program, PMAC will put the statements on the next program line and expect an ENDIF to close the branch. The logic will not be as expected. Examples: This first example has multi-line true and false branches. It can be used in either a motion program or a PLC program. IF (M11=1) P1=17 P2=13 ELSE P1=13 P2=17 ENDIF 212 Buffer Commands