Services on the Equipment Converter Thing
The following services used in this integration are provided on the equipment converter Thing (PTC.RA.EquipmentConverter).
AddEquipmentStructureToNetwork
The AddEquipmentStructureToNetwork service adds converted Things to an equipment structure in the network. This service is used by the ImportPlantModelObjects workflow service.
Input parameters:
equipmentStructure (JSON)—A JSON array containing the Thing names and parent Thing names, such as the output from the CreateEquipmentThings service. For example,
[
{
"thingName": "site_S1",
"parentThingName": ""
},
{
"thingName": "area_A1",
"parentThingName": "site_S1"
},
{
"thingName": "productionline_PL1",
"parentThingName": "area_A1"
},
{
"thingName": "workcenter_WC1",
"parentThingName": "productionline_PL1"
},
{
"thingName": "equipment_E1",
"parentThingName": "workcenter_WC1"
}
]

networkName (String)—Name of the network to be initialized. If the specified network does not exist, it is created. If the specified network exists, then Things are added to the existing network. When the AddEquipmentStructureToNetwork service is used within the ImportPlantModelObjects workflow service, this value comes from the networkName input parameter of that service.
Output: No output
ConvertAlienNameToThingWorxEntityName
The ConvertAlienNameToThingWorxEntityName service modifies the name of the plant model object to align with the ThingWorx naming requirements, as needed. Details of the ThingWorx naming requirements are provided in the service code. This service is used internally by the CreateEquipmentThings service.
Input parameters:
prefix (String)—Prefix to be added to the entity name.
suffix (String)—Suffix to be added to the entity name.
alienName (String)—Entity name to be converted.
Output: result (String)—Converted entity name aligned with ThingWorx naming requirements.
CreateEquipmentThings
The CreateEquipmentThings service creates a Thing for each plant model object that is defined in the input JSON. The Things are created according to the mapping defined in the EquipmentTypeMapping configuration table on the equipment converter (PTC.RA.EquipmentConverter). This JSON is provided by the FactoryTalk MOM connector. The CreateEquipmentThings service is used by the ImportPlantModelObjects workflow service.
Input parameters:
plantObjectModelJSON (JSON)—JSON containing the plant model object information. For example,
{
"type": "workcenter",
"url": "http://10.81.43.8:8080/FTPCApps/rest",
"entityList": [
{
"name": "S_WC1",
"description": null,
"category": null,
"creationTime": "2018-11-30T05:18:59.687Z",
"lastModifiedTime": "2018-11-30T05:18:59.687Z",
"parentId": "s_PL1",
"parentType": "productionline"
"links": {
"selfURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/workcenters/S_WC1",
"parentURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/productionlines/s_PL1",
"childrenURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/equipment?workcenter=S_WC1"
}
},
{
"name": "S_WC10",
"description": null,
"category": null,
"creationTime": "2018-11-30T05:19:05.457Z",
"lastModifiedTime": "2018-11-30T05:19:05.457Z",
"parentId": "s_PL10",
"parentType": "productionline"
"links": {
"selfURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/workcenters/S_WC10",
"parentURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/productionlines/s_PL10",
"childrenURL": "http://10.81.43.8:8080/FTPCApps/rest/mf/v1/equipment?workcenter=S_WC10"
}
}
]
}
uniqueIdentifier (String)—(Optional) Suffix added to the Thing name to ensure name uniqueness. This is useful when information is added to ThingWorx from multiple MES systems. When called from the ImportPlantModelObjects workflow service, this value comes from the identifierMES input parameter.
Output: result (JSON)—JSON containing an array of parent and child names. If the Things exist in ThingWorx , they are not overwritten. This JSON is used by the AddEquipmentStructureToNetwork service.
GetPlantModelObjectsByType
The GetPlantModelObjectsByType service uses a ThingWorx Flow workflow to return a JSON array of plant objects of a specified type from the Rockwell FactoryTalk MES system. The JSON array is optionally filtered to only children of a specified parent. Customers can decide to integrate this workflow service for further filtering purposes.
Input parameters:
type (String)— The type of entities returned by the service. The values are lower case and must match one of the PlantModelObjectType values on the EquipmentTypeMapping configuration table on the PTC.RA.EquipmentConverter Thing: site, area, workcenter, productionline, and equipment.
parentId (String)—(Optional) The name of a specific parent item in the equipment structure. If a valid parentId is entered, the service returns only direct children of the parent. If no parentId value is specified, all plant objects of the specified type are returned.
limit (Integer)— The maximum number of returned items. The default value is 500. If a non-positive number is entered, the service returns an empty JSON array.
Output: result (JSON)—JSON array of the entity list that represents the specified plant model objects recorded in a Rockwell FactoryTalk MES system.
ImportPlantModelObjects
The ImportPlantModelObjects service uses a ThingWorx Flow workflow to:
Retrieve all plant model objects defined on the connected Rockwell FactoryTalk MES system.
Create ThingWorx Things for each plant model object.
Add the created Things to a ThingWorx network in the equipment structure relationship that is defined in the Rockwell FactoryTalk MES system.
If any Things with the same name exist in ThingWorx, then creation of those Things is skipped and the property values for the skipped Things are not updated. This service uses the CreateEquipmentThings and AddEquipmentStructureToNetwork services in its ThingWorx Flow workflow.
Input parameters:
networkName (String)—The name of a ThingWorx network entity to which the converted Things are added. If this network does not exist, then it is created when the service is run. If the specified network exists, then Things are added to the existing network.
identifierMES (String)—(Optional) Identifier for the Rockwell FactoryTalk MES system. This value is appended to the Thing name. While this field is optional, its use is recommended to ensure name uniqueness if data is imported from multiple Rockwell FactoryTalk MES systems.
Output: No output.
Was this helpful?