MAX NUMBER OF TRIGGER WHEN DISTANCE

  • IS there a limit to the number of TRIGGER WHEN DISTANCE? I remember 4... but what if instead I use a TRIGGER calling a subprogram with multiple SET/RESET...


    Example:


    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO O117_EN_Eject_BWD=TRUE

    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO O116_EN_Eject_FWD=TRUE

    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO O119_TableAreaFree=TRUE

    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO O120_EN_RotTav=TRUE

    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO O106_RobotFI_TEST=TRUE

    PTP HOME Vel= 100 % DEFAULT


    or:


    TRIGGER WHEN DISTANCE = 1 DELAY = 0 DO MyCall() PRIO=-1

    PTP HOME Vel= 100 % DEFAULT


    ...


    DEF MyCall()

    O117_EN_Eject_BWD=TRUE

    O116_EN_Eject_FWD=TRUE

    O119_TableAreaFree=TRUE

    O120_EN_RotTav=TRUE

    O106_RobotFI_TEST=TRUE

    END

  • Depends on the KSS version, I think. I want to say 7, but it's in the programming manual. TRIGGERs use the same system resources as Interrupts, so each active TRIGGER reduces the number of Interrupts you can have active, and vice versa.


    So, yes, using a single Trigger calling a subroutine that handles all your I/O is a good idea. Even if you're not in danger of hitting the Trigger/Interrupt limit, it still makes for cleaner code.

  • Hi!


    Did you try it already?


    I have a similar problem, I use 4 trigger when distance=1 before a PTP motion then after it an other trigger when distance=0.

    The second trigger when distance=0 that is alone doesnt work.


    I am thinking to use subprogram or handle bool as signal like an integer an give a value for it.

  • controller has finite resources so of course there is a limit.

    i have not tested it but it should be max 16 interrupts that are active at any time. out of those 16, max 8 can be TRIGGERs (They are form of an interrupt and use same resource).


    in most case some interrupts are already in use like interrupt 3 in case of a fault

    but various tech options use interrupts too (brake test, arc welding, spot welding, EthernetKRL etc.).

    the exact usage varies from one system to another.

    and since resources are limited, using individual TRIGGERs in same place is wasteful. better option is use just one and call subprogram.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Advertising from our partners