MCIO 6

Solution Explorer -> MOTION -> add new item -> click NC/PTP configuration -> OK

Axes -> add new item -> continuous Axis -> OK

Axes -> Axis 1 -> settings -> LINK to I/O -> select channel -> OK

RUN in Human interface

Axes -> Axis 1 -> online -> Enable: set all -> F8 reset -> RUN(F1/F2/F3/F4)

Import library

Solution Explorer -> PLC-> project -> REFERENCEs -> add library -> MOTION -> PTP -> add Tc2-NC & Tc2-MC2

---------------------------------
PROGRAM MAIN
VAR
    btn_1 AT %I* : BOOL;
    btn_2 AT %I* : BOOL;

    Axis_B : AXIS_REF;

    McPower : MC_Power;
    McReset : MC_Reset;
    McJoggin : MC_Jog;

    iState : DINT;
END_VAR
---------------------------------

McPower(Axis:=Axis_B , Enable:=TRUE, Enable_Positive:=TRUE, Enable_Negative:=TRUE);
McReset(Axis:=Axis_B);
McJoggin(Axis:=Axis_B);

CASE iState OF
    0: // Initial

        iState := 10;

    10: // Start Drive Reset

        McReset(Axis:=Axis_B, Execute:=TRUE);
        IF McReset.Done THEN
            iState := 20;
        ELSIF McReset.Error THEN
            iState := 999;
        END_IF

    20: // Wait for Drive to Reset

        IF McPower.Status THEN
            iState := 30;
        END_IF

    30: // Wait for Drive command

        McJoggin(Axis:=Axis_B, JogForward:=btn_1);

    999: // Error handle

END_CASE
---------------------------------

series 7 @ 7:47

QUESTION:

  1. remove POUs

  2. restore motor controller when it is error.

  3. after McVelocity stop, it is still rotating.

Last updated

Was this helpful?