Posts by Alexandru

    You need to create a background program in which you will check about the air pressure signal. To display on the interface panel you need IFPWPRINT function. You have to create on the interface panel a strings window.


    For example:

    .PROGRAM autostart.pc ()

    ;initialisations

    IFPWPRINT 1,1,1,6,1=""

    $msg1 = "Message 1:"

    ;main loop

    loop:

    IF SIG(-1006) THEN

    .$msg1 = "No air pressure."

    ELSE

    .$msg1 = ""

    END

    IFPWPRINT 1,1,1,6,1=$msg1+.$msg1

    TWAIT 0.1

    GOTO loop

    .END


    The message will disappear when the signal is ON again, no need to have a reset button.

    Try to have your subroutine with local variables. For example:


    .PROGRAM position (.&a, .&home1)


    PO .position= .a

    SPEED 10 ALWAYS

    ACCURACY 1 ALWAYS FINE

    JMOVE .home1

    LMOVE .position


    .END


    .PROGRAM main ()

    CALL position (&positionA, &home1)

    .END


    if home1 is the HOME position, it already contains the JMOVE motion, you just need to write HOME.

    I wouldnt use the HOME position in the program, only to indicate the start position after initialization.

    You can use the BITS function:


    number = BITS(starting_input_number, number of bits)


    For example:


    i.number = 1129

    number_bits = 8


    number = BITS (i.number, number_bits) it will read from 1129 to 1136 (8 signals)

    Yes, it is...


    Lets suppose that the fieldbus signals in the robot are starting from I1065 (for inputs) and O65 (for outputs). If the R18464 is the first register address for outputs and R16384 is the first register address for inputs, therefore:


    R184641 Machine ready (Output) = I1066

    R184853 Machining Complete (Output) = I can not see in the picture where it is? :D


    R163842 Machine Stop request. (Input) = O67

    R164051 Cycle Start Command. (Input) = I can not see in the picture

    I can not view the picture, please sent another one with a higher resolution.

    What is the first input and output signal address from Mazak?

    I can give you another example:


    Lets suppose that the fieldbus connection is working between PLC and Robot.


    I am using the fieldbus option to communicate with the PLC. PLC is the master and robot is slave like in your case. The input/output addresses from the PLC are between 400 - 432 . The fieldbus signals in the robot are starting from I1065 (for inputs) and O65 (for outputs). Therefore, if the output 400.0 from the PLC is on, then I1065 is on.

    Yes


    When robot not in teach & Motor power is on => it automatically call to Main program.

    Yes, but it calls the main program all time because your background program is looping.


    Instead is thr any way to hide all program ?


    Im using protect data using command Uprotect => But if i change to level 3 again i can assess all program.

    The operator should not have access to level 3. But if the operator will select the wrong program, then the watchdog program will HALT the robot.


    You can create a button with the homming part if you want.

    Instead of outputs you can use SWITCH functions, for example:


    SWITCH(POWER) = motor ON

    SWITCH(REPEAT) = robot in repeat mode

    SWITCH(CS) = Cycle start ON


    Are you sure that the robot can move with that autostart program? You are checking all the time if the Motors are ON and not in teach mode, i think that it will PRIME the pg0 all the time when the robot is in repeat mode.

    When are you doing the hold and change the program?


    If it is calling back the pg0 maybe you have a background program that is doing this.


    I would suggest to have something like this:


    .PROGRAM pg0()#0

    HOME

    WAIT SIG(2001)

    TWAIT 0.2

    pg.no = BITS(1002,4); pg selection from plc

    IF pg.no==1 THEN

    watchdog = 12345

    CALL pg1

    END

    IF pg.no==2 THEN

    watchdog = 12345

    CALL pg2

    END

    IF pg.no==5 THEN

    watchdog = 12345

    CALL pg5

    END

    .END

    Please provide some source code from your programs. You can send via conversation in private mode if You dont want to post here.


    You need to create only one watchdog program and call it every tine when You begin a new program.

    There are many options... now it depends how you did the starting procedure.


    1. You can hide all other programs and keep only the start program.


    For each program, at the beginning you can have a "watchdog" that is checking that the program was called by the robot or not. For example:


    .PROGRAM main ()

    .....

    .....

    watchdog = 12345

    ....

    ....

    ....

    CALL program1

    ....

    ....

    .END

    .PROGRAM program1 ()

    CALL check_watchdog

    ....

    ....

    .END

    .PROGRAM check_watchdog

    IF watchdog == 12345 THEN

    watchdog = 0

    RETURN

    END

    ; if the watchdog is not the value

    PRINT "error"

    HALT

    .END


    In this way if the operator will select the wrong program, the watchdog will not allow the robot to continue.


    If you have any automatic homming procedure, when the robot is in home position you can use the MC PRIME in order to prepare the start program automatically.


    Please describe how the starting procedure is done with your robot.