Filtering a Subset of Plant Model Objects by Type
The GetPlantModelObjectsByType service is used to filter a targeted subset of the plant model object information in a Rockwell FactoryTalk MES system. The information is filtered by plant model object type, and can be further limited to children of a particular parent item in the equipment structure. This information is returned as a JSON array, and can be used in other services or customizations.
For example, the JSON array output from this service can be used as the entityList portion of the plantModelObjectJSON input for the CreateEquipmentThings service. The CreateEquipmentThings service then creates the equipment Things corresponding to the subset of plant model objects that are returned by the GetPlantModelObjectsByType service. You can then execute the AddEquipmentStructureToNetwork service to add these Things to a network.
The following diagram shows the process flow for the GetPlantModelObjectsByType service:
Process flow for the GetPlantModelObjectsByType 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 Switch component directs the flow to the appropriate loop based on the plant model object type that is specified for the type input parameter when the service is executed.
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 values specified for the type and optional parentID input parameters when the service is executed are used by the FactoryTalk MOM connector to retrieve and return the filtered subset of plant model object information.
For more information, see GetPlantModelObjectsByType.
Was this helpful?