Conveyor tracking without hardware trigger

Options
Hi everyone,

I need to set up a conveyor tracking application in which I cannot directly wire a sensor to the switch input of CMT, as my trigger is actually a logic condition, and its expression may change at runtime.

Is there any way to provide a soft trigger switch via RAPID? I am aware that I will introduce time uncertainty but my conveyor moves slowly and I need no extreme positioning accuracy.

Or, even better, is there a way to issue a Rapid instruction which cause a WObj to be continuously offset in a defined direction based on encoder measured distance? This is actually they way this application was made in the past with Kawasaki robots.

Any smarter idea than wiring a general purpose digital output to the trigger input of CMT?

Many thanks,

Gabriel




Comments

  • lucavanin
    Options
    Hi gea_gfantechi
    Yes there is a signal to simulate the Trigger.

    You can type:
    PulseDO\High\PLength:=0.2,c1SoftSync;

    If you want to manage a sequential trigger and you need to measure the distance between a trigger and other, you can use this code i've developed. (You need Multitasking)

    EXAMPLE: Trig Foto and syncTrigger every 250mm

    CONST dnum k_Maxc1Counts:=4294967295; !Max counts of encoder, youi can find in config data
    CONST dnum k_CountsPerMeter:=48579; !Same of Process parameter
    CONST num k_PhotoRatio:=250; !Distance between a trig and next

    PERS num act_c1Counts_Vis; 
    PERS num memo_c1Counts_Vis;

    PROC TrigCmd()
            
       IF ((getDistance_Vis()>NumToDnum(k_PhotoRatio) AND c1NullSpeed=0 ) THEN
            ! Cmd Trigger to CTM
            PulseDO\High\PLength:=0.2,c1SoftSync;

        ENDIF

    ENDPROC

    FUNC dnum getDistance_Vis()
        VAR dnum l_n;
        act_c1Counts_Vis:=GInputDnum(c1Counts);

        memo_c1Counts_Vis:=GInputDnum(c1CntFromEnc);

        !Recalculate position if pass over 0 axis CNV1
        IF act_c1Counts_Vis<memo_c1Counts_Vis THEN
            memo_c1Counts_Vis:=(-1)*(k_Maxc1Counts-memo_c1Counts_Vis);
        ENDIF

        l_n:=((act_c1Counts_Vis-memo_c1Counts_Vis)*1000)/k_CountsPerMeter;

        RETURN l_n;
    ENDFUNC


    IF you want to store pulsencoder and take an ID of the trigger to use conveyor advanced tracking you can use GInputDnum(c1CntFromEnc).