![]() |
![]() |
|
Add Instruction in Ladder Logic |
Sponsored by: KronoTour Travel
|
ADD - AddingWhen rung conditions are true, this output instruction adds Source A to Source B and stores the result at the destination address. Source A and Source B can either be values or addresses that contain values, however Source A and Source B cannot both be constants. Example 1N7:0 = N7:0 + 5 Ladder Logic SolutionSource A = N7:0 = 830 , Source B = 5 , Destination = N7:0 = 835
Example 2N7:3 = N7:1 + N7:2 Ladder Logic SolutionSource A = N7:1 = 32000 , Source B = N7:2 = 32000, Destination = -1536 (why). This is because the result of the addition could not fit in 16 bit register, and therefore we have the overflow bit on.
Clearing minor error that might be generated if we have an overflow. Note:
|
Sponsored by: KronoTour Travel
|
|||||||||||||||||||||||