Skip to main content

Example - Ladder Diagram

D=

The D= instruction compares a DWORD value, S1, to another DWORD value, S2, and executes if S1 is equal to S2.

LDD Execution Condition


When the result of the instruction execution of the expression D0 = D2 (2,134,456 = -756,894) is FALSE, the coil, Y0.3, is deenergized.



When the result of the instruction execution of the expression D0 = D2 (-756,894 = -756,894) is TRUE, the coil, Y0.3, is energized.

Memory Monitor

ANDD Execution Condition


When the result of the instruction execution of the expression D5 = D7 (-456,132 = 25,652) is FALSE, and the contact, M0.0 is ON (1), the coil, Y0.4, is deenergized.



When the result of the instruction execution of the expression D5 = D7 (25,652 = 25,652) is TRUE, and the contact, M0.0 is ON (1), the coil, Y0.4, is energized.

Memory Monitor

ORD Execution Condition


When the result of the instruction execution of the expression D10 = D12 (-4,858,655 = 26,557,894) is FALSE, or the contact, M0.0 is ON (1), the coil, Y0.5, is energized.



When the result of the instruction execution of the expression D10 = D12 (-26,557,894 = -26,557,894) is TRUE, and the contact, M0.1 is OFF (0), the coil, Y0.5, is energized.

Memory Monitor