Waste Model
* 
The scan rate can be modified for any of the properties. The units is milliseconds, meaning 1000 = 1 second. See below for recommendations of scan rates.
Production and Waste count tags (for RTPPM) can be at 1 minute (60000)
Downtime tags (for RTPPM) can set to 1 second (1000)
AMU tags can be set to 1 minute (60000)
1. Ensure the PTC.SCA.SCO.MnfgCommonWasteByTagAndTimeModelThingShape Thing Shape is implemented on the entity.
2. Navigate to the Property tab of the entity.
3. Create 1 new property on the equipment Thing:
Properties
Image
Name<Property Name Here>
Base TypeNumber
PersistentFalse
LoggedTrue
BindingRemotely Bound (To tag that represents a waste count (for example, WorkUnit1Waste))
4. Edit the value of the WasteByTagAndTime_EventSubTypeUID property with the Event Subtype UID associated to the waste of the equipment being configured. See the EventSubType database table. To find this value, query the dbo.eventsubtype table and locate the 'UID' value associated with the type of waste that the equipment should be producing.
* 
This should be the same Event Subtype UID as the one configured earlier for the production model.
5. Edit the value of the WasteByTagAndTime_ReadInterval property with the value at which the model is supposed to read the waste count tag value. The default value is 1 minute
6. Edit the value of the WasteByTagAndTime_NoWasteValue property . Value of the Waste tag when there is currently no waste being produced. When the tags take that value, the model will close the waste event currently open without opening a new one.
* 
This should be the same as the value set for the property ProductionByTagAndTime_NoProductionValue set earlier for the production model.
7. Edit the info table property WasteByTagAndTime_AttributeProperties and add one record to map the property created in Step 3 to the equipment’s waste quantity attribute.
a. Name—Name of the attribute against which the waste quantity will be registered (for example, "AT_Wastequantity"). This value can be found in the name field of the attribute table (see SQL Query to Determine AttributeName for an example query).
b. TagPropertyName—Name of the Thing property bound to the tag that will act as waste counter. Should be the same name as the name of the property created in Step 3.
c. CalculationType
a. Increase—If the Calculation type 'Increase' is selected, every time the waste counter tag is read, a difference will be made with its previous value. The difference will be recorded as the waste for the time interval. For more information see Value and Increase Counters
b. Value—If the calculation type ‘Value’ is selected, each time the tag changes, the value will be recorded as waste. For more information see Value and Increase Counters
d. TagResetValue—If the Calculation type 'Increase' is selected, value at which the tag resets. Used to compute the waste properly. This is an optional parameter.
e. MaximumMachineRate—If the Calculation type 'Increase' is selected, this is the maximum production rate. It is a value beyond which machine cannot produce. This is an optional parameter.
f. IsProduction—Determines whether the attribute should be recorded as waste against the equipment. This property should be TRUE if the property represents waste quantity.
g. LastReadTagValue—Leave blank, this is a value automatically computed by the models to keep in memory the value of the tag at the last read.
h. LastReadTagTime—Leave blank, this is a value automatically computed by the models to keep in memory the time the last tag was read.
i. FaultValue—Fault Number associated with the default reason with which waste will be created. Can be found in the faultvalue field of the wastefault table (see SQL Query to Determine Waste FaultValue for an example query).
8. Create 1 new subscription on the equipment Thing:
a. Navigate to the Subscriptions tab of the equipment. Click Add.
b. Subscription Info
NameWastebyTagAndTime_AttributeReadSubscription
SourceOther entity
EntityPTC.SCA.SCO.MnfgCommonAttributeReadSchedulerThing
EnabledTrue
c. JS code—
me.WasteByTagAndTime_ReadEvent({
ReadRequestTimeStamp: events["PTC.SCA.SCO.MnfgCommonAttributeReadSchedulerThing_ScheduledEvent"].eventData.timestamp
});
d. Inputs
EventScheduledEvent
To validate that the waste model has been configured correctly, navigate to the Properties and Alerts tab and locate the property shown in the image below. This property should be populating with values from the tag indicated in the Source column.
Was this helpful?