How to subtract 2 positional data and store it to a variable

  • I am trying to subtract positional between 2 position P3 = P2-P1 showing error " A value of type 'E6POS' is not permissible in an expression"


    My code


    ; P2 and P1 consists cartesian position declared inside config.dat file. P3 value is arbitrary inside config.dat (supposed to update when expression p3=p2-p1 is executed)

    ;DECL E6POS P1={X 57.0000,Y 1162.00,Z -104.000,A 0.0,B 0.0,C 0.0,S 22,T 51,E1 -6193.00,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}

    ;DECL E6POS P2={X 1481.00,Y 1162.00,Z -104.000,A 0.0,B 0.0,C 0.0,S 22,T 51,E1 -6193.00,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}

    ;DECL E6POS P3={X 1143.65,Y 506.350,Z 142.000,A 90.6036148,B 89.6457748,C -0.198897943,S 22,T 50,E1 -7856.34961,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}



    Part of my code:


    P3 =P2-P1




    Thank you in advance

  • Place your Ad here!
  • kwakisaki

    Approved the thread.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners