Navigation:  Programming > Ladder > Concepts >

Contact Logic

Previous pageReturn to chapter overviewNext page

AND LOGIC – Contact in Series

 

Figure 1: Contacts in Series

Figure 1: Contacts in Series

 

The figure above performs an AND Logic between the two last elements charged on the STACK, lowers a level of the STACK, and places the result on top of the STACK. That means that the following Boolean operation is performed: top of the STACK = BIT1.BIT2.

 

In IL (Instruction List) language it becomes like this:

LD        BIT1        (* loads the value of variable BIT1 to the STACK *)

LD        BIT2        (* loads the value of variable BIT2 to the STACK *)

AND                (* Performs AND Logic between BIT1 and BIT2 through the STACK *)

 

 

Truth Table

 

BIT1

BIT2

STACK

0

0

0

0

1

0

1

0

0

1

1

1

 

 

OR LOGIC – Contact in Parallel

 

Figure 2: Contacts in Parallel

Figure 2: Contacts in Parallel

 

The figure above performs an OR Logic between the two last elements charged on the STACK, lowers a level of the STACK, and places the result on top of the STACK. That means that the following Boolean operation is performed: top of the STACK = BIT1 + BIT2.

 

In IL (Instruction List) language it becomes like this:

LD        BIT1        (* loads the value of variable BIT1 to the STACK *)

LD        BIT2        (* loads the value of variable BIT2 to the STACK *)

OR                (* Performs OR logic between BIT1 and BIT2 through the STACK *)

 

 

Truth Table

 

BIT1

BIT2

STACK

0

0

0

0

1

1

1

0

1

1

1

1