cancel
Showing results for 
Search instead for 
Did you mean: 

Creating robot pose sensors / signals

Experimenter
Experimenter

Hello,

 

I am working on a command that will create the default signals for all robots in a study.  The part I am having trouble with is creating the pose signals.  The code I am using is at the bottom of this post.

 

This code will create a signal in the Signal Viewer with the associated robot in the Resource column.  However no pose signal is listed in the signal list of the robot.  After the study is saved and reloaded, the signal remains in the signal viewer, but is no longer associated to any resource.

 

I am using Process Simulate v13.1.

 

Thank you.

 

TxTypeFilter robotFilter = new TxTypeFilter(typeof(TxRobot));
TxObjectList allRobots = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(robotFilter);

foreach (TxRobot robot in allRobots)
{
    foreach (TxPose robotPose in robot.PoseList)
    {
        TxPlcDevicePoseSensorCreationData newRobotPoseSensorData = new TxPlcDevicePoseSensorCreationData(robotPose, robot.Name + "_at_" + robotPose.Name);
        newRobotPoseSensorData.HighRange = 2;
        newRobotPoseSensorData.LowRange = -2;
        robot.CreatePoseSensor(newRobotPoseSensorData);
    }
}

 

 

1 REPLY

Re: Creating robot pose sensors / signals

Siemens Legend Siemens Legend
Siemens Legend

Hi Dmar,

 

Your are creating a device pose sensor and you need to create a robot pose sensor. Unfortunatelly robot pose sensor creation is not yet available in the .NET API. You can contact your local GTAC support and request that API.

 

Best Regards,

DianaG