Production Model
1. To validate the production model configuration, query the productionevents table in the Manufacturing Apps database and filter the results for your configured equipment. You may use the query below as an example, where "Work Unit 1" represents the displayname of your equipment:
SELECT pe.displayname AS [Prod Event], pe.starttime as StartTime, pe.endtime as EndTime, e.displayname AS [Event Name], es.displayname AS [Event Subtype], jo.[id] as [Job Order], p.displayname as [Product], ps.displayname as [ProductionStatus], pe.quantity as Quantity
FROM dbo.productionevent pe
JOIN dbo.equipment e ON e.uid = pe.equipmentuid
JOIN dbo.eventsubtype es ON es.uid = pe.eventsubtypeuid
JOIN dbo.joborder jo ON jo.uid = pe.finaljoborderuid
JOIN dbo.product p ON p.uid = pe.finalproductuid
JOIN dbo.productionstatus ps ON ps.uid = pe.productionstatusuid
WHERE e.displayname IN ('Work Unit 1', 'Work Unit 2', 'Work Unit 3')
ORDER
BY pe.starttime DESC
2. This query should return a list of all production events created on your equipment. There should be appropriate values populating the following fields: Event Subtype, Job Order, Product, Production Status, and Quantity. If these fields are not populating as expected or there are no events and the model has had sufficient time to create events according to tag data, consider the following:
a. Review the configuration steps for the production model and verify that all steps have been performed sufficiently (for example, no typos during configuration, subscriptions are sufficiently enabled or disabled, Thing Shape properties are populated as expected, and so on).
b. Validate that Ideal Production control characteristic limits are applied to the entirety of a filtered time range. Since the Ideal Production must be entered for a future time range, the limits may not be immediately effective upon configuration.
c. Check the ScriptLog in the ThingWorx Composer (navigate on the left menu to Monitoring > ScriptLog). Look for any mention of "production". The "Content" message should provide some direction for troubleshooting.
d. Query the errorlogmessage table on the Manufacturing Apps database to see if any messages may be related.
e. Check the inherited properties from the PTC.SCA.SCO.MnfgCommonProductionByTagAndTimeModelThingShape Thing Shape on your configured equipment. There should be values populating according to the parameter’s name.
Was this helpful?