Cancel
Showing results for 
Search instead for 
Did you mean: 

[.NET C#] Update Path Editor Column

Legend
Legend

Hello!

I have a little problem with programmatically updating the Path Editor.

 

I created a weld operation with several locations and all with PTP-Interpolation (VKRC!) - see first picture.

InitialMotionParameters.png

 

Then I programmatically change the motion parameters of all linear and circular locations to LIN and CIRC.

First I remove all motion parameters and then set it to their new values.

Now the problem is that the columns Interp and Ve don't show the correct values - second picture 

 AfterProgrammaticallyChangeOfMotionParameters.png

 

After manually change the Interp column to the right values, the right values in the Ve column will also appear. - third picture

AfterManualChangeOfInterpColumn.png

 

So, my question is now how can I programmatically set the Interp-column to the right values?

 

Thank you!

8 REPLIES

Re: [.NET C'] Update Path Editor Column

Siemens Phenom Siemens Phenom
Siemens Phenom

How do you currently programmatically change the motion parameters of all linear and circular locations to LIN and CIRC ?

Re: [.NET C#] Update Path Editor Column

Legend
Legend

Hello,

 

for PTP-Motion I set the the following Parameters:

    RRS_MOTION_TYPE 1
    RRS_JOINT_SPEED 100.000000
    RRS_ZONE_NAME C_PTP
    RRS_FLYBY_PARAMETER1 0.000000
     RRS_JOINT_ACCELERATION 100.000000

 

for LIN:

    RRS_MOTION_TYPE 2
    RRS_CARTESIAN_POSITION_SPEED 999.000000
    RRS_ZONE_NAME C_VEL
    RRS_CARTESIAN_POSITION_ACCELERATION 100.000000
    RRS_FLYBY_PARAMETER4 0.000000

 

for CIRC:

    RRS_MOTION_TYPE 4
    RRS_CARTESIAN_POSITION_SPEED 666.000000
    RRS_ZONE_NAME C_VEL
    RRS_FLYBY_PARAMETER4 30.000000
    RRS_CARTESIAN_POSITION_ACCELERATION 100.000000

 

for KLIN:

    RRS_MOTION_TYPE 2
    RRS_CARTESIAN_POSITION_SPEED 222.000000
    RRS_ZONE_NAME C_DIS
    VKRC1_MOVE_TYPE 4
    RRS_FLYBY_PARAMETER2 100.000000
    RRS_CARTESIAN_POSITION_ACCELERATION 100.000000

 

for KCIRC:

    RRS_MOTION_TYPE 4
    RRS_CARTESIAN_POSITION_SPEED 333.000000
    RRS_ZONE_NAME C_DIS
    VKRC1_MOVE_TYPE 5
    RRS_FLYBY_PARAMETER2 0.000000
    RRS_CARTESIAN_POSITION_ACCELERATION 100.000000

 

Before setting up new values, the old values are deleted:

        private void RemoveMotionParameters(ITxRoboticLocationOperation roboticLocationOperation)
        {
            roboticLocationOperation.RemoveParameter("RRS_MOTION_TYPE");
            roboticLocationOperation.RemoveParameter("VKRC_MOVE_TYPE");

            roboticLocationOperation.RemoveParameter("RRS_JOINT_SPEED");
            roboticLocationOperation.RemoveParameter("RRS_CARTESIAN_POSITION_SPEED");

            roboticLocationOperation.RemoveParameter("RRS_JOINT_ACCELERATION");
            roboticLocationOperation.RemoveParameter("RRS_CARTESIAN_POSITION_ACCELERATION");

            roboticLocationOperation.RemoveParameter("RRS_FLYBY_PARAMETER1");
            roboticLocationOperation.RemoveParameter("RRS_FLYBY_PARAMETER2");
            roboticLocationOperation.RemoveParameter("RRS_FLYBY_PARAMETER4");

            roboticLocationOperation.RemoveParameter("RRS_ZONE_NAME");

            roboticLocationOperation.RemoveParameter("VKRC1_SPSTRIG");
        }

 

The new values are set up with the SetParameter-method. For example:

        private void WriteMotionType(ITxRoboticLocationOperation operation, int value)
        {
            try
            {
                TxRoboticIntParam param = new TxRoboticIntParam("RRS_MOTION_TYPE", value);
                operation.SetParameter(param);
            }
            catch
            {
            }
        }

Meanwhile I found TxPathEditorToDotNetGap Class in the help file.

There are two methods: OnComplexValueChanged and OnValueChanged

But (to be honest) because the quality of the help file is so poor, I cannot find any useful information on those methods. I will "play" with them in the evening.

Re: [.NET C#] Update Path Editor Column

Siemens Phenom Siemens Phenom
Siemens Phenom

What you did should work in principle. Have you checked the robotic parameters on the location after applying your command and after changing the parameters from the Path Editor UI (via RoboticParametersViewer tool)?

Re: [.NET C#] Update Path Editor Column

Legend
Legend

Hi,

 

I made the whole procedure again with additional screenshots of the Robotic parameters viewer.

See the Powerpoint file in the attachment.

Re: [.NET C#] Update Path Editor Column

Siemens Phenom Siemens Phenom
Siemens Phenom

Maybe a Path Editor refresh issue? Have you tried to remove and put again your operation in the Path Editor after running your code?

Re: [.NET C#] Update Path Editor Column

Legend
Legend

Yes, I tried to remove and add again the operation to the path editor. But it doesn't show the correct values.

I suppose, the problem is that for the path editor LIN and KLIN is the same. Both moves are linear because of RRS_MOTION_TYPE 2.

As a first shot I tried to give the path editor an additional information for the "Interp" column with the following code, but it throws an unknown exception.

private void UpdateInterpColumn(int motiontype, int vkrcmovetype, string locationId)
{
    string value = null;
    switch (motiontype)
    {
        case 2:
            if (vkrcmovetype == 4)
            {
                value = "KLIN";
            }
            else
            {
                value = "LIN";
            }
            break;

        case 4:
            if (vkrcmovetype == 5)
            {
                value = "KCIRC";
            }
            else
            {
                value = "CIRC";
            }
            break;

        default:
            break;
    }

    if (value != null)
    {
        TxPathEditorToDotNetGap pe = new TxPathEditorToDotNetGap();
        pe.OnComplexValueChanged("Interp", value, locationId);
    }
}

Re: [.NET C#] Update Path Editor Column

Siemens Phenom Siemens Phenom
Siemens Phenom

you have to set both RRS_MOTION_TYPE and VKRC1_MOVE_TYPE robotic parameters. VKRC1_MOVE_TYPE is used to distinguish between LIN and KLIN.

Re: [.NET C#] Update Path Editor Column

Siemens Phenom Siemens Phenom
Siemens Phenom

Note that with Path Template mechanism you can do the same and even directly set the dynamic parameter "Interp" with value "KLIN".