Cancel
Showing results for 
Search instead for 
Did you mean: 

Get Hard limit data for Joints

Creator
Creator

Hello Experts,

 

 

I am working on eMS 14.0.

TxJoint. HardLimitsData is deprecated in eMS14.0 and replaced by  TxJoint.HardLimits but I am unable to get all inforamtion which was available with TxJoint. HardLimitsData (e.g. Limits on variableHardLimits)

 

Kindly share your inputs on the same.

 

Thanks in advance.

 

Thanks,

Ravi

8 REPLIES

Re: Get Hard limit data for Joints

Siemens Genius Siemens Genius
Siemens Genius

hi,

 

try TxJoint.HardLimits

 

regards,

Moshe

Re: Get Hard limit data for Joints

Creator
Creator

Hello,

 

I used TxJoint.HardLimits. Its showing three types of HardLimits as None,Constant and Variable hard Limits.

 

If its VariableHardLimits, I am unable to get details of it.

 

Thanks,

Ravi

Re: Get Hard limit data for Joints

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Ravi,

 

HardLimits property gets or sets the hard limits of the joint.

The hard limits may be of following alternative types:

1) TxJointNoneHardLimits

2) TxJointConstantHardLimits

3) TxJointVariableHardLimits

 

To get the hard limits type of a joint, use that code:

            ITxJointHardLimits hardLimits = joint.HardLimits;
            if(hardLimits is TxJointVariableHardLimits)
            {
                TxJointVariableHardLimits varHardLimits = hardLimits as TxJointVariableHardLimits;
            }
            else if(hardLimits is TxJointNoneHardLimits)
            {
                TxJointNoneHardLimits noneHardLimits = hardLimits as TxJointNoneHardLimits;
            }
            else if (hardLimits is TxJointConstantHardLimits)
            {
                TxJointConstantHardLimits constHardLimits = hardLimits as TxJointConstantHardLimits;
            }

The device need to be open for modeling - ITxComponent.SetModelingScope().

 

TxJointVariableHardLimits has property JointValuePairs that returns a list of leading and dependant joint values, the same as in Kinematics Editor.

 

Best Regards,

DianaG

Re: Get Hard limit data for Joints

Creator
Creator

Hello Diana,

 

Thanks alot for your information. I tried this and its working fine. But I am trying to get TxVariableLimitsData for Variable hard limits.

 

In eMS 13, there was method Limits and it was giving TxVariableLimitsData. In eMS 14, I am unable to get it.

 

Thanks,

Ravi

Re: Get Hard limit data for Joints

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Ravi,

 

TxJointVariableHardLimits class has a property JointValuePairs, that returns a list of TxJointVariableHardLimitsPairData. It replaces the Limits property of TxJointVariableLimitsData.

void ReadVariableHardLimits(TxJoint joint)
        {
            ITxJointHardLimits hardLimits = joint.HardLimits;
            if(hardLimits is TxJointVariableHardLimits)
            {
                TxJointVariableHardLimits variableHardLimits = hardLimits as TxJointVariableHardLimits;
                List<TxJointVariableHardLimitsPairData> pairs = variableHardLimits.JointValuePairs;
                foreach(TxJointVariableHardLimitsPairData hardLimitsData in pairs)
                {
                    //These are the value pairs defined in the Joint Properties dialog in the Kinematics Editor
                    double dependantJointValue = hardLimitsData.DependentJointValue;
                    double leadingJointvalue = hardLimitsData.LeadingJointValue;

                    //Your code here
                }
            }
        }

See Craeting Joints, point 8. in Process Simulate documentation. These pairs of values define a graph.

 

 

Best Regards,

DianaG

Re: Get Hard limit data for Joints

Creator
Creator

Hello Diana,

 

Thank you again for your quick reply.

 

in eMS 13, on TxJointVariableLimitsData, there were three methods as  DependOnJointValue, JointUpperLimitValue and JointLowerLimitValue.

 

in eMS 14, on TxJointVariableHardLimitsPairData, there are only two methods as LeadingJointValue and DependentJointValue.

 

Shall I map methods as below?

 

eMS 13                                   eMS 14

DependOnJointValue          DependentJointValue

JointUpperLimitValue          LeadingJointValue 

JointLowerLimitValue          DependentJointValue

 

Thanks,

Ravi

Re: Get Hard limit data for Joints

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Ravi,

 

The two definitions cannot be mapped.

Although it is marked as obsolete, you can continue to use the HardLimitsData.

 

Best Regards,

DianaG

 

Re: Get Hard limit data for Joints

Creator
Creator

Hello Diana,

 

I will use HardLimitsData for my calculations.

 

Thanks a lot for your inputs and help.

 

Thanks,

Ravi