how i can define and programe a trap routine

how i can define and programe a trap routine

Hi …
In the help you can find several more examples …

    VAR intnum int_move_stop;
...

    PROC test_move_stop()
        CONNECT int_move_stop WITH trap_move_stop;
        ISignalDI di1,1,int_move_stop;

        MoveJ p10,v200,z20,gripper;
        MoveL p20,v200,z20,gripper;
    ENDPROC

    TRAP trap_move_stop
        ISleep int_move_stop;
        ! CODE

        IWatch int_move_stop;
    ENDTRAP

Good Job