RobotStudio event

Why doesn't output turn on?

Hi
I have a problem with "EIP_Out_7" in my code not turning on. Could you please give me a clue why. I know at the end of each routine it turns "EIP_Out_7" off with the "TriggL" command. But in the beginning of the next routine executed it should be turning "EIP_Out_7 on. The only thing that I can figure out is that the "TriggL" turns it off after it executes the "SetDO" command in the beginning of the next routine. Let me know if my assumption is correct. See code attached.

Tagged:

Comments

  • Hello
    Not sure what is going wrong but seeing your code I can tell you that you should avoid connecting traps in motion routines that may run multiple times. You should only define, delete and connect the interrupt one at the beginning of execution. Since the program pointer in RAPID moves ahead of the motion pointer, you could get problems where an interrupt is re-connected before the TriggL instruction ran etc. See below example of good practice when using interrupts.

    VAR intnum sig1int;

    PROC main()
    !This will only run once
    IDelete sig1int;
    CONNECT sig1int WITH iroutine1;
    ISignalDO do1,1,sig1int;

    WHILE TRUE DO
    !your program with Triggs 

    /Pavel

  • But would this be affecting "EIP_In_07"? How do you recommend using different Trap routines depending where you are in the program? Would there be a way to stop the PP right after it has gone past the last TriggL command and let it continue once the robot has reached that last position?