Importing All Plant Model Objects
To import all plant model objects and their structure from a Rockwell FactoryTalk MES system into ThingWorx, execute the ImportPlantModelObjects service on the equipment converter thing (PTC.RA.EquipmentConverter). This triggers the process flow that is described in ThingWorx Rockwell FactoryTalk MES Integration Overview, and is shown in the following graphic:
Process flow for the ImportPlantModelObjects service
At the start of the flow, the memory store is initialized to access and save data between the loops and components in the flow. There is a loop in the flow for each plant model object type, shown in the graphic as a white box containing components.
The Get <Type> Total Count component before each loop retrieves the total count for that plant model object type. This count determines the number of iterations needed for the loop to process the total object count. Within each loop, the Get <Type> component retrieves the JSON array for that plant model object type from the Rockwell FactoryTalk MES system. The JSON array is then used to create the things in ThingWorx.
After the loop has completed its necessary iterations, the workflow moves to the next total count component, and the loop for the next plant model object type. Using iterated loops, and performing these actions in series provides for a robust workflow that is better able to manage large amounts of data. The information from each loop is saved in the memory store for the flow.
Once all the loops have been completed, the parent-child relationship information for all of the created things is passed into the Concatenate Arrays component. These relationships are aggregated and used by the Add Structure To Network component to add the relationships to the network in the proper equipment structure.
For more information, see ImportPlantModelObjects.
Was this helpful?