1.4 DESIGN CASES

 

1.4.1 If-Then

 

• If-then can be implemented different ways, as a simple jump, or as a subroutine call.

 

 

 

1.4.2 For-Next

 

• For-next can be implemented as shown below, but recall that PLC programs do not execute one line at a time.

 

 

• A For/Next function is also available in the PLC.

 

• A do-while can be done as a simple variation of this.

 

 

1.4.3 Conveyor

 

• Consider a conveyor where parts enter on one end. they will be checked to be in a left or right orientation with a vision system. If neither left nor right is found, he part will be placed in a reject bin. The conveyor layout is shown below.