Ladder Lib Data Set
Ladder Lib Data Set
Bi-directional Counter
Flashing Light Control (Alternating Blinker)
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "LATCH")
ladder.add_rung(2)
branch_components1 = [
[NOContact(0, 0, "LATCH")], [NOContact(0, 0, "START")]
]
ladder.add_branch(2, 0, branch_components1)
ladder.add_output(2, "MOTOR")
ladder.add_rung(3)
ladder.add_no_contact(3, "STOP")
ladder.add_output(3, "RESET")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_nc_contact(1, "OVERLOAD")
ladder.add_output(1, "LATCH")
ladder.add_rung(2)
branch_components1 = [
[NOContact(0, 0, "LATCH")], [NOContact(0, 0, "START")]
]
ladder.add_branch(2, 0, branch_components1)
ladder.add_output(2, "MOTOR")
ladder.add_rung(3)
ladder.add_no_contact(3, "STOP")
ladder.add_output(3, "RESET")
ladder.add_rung(4)
ladder.add_no_contact(4, "MOTOR")
ladder.add_nc_contact(4, "OVERLOAD")
ladder.add_output(4, "ALARM")
ladder.add_rung(1)
ladder.add_no_contact(1, "INPUT1")
ladder.add_no_contact(1, "INPUT2")
ladder.add_output(1, "OUTPUT")
ladder.add_rung(1)
branch_components1 = [
[NOContact(0, 0, "INPUT1")],
[NOContact(0, 0, "INPUT2")]
]
ladder.add_branch(1, 0, branch_components1)
ladder.add_output(1, "OUTPUT")
ladder.add_rung(1)
branch_components1 = [
[NOContact(0, 0, "INPUT1"), NCContact(0, 0, "INPUT2")],
[NCContact(0, 0, "INPUT1"), NOContact(0, 0, "INPUT2")]
]
ladder.add_branch(1, 0, branch_components1)
ladder.add_output(1, "OUTPUT")
ladder.add_rung(1)
ladder.add_nc_contact(1, "INPUT")
ladder.add_output(1, "OUTPUT")
ladder.add_rung(1)
ladder.add_no_contact(1, "TOGGLE")
ladder.add_output(1, "LATCH")
ladder.add_rung(2)
ladder.add_no_contact(2, "LATCH")
ladder.add_nc_contact(2, "TOGGLE")
ladder.add_output(2, "RESET")
ladder.add_rung(1)
ladder.add_nc_contact(1, "ESTOP")
ladder.add_no_contact(1, "START")
ladder.add_output(1, "MOTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "MOTOR")
ladder.add_nc_contact(2, "ESTOP")
ladder.add_output(2, "HOLD")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_ton(1, "T1", "5000", "0")
ladder.add_output(1, "MOTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "MOTOR")
ladder.add_nc_contact(2, "STOP")
ladder.add_output(2, "HOLD")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_output(1, "MOTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "MOTOR")
ladder.add_tof(2, "T1", "5000", "0")
ladder.add_output(2, "STOPPED")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_rto(1, "T1", "5000", "0")
ladder.add_output(1, "MOTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "MOTOR")
ladder.add_nc_contact(2, "RESET")
ladder.add_output(2, "HOLD")
adder.add_rung(1)
ladder.add_no_contact(1, "PULSE")
ladder.add_ctu(1, "C1", "10", "0")
ladder.add_output(1, "COUNT_REACHED")
ladder.add_rung(2)
ladder.add_no_contact(2, "RESET")
ladder.add_nc_contact(2, "C1")
ladder.add_output(2, "RESET_COUNT"
ladder.add_rung(1)
ladder.add_no_contact(1, "PULSE")
ladder.add_ctd(1, "C1", "10", "0")
ladder.add_output(1, "COUNT_REACHED")
ladder.add_rung(2)
ladder.add_no_contact(2, "RESET")
ladder.add_nc_contact(2, "C1")
ladder.add_output(2, "RESET_COUNT")
ladder.add_rung(1)
ladder.add_no_contact(1, "UP_PULSE")
ladder.add_ctu(1, "C1", "10", "0")
ladder.add_output(1, "COUNT_UP_REACHED")
ladder.add_rung(2)
ladder.add_no_contact(2, "DOWN_PULSE")
ladder.add_ctd(2, "C1", "0", "10")
ladder.add_output(2, "COUNT_DOWN_REACHED")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_ton(1, "T1", "1000", "0")
ladder.add_output(1, "LIGHT_1")
ladder.add_rung(2)
ladder.add_nc_contact(2, "T1")
ladder.add_output(2, "LIGHT_2")
ladder.add_rung(3)
ladder.add_no_contact(3, "STOP")
ladder.add_nc_contact(3, "T1")
ladder.add_output(3, "RESET_TIMER")
ladder.add_rung(1)
ladder.add_no_contact(1, "FORWARD_BUTTON")
ladder.add_nc_contact(1, "REVERSE_CONTACTOR")
ladder.add_output(1, "FORWARD_CONTACTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "REVERSE_BUTTON")
ladder.add_nc_contact(2, "FORWARD_CONTACTOR")
ladder.add_output(2, "REVERSE_CONTACTOR")
ladder.add_rung(3)
ladder.add_no_contact(3, "STOP_BUTTON")
ladder.add_nc_contact(3, "FORWARD_CONTACTOR")
ladder.add_nc_contact(3, "REVERSE_CONTACTOR")
ladder.add_output(3, "STOP_MOTOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "LOW_SPEED_CONTACTOR")
ladder.add_rung(2)
ladder.add_no_contact(2, "HIGH_SPEED_BUTTON")
ladder.add_nc_contact(2, "LOW_SPEED_CONTACTOR")
ladder.add_output(2, "HIGH_SPEED_CONTACTOR")
ladder.add_rung(3)
ladder.add_no_contact(3, "STOP")
ladder.add_nc_contact(3, "HIGH_SPEED_CONTACTOR")
ladder.add_nc_contact(3, "LOW_SPEED_CONTACTOR")
ladder.add_output(3, "STOP_MOTOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "MOTOR_1")
ladder.add_ton(1, "T1", "2000", "0")
ladder.add_rung(2)
ladder.add_no_contact(2, "T1")
ladder.add_output(2, "MOTOR_2")
ladder.add_ton(2, "T2", "2000", "0")
ladder.add_rung(3)
ladder.add_no_contact(3, "T2")
ladder.add_output(3, "MOTOR_3")
ladder.add_rung(4)
ladder.add_no_contact(4, "STOP")
ladder.add_nc_contact(4, "MOTOR_1")
ladder.add_nc_contact(4, "MOTOR_2")
ladder.add_nc_contact(4, "MOTOR_3")
ladder.add_output(4, "STOP_MOTORS")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "CONVEYOR")
ladder.add_rung(2)
branch_components = [
[NOContact(0, 0, "CONVEYOR")], [NOContact(0, 0, "START")]
]
ladder.add_branch(2, 0, branch_components)
ladder.add_output(2, "CONVEYOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_no_contact(1, "LOAD_SENSOR") # Load sensor must be active
ladder.add_output(1, "CONVEYOR")
# Latching circuit
ladder.add_rung(2)
branch_components = [
[NOContact(0, 0, "CONVEYOR")], [NOContact(0, 0, "START")]
]
ladder.add_branch(2, 0, branch_components)
ladder.add_output(2, "CONVEYOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "JOG_BUTTON")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "MOTOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "STAR_CONTACTOR")
ladder.add_ton(1, "T1", "5000", "0") # 5 seconds delay
ladder.add_rung(2)
ladder.add_no_contact(2, "T1")
ladder.add_nc_contact(2, "STAR_CONTACTOR")
ladder.add_output(2, "DELTA_CONTACTOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "SOFT_START")
ladder.add_rung(2)
ladder.add_no_contact(2, "SOFT_START")
ladder.add_ton(2, "T1", "3000", "0") # 3 sec ramp-up time
ladder.add_output(2, "MOTOR")
ladder.add_rung(1)
ladder.add_no_contact(1, "RUN_SIGNAL")
ladder.add_output(1, "VFD_START")
ladder.add_rung(2)
ladder.add_no_contact(2, "STOP_SIGNAL")
ladder.add_output(2, "VFD_STOP")
ladder.add_rung(1)
ladder.add_no_contact(1, "LOW_LEVEL")
ladder.add_nc_contact(1, "HIGH_LEVEL")
ladder.add_output(1, "PUMP_ON")
ladder.add_rung(1)
ladder.add_no_contact(1, "LOW_LEVEL")
ladder.add_nc_contact(1, "PUMP2")
ladder.add_output(1, "PUMP1")
ladder.add_rung(2)
ladder.add_no_contact(2, "LOW_LEVEL")
ladder.add_nc_contact(2, "PUMP1")
ladder.add_output(2, "PUMP2")
ladder.add_rung(1)
ladder.add_no_contact(1, "NORMAL_VOLTAGE")
ladder.add_nc_contact(1, "OVERVOLTAGE")
ladder.add_nc_contact(1, "UNDERVOLTAGE")
ladder.add_output(1, "MOTOR_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "OVERVOLTAGE")
ladder.add_output(2, "TRIP_ALARM")
ladder.add_rung(3)
ladder.add_no_contact(3, "UNDERVOLTAGE")
ladder.add_output(3, "TRIP_ALARM")
ladder.add_rung(1)
ladder.add_no_contact(1, "EMERGENCY_BUTTON")
ladder.add_output(1, "SIREN")
ladder.add_output(1, "FLASHER")
ladder.add_rung(1)
ladder.add_no_contact(1, "TEMP_SENSOR_HIGH")
ladder.add_output(1, "FAN_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "TEMP_SENSOR_CRITICAL")
ladder.add_output(2, "MOTOR_TRIP")
ladder.add_output(2, "ALARM")
ladder.add_rung(1)
ladder.add_nc_contact(1, "INTERLOCK_SENSOR")
ladder.add_output(1, "MACHINE_START")
ladder.add_rung(2)
ladder.add_no_contact(2, "INTERLOCK_FAULT")
ladder.add_output(2, "MACHINE_STOP")
ladder.add_rung(1)
ladder.add_no_contact(1, "PHASE_A")
ladder.add_no_contact(1, "PHASE_B")
ladder.add_no_contact(1, "PHASE_C")
ladder.add_output(1, "MOTOR_ON")
ladder.add_rung(2)
ladder.add_nc_contact(2, "PHASE_FAIL")
ladder.add_output(2, "TRIP_ALARM")
ladder.add_rung(1)
ladder.add_no_contact(1, "LOW_LEVEL")
ladder.add_nc_contact(1, "HIGH_LEVEL")
ladder.add_output(1, "PUMP_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "HIGH_LEVEL")
ladder.add_output(2, "PUMP_OFF")
ladder.add_rung(1)
ladder.add_no_contact(1, "SMOKE_SENSOR")
ladder.add_output(1, "ALARM")
ladder.add_rung(2)
ladder.add_no_contact(2, "HEAT_SENSOR")
ladder.add_output(2, "SPRINKLER_ON")
ladder.add_rung(1)
ladder.add_no_contact(1, "GAS_SENSOR")
ladder.add_output(1, "ALARM")
ladder.add_output(1, "EXHAUST_FAN")
ladder.add_rung(1)
ladder.add_no_contact(1, "ACCESS_GRANTED")
ladder.add_output(1, "DOOR_UNLOCK")
ladder.add_rung(2)
ladder.add_no_contact(2, "ACCESS_DENIED")
ladder.add_output(2, "DOOR_LOCK")
ladder.add_rung(1)
ladder.add_no_contact(1, "FAULT_SIGNAL")
ladder.add_output(1, "RESET_TIMER")
ladder.add_rung(2)
ladder.add_no_contact(2, "RESET_TIMER_DONE")
ladder.add_output(2, "FAULT_RESET")
ladder.add_rung(1)
ladder.add_no_contact(1, "TEMP_SENSOR")
ladder.add_pid(1, "PID_CONTROLLER", "TEMP_SETPOINT")
ladder.add_output(1, "HEATER")
ladder.add_output(1, "COOLER")
ladder.add_rung(1)
ladder.add_no_contact(1, "PRESSURE_LOW")
ladder.add_output(1, "PUMP_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "PRESSURE_HIGH")
ladder.add_output(2, "PUMP_OFF")
ladder.add_rung(1)
ladder.add_no_contact(1, "LOW_LEVEL")
ladder.add_nc_contact(1, "HIGH_LEVEL")
ladder.add_output(1, "PUMP_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "HIGH_LEVEL")
ladder.add_output(2, "PUMP_OFF")
ladder.add_rung(1)
ladder.add_no_contact(1, "START")
ladder.add_nc_contact(1, "STOP")
ladder.add_output(1, "CONVEYOR_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "BOTTLE_DETECTED")
ladder.add_output(2, "VALVE_OPEN")
ladder.add_rung(3)
ladder.add_no_contact(3, "FILL_LEVEL_REACHED")
ladder.add_output(3, "VALVE_CLOSE")
ladder.add_rung(1)
ladder.add_no_contact(1, "START_CYCLE")
ladder.add_output(1, "MIXER_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "MIXING_DONE")
ladder.add_output(2, "DISCHARGE_VALVE_OPEN")
ladder.add_rung(3)
ladder.add_no_contact(3, "DISCHARGE_COMPLETE")
ladder.add_output(3, "RESET")
ladder.add_rung(1)
ladder.add_no_contact(1, "TIMER_GREEN")
ladder.add_output(1, "GREEN_LIGHT")
ladder.add_rung(2)
ladder.add_no_contact(2, "TIMER_YELLOW")
ladder.add_output(2, "YELLOW_LIGHT")
ladder.add_rung(3)
ladder.add_no_contact(3, "TIMER_RED")
ladder.add_output(3, "RED_LIGHT")
ladder = LadderDiagram()
ladder.add_rung(1)
ladder.add_no_contact(1, "CALL_BUTTON_FLOOR_1")
ladder.add_output(1, "MOVE_TO_FLOOR_1")
ladder.add_rung(2)
ladder.add_no_contact(2, "CALL_BUTTON_FLOOR_2")
ladder.add_output(2, "MOVE_TO_FLOOR_2")
ladder.display()
ladder.add_rung(1)
ladder.add_no_contact(1, "DARK_SENSOR")
ladder.add_output(1, "STREET_LIGHTS_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "DAYLIGHT_SENSOR")
ladder.add_output(2, "STREET_LIGHTS_OFF")
ladder.add_rung(1)
ladder.add_no_contact(1, "PACKAGE_DETECTED")
ladder.add_output(1, "CONVEYOR_START")
ladder.add_rung(2)
ladder.add_no_contact(2, "BARCODE_SCANNED_A")
ladder.add_output(2, "SORT_TO_A")
ladder.add_rung(3)
ladder.add_no_contact(3, "BARCODE_SCANNED_B")
ladder.add_output(3, "SORT_TO_B")
ladder.add_rung(1)
ladder.add_no_contact(1, "SOIL_DRY")
ladder.add_output(1, "WATER_PUMP_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "SOIL_WET")
ladder.add_output(2, "WATER_PUMP_OFF")
ladder.add_rung(1)
ladder.add_no_contact(1, "MOTION_SENSOR")
ladder.add_output(1, "LIGHTS_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "NO_MOTION")
ladder.add_output(2, "LIGHTS_OFF")
ladder = LadderDiagram()
ladder.add_rung(1)
ladder.add_no_contact(1, "START_BUTTON")
ladder.add_output(1, "CONVEYOR_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "BARCODE_SCANNED")
ladder.add_output(2, "SORT_PACKAGE")
ladder.add_rung(1)
ladder.add_no_contact(1, "PRODUCT_DETECTED")
ladder.add_output(1, "SEALER_ON")
ladder.add_rung(2)
ladder.add_no_contact(2, "SEAL_COMPLETE")
ladder.add_output(2, "PACKAGE_RELEASE")
ladder.add_rung(1)
ladder.add_no_contact(1, "OBJECT_DETECTED")
ladder.add_output(1, "ARM_PICK")
ladder.add_rung(2)
ladder.add_no_contact(2, "ARM_PICKED")
ladder.add_output(2, "ARM_MOVE")
ladder.add_rung(3)
ladder.add_no_contact(3, "DESTINATION_REACHED")
ladder.add_output(3, "ARM_RELEASE")