I am trying to read the jointvalues of motionstatements in python, but i am expiriencing some issues. In the image you can see P1 is where the robot currently is. P2 is also visible. The program i’ve made prints the JointValues to the outputwindow.
As you can see both statements have the same values. It looks like it gives the minimum soft value for axis 1. Am i doing something wrong or is this a bug in visual components?
I am using visual components 4.0.4.
def testJointValues(): robotComponent = app.TeachContext.ActiveRobot vcExecutors = robotComponent.findBehavioursByType(VC_ROBOTEXECUTOR) # vind alle VC_ROBOTEXECUTOR behaviours robot = vcExecutors scope = robot.Program.MainRoutine.Statements for i in scope: if i.Type == VC_STATEMENT_PTPMOTION: print i.Positions.Name, i.Positions.JointValues