Hi,
I am using the PC SDK (5.10) to get external values into a .Net application (Visual Studio 2005). I use the following code:
JointTarget jnt = controller.MotionSystem.ActiveMechanicalUnit.GetPosition();
textBox1.Text = jnt.ExtAx.Eax_a.ToString();
textBox2.Text = jnt.ExtAx.Eax_b.ToString();
textBox3.Text = jnt.ExtAx.Eax_c.ToString();
All ExtAx values are 0, even though actual external axis positions are not 0.
If I use the following code:
textBox3.Text = exJnt.RobAx.Rax_1.ToString();
textBox4.Text = exJnt.RobAx.Rax_2.ToString();
textBox5.Text = exJnt.RobAx.Rax_3.ToString();
then the correct values of the external axis positions are returned. Printing the object exJnt to screen gives:
[eax_a, eax_b, eax_c, eax_d, 0 0] [0 0 0 0 0 0]
Does this mean that I cannot get access to RobAx values?
Why are the Rax values returning Eax values??
I thought that it may have something to do with the ActiveMechanicalUnit property but there is no GetPosition() method associated with MechanicalUnit, as stated in the PC SDK Reference. The PC SDK Reference also states that GetPosition does not support external axes but another thread on this forum says it is supported ( http://forums.robotstudio.com/forum_posts.asp?T ID=1812&KW=external+axis)
Any help appreciated,
Regards,
Neil