Tech Note 711 Wonderware MES Operation Capability Object: Configuring Multiple Job Counters All Tech Notes, Tech Alerts and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information. Topic#: 002485 Created: June 2010 Introduction This Tech Note outlines how to configure the Wonderware MES Operations Capability Object (OCO) Production Counters to count against multiple jobs running on the same entity. Application Version: Wonderware MES v4.0 Configuration: Entity and OCO Modeling An OCO must be contained by a User Defined Object (UDO) that represents an MES Entity (Figure 1 below). FIGURE 1: MES ENTITY AND OCO MODELING OCO General Configuration In order for an OCO to be configured for Production Counters, you must enable the Entity Can Run Jobs and Enable Production Counters options in the General tab panel (Figure 2 below). FIGURE 2: OCO GENERAL CONFIGURATION You can configure an MES Entity to run multiple jobs simultaneously by clicking the Job Defaults tab and typing a number in the Number of Simultaneous Jobs That Can Run On This Entity field (Figure 3 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 1/6
FIGURE 3: JOB DEFAULTS SETTINGS Note: The practical limit is about 50 jobs running on one entity at any one time. If desired, you can also indicate a default Reason, Storage Entity, Lot Number, Sublot Number, etc. for production when it is recorded to the MES database. OCO Production Counter Configuration When you configure a Production Counter, one instance of the counter is automatically created for each job position. In this example, the OCO was configured for 3 job positions. Now that a Production Counter has been created, you can see that the counter instance can be selected in the Job Position list (Figure 4 below). FIGURE 4: PRODUCTION COUNTER INSTANCES It is important to understand that the Job Position drop box is provided to select which instance to edit. The number is NOT an attribute of the counter (note the lack of the attribute lock option). When you select the instance, the editor refreshes the display to include all the attributes for that instance. For example, you may want the production from each job position to have different lot numbers. You would select each Job Position instance and configure the To Lot attribute for that instance of the counter. Figure 5 (below) shows each To Lot attribute with a different Input Source defined. https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 2/6
FIGURE 5: CONFIGURING PRODUCTION COUNTER INSTANCES Each instance of the Production Counter will now has its own set of attributes, indicated by JobExec.JobPos<JobPos#>.Prod.<CounterName>. <Attribute Name> (Figure 6 below). FIGURE 6: PRODUCTION COUNTER ATTRIBUTES Runtime Operation Example For Job Execution, you can start a Job via the OCO and assign it to run at a specific Job Position. If the jobs are not started by the OCO, scripting must be provided in order to Populate the attributes that the counters use to know which job to record the production against, and Which item to record as produced. Jobs started by the OCO auto-populate these attributes. The attributes are: JobExec.JobPos<JobPos#>.WorkOrder JobExec.JobPos<JobPos#>.Operation https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 3/6
JobExec.JobPos<JobPos#>.SequenceNumber JobExec.JobPos<JobPos#>.Item In this example, three jobs are ready to run on the MES_Entity_001 entity, viewed in the Operator client (Figure 7 below). FIGURE 7: JOBS READY TO RUN The jobs can be started by the OCO by first defining the job to start and triggering the JobExec.StartJobCmd attribute. The following attributes define what job to execute the start command against (Figure 8 below). FIGURE 8: ATTRIBUTES TO START A JOB VIA THE OCO After setting the information for each job, defining the job position to run on, and starting the job, there are now three jobs running on the entity (Figure 9 below). FIGURE 9: JOBS ARE RUNNING Looking the OCO attributes in Object Viewer, you see the attributes are now populated. Also populated are CurWoId, CurOperId, and CurSeqNo. These attributes are simply read-backs from the MES database and provided for informational purposes (Figure 10 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 4/6
FIGURE 10: OCO ATTRIBUTES WITH RUNNING JOBS You can now add production to these running jobs. In this example, we will use the Absolute Counters. Production is added by specifying a value for the counter. Absolute Counter Value: JobExec.JobPos<JobPos#>.Prod.<CounterName>.AddProdQtyAbs Then that value is recorded to the MES database by setting the trigger to true. Absolute Counter Trigger: JobExec.JobPos<JobPos#>.Prod.<CounterName>.AddProdQtyAbsCmd A different produced quantity for each job is shown in Figure 11 (below). Note that the attribute JobExec.JobPos<JobPos#>.QtyProd is now reporting back the total quantity produced for that job. FIGURE 11: PRODUCTION REPORTED TO OBJECT ATTRIBUTES If we look at the jobs in the Operator client, we can see the production as well (Figure 12 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 5/6
FIGURE 12: PRODUCTION VIEWED IN OPERATOR Click the following icon to view this file in.pdf format: D. Scott Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, CA 92630. There is also technical information on our software products at Wonderware Technical Support. For technical support questions, send an e-mail to support@wonderware.com. Back to top 2013 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc. Terms of Use. https://wdnresource.wonderware.com/support/kbcd/html/1/t002485.htm 6/6