Structure Text Programming - Codesys 15
Structure Text Programming - Codesys 15
19.4 SUMMARY
1. Write a structured text program that will replace the following ladder logic.
A active
EQU MOV
Source A 20 Source -2
Source B n Dest n
A LEQ
Source A n active
Source B 20
active
active
ADD
Source A n
Source B 2
Dest n
LOG
Source n
Dest x
SUB
Source A x
Source B 1
Dest x
MUL
Source A x
Source B 2
Dest x
2. Implement the following Boolean equations in a Structured Text program. If the program was for a state
machine what changes would be required to make it work?