Syntax problem

  • Hi


    I'm working on my first Kuka project and I'm struggling with and simple syntax problem.


    I want to compare 2 variables in an IF statement, for example 2 pos datas...


    IF postion1==position2 THEN
    ....
    ...
    ...
    ENDIF


    And controller keeps giving me errorcode 2242. And if I change the code to following...


    IF postion1.x==position2.x THEN
    ....
    ...
    ...
    ENDIF


    then the controller is happy.!?!?


    So do I really have to compare every element separately or I'm missing something hear?


    Thanks


    zicki

  • Okey....


    Here is an other example...
    If i got 2 char arrays of 80 characters each, I have to compare all characters individually?
    Well that's easy to solve whit an for loop but my real case is bigger than that.


    I need to work a loot whit char/strings so I have created and struct of 80 char characters that I named string.
    Then I have declared an 3 dimension string array. Works fine so far but the comparing part gives me headache.


    STRUC STRING CHAR str[80]
    DECL STRING sJobQueue[5,41,2]



    Thanks for the REAL hint. I'll keep it in my mind.


    zicki

Advertising from our partners