Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

Question about ReadMotor

I am attempting to utilize the ReadMotor function to determine initial motion during my homing routine. However, the value I receive from the ReadMotor command doesn't seem to line up with the actual motor angle in degrees OR radians.

Attempting to read value of Axis1 on a single robot system with no external axes...
[code]MotorAngle_1 := ReadMotor(1);
MotorAngle_1 value is returning as -155.803, but the Axis 1 position is 90.0 degrees.

Can anyone tell me what I'm doing wrong

Comments

  • Hello
    Use CJointT instead as below.

        PERS jointtarget joints;    PERS num joint3;

        joints:=CJointT();    joint3:=joints.robax.rax_3;

    /Pavel
  • Hello
    Use CJointT instead as below.

        PERS jointtarget joints;
        PERS num joint3;

        joints:=CJointT();
        joint3:=joints.robax.rax_3;

    /Pavel
    I will try this out tomorrow. Thank you!
  • Pavel Riabichev, that worked perfectly! Thank you.