Building Blocks > Solution-Specific Building Blocks > Operation KPI Building Block > Key Services (Operation KPI Building Block)
Key Services (Operation KPI Building Block)
The following sections list key services for automation.
PTC.OperationKPI.AutomationEventsModelLogic_TS 
The PTC.OperationKPI.AutomationEventsModelLogic_TS is implemented by pacemaker work unit Things that are configured for data automation. The following key services are found on the PTC.OperationKPI.AutomationEventsModelLogic_TS Thing Shape:
AddPTCAutomationMessage—Adds a new message to the PTCAutomationMessage infotable property of messages. The number of messages in the property is governed by the PTCMaxNumberOfAutomationMessages property.
BufferPTCAutomationEvents—Organizes incoming events into logical groupings for faster processing during batch processing.
GetPTCAutomationProperties—Returns a hard-coded list of the automation properties and scrap properties that are defined in the PTCScrapEventProperties property.
PopulatePTCEventRelatedData—Queries for reason information from the database and populates the event data with related information. When an availability event code is not found, the default Unknown fault reason information is used.
ProcessPTCAutomationEvents—The entry point for the PTCAutomationEventProcessingTimerSubscription entity that invokes batch processing and then determines if the pacemaker that is disconnected or down should be set back to Running.
ProcessPTCAutomationEventsinMultiBatch—Queries the pacemaker’s value stream for any new automated property data to be processed in batches. This is the main automated event processing service.
ProcessPTCAutomationJobOrderRelatedEvents—Iterates through the job order ID, material master ID, and target quantity values from the aggregated events parameter and then sends those values to their respective services for further processing.
ProcessPTCAutomationProductionScrapAvailabilityEvents—Iterates through the given production, scrap, and availability events to determine if they should be ignored or added to the database. Only production and scrap events can be ignored, if there are no running job orders.
ProcessPTCAvailabilityEvent—Returns an infotable with a row built from the input parameters.
ProcessPTCCountEvent—Processes event counts with respect to rollover being true or false for the automation property, where the value is retained for each property value that has received updates in the PTCLastAutomationProcessedValues infotable property.
ProcessPTCJobOrderIDEvent— Processes job order ID event values and determines if a job order should be started or stopped.
ProcessPTCMaterialMasterIDEvent—Processes material master ID event values and determines if a job order should be created or stopped. The PTCAutomationDefaultTargetQuantity property value is used for the default target quantity when creating a new job order.
ProcessPTCProductionEvent—Invokes the ProcessPTCCountEvent service using the PTCIsProductionCountRollover property value to specify whether this is a rollover property. Uses the PTCProductionRolloverCounter property to define the value at which the rollover will occur.
ProcessPTCScrapEvent—Invokes the ProcessPTCCountEvent service for all of the properties found in the PTCScrapEventProperties property.
ProcessPTCTargetQuantityEvent—Processes the incoming target quantity event value and updates the job order material requirements target quantity if there is a running job order.
SetPTCMachineStatusToRunningIfDisconnectedMoreThanAllowed—Evaluates whether the pacemaker should be set to Running after being disconnected for longer than the maximum allowed time, when the PTCEnableAutoSetMachineStatusToRunning property is set to true and the last availability event entry was a down event.
PTC.OperationKPI.AnalysisModelLogic_TS 
The PTC.OperationKPI.AnalysisModelLogic_TS Thing Shape is implemented on the model Thing Templates such as PTC.MfgModel.DefaultWorkunit_TT.
The following services are found on the PTC.OperationKPI.AnalysisModelLogic_TS Thing Shape:
GetPTCAnalysisWorkMasterMaterials—Retrieves the material masters for the work center, the area to which the work center belongs, and the pacemaker of the work center.
GetPTCOEEValues—Retrieves the OEE values for a given start and end time.
GetPTCParetoInfos—Retrieves calculated Pareto information details.
GetPTCTrendInfos—Retrieves calculated trend information details.
GetPTCWaterfallInfos—Retrieves a list of detailed waterfall information.
PTC.OperationKPI.ExecutionModelLogic_TS 
The PTC.OperationKPI.ExecutionModelLogic_TS Thing Shape is implemented by the PTC.MfgModel.DefaultWorkcenter_TT and PTC.MfgModel.DefaultWorkunit_TT Thing Templates, and by the PTC.ProductionDashboard.Management_TS Thing Shape.
The following services are found on the PTC.OperationKPI.ExecutionModelLogic_TS Thing Shape:
AddOrUpdatePTCEvents—Adds or updates events for the specified model.
AutoCreateOrEndPTCProductionBlock—Automatically creates or ends a production block for the specified model.
DeletePTCEvents—Deletes events for the specified model.
GetPTCAllEvents—Retrieves all events for a given time range by calling the appropriate service.
GetPTCNegativeEvents—Retrieves all negative reason type events (Down, Speed Loss, and Scrap) for a given time range by calling the appropriate service.
GetPTCAvailableJobOrders—Retrieves all job orders for the given work center. Also returns job orders that are assigned to the work center’s parent area or its pacemaker work unit.
GetPTCExecutionWorkMasterMaterials—Retrieves the material masters for the work center, the area to which the work center is assigned, and the pacemaker of the work center.
GetPTCJobOrderMaterials—Retrieves the material masters of the job orders during the date range for specified model.
GetPTCJobOrderTargetStatus—Retrieves the valid target dispatch statuses for given job order.
GetPTCJobOrderSummary—Retrieves the job ordersummary data.
GetPTCProducedMaterials—Retrieves the material masters produced during the date range for specified model.
GetPTCProductionBlockEvents—Retrieves all production block events.
GetPTCProductionBlockInfo—Retrieves a list of a production block’s detailed information.
GetPTCProductionBlockInfos—Retrieves a list of production block’s detailed information for all production blocks in the provided time range.
GetPTCRunningJobOrders—Returns job orders which are running on the selected date.
GetPTCScrapEventData—Returns information about the scrap event for given scrap event UID.
GetPTCShiftViewDetails—Retrieves shift view details.
StartPTCProduction—Starts the production of the specified job order for the model.
StopPTCProduction—Stops the production of the actual running job order for the model.
PTC.OperationKPI.Management_TS 
The PTC.OperationKPI.Management_TS Thing Shape is implemented by the PTC.OperationKPI.Manager_TT Thing Template.
The following services are found on the PTC.OperationKPI.Management_TS Thing Shape:
AddEvents—Adds events.
AddJobOrder—Adds job order using the provided model, material, quantity.
AddOrUpdateEvents—Adds or updates events.
AutoCreateOrEndProductionBlock—Processes an end-to-end a production block flow.
CalculateActualCycleTime—Calculates the actual cycle time for the passed-in job order. Calculates from job order start until either the end of the current production block, or the end of job order if the job order is in a completed or held state.
DeleteEvents—Deletes the passed-in events.
GetTimeRangeEvents—Retrieves all events for a given time range and model UID.
GetAvailableJobOrders—Retrieves job orders for the given work center or work unit.
GetJobOrderSummary—Retrieves the job order summary data.
GetParetoInfos—Retrieves the calculated Pareto information details.
GetProducedMaterials—Retrieves the material masters produced during the date range for specified model.
GetProductionBlockDetail—Retrieves the calculated production block information details for the specified production block.
GetProductionBlockDetails—Retrieves the calculated production block information details for all production blocks in the provided time range.
GetRunningJobOrders—Retrieves the job orders which were running on a selected date.
GetShiftViewDetails—Retrieves shift view details for the given job order.
GetTotalTrendInfos—Calls the function to retrieve total trend information for each day of the specified time range and model UIDs.
GetTrendByReasonInfos—Retrieves trend seconds for each day of the specified time range, model UIDs and a reasonTreeNode UID.
GetTrendInfos—Retrieves the calculated first-level Pareto information details.
GetWaterfallInfos—Retrieves the calculated waterfall information details.
StartJobOrders—Starts a job order.
StartProduction—Starts the production of the specified job order and model.
StopJobOrders—Stops a job order.
StopProduction—Stops the production of the actual running job order for the provided model.
UpdateEvents—Updates events.
PTC.OperationKPIImpl.Manager_TT 
The following service is found on the PTC.OperationKPIImpl.Manager_TT Thing Template:
ToggleSubscriptionAndSourcePropertyLogger—Disables or enables the specified subscription on the specified Thing Shape and toggles the Log checkbox setting for the source property between selected (TRUE) and cleared (FALSE), depending on the status of the specified subscription. If an enabled subscription is specified, the service disables the subscription and selects the Log checkbox. If a disabled subscription is specified, the service enables the subscription and clears the Log checkbox.
This service works only with subscriptions that are related to properties, and should only be used for subscriptions related to remote properties. By default, the PTC.OperationKPI.AutomationEventsModelLogic_TS Thing Shape is specified for the entityName input parameter, but other Thing Shapes could be specified.
Was this helpful?