PLC SCL编程 在CASE OF里定时器问题

CASE "move_process" OF
    1:
        "N" := "N" + 1;
        IF "N" > 6 THEN
            "move_process" := 36;
        ELSIF "N" <= 6 AND "N" > 0 THEN
            "move_process" := 2;
        END_IF;
    2:
        IF "data_communication_with_other_device".call_full_basket THEN
            "move_process" := 3;
        END_IF;
    3://x_axis and y_axis to 1# position
        "motion_DB".x_axis_position := "goods_coordinate_parameters".coordinate_x["N"];
        "motion_DB".y_axis_position := "goods_coordinate_parameters".coordinate_y["N"];
        "IEC_Timer_4_DB".TON(IN:=TRUE,
                             PT:=t#100ms);
        IF "IEC_Timer_4_DB".Q THEN
            "IEC_Timer_4_DB".IN := FALSE;
            RESET_TIMER("IEC_Timer_4_DB");
            "move_process" := 4;
        END_IF;
    4:++++

在CASE OF,定时器启用后,会发生触发后后,会一直触发。只能使用RESET_TIMER才能关闭!!

你可能感兴趣的:(PLC,PLC,SCL)