Download ECLiPS English Control Language Programming
Transcript
5 The actions specified by Functional Terms are executed when the Term is scanned. Each Statement must have at least one Functional Term, Conditional Terms are optional. If there are no Conditional Terms in a Statement, the Functional Terms are always executed during each scan. When Conditional Terms accompany Functional Terms in a Statement, the Functional Term is executed when all of the Conditional Terms are satisfied. There are four types of conditional Terms (see the reference section). Conditional Terms are satisfied as follows: 1. Read – When valid data is received at the appropriate channel. 2. If – When the conditional expression is TRUE. To understand how Statements are scanned, assume that the Statement Conditional Terms precede the Functional Terms and that the scan proceeds from left to right. a80003 Figure 5-2. Statement Scan The Statements of a State are executed in the order that they are written into the program. Functional Terms of Statements with no Conditional Terms are always executed. Conditional Terms in Statements control whether or not the Functional Terms in those Statements are executed. If all of the Conditional Terms are satisfied, the Functional Terms are executed. If any of the Conditional Terms are not satisfied, none of the Functional Terms are executed. The Statements are executed one at a time. In this manner every Statement of the active State is evaluated. There are two types of Functional Terms that can prevent the execution of the rest of the Statements in a State. One is the Halt command which stops program execution. The other is the “go to ...” command, which immediately causes another State to become the active State. For example: If Start_Pushbutton is pushed, go to Start_Up State. GO to Restart_State. causes the Start_Up State to become the active State when the process input represented by Start_Pushbutton is true. All Terms or Statements following this Statement are not executed and at the next controller cycle, the scan of this Task starts at the first Statement of the Start_Up State. 5-8 ECLiPS English Control Language Programming System User’s Guide - March 1998 GFK-0731B