Cancel
Showing results for 
Search instead for 
Did you mean: 

Edit sensor via API

Experimenter
Experimenter

Hello,

 

Is there any way to access and edit information related to a sensor using the API?  Specifically I am working with photoelectric sensors, and would like to use the API to access and edit the information that normally is shown in the dialog window that comes up when using the "Edit Sensor" command (i.e., setting detection area and the list of objects to check interference with).

 

Thanks

5 REPLIES

Re: Edit sensor via API

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Dmar,

 

Currently the API does not expose methods and properties to edit the sensors, the information is read only. The base interface implemented by all sensor objects is ITxPlcSensor. You can check it in the Tecnomatix.NET.chm. Some of the sensors has corresponding classes in the .NET API, for example TxPlcRobotPoseSensor, but the photoelectric one does not have such class. It is represented by the TxPlcSensor.

 

Best Regards,

DianaG

Re: Edit sensor via API

Valued Contributor
Valued Contributor

DianaG,

 

when I access a photoelectric sensor in the Object Tree via the API, it is type TxComponent. How do I cast this to ITxPlcSensor so I can access the Signal member?

 

I've tried the usual method and I get "Unable to cast object of type 'Tecnomatix.Engineering.TxComponent' to type 'Tecnomatix.Engineering.ITxPlcSensor'."

 

Any help would be appreciated, thanks.

Re: Edit sensor via API

Pioneer
Pioneer

Hi, @DianaG

 

the photoelectric is represented by the TxPlcSensor, but it only has a property 'Signal', and I know we cannot create the sensor via API, but we wanna to create sensor batch, we have an idea that may I copy the sensor(TxComponent), then modify the properties? Sadly, it failed.

what time will the API expose to create the sort of sensor?

 

thanks,

best regards

Re: Edit sensor via API

Siemens Genius Siemens Genius
Siemens Genius

Hi,

Can you please contact GTAC and ask to open an ER for this API?

Re: Edit sensor via API

Pioneer
Pioneer
Hi, Ofer Ohayon

thanks, we team had asked the ER last week.