How to calculate modulo with KUKA

  • Hi there,


    There are some mathematical commands in other robot brands how to calculate modulo (5 DIV 2 = 1, 5%2=1 etc.). But I tryed to read all KUKA manuals cannot found anything related to that ???.


    So is there some or what is the easiest wau to do that with KUKA?

  • Hi,

    this code doesn't work for me, because the result here is always 0. I wrote this function, that seem to work correctly:


    DEFFCT REAL Modulo (M:IN,N:IN )


    DECL REAL DIVREAL, M, N


    DECL INT DIVINT


    DIVINT = M/N


    DIVREAL = M/N



    RETURN (DIVREAL-DIVINT)*N


    ENDFCT

Advertising from our partners