|
Create A2.0 = (E0.0 AND E0.1) OR (E0.2 AND E0.3). The brackets are included for greater clarity even though they are not really necessary as the operation AND has preference over OR. The solution ladder places two series (AND) of switches in parallel (OR), to connect the corresponding operands and then the coil.
When considering the AWL solution, note that after executing the second statement, the RLC contains the result of the logical combination AND between E0.0 and E0.1 (see Example 1). The next operation is to open brackets; The current RLC is ignored for the moment to be successively combined in AND with the result of the expression between brackets. The operation O( is an RLC delimiter and therefore the next statement will be the first of a new sequence. This means that the fourth statement (U E0.2) will be interpreted as loading the RLC with the status of E0.2 and, after executing the next statement, the RLC will contain the result of the logical combination E0.2 AND E0.3. The next statement to close the brackets will make the PLC execute the combination OR (the third was O() between the current RLC, the result of the AND between brackets, and the RLC that had been ignored, that is, the result of the first AND. The last statement (= A2.0) transfers the content of the RLC, which at this time represents the logical combination (E0.0 AND E0.1) OR (E0.2 AND E0.3), to output A2.0.
More examples: |