Showing results for 
Search instead for 
Did you mean: 

Creating robot pose sensors / signals




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;




Re: Creating robot pose sensors / signals

Siemens Phenom Siemens Phenom
Siemens Phenom

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,


Re: Creating robot pose sensors / signals

Valued Contributor
Valued Contributor

As of 14.0.1, there is a CreateRobotPoseSensor method.


Could somebody please supply an example of its use?


Presumably I need to set the HighRange and LowRange to something sensible, such as the same values as the pose sensors when the default signals are created, but I cannot seem to access these properties on robot pose sensors that have already been created using the normal method.


The default values for these parameters when creating a new robot pose sensor via TxRobotPoseSensorCreationData are both (positive) 1E+32 and the sensors are always on when running the simulation. Presumably, this is because these values are too high. What are some typical values?


It would be useful for the help to include a description of what the HighRange and LowRange parameters are.





P.S. Using trial and error, I've just found these values seem to work:


HighRange = 0.05
LowRange = 0.00

Re: Creating robot pose sensors / signals

Valued Contributor
Valued Contributor

Just to add, the HighRange and LowRange values appear to be in radians, so setting them to 0.01 and -0.01 respectively gives a robot pose sensor that detects a pose if it's within 0.625 degrees either side of a joint.

Re: Creating robot pose sensors / signals

Siemens Creator Siemens Creator
Siemens Creator

Hello LTW,


Here are the ranges based on the first driving joint:

  • For revolute joint case (value is considered in radians) : LowRange = -0.035  , HighRange = 0.035
  • For prismatic joint case (value is considered in mm): LowRange = -2, HighRange = 2


There is a fix in V14.0.2, where that values will be initialized with default values.




Re: Creating robot pose sensors / signals

Valued Contributor
Valued Contributor

Thank you!