ThingWorx Applications (RTPPM, AMU, CWC) standard data ingestion require an industrial connection between Kepware and ThingWorx. However, data aren't always available through Kepware tags. This documentation will outline the process on how to leverage data flowing by using external connectors such as an ERP system.
Each ThingWorx application has different data requirements, make sure to respect them:
When creating an external connector, some entities might need to be created. To facilitate the development and the export process it is recommended to create a custom project. This project could include all new entities created:
An external connector can either be:
The recommended communication protocol used to establish the connection between ThingWorx and the external connector is a REST API.
For data automation retrieval, there are 2 ways that can be used:
The best practice is to send messages from external sources to ThingWorx. Then subscription can be used to trigger the data processing logic.
Another way is to trigger the external sources using ThingWorx timers to get the data. However, this is not recommended for performance and timing purpose.
On another end, it is possible to customize out-of-the-box ThingWorx interfaces and use buttons as triggers for data retrieval. In those cases, ThingWorx will ask for data to the external sources via GET request through the REST API.
As mentioned before, REST API protocol is preferred to allow data flow between external connectors and ThingWorx. Depending on which way data retrieval is used here’s how to proceed for API call:
External Source -> ThingWorx
ThingWorx <-> External Source
For more documentation :
JSON universal data format is recommended to communicate between the external connector and ThingWorx. The JSON structure must be consistent and must contain key data that will allow to associate external data with the proper equipment, tool, site, etc.
Example of JSON structure
Note that it is highly recommended to log error message to facilitate troubleshooting. Those messages should include the error section and the JSON message received.