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).
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.
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.
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?