RobotStudio event

Read the position (angle) of an additional axis with the PC SDK.??

Hello!

I am abb korea partner engineer.

I want to read the position (angle) of an additional axis with the PC SDK.
I programmed it like this.
However, the 7th axis value is only read as 0.
I am not sure whether _extJoing.Eax_a reads the position value of an external additional axis.
Does _extJoing.Eax_a read the position value of an external additional axis?
Someone please answer.


===== C# Code ====

       
                      

        private void GetJointTargetPosition(out double[] pos, int size)
        {
            pos = new double[8];
            JointTarget jointTarget = new JointTarget();
            Char[] _jointTarDelimiters = { '[', ',', ',', ',', ',', ',', ']' };

            jointTarget = _controller.MotionSystem.ActiveMechanicalUnit.GetPosition();
                
            string[] wordsSplit = jointTarget.ToString().Split(_jointTarDelimiters);

            pos[0] = double.Parse(wordsSplit[2]); //Axis1
            pos[1] = double.Parse(wordsSplit[3]); //Axis2
            pos[2] = double.Parse(wordsSplit[4]); //Axis3
            pos[3] = double.Parse(wordsSplit[5]); //Axis4
            pos[4] = double.Parse(wordsSplit[6]); //Axis5
            pos[5] = double.Parse(wordsSplit[7]); //Axis6

            ExtJoint _extJoint = jointTarget.ExtAx;
            pos[6] = (double)_extJoint.Eax_a; //Additional Axis7   //<- Is this part correct for reading the external additional axis position?
            pos[7] = (double)_extJoint.Eax_b; //Additional Axis8

            ........
            ........
         }
  

Best Answer

Answers

  • Thank you very much! 
    Now there is no robot with additional axes, so it can not be tested.
    Sooner or later I will test the robot with additional axes and let me know the result.