Sunteți pe pagina 1din 538

INTEGRATED PRODUCTION & PERFORMANCE SUITE

Production Management

Batch

TECHNICAL REFERENCE GUIDE


VOLUME 1
20 PUBLICATION BATCH-RM111A-EN-E

Supersedes Publication BATCH-RM110A-EN-P

Contact Rockwell Copyright Notice

Customer Support Telephone 1.440.646.3434 Online Support http://www.rockwellautomation.com/support/ 2010 Rockwell Automation, Inc. All rights reserved. Printed in USA. This document and any accompanying Rockwell Software products are copyrighted by Rockwell Automation, Inc. Any reproduction and/or distribution without prior written consent from Rockwell Automation, Inc. is strictly prohibited. Please refer to the license agreement for details. Allen-Bradley, ControlLogix, eProcedure, FactoryTalk, Rockwell Automation, Rockwell Software, RSBizWare, RSBizWare BatchHistorian, RSBizWare Historian, RSBizWare MaterialTrack, and RSLinx are trademarks of Rockwell Automation, Inc. Any Rockwell Automation software or hardware not mentioned here is also a trademark, registered or otherwise, of Rockwell Automation, Inc.

Trademark Notices

Other Trademarks

ActiveX, Microsoft, Microsoft Access, SQL Server, Visual Basic, Visual C++, Visual SourceSafe, Windows, Windows Server-, Windows XP, and Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe, Acrobat, and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. All other trademarks are the property of their respective holders and are hereby acknowledged. This product is warranted in accordance with the product license. The products performance may be affected by system configuration, the application being performed, operator control, maintenance, and other related factors. Rockwell Automation is not responsible for these intervening factors. The instructions in this document do not cover all the details or variations in the equipment, procedure, or process described, nor do they provide directions for meeting every possible contingency during installation, operation, or maintenance. This products implementation may vary among users. This document is current as of the time of release of the product; however, the accompanying software may have changed since the release. Rockwell Automation, Inc. reserves the right to change any information contained in this document or the software at anytime without prior notice. It is your responsibility to obtain the most current information available from Rockwell when installing or using this product.

Warranty

Document Modified: April 30, 2010 4:35 pm

Contents

Server API Communication Language Reference Chapter 1 FactoryTalk Batch Server API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Moving from DDE to COM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Using the COM Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Properties, Methods, and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 BatchServer Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 BatchRemote Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Available Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Available Executes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Chapter 2 Item Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 BadTagCount. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BatchList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BatchListCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BatchOverrides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLBatchID_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLCMDMask_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLCreateID_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLDesc_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLFailure_x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLMode_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLRecipe_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLStartTime_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLState_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLType_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . COMClientCount. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CPRVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateIDBatchStepDataList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateIDBatchStepDataList2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateIDEventData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateIDEventDataFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateIDScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DataServersList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DataServerStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 14 16 17 18 19 20 21 22 23 24 25 26 27 28 28 29 33 38 39 40 41 44

iii

FactoryTalk Batch Technical Reference Vol. 1

I te m Re f e r en ce ( co n t i n u ed )

DDEClientCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 DecimalSeparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 EnumSetEnumSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 EquipmentModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 EquipmentModelDate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 ErrorMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 EventDataFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 ExpressionID_UnitID_Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ExpressionIDParamExprValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 ExpressionIDReportExprValues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 HyperlinkLabels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 IncompleteSignaturesCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 InfoMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 ItemCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 JournalDir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 ListSeparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Locale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 MatSvrStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 OPCClientCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 PhaseDataList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 PhaseErrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 PhaseErrsCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 PhaseIDBatchID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 PhaseIDFailure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 PhaseIDInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 PhaseIDMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 PhaseIDOwnerFlag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 PhaseIDParms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 PhaseIDParms2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 PhaseIDPause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 PhaseIDPausing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 PhaseIDPhaseData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 PhaseIDRequests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 PhaseIDSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 PhaseIDState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 PhaseIDStepIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 PhaseIDUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 PhasesList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 PhasesList2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 PhasesList3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 ProcedureIDData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 ProcedureIDData2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 ProcedureIDData3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 ProcedureIDDevLimits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 ProcedureIDStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 ProcedureIDStatus2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

iv

Contents

I te m Re f e r en ce ( co n t i n u ed )

ProcedureIDUnitRequirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProcessCellBitMaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProcessCellIDUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProcessCellsList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProcessCellsList2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RecipeDir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RecipeList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDEqData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDHyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDOwned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDOwners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDRequested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDRequesters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourceIDStrings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResourcesList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RunMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RunWithoutMatSvr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SignatureIDSig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signatures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StartTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StepsList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StringLabels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TagVerStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TagVerStatusOrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ThousandsSeparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TimerSteps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TimerIDTimerData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TimerIDTimerStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TotalTagCount. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEArea_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEBatchID_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEDefault_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEDesc_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEEU_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEEvent_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEEventID_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEHigh_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UELow_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEPhase_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEProcCell_x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UERecipe_x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UERespType_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UETime_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UEUnit_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105 106 107 108 109 110 110 113 124 124 125 126 127 128 128 129 130 130 131 136 137 137 138 139 139 140 140 141 142 143 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163

FactoryTalk Batch Technical Reference Vol. 1

I te m Re f e r en ce ( co n t i n u ed )

UEValue_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnAcknowledgedEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnacknowledgedEventsCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitBitMaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitIDBatchID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitIDPhaseBitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitIDPhases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitIDPhases2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitIDUnitTagData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitReqIDBindingPreferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitReqIDBindingRequirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UnitsList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VerifiedTagCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WarningMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

164 165 167 168 168 169 170 171 172 177 178 179 179 180 181

Chapter 3 Execute Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Ack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Acquire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddEvent_CI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddEvent_Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddEvent_Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Archiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AutoBatchID_Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AutoRemove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Batch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BindPhase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CancelSignature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ControlStrategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ForceTransistion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetContainerData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetFeedTypeAndMaterials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetLegalEqModules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetLegalUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetPossibleLegalUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . InfoTrimmed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MatSvrControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mtrl_Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 186 187 188 189 190 191 192 193 194 196 197 199 200 201 202 203 204 205 207 208 210 211 213 215 217 222 223 224

vi

Contents

Ex e cu te Re f e r en ce ( co n t i n u e d)

Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ParamExpClear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ParamExpOverride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parms2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Phase2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Phase3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ReactivateStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RecipeList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAllLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAllLot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetParm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SignoffSignature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tag_Verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User_Verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VerificationInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItem Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Execute Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CallTimeout Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ConnectTimeout Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Node Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TimeoutPeriod Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Command Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

225 226 227 228 229 230 231 232 234 235 236 237 237 239 240 241 242 244 245 245 247 248 249 250 251 252 252

Command Masks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Command Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Arbitration Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 PCD Programmers Technical Reference Chapter 1 Introduction to PCD Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Document Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Chapter 2 Introduction to Batch and PCD Phase Logic . . . . . . . . . . . . . . . . . . . . . 269 Batch Manufacturing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 FactoryTalk Batch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 Phases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Basic Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 HMI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
vii

FactoryTalk Batch Technical Reference Vol. 1

Chapter 3 The FactoryTalk Batch PCD Interface . . . . . . . . . . . . . . . . . . . . . . . . 275 Design Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 FactoryTalk Batch Requirements of the Phase (PLI and Phase Logic). . . . . . 276 Function of the PLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Function of the Phase Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Chapter 4 State Transition Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 State Transition Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Phase States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Communication Protocol States . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Chapter 5 Introducing Tags and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Phase Logic API Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Batch Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Chapter 6 PLI Communications Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Obey the State Transition Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 Support the Command Handshake Protocol . . . . . . . . . . . . . . . . . . . . . . 289 Command Handshake Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 The Command Tags High Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Summary of the Command Handshake Protocol . . . . . . . . . . . . . . . . . 294 Follow the Phase Logic Request Protocol . . . . . . . . . . . . . . . . . . . . . . . . 295 Phase Logic Request Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Aborting Phase Logic Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Support for Semi-Auto Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Semi-Auto Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Support for the NEW_PARAMETERS command . . . . . . . . . . . . . . . . . . . . 305 NEW_PARAMETERS Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Support for the Program/External Attribute. . . . . . . . . . . . . . . . . . . . . . 307 Program/External Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Support for the Failure Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 Support for the Watchdog Protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Standard Watchdog Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Enhanced Watchdog Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Watchdog Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

viii

Contents

Chapter 7 Requesting Data from the FactoryTalk Batch Server . . . . . . . . . . . . . . 317 Downloading Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Phase Parameter Tags Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Types of Download Parameter Requests . . . . . . . . . . . . . . . . . . . . . 320 All Phase Parameter Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Range of Phase Parameter Values. . . . . . . . . . . . . . . . . . . . . . . . . . 320 Range of Phase Parameter Values - Indirect . . . . . . . . . . . . . . . . . . . 321 Single Phase Parameter Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 Single Phase Parameter Value - Indirect . . . . . . . . . . . . . . . . . . . . . 322 Single Phase Parameter Value - Specify Location. . . . . . . . . . . . . . . . 322 Single Phase Parameter Value - Indirect/Specify Location. . . . . . . . . . 322 Subset of Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Subset of Parameter Values Download on Start . . . . . . . . . . . . . . . . 323 Subset of Parameter Values Download on TOC . . . . . . . . . . . . . . . . 324 Downloading Report Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Types of Download Report Limits Requests . . . . . . . . . . . . . . . . . . . 324 All Report Limits Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Download Single Report Parameter Limits Configuration. . . . . . . . . . . 325 Upload Report Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Report Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Electronic Batch Record Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Types of Upload Report Requests . . . . . . . . . . . . . . . . . . . . . . . . . . 327 All Report Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Range of Report Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . 327 Range of Report Values - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . 328 Single Report Parameter Value . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Single Report Value - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Single Report Parameter Value - Specify Location . . . . . . . . . . . . . . . 329 Single Report Parameter Value - Indirect/Specify Location . . . . . . . . 329 Subset of Report Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Subset of Report Parameter Values - Upload on Terminal State . . . . . . 330 Subset of Report Values - Upload on TOC. . . . . . . . . . . . . . . . . . . . . 331

ix

FactoryTalk Batch Technical Reference Vol. 1

Sending Messages to the Operator and Clearing Messages . . . . . . . . . . . . . 331 Send Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Sending a Message - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Clear Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Acquire Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Types of Acquire Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Acquiring a Single Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Acquiring a Single Resource - Indirect . . . . . . . . . . . . . . . . . . . . . . . 333 Acquiring Multiple Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Release Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Types of Release Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Releasing a Single Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Releasing a Single Resource - Indirect . . . . . . . . . . . . . . . . . . . . . . . 334 Release Multiple Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Releasing all Currently Acquired Resources . . . . . . . . . . . . . . . . . . . . 335 Send Messages to Other Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Completion of Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Processing Send and Receive Messages . . . . . . . . . . . . . . . . . . . . . . . 336 Types of Messages to Other Phases . . . . . . . . . . . . . . . . . . . . . . . . . 336 Sending a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Sending a Message - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Send a Message and Wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Send a Message and Wait - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . 338 Send a Message and Wait for One Receiver . . . . . . . . . . . . . . . . . . . . 338 Send a Message and Wait for One Receiver - Indirect . . . . . . . . . . . . . 339 Cancel Messages to Other Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 Types of Cancel Message Requests. . . . . . . . . . . . . . . . . . . . . . . . . . 339 Canceling a Single Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Canceling a Message - Indirect . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Canceling All Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Receive Message from Linked Phases . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Receiving a Message from a Linked Phase . . . . . . . . . . . . . . . . . . . . . 341 Receiving a Message from a Linked Phases - Indirect. . . . . . . . . . . . . . 341

Contents

Abort Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Download Batch Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Generating an Electronic Signature Request . . . . . . . . . . . . . . . . . . . . . 343 General Signature Request - Indirect . . . . . . . . . . . . . . . . . . . . . . . 343 Downloading Material-Based Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Chapter 8 Requesting Data from the Material Server . . . . . . . . . . . . . . . . . . . . . 345 Standard Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Material Standard Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Lot Standard Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Container Standard Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Custom Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Material Custom Attribute Fields . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Lot Custom Attribute Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Container Custom Attribute Fields . . . . . . . . . . . . . . . . . . . . . . . . . 350 Writing a Material Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 Uploading Data Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Material Server Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 Using the Enhanced Phase Logic Requests . . . . . . . . . . . . . . . . . . . . 353 Requests for Data from the Recipe Execution Environment . . . . . . . . . . . 354 Download Data from Container Currently in Use 7801 Request. . . . . . 355 Download Data from Material in Container Currently in Use 7802 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Download Data from Lot in Container Currently in Use 7803 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Upload Container Data into Container Currently in Use 7811 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 Upload Material Data into Material in Container Currently in Use 7812 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 Upload Lot Data into Lot in Container Currently in Use 7813 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Download the Current Bindings Container Selection Priority 7821 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Upload a Container Selection Priority for the Current Binding 7822 Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Download Sufficient Material Data 7831 Request . . . . . . . . . . . . . . . 365

xi

FactoryTalk Batch Technical Reference Vol. 1

Requests for Data from the Material Database . . . . . . . . . . . . . . . . . . . . 366 Download One Attribute of a Material - 80NN Request Series . . . . . . . . 367 Downloading Lot Attributes 81NN Request Series . . . . . . . . . . . . . . . 368 Downloading Container Attributes 83NN Request Series. . . . . . . . . . . 370 Downloading Container Priority Assignments 84NN Request Series . . . . 371 Uploading Material Attributes 85NN Request Series . . . . . . . . . . . . . . 372 Uploading Lot Attributes 86NN Request Series . . . . . . . . . . . . . . . . . 374 Uploading Container Attributes 88NN Request Series . . . . . . . . . . . . 375 Uploading Container Priority Assignments 89NN Request Series. . . . . . 377 Chapter 9 Modularizing the Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 About Process Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Equipment Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Control Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Define Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Define Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Modularization Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Physical Process Constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Identifying the Phases in the Selected Process . . . . . . . . . . . . . . . . . . . . 382 P & ID Drawing - Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 Chapter 10 Programming Phase Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Allocating Phase Memory Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Steps to Allocate Phase Memory Tags. . . . . . . . . . . . . . . . . . . . . . . . 386 Phase Memory Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 Parallel vs. Sequential Programming for Phase Logic. . . . . . . . . . . . . . 387

xii

Contents

Semi-Auto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Treat Modules as Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Modules of Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 Obey the State Transition Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 391 Project-Specific Phase Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Phase Logic Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Running Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Holding Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Aborting Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 Stopping Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 Restarting Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 Chapter 11 Phase Logic Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Communications Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Required Phase Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 Communication from the FactoryTalk Batch Server . . . . . . . . . . . . . . . . 401 Communication from the Phase Logic . . . . . . . . . . . . . . . . . . . . . . . . . 402 Watchdog Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 PLI Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Phase Logic Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 PLI Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 Programming the PLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 PLI Response to Watchdog Event . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Processing Non-State Commands and Events for a Phase. . . . . . . . . . . 410 PLI Response to a CLEAR_FAILURE Command . . . . . . . . . . . . . . . . . . 411 PLI Response To a REQ_COMPLETE Command . . . . . . . . . . . . . . . . . . 411 PLI Response To a REQ_ABORTACK Command . . . . . . . . . . . . . . . . . . 411 PLI Response To a REQ_ABORTFAIL Command . . . . . . . . . . . . . . . . . . 411 PLI Response To a REQ_RESET Command . . . . . . . . . . . . . . . . . . . . . 412 PLI Response To a REQ_FAILED Command . . . . . . . . . . . . . . . . . . . . 412 PLI Response To a SEMI_AUTO Command . . . . . . . . . . . . . . . . . . . . . 412 PLI Response To a RESUME Command . . . . . . . . . . . . . . . . . . . . . . . 412

xiii

FactoryTalk Batch Technical Reference Vol. 1

PLI Response To a NEW_PARAMETERS Command . . . . . . . . . . . . . . . . 413 PLI Phase State Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 SFC Graphical Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 SFC Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 System Files Reference Chapter 1 Understanding Batch File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Document Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Batch File Types - Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Chapter 2 Working with Area Model Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Structure Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Area Model File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 Field Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 Chapter 3 Working with RDB Recipe Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Header Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Recparam Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Step Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 Transition Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 Link Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 Formula Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 Transfer Table Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Unitreq Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 Materialrequirements Table Configuration . . . . . . . . . . . . . . . . . . . . . . . 486 Reportlimits Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 Bindpreferencespecifiers Table Configuration . . . . . . . . . . . . . . . . . . . . 488 Bindrequirementspecifiers Table Configuration . . . . . . . . . . . . . . . . . . . 489 LNF: Language Neutral Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Chapter 4 Working with Electronic Batch Records . . . . . . . . . . . . . . . . . . . . . . . . 493 Electronic Batch Record Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 Electronic Batch Record Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 End of Batch Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

xiv

Contents

Electronic Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 Event Journal Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 Enabling Event Journal Signatures . . . . . . . . . . . . . . . . . . . . . . . . . 505 Using Event Journal Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

xv

FactoryTalk Batch Technical Reference Vol. 1

xvi

INTEGRATED PRODUCTION & PERFORMANCE SUITE

Server API Communication Language Reference Production Management

Batch

SERVER API COMMUNICATION LANGUAGE REFERENCE

CHAPTER 1

FactoryTalk Batch Server API


This guide was developed to provide quick and easy access to information regarding the interface between the FactoryTalk Batch Server and the FactoryTalk Batch View the Server Application Programming Interface (API). It is intended to be used as a reference guide by those who want to develop custom interfaces.

Overview
The Server Application Programming Interface (API) is the interface between the FactoryTalk Batch Server and the FactoryTalk Batch View or a custom user interface application. The Server API allows you to collect batch control system information and command the Server to take some action. The two basic components of the Server API are:

Items

An Item is a named data structure that can be accessed through COM using the GetItem method.

Executes

An Execute is a command to the FactoryTalk Batch Server to perform some action. The following diagram depicts the relationships between the various components of a FactoryTalk Batch System. The Component Object Model (COM) or Distributed Component Object Model (DCOM) protocol is used between the View and the Server. You can use the COM or DCOM protocol between the FactoryTalk Batch Server and a custom user interface.
FactoryTalk Batch View COM / DCOM Protocol Custom User Interface COM / DCOM Protocol
Server API covered in this guide: Server API Communications Language Reference

Server API

Personal Computer (PC)

FactoryTalk Batch Server

ProcessConnected Device (PCD)

Phase

Phase API covered in: PCD Programmer's Technical Reference

The interface between the FactoryTalk Batch Server and the Phase is documented in the PCD Programmers Technical Reference.

FactoryTalk Batch Server API Technical Reference

Moving from DDE to COM


If you have existing applications that use DDE to interact with the FactoryTalk Batch Server, and you are upgrading these applications to work with FactoryTalk Batch 10.X or higher, you must modify your parsing program. Data returned from the Server via the COM interface is parsed differently than the data returned via the DDE interface. When using the DDE interface, the Server places a space between delimiters. When using the COM interface, the Server does not put a space between two consecutive delimiters. For example, issuing a request for the DataServersList item could return the following strings:

DDE Interface OPC_SIM \t STANDARD \t LOCAL \t <sp> \t OPC \t {3203642A-F66D-11d1-AD6C-00A024386728} \t PHASES \t WATCHDOG \t <sp> \t <sp> \t <sp> \t <sp> \crlf COM Interface OPC_SIM \t STANDARD \t LOCAL \t \t OPC \t {3203642A-F66D-11d1-AD6C-00A024386728} \t PHASES \t WATCHDOG \ t \t \t \t \crlf

You must address the new way in which the data is returned from the Server within your parsing logic. If your application was written in Visual Basic, you could address the new parsing requirement by using the Split method. You could pass the return string to the Split method creating an array with the number of elements equaling the number of fields in the string.

Using the COM Protocol


The COM interface allows programmers and system integrators to build applications that can command the FactoryTalk Batch Server and read information from the Server. The COM interface is built upon the set of data items and execute commands in the Server API. The COM interface allows Visual Basic and C/C++ programmers to use COM or DCOM as the inter-process communications protocol. Additionally, this interface allows a synchronous programming model. It is expected that the typical FactoryTalk Batch Server and BatchRemote objects user will be a Visual Basic programmer either writing a custom Visual Basic program or using a scripting language embedded within a third-party application.

Properties, Methods, and Events


An object is a combination of code that can be treated as a unit, such as a control, form, or application. Each object is defined by a class, and the FactoryTalk Batch library provides

1 FactoryTalk Batch Server API

two object classes, BatchControl.BatchServer and BatchRemote.RemoteSupport. Properties, methods, and events applying to objects are defined as follows:
Property A property is a named attribute of an object. Properties define object characteristics such as size, color, and screen location, or they can define the state of an object, such as enabled or disabled. A method is a procedure that acts upon an object. An event is an action recognized by an object, such as clicking the mouse or pressing a key, for which you can write code to respond. Events can occur as the result of a user action or program code, or can be triggered by the control. There are no events in this particular interface.

Method Event

BatchServer Object
The BatchServer object provides the mechanism used to interact with the FactoryTalk Batch Server by sending execute commands and retrieving data items. The BatchServer object represents the same interface the Batch ActiveX Controls Library uses for interacting with the FactoryTalk Batch Server. Thus, all information that is exposed from the Server application is exposed through this interface. Within a Visual Basic script, a user must dimension a BatchServer object in order to use the objects methods and property. Note that this does not start a new instance of the Server, but instead represents a new connection to an existing Server. Therefore, the Server must be running before the user can dimension a new BatchServer object. The BatchServer object is a simple object in that it exposes only two methods and a single property. These methods are GetItem and Execute. These map directly to the items and executes documented within this manual. Any item referenced in this manual can be retrieved through the GetItem method on the BatchServer object. Also, any execute referenced in this manual can be sent via the Execute method on the BatchServer object. (See Object Reference for more information.)

BatchRemote Object
The BatchRemote object is similar to the BatchServer object by providing a mechanism used to interact with the FactoryTalk Batch Server. However, the BatchRemote object provides additional features, allowing easier access to the Server from a remote computer. These additional features include the ability to automatically locate the Server computer and time out a connection. Automatically locating a Server from a remote client means that you will not need to specify the Servers computer name. This is especially useful as it allows client applications to be developed in a more generic manner. The Server name is written to the Windows registry during a client installation and can be accessed by the BatchRemote object. The timing out of a connection allows client applications to specify timeout periods for a call (GetItem or Execute) or for a connection. DCOM may take a significant amount of time to return an error code on a failed network. The BatchRemote object can minimize the time and effort required to implement error handling within the client. The timing out

FactoryTalk Batch Server API Technical Reference

of a connection also provides a means to keep a client from hanging while in a connect or call for an extended period. Within a Visual Basic script, you must dimension a BatchRemote object in order to use the objects methods and properties. Like the BatchServer object, the BatchRemote object exposes only two methods: GetItem and Execute. These map directly to the Items and Executes that are documented within this manual. Any Item referenced in this manual can be retrieved through the GetItem method on the BatchRemote object. Any Execute referenced in this manual can be sent via the Execute method on the BatchRemote object. In order to use the BatchRemote object, you must add the Batch Server Remote 1.0 Type Library to your Visual Basic project.
The BatchServer object is included in the FactoryTalk Batch Server application, the Batchsvr.exe file. The BatchRemote object is included in the Batchrem.dll file. Both files are located in the \Bin subdirectory where FactoryTalk Batch installs. A type library, Batchsvr.tlb, installs with the Server and can be loaded as a reference in Visual Basic. For more information on how to reference an ActiveX object in a Visual Basic project, see the Microsoft Visual Basic Programmer's Guide. Additionally, a header file, Batchsvr.h, is installed with the Server and can be used for C or C++ programming.

Available Items
The following is a list of all supported Items in the FactoryTalk Batch Server API:
ITEM BadTagCount (See page 14) BatchList (See page 14) BatchListCt (See page 16) DESCRIPTION An integer indicating the number of tags on which verification failed. A listing of all created batches. Batch List Count.

BatchOverrides (See page 17) Returns the number of Parameter Expression Overrides currently in effect for each batch on the batch list. BLBatchID_x (See page 18) Batch ID.

BLCMDMask_x (See page 19) Batchs Command Mask. BLCreateID_x (See page 20) BLDesc_x (See page 21) BLFailure_x (See page 22) BLMode_x (See page 23) BLRecipe_x (See page 24) Batchs Create ID. Batchs Description. Batchs Highest Priority Failure Message. Batchs Mode. Batchs Recipe.

BLStartTime_x (See page 25) Batchs Start Time. BLState_x (See page 26) BLType_x (See page 27) COMClientCount (See page 28) Batchs State. Batchs Type. Number of COM clients connected to the FactoryTalk Batch Server.

1 FactoryTalk Batch Server API

ITEM CPRVersion (See page 28) CreateIDBatchStepDataList (See page 29) CreateIDBatchStepDataList2 (See page 33) CreateIDEventData (See page 38) CreateIDEventDataFile (See page 39) CreateIDScale (See page 40)

DESCRIPTION Returns data describing the CPR version of the FactoryTalk Batch Server. A list of all steps in a recipe. A list of all steps in a recipe (allows displaying of override status of a parameter). The most recent data for a batch. The name of a batch data file. The scale factor of the batch.

DataServersList (See page 41) Information about all of the data servers defined for the equipment database. DataServerStatistics (See page 44) DDEClientCount (See page 45) DecimalSeparator (See page 45) Domains (See page 46) EnumSetEnumSet (See page 46) EquipmentModel (See page 47) EquipmentModelDate (See page 47) ErrorMessage (See page 47) EventDataFiles (See page 48) A detailed description of each configured data server conversation and the status of each conversation. Number of DDE clients connected to the Batch Server. The decimal symbol used by the FactoryTalk Batch Server. List of the Domain names available for authenticating users attempting Signoffs on Signature Requests. The list of enumerations within a specified enumeration set. Path and file name of the equipment model in use. Date of the equipment model in use. Most recent severe message in the servers log file. The list of event data fields in the system.

ExpressionIDParamExprValue Returns the current expression values for each term in the s (See page 50) expression. ExpressionIDReportExprValue Returns the current expression values for each term in a report s (See page 51) expression. ExpressionID_UnitID_Values Returns the current expression value and all of its leaf node (See page 49) values for a given expression/Unit association. HyperlinkLabels (See page 52) A tab-delimited list of hyperlink labels for each equipment type. IncompleteSignaturesCt (See page 53) InfoMessage (See page 53) A count of all incomplete signature requests, excluding those generated by private interfaces. Most recent information message in the servers log file.

FactoryTalk Batch Server API Technical Reference

ITEM ItemCount (See page 54) JournalDir (See page 54) ListSeparator (See page 54) Locale (See page 55) MatSvrStatus (See page 55) OPCClientCount (See page 56) PhaseDataList (See page 56) PhaseErrs (See page 58) PhaseErrsCt (See page 59)

DESCRIPTION Number of items created by the FactoryTalk Batch Server which are exposed through DDE and COM. A path to the journals directory. The list separator used by the FactoryTalk Batch Server, as read from the Control Panel/Regional Options. The locale identifier (language ID and code page) used by the FactoryTalk Batch Server, as read from the Control Panel. Returns a list of all phases in the system. The number of OPC clients connected to the FactoryTalk Batch Server. Information about all of the phases in the system. A list of all phases currently in failure or have an error A count of the phase errors or failure.

PhaseIDBatchID (See page 59) The batch information where the batch phase belongs. PhaseIDFailure (See page 60) The phase failure for the specified phase. PhaseIDInfo (See page 60) PhaseIDMessage (See page 61) PhaseIDOwnerFlag (See page 61) PhaseIDParms (See page 62) The name of the specified phase. The last phase message logged into the event journal for the specified phase. The current owner of the specified phase. All parameters for the specified phase.

PhaseIDParms2 (See page 63) All parameters for the specified phase including parameter limits and report limits. PhaseIDPause (See page 64) The pause attribute for the specified phase.

PhaseIDPausing (See page 64) The pausing attribute for the specified phase. PhaseIDPhaseData (See page 65) PhaseIDRequests (See page 66) PhaseIDSS (See page 67) PhaseIDState (See page 67) PhaseIDStepIndex (See page 68) PhaseIDUnit (See page 68) PhasesList (See page 69) PhasesList2 (See page 70) Current status information for the specified phase. The request value for the specified phase. The single-step flag for the specified phase. The state of the specified phase. Returns the current step index for the specified phase. The current unit for the specified phase. A list of all phases, corresponding equipment IDs, and valid units. A list of all equipment phases, corresponding equipment IDs, recipe phases, the phase type and valid units.

1 FactoryTalk Batch Server API

ITEM PhasesList3 (See page 71) ProcedureIDData (See page 72) ProcedureIDData2 (See page 78) ProcedureIDData3 (See page 85) ProcedureIDDevLimits (See page 92) ProcedureIDStatus (See page 94) ProcedureIDStatus2 (See page 99)

DESCRIPTION A list of all equipment phases, corresponding equipment IDs, recipe phases, phase types, bitmap files, and valid units. Graphical data for an SFC. Graphical data for an SFC, including transition names and comment information. Graphical data for an SFC, including transition names and comment information; supports parameter and report expressions. Recipe report parameters for a procedure. Status data for an SFC. Status data for an SFC (supports displaying the status of report and parameter expression).

ProcedureIDUnitRequirements The set of Unit Requirements configured within the specified (See page 105) recipe structure. ProcessCellBitMaps (See page 106) ProcessCellIDUnits (See page 107) ProcessCellsList (See page 108) ProcessCellsList2 (See page 109) RecipeDir (See page 110) RecipeList (See page 110) ResourceIDEqData (See page 113) ResourceIDHyperlinks (See page 124) ResourceIDInfo (See page 124) ResourceIDOwned (See page 125) ResourceIDOwners (See page 126) ResourceIDRequested (See page 127) The bitmap index for all process cells within the system. Information about all units in a process cell. A list of process cells in the current area. A list of process cells in the current area, including the process cell class name. The path to the recipe directory. Recipe information for all recipes released to production. The tag status information for all tags associated with the equipment module and state machine information to indicating the current status of the equipment module. A tab-delimited list of hyperlinks configured in the area model for the equipment element identified by the resource ID. The resource name denoted by the resource ID. A list of all resources and corresponding IDs currently owned by the operator. A list of all resource owners and the corresponding owner IDs. A list of all resources requested by the operator.

FactoryTalk Batch Server API Technical Reference

ITEM ResourceIDRequesters (See page 128) ResourceIDStrings (See page 128) ResourcesList (See page 129) ResourcesListX (See page 248) RunMode (See page 130) RunWithoutMatSvr (See page 130)

DESCRIPTION A list of all resource requesters and the corresponding Owner IDs. A list of the cross invocation strings associated with the resource specified by the ResourceID. A list of all resources and corresponding Equipment IDs. (XML) A list of all resources and corresponding Equipment IDs. Indicator of whether the server is running in demo or production mode. The time stamp when the server was started.

SignatureIDSig (See page 131) These items expose the detailed information for individual Signature requests, excluding those generated by private interfaces. Signatures (See page 136) StartTime (See page 137) StepsList (See page 137) StringLabels (See page 138) TagVerStatus (See page 139) TagVerStatusOrd (See page 139) ThousandsSeparator (See page 140) Time (See page 140) Time2 (See page 141) TimerSteps (See page 142) TimerIDTimerData (See page 143) TimerIDTimerStatus (See page 147) A list of all outstanding signature requests, excluding those generated by private interfaces. The time stamp of when the Batch Server was started. A list of all dynamic owners (control recipes) and owner IDs. The labels used for the generic strings. An internationalized string indicating the current state of the tag verification process. An integer indicating the current state of the tag verification process. The thousands separator used by the FactoryTalk Batch Server as read from the Control Panel. The current time from the FactoryTalk Batch Server and the conversation status of the data servers. The current time from the FactoryTalk Batch Server and the most severe conversation status of all defined data servers. Retrieves retrieves selected information about all of the Timer steps currently on the batch list. Retrieves information about the selected static information about a Tmer step on the batch list. Retrieves dynamic information about a specific Timer step.

TotalTagCount (See page 148) An integer value indicating the total number of tags configured in the equipment database. UEArea_x (See page 149) Unacknowledged Prompt Area.

UEBatchID_x (See page 150) Unacknowledged Prompt Batch ID.

1 FactoryTalk Batch Server API

ITEM UEDefault_x (See page 151) UEDesc_x (See page 152) UEEU_x (See page 153) UEEvent_x (See page 154)

DESCRIPTION The Default value for the xth Unacknowledged Event in the Unacknowledged Event List. Unacknowledged Prompt Description. Unacknowledged Prompt Engineering Units. Unacknowledged Prompt Event Type.

UEEventID_x (See page 155) Unacknowledged Prompt Event ID. UEHigh_x (See page 156) UELow_x (See page 157) UEPhase_x (See page 158) Unacknowledged Prompt High. Unacknowledged Prompt Low. Unacknowledged Prompt Phase.

UEProcCell_x (See page 159) Unacknowledged Prompt Process Cell. UERecipe_x (See page 160) UERespType_x (See page 161) UETime_x (See page 162) UEUnit_x (See page 163) UEValue_x (See page 164) UnAcknowledgedEvents (See page 165) UnacknowledgedEventsCt (See page 167) UnitBitMaps (See page 168) Unacknowledged Prompt Recipe. Unacknowledged Prompt Response Type. Unacknowledged Prompt Time. Unacknowledged Prompt Unit. Unacknowledged Prompt Value. A list of Unacknowledged Prompts. Unacknowledged Prompt Count. The bitmap index for all units.

UnitIDBatchID (See page 168) The operator entered batch ID for the batch which is running in the specified unit. UnitIDPhaseBitmaps (See page 169) UnitIDPhases (See page 170) A list of filenames for the bitmaps within the unit. All the phases within the specified unit.

UnitIDPhases2 (See page 171) A list of all the phases within the specified unit, including whether or not there is an associated control strategy. UnitIDUnitTagData (See page 172) The unit name, unit class, and tag status information for the specified unit.

UnitReqIDBindingPreferences The set of Binding Requirements configured on the specified Unit (See page 177) Requirement. UnitReqIDBindingRequireme The set of Binding Requirements configured on the specified Unit nts (See page 178) Requirement. UnitsList (See page 179) A list of all units, corresponding equipment IDs, and unit classes.

FactoryTalk Batch Server API Technical Reference

ITEM VerifiedTagCount (See page 179) Version (See page 180) WarningMessage (See page 181)

DESCRIPTION An integer indicating the total number of tags verified, including both tags that verified successfully and those that failed verification. Server software version. Most recent warning message in the FactoryTalk Batch Servers log file.

10

1 FactoryTalk Batch Server API

Available Executes
The following is a list of all supported executes in the Batch Server API:
EXECUTE Ack (See page 185) Acquire (See page 186) AddEvent (See page 187) AddEvent_CI (See page 188) AddEvent_Instruction (See page 189) AddEvent_Phase (See page 190) Archiver (See page 191) AutoBatchID_Info (See page 192) AutoRemove (See page 193) Batch (See page 194) Bind (See page 196) BindPhase (See page 197) CancelSignature (See page 199) Command (See page 200) ControlStrategy (See page 201) Enum (See page 202) Expression (See page 203) ForceTransistion (See page 204) GetContainerData (See page 205) GetFeedTypeAndMaterials (See page 207) GetLegalEqModules (See page 208) DESCRIPTION Acknowledge a prompt. Acquire a resource for the operator. Adds an event to all active event journals based on the BatchID. Adds a single event to the event journal based on the CreateID. Allows an external application to append an event associated with an eProcedure control step in an electronic batch record. Allows an external application to append an event in FactoryTalk Batch. Starts the Archiver application. Returns the BatchID from a call to BatchIDCreation. Tells the server to automatically remove a batch. Create a new batch (control recipe). Binds a unit to a step within a control recipe. Rebinds a step from its current equipment module to a new equipment module and optionally a new container. Cancels a signature request on an incomplete signature, excludes those that are generated by private interfaces. Send a command to a batch or procedure. Returns a list of control strategies configured for the specified phase. Obtains the enumeration sets defined in the FactoryTalk Batch Equipment Editor. Obtains the transition data from the server. Allows you to force a transition to fire when the only thing preventing it from firing is a TRUE evaluation of its transition expression. Obtains a list of container and lot data specifying what equipment module may be bound to for manually binding a material-enabled phase step. Obtains a list of feed types and materials that are supported by the equipment module. Obtains a list of equipment module - container - lot entries to be considered for manually binding or rebinding a phase step.

GetLegalUnits (See page 210) Obtains a list of units to which the step may be bound.

11

FactoryTalk Batch Server API Technical Reference

EXECUTE GetPossibleLegalUnits (See page 211) Info (See page 213) Info2 (See page 215) InfoTrimmed (See page 217)

DESCRIPTION Retrieves the possible binding options for a non-statically bound unit procedure or operation. Obtains information about a recipe. Obtains information about a recipe. Retrieves the information necessary for the formatting of a Batch execute that would be used to instantiate a batch.

MatSvrControl (See page 222) Reestablish communication with the Material Server. Messages (See page 223) Mtrl_Info (See page 224) Order (See page 225) ParamExpClear (See page 226) ParamExpOverride (See page 227) Parms (See page 228) Parms2 (See page 229) Phase (See page 230) Phase2 (See page 231) Phase3 (See page 232) Obtains a list of the messages associated with a particular phase. Returns the information necessary to allow a selection of material for a Material Server phase written as material class-based. Reorders the requesters list for a resource. Allows removal of an override of a specified expression that was created by a prior ParamExpOverride execute. Allows you to override the result of a parameter expression evaluation with a specified value. Obtains the parameters for a procedure. Obtains the parameters for a procedure with the addition of the parameter limits. Command a phase to a desired state. Commands a phase associated with a control strategy to a desired state. Commands a phase that may be material-enabled or control strategy and material-enabled.

ReactivateStep (See page 234) Commands the Batch server to journal a Step_Reactivation Request event. RecipeList (See page 235) Release (See page 236) Remove (See page 237) SetAllLabel (See page 237) SetAllLot (See page 239) SetParm (See page 240) SignoffSignature (See page 241) Step (See page 242) Tag_Verify (See page 244) User_Verify (See page 245) Obtains information about the recipes from the FactoryTalk Batch Recipe Editor. Release the resource from the operator. Remove a batch from the batch list. Sets the same Label on all material phase steps within a recipe. Sets the Lot Controller ID on a material phase step. Set the parameter values in a control recipe. Signs a signature request on an incomplete signature, excludes those generated by private interfaces. Change the active step in a procedure. Initiates or aborts the tag verification process. Determines if the password provided for a user is correct.

12

CHAPTER 2

Item Reference
An item is a named data structure that can be accessed using any data access technology supported by the FactoryTalk Batch Server like the custom COM interface GetItem method or through OPC. The following describes the formatting methods used for each of the Items:
Item Description Description Describes the item. Input Format Describes the COM/DCOM method that can be used to obtain this item (REQUEST). Use this format: object.GetItem itemName. For Example: object.GetItem(BatchList). Output Format Describes the data that is returned and the format in which it is displayed. All data is returned in CFTEXT format, representing either strings or integers. A list of the key characters and what they symbolize follows: <TEXT> <TEXT> TEXT is is is Denotes a variable which will be defined. Denotes a variable which will be expanded. Any text that is not enclosed in the < > characters is a keyword and appears as the literal string. Denotes an empty string, Cstring.Empty ( ), unless otherwise specified. Denotes a Tab character (ASCII - 9) which is used as a field delimiter. A space before and after the \t is included for readability, do not include the spaces when formatting the command line. Used to denote an OR situation. Only one segment of the statement will be used. For example, A | B | C \t D \crlf would indicate: A or B or C \t D \crlf. Denotes a Carriage Return (ASCII - 13) and a Line Feed (ASCII - 10) character which are used as a record delimiter. Denotes a space character (ASCII 32). (Refer to Command Masks.) (Refer to Arbitration Masks.)

<NullString> \t

is is

is

\crlf

is

<sp> blank <CmdMask> <ArbMask>

is is is

Example: Defines an example for the REQUEST statement: Input statement Output statement Some data returned with a request are localized. States and modes, as well as most information in the event journal are localized, based upon the language selected in the Control Panel. Time and date formats are based upon the systems International settings.
13

FactoryTalk Batch Server API Technical Reference

B AD T AG C OU NT
Description An integer indicating the number of tags on which verification failed. Input Format Request: BadTagCount Output Format The BadTagCount is returned in the following format: <Count> Field Name <Count> Format Description

ASCII - Integer The total number of tags that failed the verification.

Example: A request on object.GetItem(BadTagCount) could return: 2

B A TCH L IST
Description This item returns a list of all batches in the system. Input Format Request: BatchList Output Format The BatchList item is returned in the following format: <BatchList> <BList> <Batch> is is is <NullList> | <BList> <Batch> \crlf | <Batch> \crlf <BList> <BatchID> \t <RecipeName> \t <BatchDesc> \t <StartTime> \t <ElapsedTime> \t <State> \t <Mode> \t <Failures> \t <CreateID> \t <CmdMask> \t <BatchType> \t <ProcCellList> \t <UnitList> \t <PhaseList> Description Operator-entered batch identification number. Procedure identifier from the FactoryTalk Batch Recipe Editor. Procedure description from the FactoryTalk Batch Recipe Editor. Starting time for the batch, formatted according to Control Panel. May be a single space character. Time elapsed since batch started. If batch hasnt yet, started zero length string will be returned: 0:00:00. Current state of the batch. (Localized) Current mode of the recipe. (Localized) Describes failure message.

where <Batch> is: Field Name <BatchID> <RecipeName> <BatchDesc> <StartTime> <ElapsedTime> <State> <Mode> <Failures> <CreateID> <CmdMask> Format ASCII - String ASCII - String ASCII - String ASCII - String ASCII - String ASCII - String ASCII - String ASCII - String

ASCII - Integer The unique batch ID assigned by the FactoryTalk Batch Server. ASCII - Integer Command Masks - (Refer to Command Masks)

14

2 Item Reference

Field Name <BatchType>

Format

Description

ASCII - Integer The type of control: 1 = Recipe 2 = Manual Phase control Variable Variable Variable is is is is Process Cell(s) in which batch is running. Unit(s) in which batch is running. List of active phases in the recipe at this time.

<ProcCellList> <UnitList> <PhaseList> <ProcCellList> <NullList> <PCList> <ProcessCells> where: Field Name <PCellName> <UnitList> <NullList> <UList> <Units> where: Field Name <UnitName> <PhaseList> <NullList> <PHList> <Phases> where: Field Name <PhaseName>

where <ProcCellList> is: <NullList> | <PCList> $PRCL \t <sp> $END $PRCL \t <ProcessCells>\t $END <PCellName> | <PCellName> \t <ProcessCells> Description Procedure cells name

Format ASCII - String is is is is

where <UnitList> is: <NullList> | <UList> $UNIT \t <sp>$END $UNIT \t <Units>\t $END <UnitName> | <UnitName> \t <Units> Description Units Name

Format ASCII - String is is is is

where <PhaseList> is: <NullList> | <PHList> $PHASE \t <sp> $END $PHASE \t <Phases> \t $END <PhaseName> | <Phasename> \t <Phases> Description Phases Name

Format ASCII - String

15

FactoryTalk Batch Server API Technical Reference

Example: A request on the object.GetItem(Batchlist) could return: BATCH_98 \t CLS_FRENCHVANILLA \t FRENCH VANILLA PREMIUM - CLASS BASED \t \t 0:00:00 \t READY \t O_AUTO \t \t 15 \t 18976 \t 1 \t $PRCL \t SOUTH_PARLOR \t $END \t $UNIT \t SP_MIXER1 \t SP_FREEZER1 \t $END \t $PHASE \t $END \crlf BATCH_99 \t CLS_FRENCHVANILLA \t FRENCH VANILLA PREMIUM - CLASS BASED \t \t 0:00:00 \t READY \t O_AUTO \t \t 16 \t 18976 \t 1 \t $PRCL \t SOUTH_PARLOR \t $END \t $UNIT \t SP_MIXER1 \t SP_FREEZER1 \t $END \t $PHASE \t $END \crlf BATCH_100 \t MCLS_FRENCHVANILLA \t FRENCH VANILLA PREMIUM - CLASS BASED/MATERIAL BASED \t \t 0:00:00 \t READY \t O_AUTO \t \t 17 \t 18976 \t 1 \t $PRCL \t NORTH_PARLOR \t $END \t $UNIT \t NP_MIXER2 \t NP_FREEZER2 \t $END \t $PHASE \t $END \crlf

B A TCH L IST C T
Description This item returns the number of batches in the batch list. Input Format Request: BatchListCt Output Format The BatchListCt is returned in the following format: <NumberBatches> Field Name Format Description The number of batches currently in the batch list.

<NumberBatches ASCII > Integer

Example: A request on object.GetItem(BatchListCt) would return the following, assuming there are three batches on the batch list: 3

16

2 Item Reference

B A TCH O VERRIDES
Description This item returns the number of Parameter Expression Overrides currently in effect for each batch on the batch list. Input Format Request: BatchOverrides Output Format The BatchOverrides information is returned in the following format: <Statistics > <OverridesList> <OverrideRecord> Field Name <CreateID> Format is is is <NullList> | <OverridesList> <OverrideRecord> | <OverrideRecord> <OverridesList> <CreateID> \t <NumOverrides>\crlf

Description

ASCII String Integer, INTERNAL identifier assigned by the FactoryTalk Batch Server to a batch when it is created. This can be obtained from the BatchList item. ASCII - String Number of overrides in effect for the batch with this CreateID

<NumOverrides >

Example A request on object.GetItem(BatchOverrides) could return the following: 14 \t 3 \crlf 15 \t 0 \crlf 16 \t 5 \crlf

17

FactoryTalk Batch Server API Technical Reference

BLB A TC H ID _ X
Description This item returns the batch ID for the xth batch in the batch list. Input Format Request: BLBatchID_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLBatchID_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLBatchID_x item is returned in the following format: <BatchID> Field Name <Batch ID> Format Description

ASCII String The batch ID assigned by the operator during batch creation to the batch appearing on the xth row of the batch list.

Example: The following table is an example of a typical Batch List containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Start Time State RUNNING RUNNING RUNNING Mode O_Auto S_Auto O_Auto

Ice Cream 1 8/24/2004 1:22:02 pm Ice Cream 2 8/24/2004 1:24:12 pm Ice Cream 3 8/24/2004 1:32:30 pm

A request on object.GetItem(BLBatchID_3) would return the batch ID of the batch in the batch lists third row: BATCH_100

18

2 Item Reference

BLCMDM ASK _ X
Description This item returns the Command Mask field for the xth batch in the batch list. The command mask is a binary value (passed as an integer) whose bits represent the current set of valid commands this batch can receive. Input Format Request: BLCMDMask_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLCMDMask_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLCMDMask_x is returned in the following format: <CMDMask> Field Name <CmdMask> Format ASCII Integer Description The current set of valid commands that may be sent to the batch appearing on xth row of the batch list. (Refer to Command Masks).

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Ice Cream 1 Ice Cream 2 Ice Cream 3 Start Time State Mode

8/24/2004 1:22:02 pm RUNNING O_Auto 8/24/2004 1:24:12 pm RUNNING S_Auto 8/24/2004 1:32:30 pm RUNNING O_Auto

A request on object.GetItem(BLCMDMask_3) would return the Command Mask of the batch in the batch lists third row: 2087

19

FactoryTalk Batch Server API Technical Reference

BLC REA TE I D _ X
Description This item returns the CreateID for the xth batch in the batch list. Input Format Request: BLCreateID_<ROWNUMBER> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLCreateID_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLCreateID_x is returned in the following format: <CreateID> Field Name <Create ID> Format ASCII Integer Description The unique identifier assigned by the FactoryTalk Batch Server to the batch appearing on the xth row of the batch list.

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Create ID 15 16 17 Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Start Time State Mode

Ice Cream 8/24/2004 1 1:22:02 pm Ice Cream 8/24/2004 2 1:24:12 pm Ice Cream 8/24/2004 3 1:32:30 pm

RUNNIN O_Aut G o RUNNIN S_Aut G o RUNNIN O_Aut G o

A request on object.GetItem(BLCreateID_3) would return the CreateID of the batch in the batch lists third row: 17

20

2 Item Reference

BLD E S C _ X
Description This item returns the Description field for the xth batch in the batch list. Input Format Request: BLDesc_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLDesc_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLDesc_x item is returned in the following format: <Description> Field Name <Description> Format Description

ASCII String The description of the batch appearing on xth row of the batch list. The description is taken from the recipes header data.

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Ice Cream 1 Ice Cream 2 Ice Cream 3 Start Time State Mode

8/24/2004 1:22:02 pm RUNNING O_Auto 8/24/2004 1:24:12 pm RUNNING S_Auto 8/24/2004 1:32:30 pm RUNNING O_Auto

A request on object.GetItem(BLDESC_3) would return the description of the batch in the batch lists third row: Ice Cream 3

21

FactoryTalk Batch Server API Technical Reference

BLF AI LURE _ X
Description This item returns the batchs Failure field for the xth batch in the batch list. This field contains the highest priority failure message for the steps running within the recipe. Input Format Request: BLFailure_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

Output Format The BLFailure_x is returned in the following format:<Failure> Field Name <Failure> Format Description

ASCII String The failure message for the batch appearing on xth row of the batch list.

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Ice Cream 1 Ice Cream 2 Ice Cream 3 Start Time 8/24/2004 1:22:02 pm 8/24/2004 1:24:12 pm 8/24/2004 1:32:30 pm State RUNNING RUNNING RUNNING PHASE UNDER EXTERNAL CONTROL DETECTED Failure

A request on object.GetItem(BLFailure_3) would return the failure field of the batch in the batch lists third row: PHASE UNDER EXTERNAL CONTROL DETECTED

22

2 Item Reference

BLM O D E _ X
Description This item returns the Mode field for the xth batch in the batch list. Input Format Request: BLMode_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLMode_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch, list all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLMode_x item is returned in the following format: <Mode> Field Name <Mode> Format Description

ASCII String The current mode of the batch appearing on xth row of the batch list. (Refer to Valid States and Modes for a list of valid modes.)

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Start Time State Mode

Ice Cream 1 8/24/2004 1:22:02 pm Ice Cream 2 8/24/2004 1:24:12 pm Ice Cream 3 8/24/2004 1:32:30 pm

RUNNING O_Auto RUNNING S_Auto RUNNING O_Auto

A request on object.GetItem(BLMode_3) would return the mode of the batch in the batch lists third row: O_AUTO

23

FactoryTalk Batch Server API Technical Reference

BLR EC I P E _ X
Description This item returns the Recipe field for the xth batch in the batch list. Input Format Request: BLRecipe_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLRecipe_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a non-sorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLRecipe_x item is returned in the following format: <RecipeName> Field Name <RecipeName> Format Description

ASCII String The name of the batch appearing on xth row of the batch list.

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Desc Start Time State Mode

Ice Cream 1 8/24/2004 1:22:02 pm Ice Cream 2 8/24/2004 1:24:12 pm

RUNNING O_Auto RUNNING S_Auto RUNNING O_Auto

Premium Ice Cream 3 8/24/2004 1:32:30 French Vanilla pm

A request on object.GetItem(BLRecipe_3) would return the recipe name of the batch in the batch lists third row: Premium French Vanilla

24

2 Item Reference

BLS TA RT T IME _ X
Description This item returns the Start Time field for the xth batch in the batch list. Input Format Request: BLStartTime_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLStartTime_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a nonsorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLStartTime_x item is returned in the following format: <Time> Field Name <Time> Format Description

ASCII String The start time, formatted according to Windows internationalization and locality settings, of the batch appearing on xth row of the batch list.

Example: The following table is an example of a typical Batch List containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Premium French Vanilla Desc Start Time State Mode

Ice Cream 1 8/24/2004 1:22:02 pm RUNNING O_Auto Ice Cream 2 8/24/2004 1:24:12 pm RUNNING S_Auto Ice Cream 3 8/24/2004 1:32:30 pm RUNNING O_Auto

A request on object.GetItem(BLStartTime_3) would return the start time of the batch in the batch lists third row: 8/24/2004 1:32:30 pm

25

FactoryTalk Batch Server API Technical Reference

BLS TA TE _ X
Description This item returns the State field for the xth batch in the batch list. Input Format Request: BLState_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLState_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a non-sorted batch list. When a batch with an index of less than n is removed from the batch list all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLState_x is returned in the following format: <State> Field Name <State> Format Description

ASCII String The current state of the batch appearing on xth row of the batch list.

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Desc Ice Cream 1 Ice Cream 2 Start Time 8/24/2004 1:22:02 pm 8/24/2004 1:24:12 pm 8/24/2004 1:32:30 pm State Mode

RUNNING O_Auto RUNNING S_Auto RUNNING O_Auto

Premium Ice Cream 3 French Vanilla

A request on object.GetItem(BLState_3) would return the state field of the batch in the batch lists third row: RUNNING

26

2 Item Reference

BLT YPE _ X
Description This item returns the Type for the xth batch in the batch list, recipe or manual phase control. Input Format Request: BLType_<RowNumber> <RowNumber> is ASCII Integer An array index. When a batch is added to the batch list it is also added to an array. If the batch list is not sorted, then x is the row number of the batch appearing in the batch list.

The BLType_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxBatchTableLength = n where n is the maximum number of batches accessible to this Item (the maximum number of entries in the array). If the number of batches in the batch list is larger than n, then this item will only access the first n batches in a non-sorted batch list. When a batch with an index of less than n is removed from the batch list, all subsequent batches will have their index decreased by one. The default value of MaxBatchTableLength is 0 (zero). Output Format The BLType_x item is returned in the following format: <Type> Field Name <Type> Format Description

ASCII String The type of the batch appearing on xth row of the batch list. 1 = Recipe 2 = Manual Phase Control

Example: The following table is an example of a typical batch list containing three batches with batch IDs BATCH_98, BATCH_99, and BATCH_100: Shaded column represents batch data not displayed in the Batch List view. Batch ID BATCH_98 BATCH_99 BATCH_100 Recipe Vanilla Chocolate Desc State Mode O_Auto S_Auto O_Auto Type Recipe Manual Phase Control Recipe

Ice Cream 1 RUNNING Ice Cream 2 RUNNING

Premium Ice Cream 3 RUNNING French Vanilla

A request on object.GetItem(BLType_3) would return the batch type in the third row of the batch list: 1 A request on object.GetItem(BLType_2) would return the batch type in the second row of the batch list: 2

27

FactoryTalk Batch Server API Technical Reference

C OMC LI ENT C OU NT
Description This item returns the number of COM clients connected to the FactoryTalk Batch Server. Input Format Request: COMClientCount Output Format The COMClientCount is returned in the following format: <COMCount> Field Name <COMCount> Format Description

ASCII String The number of COM clients connected to the FactoryTalk Batch Server.

Example: A request on object.GetItem(COMClientCount) could return: 3

CPRV ERSION
Description This item returns data describing the CPR version of the FactoryTalk Batch Server. Input Format Request: CPRVersion Output Format The CPRVersion item is returned in the following format: < CPR Number > where: Field Name < CPR Number > Format Description

ASCII -Integer CPR number for the release containing this FactoryTalk Batch Server version.

Example A request on object.GetItem(CPRVersion) could return:


9

28

2 Item Reference

CREATEIDB A T CH S T E P D ATA L I ST
Description This item returns a list of all the steps in a recipe batch, and each steps status. Input Format Request: CreateIDBatchStepDataList CreateID is ASCII Integer, INTERNAL identifier assigned by the FactoryTalk Batch Server to a batch when it is created. This can be obtained from the BatchList item.

Output Format The CreateIDBatchStepDataList item is returned in the following format: <BSList> <StepList> <Step> is is is <NullList> | <StepList> <Step> \crlf | <Step> \crlf <StepList> <ID> \t <Name> \t <SP88Type> \t <KeyPName> \t <KeyValue> \t <State> \t <Mode> \t <UnitName> \t <Control> \t <Index> \t <Paused> \t <Msg> \t <Rqst> \t <Fail> \t <ParmList> \t <RepParmList> \t <OwnerID> \t <OwnerName> \t <CmdMask>

where: Field Name <ID> <Name> <SP88Type> Format ASCII Integer ASCII Integer Description Element ID (defined by ProcedureIDData item)

ASCII - String Element Name Step Type: 0 = Null 3 = Operation 1 = Procedure 4 = Phase 2 = Unit Procedure

<KeyPName> <KeyValue> <State> <Mode>

ASCII - String Key Parameter Name; may contain a single space if the step does not have a key parameter value. ASCII - String Steps Key Value; may contain a single space if the step does not have a key parameter value. ASCII - String Element State ASCII - String Steps Mode: O-AUTO P-AUTO S-AUTO MANUAL UNKNOWN ASCII - String Unit under which Step runs ASCII - String Who controls the Step: NONE PROGRAM EXTERNAL This field may contain a single space character if the step is not an active recipe element.

<UnitName> <Control>

<Index>

ASCII Integer

Step Index; the value may be a single space character if the step is not an active recipe element.

29

FactoryTalk Batch Server API Technical Reference

Field Name <Paused>

Format ASCII Integer

Description Indicates if the step is Paused. 0 = False 1 = True Only a Phase can have Paused = True. All others are False. Step Request, contents of request register Fail Message, single space if not active or no failures List of recipe parameters List of report parameters Element Owner ID, single space if step not of phase

<Msg> <Rqst> <Fail> <ParmList> <RepParmList> <OwnerID> <OwnerName> <CmdMask>

ASCII - String Step Message ASCII Integer ASCII- String Variable list Variable list ASCII Integer ASCII Integer <KeyValue> <ValueAndEU> <DefParamAndEU>

ASCII - String Owner Name, single space if step not of phase Command Masks (Refer to Command Masks)

where <KeyValue> is: is is is <ValueAndEU> | <DefParamAndEU> <DefaultValue> <sp> <EngUnits> <ParamName> <sp> <EngUnits>

where <ValueAndEU> is: Field Name <DefaultValue> <EngUnits> Field Name <ParamName> <EngUnits> Format Description

ASCII String Default value of display parameter ASCII String Engineering units associated with default value Format Description

where <DefParamAndEU> is:

ASCII String Name of the parameter to which the display parameter has been deferred ASCII String Engineering units associated with the deferred parameter <ParmList> <Parameters> <PList> <Parameter> is is is is $PARM \t <Parameters> \t $END <NullList> | <PList> <Parameter> | <Parameter> \t <PList> <ParmName> \t <Value>

where <ParmList> is:

Field Name <ParmName> <Value>

Format

Description

ASCII String Parameter Name ASCII String Current batch value ??? indicates that there is no value assigned.

30

2 Item Reference

where <RepParmList> is: <RepParmList> <Parameters> <RList> <Parameter> Field Name <ParmName> <Value> Format is is is is $REPORT \t <Parameters> \t $END <NullList> | <RList> <Parameter> | <Parameter> \t <RList> <ParmName> \t <Value>

Description

ASCII String Report Parameter Name ASCII String Current batch value

Example: The BatchList contains a batch with the CreateID of 21. Use the following Request to see a list of steps for this batch: object.GetItem(21BatchStepDataList), which could return: 627 \t BATCH_ID \t 3 \t \t MP_MIXERFREEZER2 \t RUNNING \t O_AUTO \t MP_MIXERFREEZER2 \t PROGRAM \t \t 0 \t \t \t \t $PARM \t \t $END \t $REPORT \t \t $END \t \t \t 2087 \crlf 661 \t MBR_ADD:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t SUGAR_GRANULATED \t AMOUNT \t 800 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 700 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n662 \t AGITATE:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf 632 \t MBR_ADD:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t EGG_YOLK \t AMOUNT \t 180 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 150 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n636 \t MBR_ADD:3 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t CREAM \t AMOUNT \t 2000 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 2000 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144 \crlf 660 \t TEMP_CTL:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t HOLD_TIME \t 5 \t TEMP_SP \t 71.1 \t $END \t $REPORT \t TEMPERATURE \t 0 \t TIME_HELD \t 0 \t $END \t \t \t 0 \crlf 659 \t AGITATE:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf

31

FactoryTalk Batch Server API Technical Reference

658 \t MBR_ADD:4 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t MILK \t AMOUNT \t 2000 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 2000 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n640 \t AGITATE:3 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf 644 \t MBR_ADD:5 \t 4 \t \t \t RUNNING \t P_AUTO \t MP_MIXERFREEZER2 \t PROGRAM \t 10 \t 0 \t \t 0 \t \t $PARM \t MATERIAL \t VANILLA \t AMOUNT \t 20 \t $BINDCONTAINER \t TEMPFLAVOR_VANILLA \t $BINDEQMODULE \t MP_ADDFLAVOR_MF2 \t $END \t $REPORT \t ACTUAL_AMOUNT \t \t FEED_COMPLETE \t \t $END \t -1142 \t 21:FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_1_O1 \t 32 \crlf 657 \t TEMP_CTL:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t HOLD_TIME \t 5 \t TEMP_SP \t 71.1 \t $END \t $REPORT \t TEMPERATURE \t \t TIME_HELD \t \t $END \t \t \t 0\n648 \t RECIRC:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t RECIRC_RATE \t 50 \t $END \t $REPORT \t FINAL_RECIRC_RATE \t \t $END \t \t \t 0\n652 \t MBR_DUMP:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t IC_FRENCH_VANILLA \t AMOUNT \t -5000 \t $BINDCONTAINER \t \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t \t FEED_COMPLETE \t \t $END \t \t \t 262144 \crlf

32

2 Item Reference

CREATEIDB A T CH S T E P D ATA L I ST 2
Description This item returns a list of all the steps in a recipe batch, and each steps status. Input Format Request: CreateIDBatchStepDataList2 CreateID is ASCII Integer, INTERNAL identifier assigned by the FactoryTalk Batch Server to a batch when it is created. This can be obtained from the BatchList item.

Output Format The CreateIDBatchStepDataList2 item is returned in the following format: <BSList> <StepList> <Step> is is is <NullList> | <StepList> <Step> \crlf | <Step> \crlf <StepList> <ID> \t <Name> \t <SP88Type> \t <KeyPName> \t <KeyValue> \t <State> \t <KeyValueStatus> t\ <Mode> \t <UnitName> \t <Control> \t <Index> \t <Paused> \t <Msg> \t <Rqst> \t <Fail> \t <ParmList> \t <RepParmList> \t <OwnerID> \t <OwnerName> \t <CmdMask>

where: Field Name <ID> <Name> <SP88Type> Format ASCII Integer ASCII Integer Description Element ID (defined by ProcedureIDData item)

ASCII - String Element Name Step Type: 0 = Null 3 = Operation 1 = Procedure 4 = Phase 2 = Unit Procedure

<KeyPName> <KeyValue>

ASCII - String Key Parameter Name; may contain a single space if the step does not have a key parameter value. ASCII - String Steps Key Value; may contain a single space if the step does not have a key parameter value. Step's Key Value Status of an expression: 0 or blank = OK or not an expression 1 = Override 2 = Exception 3 = Override, Exception 4 = Out of Range 5 = Override, Out of Range 6 = "Exception","Out of Range" 7 = Override, Exception, Out of Range

<KeyValueStatus> ASCII Integer

<State>

ASCII - String Element State

33

FactoryTalk Batch Server API Technical Reference

Field Name <Mode>

Format

Description

ASCII - String Steps Mode: O-AUTO P-AUTO S-AUTO MANUAL UNKNOWN ASCII - String Unit under which Step runs ASCII - String Who controls the Step: NONE PROGRAM EXTERNAL This field may contain a single space character if the step is not an active recipe element.

<UnitName> <Control>

<Index> <Paused>

ASCII Integer ASCII Integer

Step Index; the value may be a single space character if the step is not an active recipe element. Indicates if the step is Paused. 0 = False 1 = True Only a Phase can have Paused = True. All others are False. Step Request, contents of request register Fail Message, single space if not active or no failures List of recipe parameters List of report parameters Element Owner ID, single space if step not of phase

<Msg> <Rqst> <Fail> <ParmList> <RepParmList> <OwnerID> <OwnerName> <CmdMask>

ASCII - String Step Message ASCII Integer ASCII- String Variable list Variable list ASCII Integer ASCII Integer <KeyValue> <ValueAndEU> <DefParamAndEU>

ASCII - String Owner Name, single space if step not of phase Command Masks (Refer to Command Masks)

where <KeyValue> is: is is is <ValueAndEU> | <DefParamAndEU> <DefaultValue> <sp> <EngUnits> <ParamName> <sp> <EngUnits>

where <ValueAndEU> is: Field Name <DefaultValue> <EngUnits> Field Name <ParamName> <EngUnits> Format Description

ASCII String Default value of display parameter ASCII String Engineering units associated with default value Format Description

where <DefParamAndEU> is:

ASCII String Name of the parameter to which the display parameter has been deferred ASCII String Engineering units associated with the deferred parameter

34

2 Item Reference

where <ParmList> is: <ParmList> <Parameters> <PList> <Parameter> Field Name <ParmName> <Value> Format is is is is $PARM \t <Parameters> \t $END <NullList> | <PList> <Parameter> | <Parameter> \t <PList> <ParmName> \t <Value>

Description

ASCII String Parameter Name ASCII String Current batch value ??? indicates that there is no value assigned. <RepParmList> <Parameters> <RList> <Parameter> is is is is $REPORT \t <Parameters> \t $END <NullList> | <RList> <Parameter> | <Parameter> \t <RList> <ParmName> \t <Value>

where <RepParmList> is:

Field Name <ParmName> <Value>

Format

Description

ASCII String Report Parameter Name ASCII String Current batch value

35

FactoryTalk Batch Server API Technical Reference

Example: The BatchList contains a batch with the CreateID of 21. Use the following Request to see a list of steps for this batch: object.GetItem(21BatchStepDataList), which could return: 627 \t BATCH_ID \t 3 \t \t MP_MIXERFREEZER2 \t RUNNING \t O_AUTO \t MP_MIXERFREEZER2 \t PROGRAM \t \t 0 \t \t \t \t $PARM \t \t $END \t $REPORT \t \t $END \t \t \t 2087 \crlf 661 \t MBR_ADD:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t SUGAR_GRANULATED \t AMOUNT \t 800 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 700 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n662 \t AGITATE:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf 632 \t MBR_ADD:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t EGG_YOLK \t AMOUNT \t 180 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 150 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n636 \t MBR_ADD:3 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t CREAM \t AMOUNT \t 2000 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 2000 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144 \crlf 660 \t TEMP_CTL:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t HOLD_TIME \t 5 \t TEMP_SP \t 71.1 \t $END \t $REPORT \t TEMPERATURE \t 0 \t TIME_HELD \t 0 \t $END \t \t \t 0 \crlf 659 \t AGITATE:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf

36

2 Item Reference

658 \t MBR_ADD:4 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t MILK \t AMOUNT \t 2000 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 2000 \t FEED_COMPLETE \t YES \t $END \t \t \t 262144\n640 \t AGITATE:3 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t SPEED_RATE \t 5 \t $END \t $REPORT \t MIX_SPEED \t 30 \t $END \t \t \t 0 \crlf 644 \t MBR_ADD:5 \t 4 \t \t \t RUNNING \t P_AUTO \t MP_MIXERFREEZER2 \t PROGRAM \t 10 \t 0 \t \t 0 \t \t $PARM \t MATERIAL \t VANILLA \t AMOUNT \t 20 \t $BINDCONTAINER \t TEMPFLAVOR_VANILLA \t $BINDEQMODULE \t MP_ADDFLAVOR_MF2 \t $END \t $REPORT \t ACTUAL_AMOUNT \t \t FEED_COMPLETE \t \t $END \t -1142 \t 21:FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_1_O1 \t 32 \crlf 657 \t TEMP_CTL:2 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t HOLD_TIME \t 5 \t TEMP_SP \t 71.1 \t $END \t $REPORT \t TEMPERATURE \t \t TIME_HELD \t \t $END \t \t \t 0\n648 \t RECIRC:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t RECIRC_RATE \t 50 \t $END \t $REPORT \t FINAL_RECIRC_RATE \t \t $END \t \t \t 0\n652 \t MBR_DUMP:1 \t 4 \t \t \t \t \t MP_MIXERFREEZER2 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t IC_FRENCH_VANILLA \t AMOUNT \t -5000 \t $BINDCONTAINER \t \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t \t FEED_COMPLETE \t \t $END \t \t \t 262144 \crlf

37

FactoryTalk Batch Server API Technical Reference

CREATEIDE V E NT D ATA
Description This item returns the data regarding the most recently generated event for the specified batch. Input Format Request: CreateIDEventData CreateID is ASCII Integer, INTERNAL identifier assigned by the Batch Server to a batch when it is created. This can be obtained from the BatchList item.

Output Format The CreateIDEventData is returned in the following format: <EvtData> where: <SVRSignal> where <EList> is: <EList> <Event> is is <Event> | <Event> <EList> <Time> \t <BatchID> \t <RecipePath> \t <Description> \t <EventType> \t <Value> \t <EngUnits> \t <Area> \t <PCell> \t <Unit> \t <EQMName> \t <PhaseType> \t <UserID> \t <CreateID> \crlf ASCII Integer 0 = continue update of data for this advise 1 = discontinue update of data for this advise is <SVRSignal> \crlf <EList>

Field Name <Time> <BatchID> <RecipePath> <Description> <EventType> <Value> <EngUnits> <Area> <PCell> <Unit> <EQMName> <PhaseType> Field Name <User>

Format

Description

ASCII String The time at which the event occurred. ASCII String Operator entered batch identification number. ASCII String Procedure identifier from the FactoryTalk Batch Recipe Editor. ASCII String A description of the event. ASCII String The type of event. ASCII String The value associated with the event. ASCII String Engineering units associated with the event, if any. ASCII String The Area from the Equipment database. ASCII String The process cell in which the event occurred. ASCII String The unit in which the event occurred. ASCII String The equipment module in which the event occurred. ASCII String Phase Class Category. Format Description

ASCII String Machine Name/User Name of person who issued this event to the FactoryTalk Batch Server. This may not be displayed if the event was not generated by the operator. ASCII Integer The unique batch ID assigned by the FactoryTalk Batch Server.

<CreateID>

38

2 Item Reference

Example: A request on object.GetItem(17EventData) could return: 2004.08.24 16:20:54 \t BATCH_100 \t 17:MCLS_FRENCHVANILLA\MCLS_SWEETCREAM_UP:1\MCLS_ SWEETCREAM_OP:1-1 \t State Changed: \t State Change \t RUNNING \t \t AREA1 \t NORTH_PARLOR \t NP_MIXER2 \t \t \t \t 17 \t \t \t \t \t \t \t \r\n

CREATEIDE V E NT D ATA F IL E
Description This item returns the path to the electronic batch record file as long as it has not been removed from the batch list. Input Format Request: CreateIDEventDataFile CreateID is ASCII Integer, INTERNAL identifier assigned by the Batch Server to a batch when it is created. This can be obtained from the BatchList item.

Output Format The CreateIDEventDataFile is returned in the following format: <PathToEventDataFile> <PathToJournalDirectory> is is <PathToJournalDirectory><EventFile> <DriveLetter>:<PathToDirectory>\ as defined in the Batchsvr.ini file under [EventManager] section, EventDirectoryPath item. <CreateID>.EVT

<EventFile> Field Name <CreateID> Format ASCII Integer

is

Description This is the same CreateID as described in the Input Format, above.

Example: A request on the object.GetItem(17EventDataFile) could return: \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\SAMPLEAPP\JOURNALS\17.evt

39

FactoryTalk Batch Server API Technical Reference

CREATEIDS CALE
Description This item returns the scale factor defined when the batch was created. Input Format Request: CreateIDScale CreateID is ASCII Integer, INTERNAL identifier assigned by the FactoryTalk Batch Server to a batch when it is created. This can be obtained from the BatchList item.

Output Format The CreateIDScale is returned in the following format: <ScaleText> where: Field Name <ScaleText> Format ASCII Integer Description String representation of batch scale where 1 represents 100% and 0.5 would be 50%

Example: A request on the object.GetItem(3scale) could return: 0.75

40

2 Item Reference

D A T A S E R V E R S L IST
Description This item returns information about all of the data servers defined for the equipment database. Input Format Request: DataServersList Output Format The DataServersList is returned in the following format: <DataServersList> <ServerList> <DataServersList> where: <Server> is <DataServerName> \t <WatchdogProtocol> \t <Location> \t <RemoteNodeName> \t <Protocol> \t <ServerIdentifier> \t <ConfigString1> \t <ConfigString2> \t <ConfigString3> \t <ConfigString4> \t <LocaleID> \t <BadValueString> \crlf is is is <ServerList> <NullList> | <DataServersList> <Server> | <Server> \t <DataServersList>

where: Field Name <DataServer Name> Format ASCII - String Description Configured name of the data server. Indicates configuration option in the equipment database: OPC: DDE: CIP:
*FTD:

<WatchdogProtoc ASCII - String ol>

Either ENHANCED or STANDARD, indicating configured behavior in area model. Either ENHANCED or STANDARD, indicating configured behavior in area model. Unused (<sp>) Either ENHANCED or STANDARD, indicating configured behavior in area model. Either LOCAL or REMOTE, indicating configuration of data server in area model. Either LOCAL or REMOTE, indicating configuration of data server in area model. LOCAL (only possible selection for CIP server) LOCAL (only possible selection for FTD server)

<Location>

ASCII - String

Indicates configuration option in the equipment database: OPC: DDE: CIP: FTD:

41

FactoryTalk Batch Server API Technical Reference

Field Name <RemoteNode Name>

Format

Description OPC: If <Location> is REMOTE, this is the remote nodes configured name where the OPC data server is located. If <Location> is LOCAL, this field is unused (<sp>). If <Location> is REMOTE, this is the remote nodes configured name where the DDE data server is located. If <Location> is LOCAL, this field is unused (<sp>). Unused (<sp>) Unused (<sp>)

ASCII String The configured name of the remote node:

DDE:

CIP: FTD: <Protocol> <ServerIdentifier >

ASCII String Indicates the data server type selected in the equipment database. Legal values are OPC, DDE, CIP, and FTD. ASCII String Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD: An 128-bit GUID indicating the ClassID of the OPC server. The Application name used in establishing a connection to the DDE server. The string constant RSLinx. The Area Path used in establishing a connection to the FTD server. The data servers configured watchdog read item access path. The data servers configured watchdog read item topic. Controller Path The data servers configured watchdog read item access path. The data servers configured watchdog read item name. The data servers configured watchdog read item name. Controller Type The data servers configured watchdog read item name.

<ConfigString1>

ASCII String Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

<ConfigString2>

ASCII String Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

42

2 Item Reference

Field Name <ConfigString3>

Format

Description OPC: DDE: CIP: FTD: The data servers configured watchdog write item name. The data servers configured watchdog write item topic. Unused (<sp>). The data servers configured watchdog write item access path. The data servers configured watchdog write item name. The data servers configured watchdog write item name. Unused (<sp>). The data servers configured watchdog write item name. Unused (<sp>) The configured LocaleID of the data server. Unused (<sp>) Unused (<sp>) Unused (<sp>) The data servers configured Bad Value string. Unused (<sp>) Unused (<sp>)

ASCII String Protocol specific configuration string exposed as follows:

<ConfigString4>

ASCII String Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

<LocaleID>

ASCII Integer

Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

<BadValueString >

ASCII String Protocol specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

Example: A request on object.GetItem(DataServersList) could return: INSTRUCTIONBASEDSERVER \t STANDARD \t LOCAL \t \t OPC \t {473B5480-888D-11d2-811B-0800363B4A03} \t INSTRUCTIONS \t WATCHDOG \t \t \t \t \crlf OPC_SIM \t STANDARD \t LOCAL \t \t OPC \t {3203642A-F66D-11d1-AD6C-00A024386728} \t PHASES \t WATCHDOG \t \t \t \t \crlf * The FactoryTalk Live Data (FTD) protocol provides services that read and write real-time manufacturing data from OPC servers and controllers for all participating FactoryTalk-enabled products in the FactoryTalk Directory. (See the FactoryTalk Batch Equipment Editor Users Guide for information on configuring an RSLinx Enterprise Live Data server for FactoryTalk Batch.)

43

FactoryTalk Batch Server API Technical Reference

D A T A S ERVER S TATISTICS
Description This item returns a detailed description of each configured data server conversation and each conversations status. Input Format Request: DataServerStatistics Output Format The DataServerStatistics information is returned in the following format: <Statistics > <ServerList> <ServerRecord> is is is <NullList> | <ServerList> <ServerRecord> | <ServerRecord> <ServerList> <ServerName> \t <ConfigString1> \t <ConfigString2> \t <ConversationStatus> \t <WatchDog> \crlf

where <ServerRecord> is: Field Name <ServerName> <ConfigString1> Format Description

ASCII - String The name of the data server. ASCII - String Protocol-specific configuration string exposed as follows: OPC: DDE: CIP:
*FTD:

Data Server brand name from DSDF file. Application Name used to connect to data server. The string constant RSLinx. The Area Path used in establishing a connection to the FactoryTalk Live Data server. Data Servers configured Watchdog read item access path. Topic name used to connect with data server. Controller Path Data Servers configured Watchdog read item access path.

<ConfigString2>

ASCII - String Protocol-specific configuration string exposed as follows: OPC: DDE: CIP: FTD:

<Conversation Status> <WatchDog>

ASCII String The language-specific word for the current conversation status between the Batch Server and the data server: Good, Bad, Suspect, or Lost ASCII String Protocol-specific configuration string exposed as follows: OPC: DDE: CIP: FTD: Data Servers configured Watchdog read item name. Data Servers watchdog item name. Unused (<sp>) Data Servers configured Watchdog read item name.

44

2 Item Reference

Example: A request on the object.GetItem(DataServerStatistics) could return the following for two servers: OPC_SIM \t \t PHASES \t GOOD \t WATCHDOG \crlf INSTRUCTIONBASEDSERVER \t \t INSTRUCTIONS \t GOOD \t WATCHDOG \crlf * The FactoryTalk Live Data (FTD) protocol provides services that read and write real-time manufacturing data from OPC servers and controllers for all participating FactoryTalk-enabled products in the FactoryTalk Directory. (See the FactoryTalk Batch Equipment Editor Users Guide for information on configuring an RSLinx Enterprise Live Data server for FactoryTalk Batch.)

D D E C LI ENT C OU NT
Description This item returns the number of DDE clients connected to the FactoryTalk Batch Server. Input Format Request: DDEClientCount Output Format The DDEClientCount is returned in the following format: <DDECount> Field Name <DDECount> Format Description

ASCII - String The number of DDE clients connected to the FactoryTalk Batch Server.

Example: A request on the object.GetItem(DDEClientCount) could return: 1

D ECIMAL S EPARATOR
Description This item returns the decimal symbol being used by the FactoryTalk Batch Server. Input Format Request: DecimalSeparator Output Format The DecimalSeparator is returned in the following format: <Character> Field Name <Character> Format Description

ASCII String The decimal character for the language specific operating system.

Example: A request on object.GetItem(DecimalSeparator) could return: .

45

FactoryTalk Batch Server API Technical Reference

D O M AI NS
Description This item returns an empty list. Input Format Request: Domains Output Format The Domains is returned in the following format:

<Domains> <DomainList>

is is

<Domain> | <DomainList> <Domain> | <Domain> \t <DomainList>

Field Name <Domain>

Format

Description

ASCII - String The name of a supported Domain for user ID authentication passed in Signoff.

Example: A request on object.GetItem(Domains) returns: []

ENUMSETE NU M S ET
Description This item returns the names and ordinal values for each enumeration within the specified enumeration set as defined in the current area model. Input Format Request only: EnumSetEnumSet EnumSet is ASCII text, any enumeration set name as defined in the equipment database.

Output Format The EnumSetEnumSet is returned in the following format: <EnumList> <EList> Field Name <EnumName> <OrdValue> Format is is <EList> | <EList> <EnumList> <EnumName> \t <OrdValue> \crlf

Description

ASCII String The enumeration name. ASCII String The ordinal value associated with the enumeration.

Example: A request on object.GetItem(YES_NOEnumSet) could return: NO \t 0 \crlf YES \t 1 \crlf

46

2 Item Reference

E QUI PMENT M O D E L
Description This item returns the path and file name of the equipment model in use. Input Format Request: EquipmentModel Output Format The EquipmentModel is returned in the following format: <PathName> Field Name <PathName> Format Description

ASCII String The path and file name of equipment model in use.

Example: A request on object.GetItem(EquipmentModel) could return: \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\SAMPLEAPP\RECIPES\ICE_CREAM.CFG

E QUI PMENT M O D E L D ATE


Description The timestamp on the equipment model that was loaded by the FactoryTalk Batch Server upon startup. Input Format Request: EquipmentModelDate Output Format The EquipmentModelDate is returned in the following format: <Date> Field Name <Date> Format Description

ASCII - String Time stamp of equipment model. Example: A request on object.GetItem(EquipmentModelDate) could return: 2004.08.24 10:05:16

E RR OR M ESSAGE
Description This item returns the most recent severe message in the FactoryTalk Batch Servers log file. Input Format Request: ErrorMessage Output Format The ErrorMessage is returned in the following format: <Time> \t <Description> \t <Additional Data>\crlf Field Name <Time> <Description> Format ASCII String ASCII String Description The time when the message was generated. General message description. More specific message information May be <NullString> or a blank space character <sp>.

<Additional Data> ASCII String

Example: A request on object.GetItem(ErrorMessage) could return: 2004.08.24 16:14:49:220 \t SETTING CONVERSATION STATUS BAD \t SERVER:OPC_SIM \crlf

47

FactoryTalk Batch Server API Technical Reference

E VENT D ATA F IL ES
Description This item returns the list of event data files in the system. Input Format Request: EventDataFiles Output Format The EventDataFiles is returned in the following format: <EvtDataFiles> <EvtFileList> <EventFile> where <EventFile> is: Field Name <BatchID> <CreateID> <Description> <FilePath> Format Description is is is <NullList> | <EvtFileList> <EventFile> | <EventFile> <EvtFileList> <BatchID> \t <CreateID> \t <Description> \t <FilePath> \t <StartTime> \t <RecipeName> \crlf

ASCII - String Operator-entered batch ID number. ASCII Integer The unique batch ID assigned by the FactoryTalk Batch Server.

ASCII - String Procedure description from the FactoryTalk Batch Recipe Editor. ASCII - String Complete file name and event file path as defined in the BATCHSVR.INI file under [EventManager] section, EventDirectoryPath item. ASCII - String The time at which the batch started. May be a blank space character if the batch has not yet started. ASCII - String Recipe file name.

<StartTime> <RecipeName>

Example: A request on object.GetItem(EventDataFiles) could return: BATCH_98 \t 15 \t French Vanilla Premium - class based \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH \SAMPLEAPP\JOURNALS\15.evt \t \t CLS_FRENCHVANILLA \crlf BATCH_99 \t 16 \t French Vanilla Premium - class based \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH \SAMPLEAPP\JOURNALS\16.evt \t \t CLS_FRENCHVANILLA \crlf BATCH_100 \t 17 \t French Vanilla Premium - class based/material based \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE \BATCH\SAMPLEAPP\JOURNALS\17.evt \t 2004.08.24 16:20:54 \t MCLS_FRENCHVANILLA \crlf

48

2 Item Reference

EXPRESSIONID_UNITID_V AL UES
Description This item returns the current expression value and all of its leaf node values for a given expression/Unit association. Input Format Request: ExpressionID_UnitID_Values ExpressionID is ASCII - Integer, the unique ID of an Expression. This value can be retrieved using the UnitReqIDBindingRequirements data item or the UnitReqIDBindingPreferences data item. ASCII - Integer, the unique ID of a Unit Instance. This value can be retrieved using the UnitsList data item.

UnitID

is

Output Format The ExpressionID_UnitID_Values is returned in the following format: where: <ExpressionValues> <ExpressionData> <LeafValuePairs> <LeafValueList> <LeafPair> where: Field Name <ErrorData> Format Description is is is is is <ExpressionValue> <ExpressionData> <ErrorData> | <LeafValuePairs> <NullList> | /t <LeafValueList> <LeafPair> | <LeafPair> /t <LeafValueList> <LeafName> /t <LeafValue>

ASCII - String String describing error that prevents proper evaluation of Binding Expression. This is typically either a parsing error or a mathematical exception. The evaluated value of the expression.

<ExpressionValue ASCII > Variable <LeafName> <LeafValue> <NullList> ASCII Variable

ASCII - String The name of the leaf from the expression. The value of the leaf from the expression.

ASCII - String Empty string

Example: A request on object.GetItem(15_4_Values), ) which is associated with the expression "(25 <= ON_SCAN_READY) AND ( ON_SCAN_READY <= 75) OR ON_SCAN_READY >= 0"could return:
TRUE/tON_SCAN_READY/t0/t0/t0/ON_SCAN_READY/t/t0/t75/t75/ t25/t25/ON_SCAN_READY/t0

49

FactoryTalk Batch Server API Technical Reference

EXPRESSIONIDP ARAM E X P R V AL UES


Description This item returns the current expression value and all of its leaf node values for a given parameter expression. Input Format Request: ExpressionIDParamExprValues ExpressionID is ASCII - Integer, the unique ID of a parameter expression. This value can be retrieved using the ProcedureIDData3 data item.

Output Format The ExpressionIDParamExprValues is returned in the following format: where: <ExpressionValues> is <ExpressionText> /t <CurrentValue> /t <ExpressionStatus> /t <ExpressionValue> /t <LeafValuePairs>
<NullList> | /t <LeafValueList> <LeafPair> | <LeafPair> /t <LeafValueList> <LeafName> /t <LeafValue>

<LeafValuePairs> <LeafValueList> <LeafPair> where: Field Name <ExpressionText> <CurrentValue> Format ASCII Variable

is
is is

Description The expression current value. Note this may be changed by Parameter expression overrides or forced to Bad Value (???) by range limit checks.

ASCII - String The configured expression text.

<ExpressionStatus ASCII - Integer Integer value of Parameter Expression Status Mask if > parameter is a parameter expression, else a single space character. Parameter Expression Status Mask bits are defined as:

Bit 0 - Expression Forced Bit 1 - Expression Evaluation Exception Bit 2 - Expression Evaluating Out of Range

<ExpressionValue > <LeafName> <LeafValue> <NullList>

ASCII Variable ASCII Variable

The value to which the expression would currently evaluate ignoring expression overrides and range limit checks. The value of the leaf from the expression.

ASCII - String The name of the leaf from the expression.

ASCII - String Empty string

Example: A request on object.GetItem(9ParamExprValues) could return: CLS_FRENCHVANILLA_OP.FLAVOR_AMOUNT + ADD_FLAVOR:1.AMOUNT_ADDED ) / RECIRC:1.RECIRC_RATE<t> 2<t> 0<t> 2<t> CLS_FRENCHVANILLA_OP.FLAVOR_AMOUNT<t> 50<t> ADD_FLAVOR:1.AMOUNT_ADDED<t> 50<t> RECIRC:1.RECIRC_RATE<t> 50

50

2 Item Reference

EXPRESSIONIDR EPORT E X PR V ALU ES


Description This item returns the current expression value and all of its leaf node values for a given report expression. Input Format Request: ExpressionIDReportExprValues ExpressionID is ASCII - Integer, the unique ID of a report expression. This value can be retrieved using the ProcedureIDData3 data item.

Output Format The ExpressionIDReportExprValues is returned in the following format: where: <ExpressionValues> <LeafValuePairs> <LeafValueList> <LeafPair> where: Field Name <ExpressionText> <ExpressionValue > Format ASCII Variable Description The current value of the report expression. Note this may be Bad Value (???) if the report expression calculation condition has not been reached. If the report expression has not yet been evaluated, there will be no <LeafValuePairs> The value of the leaf from the expression. is is
is is

<ExpressionText> /t <ExpressionValue> <LeafValuePairs>


<NullList> | /t <LeafValueList> <LeafPair> | <LeafPair> /t <LeafValueList> <LeafName> /t <LeafValue>

ASCII - String The configured expression text.

<LeafName> <LeafValue> <NullList>

ASCII - String The name of the leaf from the expression. ASCII Variable

ASCII - String Empty string

Example: A request on object.GetItem(15ReportExprValues) could return: ADD_CREAM:1.AMOUNT_ADDED+ADD_MILK:1.AMOUNT_ADD ED+ADD_SUGAR:1.AMOUNT_ADDED<t>35.98<t>ADD_CREAM:1. AMOUNT_ADDED<t>15.7<t>ADD_MILK:1.AMOUNT_ADDED<t>1 4.69<t>ADD_SUGAR:1.AMOUNT_ADDED<t>5.59

51

FactoryTalk Batch Server API Technical Reference

H YPERLINK L ABEL S
Description The HyperlinkLabels item returns a tab-delimited list of hyperlink labels for each equipment type: process cells, units, equipment phases, and shared resources. Each equipment type can contain up to five hyperlink labels. Input Format Request: HyperlinkLabels Output Format The HyperlinkLabels is returned in the following format: <PCellLabels> \crlf <UnitLabels> \crlf <PhaseLabels> \crlf <ShResrcLabels> where: <PCellLabels> <UnitLabels> <PhaseLabels> <ShResrcLabels> where: Field Name <PCL#> <UL#> <PL#> <SRL#> Format Description is is is is <PCL1> \t <PCL2> \t <PCL3> \t <PCL4> \t <PCL5> <UL1> \t <UL2> \t <UL3> \t <UL4> \t <UL5> <PL1> \t <PL2> \t <PL3> \t <PL4> \t <PL5> <SRL1> \t <SRL2> \t <SRL3> \t <SRL4> \t <SRL5>

ASCII String Where # is an integer from 1 to 5. Hyperlink label for a process cell. ASCII String Where # is an integer from 1 to 5. Hyperlink label for a unit. ASCII String Where # is an integer from 1 to 5. Hyperlink label for a phase. ASCII String Where # is an integer from 1 to 5. Hyperlink label for a shared resource.

Example: A request on object.GetItem(HyperlinkLabels) could return: Hyperlink Label 1 English Process Cell \t Hyperlink Label 2 English Process Cell \t Hyperlink Label 3 English Process Cell \t Hyperlink Label 4 English Process Cell \t Hyperlink Label 5 English Process Cell \crlf Hyperlink Label 1 English Unit \t Hyperlink Label 2 English Unit \t Hyperlink Label 3 English Unit \t Hyperlink Label 4 English Unit \t Hyperlink Label 5 English Unit \crlf Hyperlink Label 1 English Phase \t Hyperlink Label 2 English Phase \t Hyperlink Label 3 English Phase \t Hyperlink Label 4 English Phase \t Hyperlink Label 5 English Phase \crlf Hyperlink Label 1 English Resource String \t Hyperlink Label 2 English Resource String \t Hyperlink Label 3 English Resource String \t Hyperlink Label 4 English Resource String \t Hyperlink Label 5 English Resource String \crlf

52

2 Item Reference

I N C O M PL E T E S IG NATU RES C T
Description This item returns a count of all incomplete signature requests (excluding those generated by private interfaces). Input Format Request: IncompleteSignaturesCt Output Format The IncompleteSignaturesCt is returned in the following format: <NumSignatures> where: Field Name Format Description The number of incomplete signatures in the batch system (excluding those generated by private interfaces).

<NumSignatures> ASCII Integer

I NFO M E S S A G E
Description This item returns the most recent information message in the FactoryTalk Batch Servers log file. Input Format Request: InfoMessage Output Format The InfoMessage is returned in the following format: <Time> \t <Description> \t <Additional Data> where: Field Name <Time> <Description> Format Description

ASCII String The time when the message was generated. ASCII String General description of the message.

<Additional Data> ASCII String More specific message information. May be <NullString> or a blank space character <sp>. Example: A request on object.GetItem(InfoMessage) could return: 2004.08.24 16:20:56:488 \t COMMAND VALUE UPDATE RECEIVED - COMMAND NOT YET PROCESSED BY PHASE \t CMDID =1 LOW BYTE =100 \crlf

53

FactoryTalk Batch Server API Technical Reference

I T E M C OU NT
Description This item returns the number of items created by the FactoryTalk Batch Server which are exposed through DDE and COM. Input Format Request: ItemCount Output Format The ItemCount is returned in the following format: <Count> Field Name <Count> Format Description

ASCII String The number of DDE and COM items created by the FactoryTalk Batch Server.

Example: A request on object.GetItem(ItemCount) could return: 3588

J O UR N AL D IR
Description This item returns the path to the journal directory specified in the Batchsvr.ini file. Input Format Request: JournalDir Output Format The JournalDir item is returned in the following format: <Path> \crlf where: Field Name <Path> Format Description

ASCII String The journal directory path specified in the Batchsvr.ini file. Example: A request on object.GetItem(JournalDir) could return: \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\ SAMPLEAPP\JOURNALS\ \crlf

L I S T S E PA RA TO R
Description This item returns the list separator being used by the FactoryTalk Batch Server. Input Format Request: ListSeparator Output Format The ListSeparator is returned in the following format: <Separator> Field Name <Separator> Format Description

ASCII String The default list separator for the language specific operating system.

Examples: A request on object.GetItem(ListSeparator) could return: ,

54

2 Item Reference

L O C ALE
Description The locale identifier being used by the FactoryTalk Batch Server. This includes the language ID and code page. Input Format Request: Locale Output Format The Locale is returned in the following format: <LanguageID> \t <CodePage> Field Name <LanguageID> Format Description 1031 German (Standard) 1033 English (United States) 1036 French (Standard) 1040 Italian (Standard) 3082 Spanish (Modern Sort) <CodePage> ASCII String Code page used by server, decimal number Example: A request on object.GetItem(Locale) could return: 1033 \t 1252

ASCII String The ID that identifies the language:

M AT S V R S T A T U S
Description This item returns the status of the Material Server as an ordinal data item. Input Format Request: MatSvrStatus Output Format The MatSvrStatus is returned in the following format: <Status> where: Field Name <Status> Format ASCII Integer Description 3 = Material Manager not installed. 2 = Material Server communication in use. 1 = Material Server communication available but not restored. 0 = Material Server communication not available. Example: A request on object.GetItem(MatSvrStatus) could return: 3

55

FactoryTalk Batch Server API Technical Reference

OP CC L IE N T C O UN T
Description This item returns the number of OPC clients connected to the FactoryTalk Batch Server. Input Format Request: OPCClientCount Output Format The OPCClientCount is returned in the following format: <OPCCount> where: Field Name <OPCCount> Format Description

ASCII String The number of OPC clients connected to the FactoryTalk Batch Server.

Example: A request on object.GetItem(OPCClientCount) could return: 2

P H AS E D ATA L IST
Description This item lists information about all of the phases in the system. NOTE: The PhaseDataList item exposes a large amount of data for each phase. This can cause a significant processing load on the data server, Batch Server, and client. The PhaseIDPhaseData item can be used in place of the PhaseDataList item, only returning data for a specific phase. You can disable the PhaseDataList item and the PhaseErrs item by adding the following entry in the [CLIENT MGR DDE] section of the batchsvr.ini file. [CLIENT MGR DDE] DisablePhaseDataList=YES If the items are disabled, the FactoryTalk Batch Server will not return any data if a request is issued for either of these items. In addition, if the DisablePhaseDataList item is set to YES, the Alarm Summary and Phase Summary windows in the FactoryTalk Batch View will not display any data. Input Format Advise: PhaseDataList Output Format The PhaseDataList is returned in the following format: <PhaseDataList> <Phase> is is <Phase> \crlf | <Phase> \crlf <PhaseDataList> <PhaseID> \t <PhaseName> \t <PhaseState> \t <Pausing> \t <Mode> \t <ArbMask> \t <CmdMask> \t <UnitID> \t <UnitName> \t <Owner> \t <BatchID> \t <FailMsg> \t <PhaseMsg> \t <StepIndex> \t <ValidUList>\crlf

where <Phase> is: Field Name <PhaseID> <PhaseName>


56

Format

Description

ASCII String Equipment ID of phase. ASCII String Name of phase configured in the FactoryTalk Batch Equipment Editor.

2 Item Reference

Field Name <PhaseState> <Pausing>

Format

Description

ASCII String The current state of the phase. ASCII Integer Pause and Paused attributes: 0 = not significant 1 = Pausing Pause && !Paused 2 = Paused Paused Under Recipe Control: O-AUTOP-AUTO S-AUTOMANUAL Under Manual Phase Control: PH-AUTOPH-SEMI If the phase is not part of a running recipe or owned by the Operator, a blank character will be returned.

<Mode>

ASCII - String Mode of the Phase

<ArbMask> <CmdMask> Field Name <UnitID> <Uname> <Owner>

ASCII - String (Refer to Arbitration Masks) ASCII - String (Refer to Command Masks) Format ASCII Integer Description Current Unit ID.

ASCII - String Current Unit Name. ASCII - String Current owner: NONE PROGRAM OPERATOR EXTERNAL

<BatchID> <FailMsg> <PhaseMsg> <StepIndex> <ValidUList> where:

ASCII - String User entered batch ID. ASCII - String Failure Message. ASCII - String Phase Message. ASCII Integer Variable list <ValidUList> The value of the Step Index Tag in the process-connected device. List of valid units. is <UnitName> | <UnitName> \t <ValidUList>

Field Name <UnitName>

Format

Description

ASCII - String Name of valid unit.

Example: A request on object.GetItem(PhaseDataList) could return: 5 \t WP_ADD_CREAM_M1 \t IDLE \t 0 \t \t 1 \t 0 \t 0 \t \t UNKNOWN \t \t \t \t 0 \t WP_MIXER1 \crlf 6 \t WP_ADD_CREAM_M2 \t IDLE \t 0 \t \t 1 \t 0 \t 0 \t \t UNKNOWN \t \t \t \t 0 \t WP_MIXER2 \crlf ... 104 \t MP_DUMP_MF2 \t IDLE \t 0 \t \t 1 \t 0 \t 0 \t \t UNKNOWN \t \t \t \t 0 \t MP_MIXERFREEZER2 \crlf

57

FactoryTalk Batch Server API Technical Reference

P H AS E E R R S
Description This item lists all the phases that are currently in failure or have an error.
NOTE: If the FactoryTalk Batch Server does not return any data when a request is issued against this item, it is possible that the item has been disabled in the batchsvr.ini file. Refer to the PhaseDataList item for information on disabling these two items.

Input Format Request: PhaseErrs Output Format The PhaseErrs item is returned in the following format: <PhaseErrors> <PhErrList> <PhErrDesc> is is is <NullList> | <PhErrList> \crlf <PhErrDesc> \crlf | <PhErrDesc> \crlf <PhErrList> <PhaseID> \t <PhaseName> \t <UnitID> \t <UnitName> \t <PCellName> \t <AreaName> \t <Owner> \t <BatchID> \t <PhErrMsg> \t <State> <FailMsg> | <ErrMsg>

<PhErrMsg> where <PhErrDesc> is: Field Name <PhaseID> <PhaseName> <UnitID> <UnitName> <PCellName> <AreaName> <Owner> <BatchID> <PhErrMsg> <State> <FailMsg> Format ASCII Integer

is

Description Equipment ID of phase.

ASCII - String Name of phase configured in the FactoryTalk Batch Equipment Editor. ASCII Integer Current Unit ID.

ASCII - String Current Unit Name. ASCII - String Process Cell Name. ASCII - String Area Name. ASCII - String Owner Name. ASCII - String User entered batch identifier. ASCII - String Message generated by ladder logic or FactoryTalk Batch Server. ASCII - String Current State of Phase. ASCII - String Failure Message, generated by the ladder logic running in the PLC. It is configured in the Phase_Failures enumeration of the Equipment Database. ASCII - String Error Message, generated by the FactoryTalk Batch Server. It is internal to FactoryTalk Batch.

where <PhErrMsg> is:

<ErrMsg>

Example: A request on object.GetItem(PhaseErrs) could return: 68 \t NP_ADDDAIRY_M1 \t 0 \t \t West_Parlor \t AREA1 \t \t \t FV101_FAILED_TO_CLOSE \t IDLE \crlf

58

2 Item Reference

P H AS E E R R S C T
Description This item returns the number of phase errors currently listed in the alarm summary window. Input Format Request: PhaseErrsCt Output Format The PhaseErrsCt item is returned in the following format: <NumberOfErrors> Field Name <NumberOf Errors> Format ASCII Integer Description The number of phase errors currently in the alarm summary window.

Example: A request on object.GetItem(PhaseErrsCt) could return: 3

PHASEIDB A TCH I D
Description This item lists the operator-entered batch ID for the batch to which the phase belongs. Input Format Request: PhaseIDBatchID PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDBatchID is returned in the following format: <BatchID> is ASCII - String (user defined) Example: A request on object.GetItem(68BatchID) could return: Batch_100

59

FactoryTalk Batch Server API Technical Reference

PHASEIDF A IL UR E
Description This item lists the phase failure message for the phase denoted by the phase ID. Input Format Request: PhaseIDFailure PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDFailure is returned in the following format: <FailureMessage> Field Name Format Description

<FailureMessage> ASCII - String The text of the error generated in the Phase Failures enumeration. If an error message hasnt been defined for the failure number, a Config Error message displays. If the phase is not active, OFF displays. Example: A request on object.GetItem(68Failure) could return: FV101_FAILED_TO_CLOSE

PHASEIDI NFO
Description This item returns the name of the phase, which is denoted by the phase ID. Input Format Request: PhaseIDInfo PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDInfo is returned in the following format: Phase <PhaseInfo> Field Name <PhaseInfo> Format Description

ASCII - String The name of the phase prefaced with the text Phase.

Example: A request on object.GetItem(68Info) could return: Phase NP_ADDDAIRY_M1

60

2 Item Reference

PHASEIDM E S S A G E
Description This item returns the last message sent to the FactoryTalk Batch Server by the phase, which is denoted by the phase ID. Input Format Request: PhaseIDMessage PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDMessage is returned in the following format: <PhaseMessage> Field Name <PhaseMessage> Format Description

ASCII - String The text of the last message sent to the FactoryTalk Batch Server by the phase.

Example: A request on object.GetItem(68Message) could return: CHARGE_MESSAGE

PHASEIDO W NE R F LAG
Description This item returns the phases current owner as denoted by the phase ID. Input Format Request: PhaseIDOwnerFlag PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDOwnerFlag is returned in the following format: <PhaseOwner> Field Name <PhaseOwner> Format Description No owner: S_AUTO Procedure Control: P_AUTO Operator Control: MANUAL External Control: O_AUTO Example: A request on object.GetItem(68OwnerFlag) could return: P_AUTO

ASCII String Phase owner: Response

61

FactoryTalk Batch Server API Technical Reference

PHASEIDP ARMS
Description This item returns all parameters for the phase. If the phase is inactive there is no data returned. Input Format Request: PhaseIDParms PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDParms is returned in the following format: <PhaseIDParms> <PhaseParmList> <ParmEntry> where <ParmEntry> is: Field Name <ParmName> <ParmType> <ParmScope> Format Description is is is <NullList> | <PhaseParmList> <ParmEntry> | <ParmEntry> <PhaseParmList> <ParmName> \t <ParmType> \t <ParmScope> \t <Eus> \t <MaxValue> \t <MinValue> \t <Value> \t

ASCII - String Name of parameter ASCII Integer ASCII Integer 1: Real 3: String 2: Long Integer 5: Enumeration 1: Value 2: UnAcked Prompt 3: Deferred Parameter

<EUs> <MaxValue> <MinValue> <Value>

ASCII - String Engineering Units ASCII - String Maximum Value ASCII - String Minimum Value ASCII - String Current Value ??? represents an Unacknowledged Prompt

Example: A request on object.GetItem(68Parms) could return: MATERIAL \t 5 \t 1 \t MATERIALS \t \t \t CREAM

62

2 Item Reference

PHASEIDP ARMS 2
Description This item returns all parameters for the phase including the parameter limits high/low, high-high/low-low and high-high-high/low-low-low. If the phase is inactive there is no data returned. Input Format Request: PhaseIDParms2 PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDParms2 is returned in the following format: <PhaseIDParms> <PhaseParmList> <ParmEntry> is is is <NullList> | <PhaseParmList> <ParmEntry> | <ParmEntry> <PhaseParmList> <ParmName> \t <ParmType> \t <ParmScope> \t <Eus> \t <MaxValue> \t <MinValue> \t <Value> \t<HighHighHighLimit>\t<HighHighLimit> \t<HighLimit>\t<LowLimit>\t<LowLowLimit> \t<LowLowLowLimit>

where <ParmEntry> is: Field Name <ParmName> Format Description

ASCII - String Name of parameter: $BINDCONTAINER - for container only. $BINDEQMODULE - for equipment module only. ASCII Integer ASCII Integer Data Type: 1: Real 2: Long Integer 3: String 5: Enumeration 4: Static 5: Material Data

<ParmType>

<ParmScope>

Kind of parameter: 1: Value 2: UnAcked Prompt 3: Deferred

<EUs>

ASCII - String Engineering Units IF <ParmType> = 5, then this is the enumeration set IF <ParmType> = 3, then a single space ASCII Integer Maximum Value Single space for strings and enumerations

<MaxValue> <MinValue> <Value> <HighHighHigh Limit>

ASCII - String Minimum Value Single space for strings and enumerations ASCII - String Current Value ??? represents an Unacknowledged Prompt ASCII Integer High-High-High Limit High-High Limit High Limit

<HighHighLimit> ASCII Integer <HighLimit> ASCII Integer

63

FactoryTalk Batch Server API Technical Reference

Field Name <LowLimit> <LowLowLimit> <LowLowLow Limit>

Format ASCII Integer ASCII Integer ASCII Integer

Description Low Limit Low-Low Limit Low-Low-Low Limit

Example: A request on object.GetItem(68Parms) could return: MATERIAL \t 5 \t 1 \t MATERIALS \t \t \t CREAM \t \t \t \t \t \t

PHASEIDP AU SE
Description This item returns the phases PAUSE attribute. Input Format Request: PhaseIDPause PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDPause is returned in the following format: <PauseText> Field Name <PauseText> Format Description

ASCII - String Off when the value in the Pause Tag in the PCD is zero, or On when the value is non-zero.

Example: A request on object.GetItem(68Pause) could return: Off

PHASEIDP A U S I N G
Description This item returns the phases PAUSED attribute. Input Format Request: PhaseIDPausing PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDPausing is returned in the following format: <PausingText> Field Name <PausingText> Format Description

ASCII - String Off when the value in the Pausing Tag in the PCD is zero, or On when the value is non-zero.

Example: A request on object.GetItem(68Pausing) could return: Off

64

2 Item Reference

PHASEIDP H AS E D ATA
Description This item lists current status information for the phase denoted by the PhaseID.
NOTE: The PhaseIDPhaseData item was created to be used in place of the PhaseDataList item. The PhaseDataList item returns data on all phases within an equipment database, where the PhaseIDPhaseData item returns data only for the specified phase.

Input Format Advise: PhaseIDPhaseData PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDPhaseData is returned in the following format: <PhaseIDPhaseData> is <PhaseID> \t <PhaseName> \t <PhaseState> \t <Pausing> \t <Mode> \t <ArbMask> \t <CmdMask> \t <UnitID> \t <UnitName> \t <Owner> \t <BatchID> \t <FailMsg> \t <PhaseMsg> \t <StepIndex> \t <ValidUList>

where <Phase> is: Field Name <PhaseID> <PhaseName> <PhaseState> <Pausing> Format Description

ASCII - String Equipment ID of phase. ASCII - String Name of phase configured in the FactoryTalk Batch Equipment Editor. ASCII - String The current state of the phase ASCII Integer Pause and Paused attributes, 0: not significant 1: Pausing - Pause && !Paused 2: Paused Paused Under Recipe Control: O_AUTO P_AUTO S_AUTO MANUAL Under Manual Phase Control: PH_AUTO PH_SEMI If the phase is not part of a running recipe or owned by the Operator, a blank space character will be returned.

<Mode>

ASCII - String Mode of the Phase

<ArbMask> <CmdMask> <UnitID> <UnitName> <Owner>

ASCII - String (Refer to Arbitration Masks) ASCII - String (Refer to Command Masks) ASCII Integer Current Unit ID.

ASCII - String Current Unit Name. ASCII - String Current owner: NONE PROGRAM OPERATOR EXTERNAL

65

FactoryTalk Batch Server API Technical Reference

Field Name <BatchID> <FailMsg> <PhaseMsg> <StepIndex> <ValidUList> where:

Format

Description

ASCII - String User entered batch ID. ASCII - String Failure Message. ASCII - String Phase Message. ASCII Integer Variable list <ValidUList> The value of the Step Index Tag in the process-connected device. List of valid units. is <UnitName> | <UnitName> \t <ValidUList>

Field Name <UnitName>

Format

Description

ASCII - String Name of valid unit.

Example: A request on object.GetItem(68PhaseData) could return: 68 \ t NP_ADDDAIRY_M1 \t COMPLETE \t 0 \t P_AUTO \t 1 \t 32 \t 55 \t NP_MIXER1 \t PROGRAM \t BATCH_ID \t \t FEED_COMPLETE NOT COMPLETE. \t 10 \t NP_MIXER1\crlf

PHASEIDR E Q U E S TS
Description This item returns the phase request value. Input Format Request: PhaseIDRequests PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDRequests is returned in the following format: <RequestsText> Field Name <RequestsText> Format Description

ASCII - String The text representation of the value of the request register in the process connected device for the specified phase.

Example: A request on object.GetItem(68Requests) could return: 1000

66

2 Item Reference

PHASEIDSS
Description This item returns the single step index attribute of the phase specified by the phase ID. Input Format Request: PhaseIDSS PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDSS is returned in the following format: <SingleStepText> Field Name Format Description

<SingleStepText> ASCII - String Off = if the value in the Single Step Tag in the processconnected device is zero. On = the value is non-zero. ??? = the phase is inactive. Example: A request on object.GetItem(68SS) could return: Off

PHASEIDS TA TE
Description This item returns the current state of the phase specified by the phase ID. Input Format Request: PhaseIDState PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDState is returned in the following format: <StateText> Field Name <StateText> Format Description

ASCII - String The state corresponding to the state registers value in the process-connected device for the specified phase or ??? if this value does not correspond to any defined Batch state. (Refer to Valid States and Modes.)

Example: A request on object.GetItem(68State) could return: IDLE

67

FactoryTalk Batch Server API Technical Reference

PHASEIDS T E P I N D E X
Description This item returns the current step attribute of the phase specified by the phase ID. Input Format Request: PhaseIDStepIndex Output Format The PhaseIDStepIndex is returned in the following format: <StepIndex> Field Name <StepIndex> Format ASCII Integer Description The value of the Step Index Tag in the process-connected device.

Example: A request on the object.GetItem(12stepindex) could return: 4

PHASEIDU N I T
Description This item returns the current unit of the phase specified by the phase ID. Input Format Request: PhaseIDUnit PhaseID is ASCII - Integer, the unique Equipment ID corresponding to the phase.

Output Format The PhaseIDUnit is returned in the following format: <UnitID> Field Name <UnitID> Format ASCII Integer Description Returns the text representation of the equipment ID of the unit to which this phase belongs.

Example: A request on object.GetItem(68Unit) could return: 55

68

2 Item Reference

P H AS E S L IST
Description This item returns a list of all phases, corresponding equipment IDs, and valid units. Input Format Request: PhasesList Output Format The PhasesList item is returned in the following format: <PhasesList> <PhaseData> <PhaseDesc> <UnitList> where <PhaseDesc> is: Field Name <PhaseID> <PhaseName> Field Name <UnitName> Format ASCII Integer Description Unique Equipment ID for a Phase. is is is is <PhaseData> \crlf | <PhaseData> \crlf <PhasesList> <PhaseDesc> \t <UnitList> <PhaseID> \t <PhaseName> <UnitName> | <UnitName> \t <UnitList>

ASCII - String The Phase Name. Format Description

where <UnitList> is:

ASCII - String A valid Unit Name for this phase.

Example: A request on object.GetItem(PhasesList) could return: 5 \t WP_ADD_CREAM_M1 \t WP_MIXER1 \crlf 6 \t WP_ADD_CREAM_M2 \t WP_MIXER2 \crlf 39 \t SP_ADD_CREAM_M1 \t SP_MIXER1 \crlf ... 04 \t MP_DUMP_MF2 \t MP_MIXERFREEZER2 \crlf

69

FactoryTalk Batch Server API Technical Reference

P H AS E S L IST 2
Description This item returns a list of all equipment phases, corresponding equipment IDs, recipe phases, the phase type and valid units. Input Format Request: PhasesList2 Output Format The PhasesList2 item is returned in the following format: <PhasesList> <PhaseData> <PhaseDesc> <UnitList> where <PhaseDesc> is: Field Name <PhaseID> <Equipment PhaseName> <Recipe PhaseName> <PhaseType> Format ASCII Integer Description Unique Equipment ID for a Phase. is is is is <PhaseData> \crlf | <PhaseData> \crlf <PhasesList> <PhaseDesc> \t <UnitList> <PhaseID> \t <Equipment PhaseName> \t <Recipe PhaseName> \t <PhaseType> <UnitName> | <UnitName> \t <UnitList>

ASCII - String The Equipment Phase Name. (Marked as the equipment module in the FactoryTalk Batch Equipment Editor.) ASCII - String The Recipe Phase Name. (Marked as the phase in the FactoryTalk Batch Equipment Editor.) ASCII Integer Format 0 = Reserved for future use.

Where <UnitList> is: Field Name <UnitName> Description

ASCII - String A valid Unit Name for this phase.

Example: A request on object.GetItem(PhasesList2) could return: 5 \t WP_ADD_CREAM_M1 \t ADD_CREAM \t 0 \t WP_MIXER1 \crlf 6 \t WP_ADD_CREAM_M2 \t ADD_CREAM \t 0 \t WP_MIXER2 \crlf 39 \t SP_ADD_CREAM_M1 \t ADD_CREAM \t 0 \t SP_MIXER1 \crlf ... 104 \t MP_DUMP_MF2 \t MBR_DUMP \t 0 \t MP_MIXERFREEZER2 \crlf

70

2 Item Reference

P H AS E S L IST 3
Description This item returns a list of all equipment phases, corresponding equipment IDs, recipe phases, phase types, bitmap filenames, and valid units. Input Format Request: PhasesList3 Output Format The PhasesList3 item is returned in the following format: <PhasesList> <PhaseData> <PhaseDesc> is is is <PhaseData> \crlf | <PhaseData> \crlf <PhasesList> <PhaseDesc> \t <UnitList> <PhaseID> \t <Equipment PhaseName> \t <Recipe PhaseName> \t <PhaseType> \t <PhaseBitmapName> <UnitName> | <UnitName> \t <UnitList>

<UnitList> where <PhaseDesc> is: Field Name <PhaseID> <Equipment PhaseName> <Recipe PhaseName> <PhaseType> <PhaseBitmap Name> Field Name <UnitName> Format ASCII Integer

is

Description Unique Equipment ID for a Phase.

ASCII - String The Equipment Phase Name. (Marked as the equipment module in the FactoryTalk Batch Equipment Editor.) ASCII - String The Recipe Phase Name. (Marked as the phase in the FactoryTalk Batch Equipment Editor.) ASCII Integer 0 = Reserved for future use.

ASCII - String The name of the phase bitmap file.

where <UnitList> is: Format Description

ASCII - String A valid Unit Name for this phase.

Example: A request on object.GetItem(PhasesList3) could return: 5 \t WP_ADD_CREAM_M1 \t ADD_CREAM \t 0 \t DUMP2&.BMP \t WP_MIXER1 \crlf 6 \t WP_ADD_CREAM_M2 \t ADD_CREAM \t 0 \t DUMP2&.BMP \t WP_MIXER2 \crlf 39 \t SP_ADD_CREAM_M1 \t ADD_CREAM \t 0 \t DUMP2&.BMP \t SP_MIXER1 \crlf ... 104 \t MP_DUMP_MF2 \t MBR_DUMP \t 0 \t dump1&.bmp \t MP_MIXERFREEZER2 \crlf

71

FactoryTalk Batch Server API Technical Reference

PROCEDUREIDD A TA
Description This item returns detailed data regarding the specified level of a procedure. Each recipe level must be queried to get the complete picture of the recipe.
NOTE: The data returned by this item is static; you must obtain this item again to reflect any updates.

Input Format Request: ProcedureIDData ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName

Procedure Level Unit Procedure Level Operation Level

is is is

Output Format The ProcedureIDData item is returned in the following format: <ProcData> where: Field Name <SVRSignal> Format ASCII Integer <DataList> <RecipeDat> Description 0 = continue update of data for this advise 1 = discontinue update of data for this advise is is <RecipeDat> \crlf <RecipeElemList>
*<RecipeElemList> expanded after <RecipeDat>

is

<SVRSignal> \crlf <DataList>

where <DataList> is:

<RecpAbstr> \crlf <RecpDesc> \crlf <RecpID> \crlf <RecpCode> \crlf <RecpVersion> \crlf <RecpAuthor> \crlf <RecpDate> \crlf <DocDim> \crlf <AreaName> \crlf <ProcCellList> \crlf <BoundUnit>

where <RecipeDat> is: Field Name <RecpAbstr> <RecpDesc> <RecpID> <RecpCode> <RecpVersion> <RecpAuthor> <RecpDate> <DocDim> <AreaName> Format Description

ASCII - String Recipe Abstract. ASCII - String Recipe Description. ASCII - String Recipe Identifier. ASCII - String Recipe Product Code. ASCII - String Recipe Version. ASCII - String Recipe Author. ASCII - String Date Recipe was last saved. The format will be in accordance with the date/time as set in the Control Panel. Variable List Recipe Drawing Dimensions. ASCII - String Equipment Database Name.

72

2 Item Reference

Field Name <ProcCellList> <BoundUnit>

Format

Description

ASCII - String Currently always a blank space character. ASCII - String Unit name to which the step is bound. <DocDim> is <Xdim> \t <Ydim>

where <DocDim> is: Field Name <Xdim> <Ydim> Format ASCII Integer ASCII Integer Description Always returns zero. Reserved for future use. Always returns zero. Reserved for future use.

where <RecipeElemList> is: *<ParentStep> is always the first element in a <RecipeElemList> and only appears once in that list. <RecipeElemList> <RecipeElem> is is <RecipeElem> | <RecipeElem> \crlf <RecipeElemList> <ParentStep> | <InitialStep> | <TerminalStep> | <RegularStep> | <Transition> | <EqModLink> | <OrDiverg> | <OrConverg> | <AndDiverg> | <AndConverg> <ElemType> \t <ElemID> \t <RecipeLink> \t <ParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t <StepName> \t <ControllingProc> \t <ParmList> \t <RptParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t <ConditionExpression> <ElemType> \t <ElemID> \t <PrevElemID> \t <NextElemID> <ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList> <ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList>

<ParentStep> <InitialStep> <TerminalStep> <RegularStep>

is is is is

<Transition> <EqModLink> <OrDiverg> <OrConverg> <AndDiverg> <AndConverg>

is is is is is is

73

FactoryTalk Batch Server API Technical Reference

where <RecipeElemList> is: Field Name <ElemType> Format ASCII Integer Description Recipe Element Type 0 = Parent Step 1 = Initial Step 2 = Terminal Step 3 = Regular Step 4 = Transition 5 = Link 6 = OR Divergence 7 = OR Convergence 8 = AND Divergence 9 = AND Convergence Element Identifier. Path to the recipe file and recipe. X coordinate for drawing the element. Y coordinate for drawing the element. Parameters associated with the procedure.

<ElemID> <RecipeLink> <DrawXCoord> <DrawYCoord <ParmList> <StepName> <RptParmList> <Condition Expression> <PrevElemID> <NextElemID>

ASCII Integer ASCII Integer ASCII Integer ASCII Integer Variable List

ASCII - String Name of a step element. Variable List Report Parameters associated with the procedure.

<ControllingProc> ASCII - String Name of the procedure a step element controls. ASCII - String The condition expressions text of a transition element. ASCII Integer ASCII Integer Elements Identifier appearing IN FRONT of an equipment module link. Elements Identifier appearing BEHIND an equipment module link. List of elements appearing ABOVE a divergence or convergence. List of elements appearing BELOW a divergence or convergence. is is is is is $PARM \t <Parameters> \t $END <NullParmList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <ParmType> \t <ParmKind> \t <EUs> \t <MaxValue> \t <MinValue> \t <DefaultValue>

<PrevElemIDList Variable List > <NextElemIDList Variable List > where <ParmList> is: <ParmList> <Parameters> <NullParmList> <PList> <Parameter>

74

2 Item Reference

where <Parameter> is: Field Name <ParmName> Format Field Name $BINDCONTAINER - for container only. $BINDEQMODULE - for equipment module only <ParmType> ASCII Integer ASCII Integer Data Type 1: Real3: String 2: Long5: Enumeration Kind of parameter 1: Value4: Static 2: UnAcked Prompt5: Material Data 3: Deferred

ASCII - String Parameter Name

<ParmKind>

<EUs>

ASCII - String Eng Unit If <ParmType> = 5, then this is the enumeration set If <ParmType>=3, then a single space ASCII - String Maximum value Single space for strings and enumerations ASCII - String Minimum value Single space for strings and enumerations <ParmType> <RptParmList> <NullRPList> <RPList> <RList> <ReportParm> Default value assigned to parameter is is is is is <NullRPList> | <RPList> $REPORT \t $END $REPORT \t <RList> \t $END <ReportParm> | <ReportParm> \t <RList> <RptName> \t <EUs>

<MaxValue> <MinValue> <DefaultValue>

where <RptParmList> is:

where <ReportParm> is: Field Name <RptName> <EUs> Format Field Name

ASCII - String Report parameter name ASCII - String Engineering units for report parameter <PrevElemIDList> is is is <ElemIDList> <ElemIDList> <ElemID> | <ElemID> \t <ElemIDList>

where <PrevElemIDList> is: where <NextElemIDList> is: <NextElemIDList> where <ElemIDList> is: <ElemIDList> Field Name <ElemID> Format ASCII Integer Field Name Element identifier

75

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(17Data) (Procedure Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf French Vanilla Premium - class based/material based \crlf MCLS_FRENCHVANILLA \crlf FV-101 \crlf 1.0 \crlf Mark Shepard \crlf 8/24/2004 10:11:30 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf \crlf 0 \t 572 \t MCLS_FRENCHVANILLA.BPC \t $PARM \t MILK_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 1999 \t SUGAR_AMOUNT \t 1 \t 1 \t KG \t 1500 \t 0 \t 750 \t CREAM_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 2001 \t EGG_AMOUNT \t 1 \t 1 \t KG \t 500 \t 0 \t 230 \t FLAVOR_AMOUNT \t 1 \t 1 \t KG \t 100 \t 0 \t 20 \t $END \crlf 1 \t 573 \t 700 \t 100 \crlf 5 \t 574 \t 573 \t 575 \crlf 4 \t 575 \t 800 \t 398 \t TRUE \crlf 5 \t 576 \t 575 \t 577 \crlf 3 \t 577 \t 600 \t 598 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_UP.UPC \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 578 \t 577 \t 579 \crlf 4 \t 579 \t 800 \t 898 \t MCLS_SWEETCREAM_UP:1.STATE = COMPLETE \crlf 8 \t 580 \t 579 \t 590 \t 581 \crlf 3 \t 590 \t 200 \t 1300 \t MCLS_TRANSFER_OUT_UP:1 \t MCLS_TRANSFER_OUT_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 3 \t 581 \t 900 \t 1300 \t MCLS_TRANSFER_IN_UP:1 \t MCLS_TRANSFER_IN_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 4 \t 583 \t 800 \t 1800 \t MCLS_TRANSFER_IN_UP:1.STATE = COMPLETE AND MCLS_TRANSFER_OUT_UP:1.STATE = COMPLETE \crlf 9 \t 582 \t 583 \t 590 \t 581 \crlf 5 \t 584 \t 583 \t 585 \crlf 3 \t 585 \t 600 \t 2000 \t MCLS_FRENCHVANILLA_UP:1 \t MCLS_FRENCHVANILLA_UP.UPC \t $PARM \t FLAVOR_AMOUNT \t 1 \t 3 \t KG \t 100 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 586 \t 585 \t 587 \crlf 4 \t 587 \t 800 \t 2400 \t MCLS_FRENCHVANILLA_UP:1.STATE = COMPLETE \crlf 5 \t 588 \t 587 \t 589 \crlf 2 \t 589 \t 800 \t 2700 \crlf

76

2 Item Reference

Example: A request on object.GetItem(17 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1DATA) (Operation Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf Sweetcream operation - class based/material based \crlf MCLS_SWEETCREAM_OP \crlf SWC-101 \crlf 1.0 \crlf Mark S. Shepard \crlf 8/28/2004 7:14:07 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf NP_MIXER1 \crlf 0 \t 162 \t MCLS_SWEETCREAM_OP.UOP \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \crlf 1 \t 167 \t 700 \t 100 \crlf 5 \t 168 \t 167 \t 169 \crlf 4 \t 169 \t 800 \t 398 \t TRUE \crlf 8 \t 170 \t 169 \t 184 \t 185 \t 171 \crlf 3 \t 184 \t 600 \t 698 \t MBR_ADD:1 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 185 \t 1400 \t 698 \t MBR_ADD:2 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 171 \t 2500 \t 700 \t AGITATE:1 \t \t $PARM \t SPEED_RATE \t 1 \t 1 \t RPM \t 50 \t 0 \t 5 \t $END \t $REPORT \t MIX_SPEED \t RPM \t $END \crlf 4 \t 182 \t 800 \t 1096 \t MBR_ADD:2.STATE = COMPLETE AND MBR_ADD:1.STATE = COMPLETE \crlf 9 \t 183 \t 182 \t 184 \t 185 \crlf 8 \t 181 \t 182 \t 180 \t 186 \crlf 3 \t 180 \t 600 \t 1396 \t MBR_ADD:3 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 186 \t 1400 \t 1400 \t TEMP_CTL:1 \t \t $PARM \t TEMP_SP \t 1 \t 1 \t DEG C \t 100 \t 0 \t 71.1 \t HOLD_TIME \t 1 \t 2 \t MINUTES \t 60 \t 0 \t 5 \t $END \t $REPORT \t TEMPERATURE \t DEG F \t TIME_HELD \t MIN \t $END \crlf 4 \t 178 \t 800 \t 1794 \t TEMP_CTL:1.STATE = COMPLETE AND MBR_ADD:3.STATE = COMPLETE \crlf 9 \t 179 \t 178 \t 180 \t 186 \crlf 5 \t 177 \t 178 \t 176 \crlf 3 \t 176 \t 600 \t 1994 \t MBR_ADD:4 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 4 \t 173 \t 800 \t 2500 \t MBR_ADD:4.STATE = COMPLETE \crlf 9 \t 172 \t 173 \t 176 \t 171 \crlf 5 \t 174 \t 173 \t 175 \crlf 2 \t 175 \t 800 \t 2700 \crlf

77

FactoryTalk Batch Server API Technical Reference

PROCEDUREIDD A TA 2
Description This item returns detailed data regarding the specified level of a procedure. Each recipe level must be queried to get the complete picture of the recipe. NOTE: The data returned by this item is static; you must obtain this item again to reflect any updates. Input Format Request: ProcedureIDData2 ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName

Procedure Level Unit Procedure Level OperationLevel

is is is

Output Format The ProcedureIDData2 item is returned in the following format: <ProcData> where: Field Name <SVRSignal> Format ASCII Integer <DataList> <RecipeDat> Description 0 = continue update of data for this advise 1 = discontinue update of data for this advise is is <RecipeDat> \crlf <RecipeElemList>
*<RecipeElemList> expanded after <RecipeDat>

is

<SVRSignal> \crlf <DataList>

where <DataList> is:

<RecpAbstr> \crlf <RecpDesc> \crlf <RecpID> \crlf <RecpCode> \crlf <RecpVersion> \crlf <RecpAuthor> \crlf <RecpDate> \crlf <DocDim> \crlf <AreaName> \crlf <ProcCellList> \crlf <BoundUnit>

where <RecipeDat> is: Field Name <RecpAbstr> <RecpDesc> <RecpID> <RecpCode> <RecpVersion> <RecpAuthor> <RecpDate> <DocDim> Format Description

ASCII - String Recipe Abstract. ASCII - String Recipe Description. ASCII - String Recipe Identifier. ASCII - String Recipe Product Code. ASCII - String Recipe Version. ASCII - String Recipe Author. ASCII - String Date Recipe was last saved. The format will be in accordance with the date/time as set in the Control Panel. Variable List Recipe Drawing Dimensions.

78

2 Item Reference

Field Name <AreaName> <ProcCellList> <BoundUnit>

Format

Description

ASCII - String Equipment Database Name. ASCII - String Currently always a blank space character. ASCII - String Unit name to which the step is bound. <DocDim> is <Xdim> \t <Ydim>

where <DocDim> is: Field Name <Xdim> <Ydim> Format ASCII Integer ASCII Integer Description Always returns zero. Reserved for future use. Always returns zero. Reserved for future use.

where <RecipeElemList> is: *<ParentStep> is always the first element in a <RecipeElemList> and only appears once in that list. <RecipeElemList> <RecipeElem> is is <RecipeElem> | <RecipeElem> \crlf <RecipeElemList> <ParentStep> | <InitialStep> | <TerminalStep> | <RegularStep> | <Transition> | <EqModLink> | <OrDiverg> | <OrConverg> | <AndDiverg> | <AndConverg> | <TextBox> <ElemType> \t <ElemID> \t <RecipeLink> \t <ParmList> \t <RptParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t <StepName> \t <ControllingProc> \t <ParmList> \t <RptParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t<TransitionName>\t <ConditionExpression> <ElemType> \t <ElemID> \t <PrevElemID> \t <NextElemID> <ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList>

<ParentStep> <InitialStep> <TerminalStep> <RegularStep>

is is is is

<Transition>

is

<EqModLink> <OrDiverg> <OrConverg>

is is is

79

FactoryTalk Batch Server API Technical Reference

<AndDiverg> <AndConverg> <TextBox> where <RecipeElemList> is: Field Name <ElemType> Format ASCII Integer

is is is

<ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList> <ElemType> \t<Size>\t<Comment>\t<Associated Element>\t<TextBoxID>

Description Recipe Element Type 0 = Parent Step 1 = Initial Step 2 = Terminal Step 3 = Regular Step 4 = Transition 5 = Link 6 = OR Divergence 7 = OR Convergence 8 = AND Divergence 9 = AND Convergence 10 = Text box Element Identifier.

<ElemID> <RecipeLink> <DrawXCoord> <DrawYCoord> <ParmList> <StepName> <RptParmList> <Condition Expression> <PrevElemID> <NextElemID>

ASCII Integer ASCII Integer Variable List

ASCII-Integer Path to the recipe file and recipe. X coordinate for drawing the element.

ASCII-Integer Y coordinate for drawing the element. Parameters associated with the procedure. ASCII - String Name of a step element. Variable List Report Parameters associated with the procedure.

<ControllingProc> ASCII - String Name of the procedure a step element controls. ASCII - String The condition expressions text of a transition element. ASCII Integer ASCII Integer Elements Identifier appearing IN FRONT of an equipment module link. Elements Identifier appearing BEHIND an equipment module link. List of elements appearing ABOVE a divergence or convergence. List of elements appearing BELOW a divergence or convergence.

<PrevElemIDList Variable List > <NextElemIDList Variable List >

<TransitionName ASCII - String Name of a transition: T followed by a unique number, e.g. > T55. <Size> Fixed List Coordinates of text boxs upper left-hand corner and lower right-hand corner.

80

2 Item Reference

Field Name <Comment>

Format

Description

ASCII - String The batch server encodes the following characters found in any text box comments: CharacterReplacement Sequence / List Separator ( ) \t crlf /FS /LS /OP /CP /TAB /CRLF

<Associated Element> <TextBoxID> where <Size> is:

ASCII - String Name of step or transition that text box is associated with. If the text box is NOT associated with a step or transition, this field is empty. ASCII - String Name of text box: C followed by a unique number, e.g. C53. <Size> is <Left>\t<Top>\t<Right>\t<Bottom>

where: <Left> <Top> <Right> <Bottom> ASCII Number ASCII Number ASCII Number ASCII Number <ParmList> <Parameters> <NullParmList> <PList> <Parameter> X coordinate for upper left hand corner. Y coordinate for upper left hand corner. X coordinate for lower right hand corner. Y coordinate for lower right hand corner.

where <ParmList> is: is is is is is $PARM \t <Parameters> \t $END <NullParmList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <ParmType> \t <ParmKind> \t <EUs> \t <MaxValue> \t <MinValue> \t <DefaultValue> \t <ParamExpressionID>

where <Parameter> is: Field Name <ParmName> Format Field Name $BINDCONTAINER - for container only $BINDEQMODULE - for equipment module only <ParmType> ASCII Integer Data Type 1: Real 3: String 2: Long 5: Enumeration

ASCII - String Parameter Name

81

FactoryTalk Batch Server API Technical Reference

Field Name <ParmKind>

Format ASCII Integer

Field Name Kind of parameter 1: Value 2: UnAcked Prompt 3: Deferred 4: Static 5: Material Data 6: Expression

<EUs>

ASCII - String Eng Unit If <ParmType> = 5, then this is the enumeration set If <ParmType> = 3, then a single space ASCII - String Maximum value Single space for strings and enumerations ASCII - String Minimum value Single space for strings and enumerations <ParmType> Default value assigned to parameter If 0, parameter is not an expression If a unique positive integer, parameter is an expression is is is is is <NullRPList> | <RPList> $REPORT \t $END $REPORT \t <RList> \t $END <ReportParm> | <ReportParm> \t <RList> <RptName> \t <EUs> \t <ReportExpressionID>

<MaxValue> <MinValue> <DefaultValue>

<ParamExpression ASCII ID> Variable where <RptParmList> is: <RptParmList> <NullRPList> <RPList> <RList> <ReportParm> where <ReportParm> is: Field Name <RptName> <EUs> Format

Field Name

ASCII - String Report parameter name ASCII - String Engineering units for report parameter If 0, report is not an expression If a unique positive integer, report is an expression is is is <ElemIDList> <ElemIDList> <ElemID> | <ElemID> \t <ElemIDList>

<ReportExpressio ASCII nID> Variable where <PrevElemIDList> is: <PrevElemIDList> where <NextElemIDList> is: <NextElemIDList> where <ElemIDList> is: <ElemIDList> Field Name <ElemID> Format ASCII Integer

Field Name Element identifier

82

2 Item Reference

Example: A request on object.GetItem(17Data) (Procedure Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf French Vanilla Premium - class based/material based \crlf MCLS_FRENCHVANILLA \crlf FV-101 \crlf 1.0 \crlf Mark Shepard \crlf 8/24/2004 10:11:30 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf \crlf 0 \t 572 \t MCLS_FRENCHVANILLA.BPC \t $PARM \t MILK_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 1999 \t SUGAR_AMOUNT \t 1 \t 1 \t KG \t 1500 \t 0 \t 750 \t CREAM_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 2001 \t EGG_AMOUNT \t 1 \t 1 \t KG \t 500 \t 0 \t 230 \t FLAVOR_AMOUNT \t 1 \t 1 \t KG \t 100 \t 0 \t 20 \t $END \crlf 1 \t 573 \t 700 \t 100 \crlf 5 \t 574 \t 573 \t 575 \crlf 4 \t 575 \t 800 \t 398 \t T51 \t TRUE \crlf 5 \t 576 \t 575 \t 577 \crlf 3 \t 577 \t 600 \t 598 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_UP.UPC \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 578 \t 577 \t 579 \crlf 4 \t 579 \t 800 \t 898 \t T55 \t MCLS_SWEETCREAM_UP:1.STATE = COMPLETE \crlf 8 \t 580 \t 579 \t 590 \t 581 \crlf 3 \t 590 \t 200 \t 1300 \t MCLS_TRANSFER_OUT_UP:1 \t MCLS_TRANSFER_OUT_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 3 \t 581 \t 900 \t 1300 \t MCLS_TRANSFER_IN_UP:1 \t MCLS_TRANSFER_IN_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 4 \t 583 \t 800 \t 1800 \t T56 \t MCLS_TRANSFER_IN_UP:1.STATE = COMPLETE AND MCLS_TRANSFER_OUT_UP:1.STATE = COMPLETE \crlf 9 \t 582 \t 583 \t 590 \t 581 \crlf 5 \t 584 \t 583 \t 585 \crlf 3 \t 585 \t 600 \t 2000 \t MCLS_FRENCHVANILLA_UP:1 \t MCLS_FRENCHVANILLA_UP.UPC \t $PARM \t FLAVOR_AMOUNT \t 1 \t 3 \t KG \t 100 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 586 \t 585 \t 587 \crlf 4 \t 587 \t 800 \t 2400 \t T60 \t MCLS_FRENCHVANILLA_UP:1.STATE = COMPLETE \crlf 5 \t 588 \t 587 \t 589 \crlf 2 \t 589 \t 800 \t 2700 \crlf

83

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(17 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1DATA) (Operation Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf Sweetcream operation - class based/material based \crlf MCLS_SWEETCREAM_OP \crlf SWC-101 \crlf 1.0 \crlf Mark S. Shepard \crlf 8/28/2004 7:14:07 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf NP_MIXER1 \crlf 0 \t 162 \t MCLS_SWEETCREAM_OP.UOP \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \crlf 1 \t 167 \t 700 \t 100 \crlf 5 \t 168 \t 167 \t 169 \crlf 4 \t 169 \t 800 \t 398 \t T12 \t TRUE \crlf 8 \t 170 \t 169 \t 184 \t 185 \t 171 \crlf 3 \t 184 \t 600 \t 698 \t MBR_ADD:1 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 185 \t 1400 \t 698 \t MBR_ADD:2 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 171 \t 2500 \t 700 \t AGITATE:1 \t \t $PARM \t SPEED_RATE \t 1 \t 1 \t RPM \t 50 \t 0 \t 5 \t $END \t $REPORT \t MIX_SPEED \t RPM \t $END \crlf 4 \t 182 \t 800 \t 1096 \t T13 \t MBR_ADD:2.STATE = COMPLETE AND MBR_ADD:1.STATE = COMPLETE \crlf 9 \t 183 \t 182 \t 184 \t 185 \crlf 8 \t 181 \t 182 \t 180 \t 186 \crlf 3 \t 180 \t 600 \t 1396 \t MBR_ADD:3 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 186 \t 1400 \t 1400 \t TEMP_CTL:1 \t \t $PARM \t TEMP_SP \t 1 \t 1 \t DEG C \t 100 \t 0 \t 71.1 \t HOLD_TIME \t 1 \t 2 \t MINUTES \t 60 \t 0 \t 5 \t $END \t $REPORT \t TEMPERATURE \t DEG F \t TIME_HELD \t MIN \t $END \crlf 4 \t 178 \t 800 \t 1794 \t T14 \t TEMP_CTL:1.STATE = COMPLETE AND MBR_ADD:3.STATE = COMPLETE \crlf 9 \t 179 \t 178 \t 180 \t 186 \crlf 5 \t 177 \t 178 \t 176 \crlf 3 \t 176 \t 600 \t 1994 \t MBR_ADD:4 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 4 \t 173 \t 800 \t 2500 \t T15 \t MBR_ADD:4.STATE = COMPLETE \crlf 9 \t 172 \t 173 \t 176 \t 171 \crlf 5 \t 174 \t 173 \t 175 \crlf 2 \t 175 \t 800 \t 2700 \crlf 10 \t 820 \t 1096 \t 880 \t 1140 \t This is comment \t MBR_ADD:1 \t C10 \crlf

84

2 Item Reference

PROCEDUREIDD A TA 3
Description This item returns detailed data regarding the specified level of a procedure. Each recipe level must be queried to get the complete picture of the recipe. NOTE: The data returned by this item is static; you must obtain this item again to reflect any updates. Input Format Request: ProcedureIDData3 ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName

Procedure Level Unit Procedure Level OperationLevel

is is is

Output Format The ProcedureIDData2 item is returned in the following format: <ProcData> where: Field Name <SVRSignal> Format ASCII Integer <DataList> <RecipeDat> Description 0 = continue update of data for this advise 1 = discontinue update of data for this advise is is <RecipeDat> \crlf <RecipeElemList>
*<RecipeElemList> expanded after <RecipeDat>

is

<SVRSignal> \crlf <DataList>

where <DataList> is:

<RecpAbstr> \crlf <RecpDesc> \crlf <RecpID> \crlf <RecpCode> \crlf <RecpVersion> \crlf <RecpAuthor> \crlf <RecpDate> \crlf <DocDim> \crlf <AreaName> \crlf <ProcCellList> \crlf <BoundUnit>

where <RecipeDat> is: Field Name <RecpAbstr> <RecpDesc> <RecpID> <RecpCode> <RecpVersion> <RecpAuthor> <RecpDate> <DocDim> <AreaName> <ProcCellList> <BoundUnit> Format Description

ASCII - String Recipe Abstract. ASCII - String Recipe Description. ASCII - String Recipe Identifier. ASCII - String Recipe Product Code. ASCII - String Recipe Version. ASCII - String Recipe Author. ASCII - String Date Recipe was last saved. The format will be in accordance with the date/time as set in the Control Panel. Variable List Recipe Drawing Dimensions. ASCII - String Equipment Database Name. ASCII - String Currently always a blank space character. ASCII - String Unit name to which the step is bound.
85

FactoryTalk Batch Server API Technical Reference

where <DocDim> is: <DocDim> Field Name <Xdim> <Ydim> Format ASCII Integer ASCII Integer is <Xdim> \t <Ydim> Description Always returns zero. Reserved for future use. Always returns zero. Reserved for future use.

where <RecipeElemList> is: *<ParentStep> is always the first element in a <RecipeElemList> and only appears once in that list. <RecipeElemList> <RecipeElem> is is <RecipeElem> | <RecipeElem> \crlf <RecipeElemList> <ParentStep> | <InitialStep> | <TerminalStep> | <RegularStep> | <Transition> | <EqModLink> | <OrDiverg> | <OrConverg> | <AndDiverg> | <AndConverg> | <TextBox> <ElemType> \t <ElemID> \t <RecipeLink> \t <ParmList> \t <RptParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t <StepName> \t <ControllingProc> \t <ParmList> \t <RptParmList> <ElemType> \t <ElemID> \t <DrawXCord> \t <DrawYCord> \t<TransitionName>\t <ConditionExpression> <ElemType> \t <ElemID> \t <PrevElemID> \t <NextElemID> <ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList> <ElemType> \t <ElemID> \t <PrevElemIDList> \t <NextElemIDList> <ElemType> \t <ElemID> \t <NextElemIDList> \t <PrevElemIDList> <ElemType> \t<Size>\t<Comment>\t<Associated Element>\t<TextBoxID>

<ParentStep> <InitialStep> <TerminalStep> <RegularStep>

is is is is

<Transition>

is

<EqModLink> <OrDiverg> <OrConverg> <AndDiverg> <AndConverg> <TextBox>

is is is is is is

86

2 Item Reference

where <RecipeElemList> is: Field Name <ElemType> Format ASCII Integer Description Recipe Element Type 0 = Parent Step 1 = Initial Step 2 = Terminal Step 3 = Regular Step 4 = Transition 5 = Link 6 = OR Divergence 7 = OR Convergence 8 = AND Divergence 9 = AND Convergence 10 = Text box Element Identifier.

<ElemID> <RecipeLink> <DrawXCoord> <DrawYCoord> <ParmList> <StepName> <RptParmList> <Condition Expression> <PrevElemID> <NextElemID>

ASCII Integer ASCII Integer Variable List

ASCII-Integer Path to the recipe file and recipe. X coordinate for drawing the element.

ASCII-Integer Y coordinate for drawing the element. Parameters associated with the procedure. ASCII - String Name of a step element. Variable List Report Parameters associated with the procedure.

<ControllingProc> ASCII - String Name of the procedure a step element controls. ASCII - String The condition expressions text of a transition element. ASCII Integer ASCII Integer Elements Identifier appearing IN FRONT of an equipment module link. Elements Identifier appearing BEHIND an equipment module link. List of elements appearing ABOVE a divergence or convergence. List of elements appearing BELOW a divergence or convergence.

<PrevElemIDList Variable List > <NextElemIDList Variable List >

<TransitionName ASCII - String Name of a transition: T followed by a unique number, e.g. > T55. <Size> Fixed List Coordinates of text boxs upper left-hand corner and lower right-hand corner.

87

FactoryTalk Batch Server API Technical Reference

Field Name <Comment>

Format

Description

ASCII - String The batch server encodes the following characters found in any text box comments: CharacterReplacement Sequence / List Separator ( ) \t crlf /FS /LS /OP /CP /TAB /CRLF

<Associated Element> <TextBoxID> where <Size> is:

ASCII - String Name of step or transition that text box is associated with. If the text box is NOT associated with a step or transition, this field is empty. ASCII - String Name of text box: C followed by a unique number, e.g. C53. <Size> is <Left>\t<Top>\t<Right>\t<Bottom>

where: <Left> <Top> <Right> <Bottom> ASCII Number ASCII Number ASCII Number ASCII Number <ParmList> <Parameters> <NullParmList> <PList> <Parameter> X coordinate for upper left hand corner. Y coordinate for upper left hand corner. X coordinate for lower right hand corner. Y coordinate for lower right hand corner.

where <ParmList> is: is is is is is $PARM \t <Parameters> \t $END <NullParmList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <ParmType> \t <ParmKind> \t <EUs> \t <MaxValue> \t <MinValue> \t <DefaultValue> \t <ParamExpressionID>

where <Parameter> is: Field Name <ParmName> Format Field Name $BINDCONTAINER - for container only $BINDEQMODULE - for equipment module only <ParmType> ASCII Integer Data Type 1: Real 3: String 2: Long 5: Enumeration

ASCII - String Parameter Name

88

2 Item Reference

Field Name <ParmKind>

Format ASCII Integer

Field Name Kind of parameter 1: Value 2: UnAcked Prompt 3: Deferred 4: Static 5: Material Data 6: Expression

<EUs>

ASCII - String Eng Unit If <ParmType> = 5, then this is the enumeration set If <ParmType> = 3, then a single space ASCII - String Maximum value Single space for strings and enumerations ASCII - String Minimum value Single space for strings and enumerations <ParmType> Default value assigned to parameter If 0, parameter is not an expression If a unique positive integer, parameter is an expression is is is is is <NullRPList> | <RPList> $REPORT \t $END $REPORT \t <RList> \t $END <ReportParm> | <ReportParm> \t <RList> <RptName> \t <EUs> \t <ReportExpressionID>

<MaxValue> <MinValue> <DefaultValue>

<ParamExpression ASCII ID> Variable where <RptParmList> is: <RptParmList> <NullRPList> <RPList> <RList> <ReportParm> where <ReportParm> is: Field Name <RptName> <EUs> Format

Field Name

ASCII - String Report parameter name ASCII - String Engineering units for report parameter If 0, report is not an expression If a unique positive integer, report is an expression is is is <ElemIDList> <ElemIDList> <ElemID> | <ElemID> \t <ElemIDList>

<ReportExpressio ASCII nID> Variable where <PrevElemIDList> is: <PrevElemIDList> where <NextElemIDList> is: <NextElemIDList> where <ElemIDList> is: <ElemIDList> Field Name <ElemID> Format ASCII Integer

Field Name Element identifier

89

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(17Data) (Procedure Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf French Vanilla Premium - class based/material based \crlf MCLS_FRENCHVANILLA \crlf FV-101 \crlf 1.0 \crlf Mark Shepard \crlf 8/24/2004 10:11:30 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf \crlf 0 \t 572 \t MCLS_FRENCHVANILLA.BPC \t $PARM \t MILK_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 1999 \t SUGAR_AMOUNT \t 1 \t 1 \t KG \t 1500 \t 0 \t 750 \t CREAM_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 2001 \t EGG_AMOUNT \t 1 \t 1 \t KG \t 500 \t 0 \t 230 \t FLAVOR_AMOUNT \t 1 \t 1 \t KG \t 100 \t 0 \t 20 \t $END \crlf 1 \t 573 \t 700 \t 100 \crlf 5 \t 574 \t 573 \t 575 \crlf 4 \t 575 \t 800 \t 398 \t T51 \t TRUE \crlf 5 \t 576 \t 575 \t 577 \crlf 3 \t 577 \t 600 \t 598 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_UP.UPC \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 578 \t 577 \t 579 \crlf 4 \t 579 \t 800 \t 898 \t T55 \t MCLS_SWEETCREAM_UP:1.STATE = COMPLETE \crlf 8 \t 580 \t 579 \t 590 \t 581 \crlf 3 \t 590 \t 200 \t 1300 \t MCLS_TRANSFER_OUT_UP:1 \t MCLS_TRANSFER_OUT_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 3 \t 581 \t 900 \t 1300 \t MCLS_TRANSFER_IN_UP:1 \t MCLS_TRANSFER_IN_UP.UPC \t $PARM \t \t $END \t $REPORT \t $END \crlf 4 \t 583 \t 800 \t 1800 \t T56 \t MCLS_TRANSFER_IN_UP:1.STATE = COMPLETE AND MCLS_TRANSFER_OUT_UP:1.STATE = COMPLETE \crlf 9 \t 582 \t 583 \t 590 \t 581 \crlf 5 \t 584 \t 583 \t 585 \crlf 3 \t 585 \t 600 \t 2000 \t MCLS_FRENCHVANILLA_UP:1 \t MCLS_FRENCHVANILLA_UP.UPC \t $PARM \t FLAVOR_AMOUNT \t 1 \t 3 \t KG \t 100 \t 0 \t 0 \t $END \t $REPORT \t $END \crlf 5 \t 586 \t 585 \t 587 \crlf 4 \t 587 \t 800 \t 2400 \t T60 \t MCLS_FRENCHVANILLA_UP:1.STATE = COMPLETE \crlf 5 \t 588 \t 587 \t 589 \crlf 2 \t 589 \t 800 \t 2700 \crlf

90

2 Item Reference

Example: A request on object.GetItem(17 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1DATA) (Operation Level of MCLS_FRENCHVANILLA) could return: 0 \crlf \crlf Sweetcream operation - class based/material based \crlf MCLS_SWEETCREAM_OP \crlf SWC-101 \crlf 1.0 \crlf Mark S. Shepard \crlf 8/28/2004 7:14:07 AM \crlf 30000 \t 30000 \crlf AREA1 \crlf \crlf NP_MIXER1 \crlf 0 \t 162 \t MCLS_SWEETCREAM_OP.UOP \t $PARM \t MILK_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t SUGAR_AMOUNT \t 1 \t 3 \t KG \t 1500 \t 0 \t 0 \t CREAM_AMOUNT \t 1 \t 3 \t KG \t 5000 \t 0 \t 0 \t EGG_AMOUNT \t 1 \t 3 \t KG \t 500 \t 0 \t 0 \t $END \crlf 1 \t 167 \t 700 \t 100 \crlf 5 \t 168 \t 167 \t 169 \crlf 4 \t 169 \t 800 \t 398 \t T12 \t TRUE \crlf 8 \t 170 \t 169 \t 184 \t 185 \t 171 \crlf 3 \t 184 \t 600 \t 698 \t MBR_ADD:1 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 185 \t 1400 \t 698 \t MBR_ADD:2 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 171 \t 2500 \t 700 \t AGITATE:1 \t \t $PARM \t SPEED_RATE \t 1 \t 1 \t RPM \t 50 \t 0 \t 5 \t $END \t $REPORT \t MIX_SPEED \t RPM \t $END \crlf 4 \t 182 \t 800 \t 1096 \t T13 \t MBR_ADD:2.STATE = COMPLETE AND MBR_ADD:1.STATE = COMPLETE \crlf 9 \t 183 \t 182 \t 184 \t 185 \crlf 8 \t 181 \t 182 \t 180 \t 186 \crlf 3 \t 180 \t 600 \t 1396 \t MBR_ADD:3 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 3 \t 186 \t 1400 \t 1400 \t TEMP_CTL:1 \t \t $PARM \t TEMP_SP \t 1 \t 1 \t DEG C \t 100 \t 0 \t 71.1 \t HOLD_TIME \t 1 \t 2 \t MINUTES \t 60 \t 0 \t 5 \t $END \t $REPORT \t TEMPERATURE \t DEG F \t TIME_HELD \t MIN \t $END \crlf 4 \t 178 \t 800 \t 1794 \t T14 \t TEMP_CTL:1.STATE = COMPLETE AND MBR_ADD:3.STATE = COMPLETE \crlf 9 \t 179 \t 178 \t 180 \t 186 \crlf 5 \t 177 \t 178 \t 176 \crlf 3 \t 176 \t 600 \t 1994 \t MBR_ADD:4 \t \t $PARM \t MATERIAL \t 5 \t 4 \t MATERIALS \t \t \t NULL_MATERIAL \t AMOUNT \t 1 \t 3 \t \t 5000 \t 0 \t 0 \t $BINDCONTAINER \t 3 \t 5 \t \t \t \t \t $BINDEQMODULE \t 3 \t 5 \t \t \t \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t ENG. UNITS \t FEED_COMPLETE \t YES_NO \t $END \crlf 4 \t 173 \t 800 \t 2500 \t T15 \t MBR_ADD:4.STATE = COMPLETE \crlf 9 \t 172 \t 173 \t 176 \t 171 \crlf 5 \t 174 \t 173 \t 175 \crlf 2 \t 175 \t 800 \t 2700 \crlf 10 \t 820 \t 1096 \t 880 \t 1140 \t This is comment \t MBR_ADD:1 \t C10 \crlf

91

FactoryTalk Batch Server API Technical Reference

PROCEDUREIDD EV L I M IT S
Description This item returns recipe and report parameter limits for a procedure. Input Format Request: ProcedureIDDevLimits ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName <ElemList>

Procedure Level Unit Procedure Level Operation Level Output Format <ProcIDDev Limits> where <ElemList> is: <ElemList> <RegularStep> Field Name <Name> Format ASCII Integer

is is is is

is is

<RegularStep> \crlf <RegularStep> <Name> \t <ParmLimitList> \t <RptLimitList>

Description Step name For example: PHASE1:1 is is is is is $PARM \t <ParameterLimits> \t <$END <NullParmList> | <PList>
<sp>

where <ParamLimitList> is: <ParamLimitList> <ParameterLimits> <NullParmList> <PList> <ParameterLimit>

<ParameterLimit> | <ParameterLimits> \t<PList> <ParamName> \t<VerificationMethod> \t<HighHighHighLimit> \t<HighHighLimit> \t<HighLimit> \t<LowLimit> \t<LowLowLimit> \t<LowLowLowLimit>

where <ParameterLimit> is: Field Name <ParmName> <Verification Method> Format Description

ASCII - String Parameter name. ASCII Integer Parameter Verification Method: 0 = No Limits 1 = High/Low 2 = High-High/Low-Low 3 = High-High-High/Low-Low-Low High-High-High Limit

<HighHighHigh Limit>

ASCII Integer

92

2 Item Reference

Field Name

Format

Description High-High Limit High Limit Low Limit Low-Low Limit Low-Low-Low Limit

<HighHighLimit> ASCII Integer <HighLimit> <LowLimit> <LowLowLimit> <LowLowLow Limit> ASCII Integer ASCII Integer ASCII Integer ASCII Integer <RptLimitList> <ReportLimits> <NullRptList> <RPList> <ReportLimit>

where <RptLimitList> is: is is is is is $REPORT \t <ReportLimits> \t$END <NullRptList> | <RPList> <sp> <ReportLimit> | <ReportLimit> \t<RPList> <ReportName> \t<VerificationMethod> \t<HighHighHighLimit> \t<HighHighLimit> \t<HighLimit> \t<LowLimit> \t<LowLowLimit> \t<LowLowLowLimit>

where <ReportLimit> is: Field Name <ReportName> <Verification Method> Format Description

ASCII - String Report name. ASCII Integer Parameter Verification Method: 0 = No Limits 1 = High/Low 2 = High-High/Low-Low 3 = High-High-High/Low-Low-Low High-High-High Limit High-High Limit High Limit Low Limit Low-Low Limit Low-Low-Low Limit

<HighHighHigh Limit>

ASCII Integer

<HighHighLimit> ASCII Integer <HighLimit> <LowLimit> <LowLowLimit> <LowLowLow Limit> ASCII Integer ASCII Integer ASCII Integer ASCII Integer

93

FactoryTalk Batch Server API Technical Reference

PROCEDUREIDS TATUS
Description This item returns data regarding the status of a specified procedure level. Each recipe level must be queried to get the complete picture of the recipe. Input Format Request: ProcedureIDStatus ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName <SVRSignal> \crlf <ElemList>

Procedure Level Unit Procedure Level Operation Level Output Format <ProcIDStatus > where: Field Name <SVRSignal> Format ASCII Integer <ElemList> <ParentStep> <RegularStep>

is is is is

Description 0=continue update of data for this advise 1=discontinue update of data for this advise is is is <ParentStep> \crlf <ChildElemList> <RegularStep> <ID> \t <Name> \t <SP88Type> \t <KeyPName> \t <KeyValue> \t <State> \t <Mode> \t <UnitName> \t <Control> \t <Index> \t <Paused> \t <Msg> \t <Rqst> \t <Fail> \t <ParmList> \t <RptParmList> \t <OwnerID> \t <OwnerName> \t <CmdMask> <RecipeElement> \crlf | <RecipeElement> \crlf <ChildElemList> <InitialStep> | <TerminalStep> | <Transition> | <RegularStep> <ElemID> \t <ElemState> \t <FailureMsg> <ElemID> \t <ElemState> \t <FailureMsg> <ElemID> \t <ElemState> \t <FailureMsg> \t <RqstAcquire> \t <Paused>

where <ElemList> is:

<ChildElemList> <RecipeElement> <InitialStep> <TerminalStep> <Transition> where <InitialStep> is: Field Name <ElemID> <ElemState> <FailureMsg> Format ASCII Integer

is is is is is

Description Element ID (defined by ProcedureIDData data item).

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures.

94

2 Item Reference

where <TerminalStep> is: Field Name <ElemID> <ElemState> <FailureMsg> Format ASCII Integer Description Element ID (defined by ProcedureIDData data item).

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures. Format ASCII Integer Description Element ID (defined by ProcedureIDData data item).

where <Transition> is: Field Name <ElemID> <ElemState> <FailureMsg> <RqstAcquire>

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures. ASCII Integer Displays a string that equates to the value of the transitions Firing Attribute: 0= 1 = Acquiring 2 = Binding 3 = Committed 4 = Stopping 5 = Resetting 6 = Pending 7 = Paused

<Paused>

ASCII Integer Format ASCII Integer ASCII Integer

Not used, replaced with Firing Attribute. Supported for legacy systems only. Description Element ID (defined by ProcedureIDData data item).

where <RegularStep> is: Field Name <ID> <Name> <SP88Type>

ASCII - String Element Name. Step Type: 0 = Null 3 = Operation 1 = Procedure 4 = Phase 2 = Unit Procedure

<KeyPName> <KeyValue> <State> <Mode> <UnitName>

ASCII - String Key Parameter Name; may contain a single space if the step does not have a key parameter value. ASCII - String Steps Key Value; may contain a single space if the step does not have a key parameter value ASCII - String Element State; the value can be a single space character if the step is not an active element. ASCII - String Returns the Steps Mode when the step is active or inactive. (Refer to Valid States and Modes.) ASCII - String Unit Step runs under; the value can be a single space character if the step is not associated with a single Unit (e.g. BPC batch step).

95

FactoryTalk Batch Server API Technical Reference

Field Name <Control>

Format

Description

ASCII - String Who controls the Step NONE PROGRAM EXTERNAL This field may contain a single space character if the step is not an active recipe element. ASCII Integer ASCII Integer Step Index; the value may be a single space character if the step is not an active recipe element. 0 = not paused, 1 = paused

<Index> <Paused> <Msg> <Rqst>

ASCII - String Step Message ASCII- integer Step Request, contents of request register; the value may be a single space character if the step is not an active recipe element or is not a phase level step. ASCII - String Fail Message; the value may contain a single space character if there is no failure associated with the step. Variable Variable ASCII Integer List of recipe parameters List of report parameters ElemOwner ID only for phase steps, otherwise blank space character.

<Fail> <ParmList> <RptParmList> <OwnerID> <OwnerName> <CmdMask>

ASCII - String Owner Name only for phase steps, otherwise blank space character. ASCII Integer <ParmList> <Parameters> <NullParmList> <PList> <Parameter> Command Masks - (Refer to Command Masks)

where <ParmList> is: is is is is is $PARM \t <Parameters> \t $END <NullParmList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <CurrentValue>

where <Parameter> is: Field Name <ParmName> Format Description $BINDCONTAINER - for container only. $BINDEQMODULE - for equipment module only <CurrentValue> ASCII Integer <RptParmList> <NullRPList> <RPList> <RList> <ReportParm>
96

ASCII - String Parameter name

Current value of parameter in recipe. Could also be the name of the container or the equipment module. is is is is is <NullRPList> | <RPList> $REPORT \t <sp> \t $END $REPORT \t <RList> \t $END <ReportParm> | <ReportParm> \t <RList> <ParmName> \t <ParmValue>

where <RptParmList> is:

2 Item Reference

where <ReportParm> is: Field Name <ParmName> <ParmValue> Format ASCII Integer Field Name The value of the report parameter. This value displays ??? if the value is not yet assigned.

ASCII - String Report parameter name

Example: A request on object.GetItem(17Status) could return: 0\crlf124\tBATCH_ID\t1\t\t \tHELD\tO_AUTO\t \tPROGRAM\t \t0\t \t \t \t$PARM\tMILK_AMOUNT\t1999\tSUGAR_AMOUNT\t750 \tCREAM_AMOUNT\t2001\tEGG_AMOUNT\t200 \tFLAVOR_AMOUNT\t50\t$END\t$REPORT\t \t$END\t \t \t2341\crlf129\t \t \crlf125\tCLS_FRENCHVANILLA_UP:1\t2 \tFLAVOR_AMOUNT\tWP_FREEZER1\t \tP_AUTO\tWP_FREEZER1\t \t \t0\t \t \t \t$PARM\tFLAVOR_AMOUNT\t50\t \t$END\t$REPORT\t \t$END\t \t \t32768\crlf126\tCLS_SWEETCREAM_UP:1\t2\t\tWP_MIXER1 \tHELD\tP_AUTO\tWP_MIXER1\tPROGRAM\t \t0\t \t \t \t$PARM\tMILK_AMOUNT\t1999\t \tSUGAR_AMOUNT\t750\t \tCREAM_AMOUNT\t2001\t \tEGG_AMOUNT\t200\t \t$END\t$REPORT\t \t$END\t \t \t2080\crlf127\tCLS_TRANSFER_IN_UP:1\t2\t\tWP_FREEZER1 \t \tP_AUTO\tWP_FREEZER1\t \t \t0\t \t \t \t$PARM\t \t$END\t$REPORT\t \t$END\t \t \t32768\crlf128\tCLS_TRANSFER_OUT_UP:1\t2 \t\tWP_MIXER1\t \tP_AUTO\tWP_MIXER1\t \t \t0\t \t \t \t$PARM\t \t$END\t$REPORT\t \t$END\t \t \t0\crlf130\t \t \crlf131\tIDLE\t \t0\t0\crlf132 \tHELD\t \t0\t0\crlf133\tIDLE\t \t0\t0\crlf134\tIDLE\t \t0\t0\crlf

97

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(17 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1Status) could return: 0 \crlf 162 \t MCLS_SWEETCREAM_OP:1 \t 3 \t \t \t HELD \t P_AUTO \t NP_MIXER1 \t PROGRAM \t \t 0 \t \t \t FEED_COMPLETE NOT COMPLETE. \t $PARM \t MILK_AMOUNT \t 1999 \t SUGAR_AMOUNT \t 750 \t CREAM_AMOUNT \t 2001 \t EGG_AMOUNT \t 230 \t $END \t $REPORT \t \t $END \t \t \t 2080 \crlf 167 \t \t \crlf 171 \t AGITATE:1 \t 4 \t SPEED_RATE \t 25 \t COMPLETE \t P_AUTO \t NP_MIXER1 \t PROGRAM \t 10 \t 0 \t \t 0 \t \t $PARM \t SPEED_RATE \t 25 \t $END \t $REPORT \t MIX_SPEED \t 0 \t $END \t -1112 \t 28:MCLS_FRENCHVANILLA\MCLS_SWEETCREAM_UP:1\MCLS_ SWEETCREAM_OP:1 \t 32 \crlf 184 \t MBR_ADD:1 \t 4 \t \t \t \t \t NP_MIXER1 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t EGG_YOLK \t AMOUNT \t 230 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 0 \t FEED_COMPLETE \t NO \t $END \t \t \t 262144 \crlf 185 \t MBR_ADD:2 \t 4 \t \t \t \t \t NP_MIXER1 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t SUGAR_GRANULATED \t AMOUNT \t 750 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 0 \t FEED_COMPLETE \t NO \t $END \t \t \t 262144 \crlf 180 \t MBR_ADD:3 \t 4 \t \t \t \t \t NP_MIXER1 \t \t 0 \t \t \t \t \t $PARM \t MATERIAL \t CREAM \t AMOUNT \t 2001 \t $BINDCONTAINER \t NULL_CONTAINER \t $BINDEQMODULE \t \t $END \t $REPORT \t ACTUAL_AMOUNT \t 0 \t FEED_COMPLETE \t NO \t $END \t \t \t 262144 \crlf 176 \t MBR_ADD:4 \t 4 \t \t \t COMPLETE \t P_AUTO \t NP_MIXER1 \t PROGRAM \t 10 \t 0 \t FEED_COMPLETE NOT COMPLETE. \t 0 \t FEED_COMPLETE NOT COMPLETE. \t $PARM \t MATERIAL \t MILK \t AMOUNT \t 1999 \t $BINDCONTAINER \t DAIRY_WEST1 \t $BINDEQMODULE \t NP_ADDDAIRY_M1 \t $END \t $REPORT \t ACTUAL_AMOUNT \t 0 \t FEED_COMPLETE \t NO \t $END \t -1112 \t28:MCLS_FRENCHVANILLA\MCLS_SWEETCREAM_UP:1\MCLS _SWEETCREAM_OP:1 \t 32 \crlf 186 \t TEMP_CTL:1 \t 4 \t TEMP_SP \t 71.1 \t \t \t NP_MIXER1 \t \t 0 \t \t \t \t \t $PARM \t HOLD_TIME \t 5 \t TEMP_SP \t 71.1 \t $END \t $REPORT \t TEMPERATURE \t 0 \t TIME_HELD \t 0 \t $END \t \t \t 0 \crlf 175 \t \t \crlf 169 \t IDLE \t \t 0 \t 0 \crlf 182 \t IDLE \t \t 0 \t 0 \crlf 178 \t IDLE \t \t 0 \t 0 \crlf 173 \t HELD \t \t 0 \t 0 \crlf

98

2 Item Reference

PROCEDUREIDS TATUS 2
Description This item returns data regarding the status of a specified procedure level. Each recipe level must be queried to get the complete picture of the recipe. Input Format Request: ProcedureIDStatus2 ProcedureID is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use BLCreateID_x item to retrieve the CreateID. CreateID CreateID \t UnitProcedureName CreateID \t UnitProcedureName \t OperationName <SVRSignal> \crlf <ElemList>

Procedure Level Unit Procedure Level Operation Level Output Format <ProcIDStatus 2> where: Field Name <SVRSignal> Format ASCII Integer <ElemList> <ParentStep> <RegularStep>

is is is is

Description 0=continue update of data for this advise 1=discontinue update of data for this advise is is is <ParentStep> \crlf <ChildElemList> <RegularStep> <ID> \t <Name> \t <SP88Type> \t <KeyPName> \t <KeyValue> \t <KeyValueStatus> \t <State> \t <Mode> \t <UnitName> \t <Control> \t <Index> \t <Paused> \t <Msg> \t <Rqst> \t <Fail> \t <ParmList> \t <RptParmList> \t <OwnerID> \t <OwnerName> \t <CmdMask> <RecipeElement> \crlf | <RecipeElement> \crlf <ChildElemList> <InitialStep> | <TerminalStep> | <Transition> | <RegularStep> <ElemID> \t <ElemState> \t <FailureMsg> <ElemID> \t <ElemState> \t <FailureMsg> <ElemID> \t <ElemState> \t <FailureMsg> \t <RqstAcquire> \t <Paused>

where <ElemList> is:

<ChildElemList> <RecipeElement> <InitialStep> <TerminalStep> <Transition> where <InitialStep> is: Field Name <ElemID> <ElemState> <FailureMsg> Format ASCII Integer

is is is is is

Description Element ID (defined by ProcedureIDData data item).

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures.
99

FactoryTalk Batch Server API Technical Reference

where <TerminalStep> is: Field Name <ElemID> <ElemState> <FailureMsg> Format ASCII Integer Description Element ID (defined by ProcedureIDData data item).

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures. Format ASCII Integer Description Element ID (defined by ProcedureIDData data item).

where <Transition> is: Field Name <ElemID> <ElemState> <FailureMsg> <RqstAcquire>

ASCII - String Element state ASCII - String Failure message, single space if not active or if there are no failures. ASCII Integer Displays a string that equates to the value of the transitions Firing Attribute: 0= 1 = Acquiring 2 = Binding 3 = Committed 4 = Stopping 5 = Resetting 6 = Pending 7 = Paused

<Paused>

ASCII Integer Format ASCII Integer ASCII Integer

Not used, replaced with Firing Attribute. Supported for legacy systems only. Description Element ID (defined by ProcedureIDData data item).

where <RegularStep> is: Field Name <ID> <Name> <SP88Type>

ASCII - String Element Name. Step Type: 0 = Null 3 = Operation 1 = Procedure 4 = Phase 2 = Unit Procedure

<KeyPName> <KeyValue>

ASCII - String Key Parameter Name; may contain a single space if the step does not have a key parameter value. ASCII - String Steps Key Value;may contain a single space if the step does not have a key parameter value

100

2 Item Reference

Field Name

Format

Description Steps Key Value Status of an expression: 0 or blank = "OK or not an expression" 1= "Override" 2="Exception" 3="Override", "Exception" 4="Out of Range" 5="Override", "Out of Range" 6="Exception","Out of Range" 7="Override", "Exception", "Out of Range" The field may contain a single space character if the step does not have a key parameter value or if the key parameter is not a parameter expression.

<KeyValueStatus> ASCII Integer

<State> <Mode> <UnitName>

ASCII - String Element State; the value can be a single space character if the step is not an active element. ASCII - String Returns the Steps Mode when the step is active or inactive. (Refer to Valid States and Modes.) ASCII - String Unit Step runs under; the value can be a single space character if the step is not associated with a single Unit (e.g. BPC batch step). ASCII - String Who controls the Step NONE PROGRAM EXTERNAL This field may contain a single space character if the step is not an active recipe element. ASCII Integer ASCII Integer Step Index; the value may be a single space character if the step is not an active recipe element. 0 = not paused, 1 = paused

<Control>

<Index> <Paused> <Msg> <Rqst>

ASCII - String Step Message ASCII- integer Step Request, contents of request register; the value may be a single space character if the step is not an active recipe element or is not a phase level step. ASCII - String Fail Message; the value may contain a single space character if there is no failure associated with the step. Variable Variable ASCII Integer List of recipe parameters List of report parameters ElemOwner ID only for phase steps, otherwise blank space character.

<Fail> <ParmList> <RptParm List> <OwnerID> <OwnerName> <CmdMask>

ASCII - String Owner Name only for phase steps, otherwise blank space character. ASCII Integer Command Masks - (Refer to Command Masks)

101

FactoryTalk Batch Server API Technical Reference

where <ParmList> is: <ParmList> <Parameters> <NullParmList> <PList> <Parameter> where <Parameter> is: Field Name <ParmName> Format Description $BINDCONTAINER - for container only. $BINDEQMODULE - for equipment module only <CurrentValue> <CurrentStatus> ASCII Integer ASCII Integer Current value of parameter in recipe. Could also be the name of the container or the equipment module. Current status of value if parameter is an expression: 0 or blank = "OK or not an expression" 1= "Override" 2="Exception" 3="Override", "Exception" 4="Out of Range" 5="Override", "Out of Range" 6="Exception","Out of Range" 7="Override", "Exception", "Out of Range" The field may contain a single space character if the parameter is not a parameter expression. where <RptParmList> is: <RptParmList> <NullRPList> <RPList> <RList> <ReportParm> where <ReportParm> is: Field Name <ParmName> <ParmValue> Format Field Name is is is is is <NullRPList> | <RPList> $REPORT \t <sp> \t $END $REPORT \t <RList> \t $END <ReportParm> | <ReportParm> \t <RList> <ParmName> \t <ParmValue> is is is is is $PARM \t <Parameters> \t $END <NullParmList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <CurrentValue>\t <CurrentStatus>

ASCII - String Parameter name

ASCII - String Report parameter name ASCII Integer The value of the report parameter. This value displays ???if the value is not yet assigned.

102

2 Item Reference

Example: A request on object.GetItem(17Status) could return: 0\crlf124\tBATCH_ID\t1\t\t \t \tHELD\tO_AUTO\t \tPROGRAM\t \t0\t \t \t \t$PARM\tMILK_AMOUNT\t1999\t \tSUGAR_AMOUNT\t750\t \tCREAM_AMOUNT\t2001\t \tEGG_AMOUNT\t200\t \tFLAVOR_AMOUNT\t50\t \t$END\t$REPORT\t \t$END\t \t \t2341\crlf129 \t \t \crlf125\tCLS_FRENCHVANILLA_UP:1\t2 \tFLAVOR_AMOUNT\tWP_FREEZER1\t \t \tP_AUTO\tWP_FREEZER1\t \t \t0\t \t \t \t$PARM\tFLAVOR_AMOUNT\t50\t \t$END\t$REPORT\t \t$END\t \t \t32768\crlf126\tCLS_SWEETCREAM_UP:1\t2\t\tWP_MIXER1 \t \tHELD\tP_AUTO\tWP_MIXER1\tPROGRAM\t \t0\t \t \t \t$PARM\tMILK_AMOUNT\t1999\t \tSUGAR_AMOUNT\t750\t \tCREAM_AMOUNT\t2001\t \tEGG_AMOUNT\t200\t \t$END\t$REPORT\t \t$END\t \t \t2080\crlf127\tCLS_TRANSFER_IN_UP:1\t2\t\tWP_FREEZER1 \t \t \tP_AUTO\tWP_FREEZER1\t \t \t0\t \t \t \t$PARM\t \t$END\t$REPORT\t \t$END\t \t \t32768\crlf128 \tCLS_TRANSFER_OUT_UP:1\t2\t\tWP_MIXER1\t \t \tP_AUTO\tWP_MIXER1\t \t \t0\t \t \t \t$PARM\t \t$END\t$REPORT\t \t$END\t \t \t0\crlf130\t \t \crlf131\tIDLE\t \t0\t0\crlf132\tHELD\t \t0\t0 \crlf133\tIDLE\t \t0\t0\crlf134\tIDLE\t \t0\t0\crlf

103

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(17 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1Status) could return: 0/crlf422/tCLS_SWEETCREAM_OP:1/t3/t/t /t /tHELD/tP_AUTO/ tWP_MIXER1/tPROGRAM/t /t0/t /t /t /t$PARM/tMILK_AMOUNT/ t1999/t /tSUGAR_AMOUNT/t750/t /tCREAM_AMOUNT/t2001/t / tEGG_AMOUNT/t200/t /t$END/t$REPORT/t /t$END/t /t /t2080/crlf436/ t /t /crlf431/tADD_CREAM:1/t4/tADD_AMOUNT/t2001/tKG/t /t / tP_AUTO/tWP_MIXER1/t /t /t0/t /t /t /t$PARM/tADD_AMOUNT/ t2001/t /t$END/t$REPORT/tAMOUNT_ADDED/t???/t$END/t /t /t0/ crlf432/tADD_EGG:1/t4/tADD_AMOUNT/t200/tKG/t /tHELD/ tP_AUTO/tWP_MIXER1/tPROGRAM/t10/t0/t/t0/t /t$PARM/ tADD_AMOUNT/t200/t /t$END/t$REPORT/tAMOUNT_ADDED/t???/ t$END/t-1042/ t36:CLS_FRENCHVANILLA\CLS_SWEETCREAM_UP:1\CLS_SWE ETCREAM_OP:1/t32/crlf433/tADD_MILK:1/t4/tADD_AMOUNT/ t1999/tKG/t /t /tP_AUTO/tWP_MIXER1/t /t /t0/t /t /t /t$PARM/ tADD_AMOUNT/t1999/t /t$END/t$REPORT/tAMOUNT_ADDED/ t???/t$END/t /t /t0/crlf434/tADD_SUGAR:1/t4/tADD_AMOUNT/t750/ tKG/t /tHELD/tP_AUTO/tWP_MIXER1/tPROGRAM/t10/t0/t/t0/t / t$PARM/tADD_AMOUNT/t750/t /t$END/t$REPORT/ tAMOUNT_ADDED/t???/t$END/t-1042/ t36:CLS_FRENCHVANILLA\CLS_SWEETCREAM_UP:1\CLS_SWE ETCREAM_OP:1/t32/crlf435/tAGITATE:1/t4/tSPEED_RATE/t25 RPM/t /tHELD/tP_AUTO/tWP_MIXER1/tPROGRAM/t10/t0/t/t0/t / t$PARM/tSPEED_RATE/t25/t /t$END/t$REPORT/tMIX_SPEED/t???/ t$END/t-1042/ t36:CLS_FRENCHVANILLA\CLS_SWEETCREAM_UP:1\CLS_SWE ETCREAM_OP:1/t32/crlf437/tTEMP_CTL:1/t4/tTEMP_SP/t71.1/ tDEG C/t /t /tP_AUTO/tWP_MIXER1/t /t /t0/t /t /t /t$PARM/ tHOLD_TIME/t5/t /tTEMP_SP/t71.1/t /t$END/t$REPORT/ tTEMPERATURE/t???/tTIME_HELD/t???/t$END/t /t /t0/crlf438/t /t / crlf439/tIDLE/t /t0/t0/crlf440/tHELD/t /t0/t0/crlf441/tIDLE/t /t0/t0/ crlf442/tHELD/t /t0/t0/crlf

104

2 Item Reference

PROCEDUREIDU NIT R EQUIREMENTS


Description This item returns the set of Unit Requirements configured within the specified recipe structure. Input Format Request: ProcedureIDUnitRequirements <ProcedureID> is ASCII - String, the unique path to the recipe step. This path begins with the CreateID. You may use the BatchList item to retrieve the CreateID.

Examples for an Operation Recipe: <Operation Level> is <CreateID> for a Unit Procedure Recipe: <Unit Procedure Level> is <CreateID> <Operation Level> is <CreateID> \t Operation Name for a Procedure Recipe: <Procedure Level> is <CreateID> <Unit Procedure Level> is <CreateID> \t UnitProcedure Name <Operation Level> is <CreateID> \t UnitProcedure Name \t Operation Name Output Format The ProcedureIDUnitRequirements item is returned in the following format: <UnitRequirements> <UnitReqList> <UnitRequirement> is is is <NullList> | <UnitReqList> <UnitRequirement> | <UnitRequirement> \crlf <UnitReqList> <UnitReqName> /t <UnitReqID> /t <UnitReqType> /t <UnitReqClassOrInstanceName> <AssocStepList> /t $END <DownstreamUnitReqList> <NullList> | /t <AssocSteps> <ElemID> | <ElemID> /t <AssocSteps> <NullList> | /t <DownstreamUnitReqs> <DownstreamUnitReqID> | <DownstreamUnitReqID> /t <DownstreamUnitReqs>

<AssocStepList> <AssocSteps> <DownstreamUnitReqList> <DownstreamUnitReqs>

is is is is

where <PhaseDesc> is: Field Name Format Description

<UnitReqName> ASCII - String Unit Requirement Name <UnitReqID> ASCII Integer Unique ID assigned to Unit Requirement

105

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description Unit Requirement Type Code: 1 = Unit Class 2 = Unit Instance

<UnitReqType> ASCII Integer

<UnitReqClassOr ASCII - String Name of Unit Class or Unit Instance associated with Unit InstanceName> Requirement <ElemID> ASCII Integer <DownstreamUnit ASCII ReqID> Integer Unique ID of step associated with this Unit Requirement Unique ID of configure downstream Unit Requirement

Example: A request on object.GetItem(17UnitRequirements) could return: MAX_SPEED \t 13 \t 1 \t MIXER \t 127 \t $END \t 14 \crlf TEMP \t 14 \t 1 \t FREEZER \t 128 \t $END

P R O C E S S C ELL B IT M APS
Description This item returns the bitmap index for all the process cells within the equipment database loaded by the server. Input Format Request: ProcessCellBitMaps Output Format The ProcessCellBitMaps is returned in the following format: <ProcessCellBitMaps> <BitMapList> <BitMap> <ProcessCellBitMaps> where <BitMapList> is: Field Name <BitMapIndex> <ProcessCell Name> Format ASCII Integer Description Location of the bit map in the process cell items. is is is is <NullList> | <BitMapList> <BitMap> | <BitMap> \crlf <BitMapList> <BitMapIndex> \t <ProcessCellName> <NullList> | <BitMapList>

ASCII - String The name of the process cell bitmap file.

Example: A request on object.GetItem(ProcessCellBitMaps) could return: 0 \t REFINERY.BMP \crlf 1 \t REFINERY.BMP \crlf 2 \t REFINERY.BMP \crlf 3 \t REFINERY.BMP \crlf

106

2 Item Reference

PROCESSCELLIDU NITS
Description This item returns information about all units in a process cell, including how they are linked. Input Format Request only: ProcessCellIDUnits While Advise will return information, it would not normally be used as the data does not change during processing. ProcessCellID is ASCII Integer, the unique Equipment ID corresponding to the process cell

Output Format The ProcessCellIDUnits is returned in the following format: <PCellIDUnits> <NullList> <UnitList> <UnitData> is is is is <NullList> | <UnitList> CString.Empty() \crlf <UnitData> \crlf | <UnitData> \crlf <UnitList> <UnitID> \t <UnitName> \t <UnitClass> \t <MaxOwners> \t <XCord> \t <YCord> \t <BitMapIndex> \t <Connections>

where <UnitData> is: Field Name <UnitID> <UnitName> <UnitClass> <MaxOwners> <XCord> <YCord> <BitMapIndex> <Connections> Format ASCII Integer Description Resource ID configured in FactoryTalk Batch Equipment Editor.

ASCII - String Unit Name. ASCII - String Unit Class Name. ASCII Integer ASCII Integer ASCII Integer ASCII Integer Variable <Connections> <ConnData> <NullConnList> <ConnList> Max # of Owners as configured in FactoryTalk Batch Equipment Editor. X Coordinate for Equipment View. Y Coordinate for Equipment View. Location of bitmap in the list of Unit Bitmaps item. Information about the units to which this unit is connected. is is is is $CONN \t <ConnData> \t $END <NullConnList> | <ConnList> \t \t <UnitName> \t <UnitID>

where <Connections> is:

where <ConnList> is: Field Name <UnitName> <UnitID> Format Description

ASCII - String Unit Name. ASCII Integer Resource ID configured in FactoryTalk Batch Equipment Editor.
107

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(54Units) could return: 55 \t NP_MIXER1 \t MBR_MIXER_CLS \t 1 \t 194 \t 54 \t 8 \t $CONN \t NP_FREEZER1 \t 67 \t $END \crlf 84 \t NP_MIXER2 \t MBR_MIXER_CLS \t 1 \t 392 \t 54 \t 9 \t $CONN \t NP_FREEZER2 \t 85 \t $END \crlf 85 \t NP_FREEZER2 \t MBR_FREEZER_CLS \t 1 \t 392 \t 242 \t 11 \t $CONN \t \t $END \crlf 67 \t NP_FREEZER1 \t MBR_FREEZER_CLS \t 1 \t 194 \t 246 \t 10 \t $CONN \t \t $END \crlf

P R O C E S S C E L L S L I ST
Description This item returns a list of process cells in the current area. Input Format Request: ProcessCellsList Output Format The ProcessCellsList item is returned in the following format: <ProcessCellList> <PCList> <ProcessCell> is is is <NullList> | <PCList> <ProcessCell> | <ProcessCell> <PCList> <PCellID> \t <PCellName> \t <MaxOwners> \t <XCoord> \t <YCoord> \t <Area> \t <BitMapIndex> \crlf

where <ProcessCell> is: Field Name <PCellID> <PCellName> <MaxOwners> <XCoord> <YCoord> <Area> <BitMapIndex> Format ASCII Integer ASCII Integer ASCII Integer ASCII integer ASCII integer Description Resource ID for process cell.

ASCII - String Name of process cell. Max # of Owners. X Coordinate for Equipment View. Y Coordinate for Equipment View. Location of bitmap in the list of process cell bitmaps item.

ASCII - String Area name.

Example: A request on object.GetItem(ProcessCellsList) could return: 1 \t WEST_PARLOR \t 1 \t 120 \t 48 \t AREA1 \t 0 \crlf 24 \t SOUTH_PARLOR \t 1 \t 271 \t 48 \t AREA1 \t 1 \crlf 54 \t NORTH_PARLOR \t 1 \t 423 \t 47 \t AREA1 \t 2 \crlf 36 \t MEGA_PARLOR \t 1 \t 280 \t 195 \t AREA1 \t 3 \crlf

108

2 Item Reference

P R O C E S S C E L L S L I ST 2
Description This item returns a list of process cells in the current area. This item is different from the ProcessCellsList item in that it provides the name of a class on which a process cell is based. Input Format Request: ProcessCellsList2 Output Format The ProcessCellsList2 item is returned in the following format: <ProcessCellList> <PCList> <ProcessCell> is is is <NullList> | <PCList> <ProcessCell> | <ProcessCell> <PCList> <PCellID> \t <PCellName> \t <MaxOwners> \t <XCoord> \t <YCoord> \t <Area> \t <BitMapIndex> \t <PCellClass> \crlf

where <ProcessCell> is: Field Name <PCellID> <PCellName> <MaxOwners> <XCoord> <YCoord> <Area> <BitMapIndex> <PCellClass> Format ASCII Integer ASCII Integer ASCII Integer ASCII Integer ASCII Integer Description Resource ID for process cell.

ASCII - String Name of process cell. Max # of Owners. X Coordinate for Equipment View. Y Coordinate for Equipment View.

ASCII - String Area name. Location of bitmap in the list of process cell bitmaps item.

ASCII - String Name of the process cell class.

Example: A request on object.GetItem(ProcessCellsList2) could return: 1 \t WEST_PARLOR \t 1 \t 120 \t 48 \t AREA1 \t 0 \t TOM_AND_JERRY \crlf 24 \t SOUTH_PARLOR \t 1 \t 271 \t 48 \t AREA1 \t 1 \t TOM_AND_JERRY \crlf 54 \t NORTH_PARLOR \t 1 \t 423 \t 47 \t AREA1 \t 2 \t TOM_AND_JERRY \crlf 36 \t MEGA_PARLOR \t 1 \t 280 \t 195 \t AREA1 \t 3 \t TOM_AND_JERRY \crlf

109

FactoryTalk Batch Server API Technical Reference

R ECIPE D IR
Description This item returns the path to the recipe directory specified in the Batchsvr.ini file. Input Format Request: RecipeDir Output Format RecipeDir is returned in the following format: <Path> Field Name <Path> Format Description

ASCII - String The recipe directory path specified in the Batchsvr.ini file. Example: A request on object.GetItem(RecipeDir) could return: \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH \SAMPLEAPP\RECIPES\

R ECIPE L IST
Description This item returns information about the recipes available within the FactoryTalk Batch View. The RecipeList execute must be run once prior to advising or requesting on this item. Input Format Request: RecipeList Output Format RecipeList is returned in the following format: <RecipeList> <RecipeInfo> is is <RecipeInfo> | <RecipeInfo> <RecipeList> <ProductVersion> \t <FileName> \t <RecipeID> \t <RecipeDesc> \t <ProductName> \t <ProductCode> \t <RecipeVersion> \t <RecipeVersTime> \t <Author> \t <ApprovedBy> \t <RecipeLevel> \t <RecipeType> \t <Abstract> \t <MinBatchSize> \t <DefBatchSize> \t <MaxBatchSize> \t <UOM> \t <EstDuration> \t <Released> \t <AreaModel> \t <AreaModelTime> \t <Unit> \t <VerifyDate> \crlf <RecipeInfo> | <RecipeInfo> <RecipeList>

<RecipeList> where <RecipeInfo> is: Field Name Format

is

Description

<ProductVersion> ASCII - String The version of the product as defined in the recipe header. <FileName> <RecipeID> <RecipeDesc> <ProductName> <ProductCode> <RecipeVersion> ASCII - String The filename of the recipe. ASCII - String The recipe identifier as defined in the recipe header. ASCII - String A recipe description as defined in the recipe header. ASCII - String The product name as defined in the recipe header. ASCII - String The product code as defined in the recipe header. ASCII - String The recipe version as defined in the recipe header.

<RecipeVersTime ASCII - String The date/time that the recipe was saved. The format is in > dd/mm/yy accordance with the date/time as set in the Control Panel. hh:mm
110

2 Item Reference

Field Name <Author> <ApprovedBy> <RecipeLevel> <RecipeType> <Abstract> <MinBatchSize> <DefBatchSize> <MaxBatchSize> <UOM> <EstDuration> <Released>

Format

Description

ASCII - String The recipe author as defined in the recipe header. ASCII - String The approved by name as defined in the recipe header. ASCII - String The level of the recipe: PROCEDURE, UNIT PROCEDURE, or OPERATION. ASCII - String The type of equipment requirements for the recipe: CLASS or INSTANCE. ASCII - String The recipe abstract as defined in the recipe header. ASCII - String The minimum batch size, as defined in the recipe header. ASCII - String The default batch size, as defined in the recipe header. ASCII - String The maximum batch size, as defined in the recipe header. ASCII - String The unit of measure, as defined in the recipe header. ASCII - String The estimated duration of the batch, as defined in the recipe header. ASCII - String Indicates if the recipe has been released to production. Always TRUE. (Only recipes which have been released to production are included in the RecipeList item.) ASCII - String The area model file and path name against which the recipe was verified. dd/mm/yy hh:mm The date/time of area model file against which the recipe was verified. The format will be in accordance with the date/ time as set in the Control Panel.

<AreaModel> <AreaModelTime > <Unit> <VerifyDate>

ASCII - String The name of the unit or alias to which the recipe is bound. Will return an empty string for PROCEDURE level recipes. ASCII - String The latest modification date/time for the recipe. The format will be in accordance with the date/time as set in the Control dd/mm/yy Panel. hh:mm

111

FactoryTalk Batch Server API Technical Reference

Example: A request on object.GetItem(RecipeList) could return: 3.0 \t FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_2_U1.UPC \t FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_2_U1 \t French Vanilla IceCream \t French Vanilla \t FVP-101 \t Premium 1 \t 8/ 24/2004 10:11:33 AM \t Administrator \t rpmServer (STAGE1\rpmServer) on computer STAGE1 \t UNIT PROCEDURE \t Instance \t The general recipe French_Vanilla, Variant= Premium, Version= 1 is successfully converted to master recipe FRENCH_VANILLAPREMIUM1_MEGA_PARLOR \t 25 \t 50 \t 100 \t KG \t \t TRUE \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\SAMPLEAPP\RECIPES\ICE_CREAM.CFG \t 8/ 24/2004 10:05:16 AM \t MP_MIXERFREEZER1 \t 8/24/2004 10:11:27 AM \crlf ... 3.0 \t CLS_STRAWBERRY_ICEMILK.BPC \t CLS_STRAWBERRY_ICEMILK \t Strawberry Ice Milk - Reduced Fat Ice Cream - class based \t Strawberry Ice Milk \t SIM-101 \t 1.0 \t 8/24/ 2004 10:11:34 AM \t Mark Shepard \t MSS \t PROCEDURE \t Class \t \t 3000 \t 5000 \t 7000 \t KG \t 45 \t TRUE \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\SAMPLEAPP\RECIPES\ICE_CREAM.CFG \t 8/ 24/2004 10:05:16 AM \t \t 8/24/2004 10:11:27 AM \crlf

112

2 Item Reference

RESOURCEIDE Q D ATA
Description This item returns the tag status information for tags associated with the equipment phase, and state machine information to indicate the current status of the equipment phase. A setting in the batchsvr.ini file controls whether data collection is disabled, enabled without Deviation Limits, or enabled with Deviation Limits supported in the format of the returned ResourceIDEqData. The setting EqDataItemFormat is found in the CLIENT_MGR_DDE section of the batchsvr.ini file. batchsvr.ini Section: CLIENT_MGR_DDE where: Setting Name EqDataItemFormat EqDataItemFormat Value Meaning

0 (zero) Data collection for ResourceIDEqData is disabled. The item is not supported. 1 Data collection for ResourceIDEqData is enabled. Deviation Limits are not supported. (Default: EqDataItemFormat=1) Data collection for ResourceIDEqData is enabled. Deviation Limits are supported.

EqDataItemFormat EqDataItemFormat

Setting Data collection for ResourceIDEqData is disabled. The item is not supported. does not exist in the ini Any other value Data collection for ResourceIDEqData is disabled. The item is not supported.

EqDataItemFormat

Input Format Request: ResourceIDEqData ResourceID is ASCII - String, the unique ID corresponding to a specific equipment phase.

Output Format The ResourceIDEqData is returned in the following format: <EqData> is <EqModName> \crlf <PhaseName> \crlf <StateTag> \crlf <CmdTag> \crlf <FailTag> \crlf <OwnTag> \crlf <ReqTag> \crlf <PauseTag> \crlf <PausedTag> \crlf <SnglStepTag> \crlf <StepIdxTag> \crlf <UnitTag> \crlf <ParmList>\crlf <ParmLimitList> \crlf <RptList> \crlf <RptLimitList> \crlf <ReqList> \crlf <ConnFsm> \crlf <CmdFsm> \crlf <ReqFsm> \crlf

113

FactoryTalk Batch Server API Technical Reference

where: Field Name <EqModName> <PhaseName> where: <StateTag> <CmdTag> <FailTag> <OwnTag> <ReqTag> <PauseTag> <PausedTag> <SnglStepTag> <StepIdxTag> <UnitTag> <ParmList> <PTagList> <ParmLimit List> <LimitTagList> is is is is is is is is is is is is is is <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <NullList> | <PTagList> <TagInfo> | <TagInfo> \t <PTagList> <NullList> | <LimitTagList> <MethodTag> \t<NormPolTag><MethodTag> \t <NormPolTag>\t<LoLtTag>\t<HiLtTag>\t <HLPolTag> \t <LoLoLtTag>\t<HiHiLtTag>\t <HHLLPolTag>\t<LoLoLoLtTag>\t <HiHiHiLtTag> \t <HHHLLLPolTag>\ <NullList> | <RptTagList> <TagInfo> | <TagInfo> \t <RptTagList> <NullList> | <LimitTagList> <MethodTag> \t<NormPolTag> \t<LoLtTag> \t <HiLtTag>\t<HLPolTag> \t<LoLoLtTag>\t <HiHiLtTag>\t<HHLLPolTag>\t <LoLoLoLtTag> \t<HiHiHiLtTag>\t<HHHLLLPolTag>\t <NullList> | <ReqTagList> <TagInfo> | <TagInfo> \t <ReqTagList> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagInfo> Format Description

ASCII - String The name of the equipment phase. ASCII - String The name of the recipe phase the equipment phase can execute.

<RptList> <RptTagList> RptLimitList> <LimitTagList>

is is is is

<ReqList> <ReqTagList> where: <MethodTag> <NormPolTag <LoLtTag> <HiLtTag> <HLPolTag> <LoLoLtTag> <HiHiLtTag>
114

is is is is is is is is is

2 Item Reference

<HHLLPolTag> <LoLoLoLtTag> <HiHiHiLtTag> <HHHLLLPolTag> where: <TagInfo>

is is is is is

<TagInfo> <TagInfo> <TagInfo> <TagInfo> <TagName> \t <DataServerName> \t <ConfigString1> \t ConfigString2> \t <ConfigString3> \t <ConfigString4> \t <Protocol> \t <ConfiguredDataType> \t <OPCAdviseItemDataType> \t <OPCReadItemDataType> \t <OPCWriteItemDataType> \t <AdviseStatus> \t <LatestAdviseValue> \t <LatestAdviseValueQuality> \t <LatestAdviseValueTimestamp> \t <ReadStatus> \t <LatestReadValue> \t <LatestReadValueQuality> \t <LatestReadValueTimestamp> \t <WriteStatus> \t <LastValueWritten> \t <LastWriteResult> \t <LastWriteTimestamp>

where: Field Name <TagName> Format Description OPC - Name of the tag. DDE - Name of the tag. CIP - An English string indicating the equipment phase attribute exposed in this <TagInfo> structure.
*FTD

ASCII - String Protocol-specific configuration string:

- Name of the tag.

<DataServerName ASCII - String Protocol-specific configuration string: > OPC - Data server name the tag uses. DDE - Data server name the tag uses. CIP - Name of data server associated with equipment phase. FTD - Data server name the tag uses. <ConfigString1> ASCII - String Protocol-specific configuration string: OPC - Read Item Access Path DDE - Read Item Topic Name CIP - Unused (<sp>) FTD - Read Item Access Path <ConfigString2> ASCII - String Protocol-specific configuration string: OPC - Read Item Name DDE - Read Item Name CIP - Unused (<sp>) FTD - Read Item Name

115

FactoryTalk Batch Server API Technical Reference

Field Name <ConfigString3>

Format

Description OPC - Write Item Access Path DDE - Write Item Topic Name CIP - Unused (<sp>) FTD - Write Item Access Path

ASCII - String Protocol-specific configuration string:

<ConfigString4>

ASCII - String Protocol-specific configuration string: OPC - Write Item Name DDE - Write Item Name CIP - Unused (<sp>) FTD - Write Item Name

<Protocol>

ASCII - String String indicating communication protocol used for the tag or equipment phase attribute. Possible legal values are: DDE, OPC, CIP or FTD. ASCII - Integer Protocol-specific data type configured for tag in equipment database. OPC Ordinal indicating data type configured for tag in area model. 1 = FLOAT 2 = INTEGER 3 = STRING 4 = ENUMERATION DDE Same as OPC CIP Same as OPC FTD Same as OPC

<ConfiguredData Type>

<OPCAdviseItem DataType>

ASCII - Integer Protocol-specific string. OPC Ordinal indicating OLE variant type returned by the data server for advises. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD Same as OPC

116

2 Item Reference

Field Name <OPCReadItem DataType>

Format

Description OPC Ordinal indicating OLE variant type returned by the data server for reads. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD Same as OPC

ASCII - Integer Protocol-specific string.

<OPCWriteItem DataType>

ASCII - Integer Protocol-specific string. OPC Ordinal indicating OLE variant type returned by the data server for writes. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD Same as OPC

<AdviseStatus>

ASCII - Integer Ordinal indicating current status of any advise operation associated with the tag. 0 = NOT ADVISED 1 = ADVISED Advise established and initial value received 2 = PENDING Pending asynchronous establishment 3 = ENDING Asynchronously ending advise 4 = FAILED 5 = ESTABLISHED Advised, but no initial value received 9 = UNDEFINED/ERROR ASCII - String The latest data value received by the tag as the result of an update from an advise or active item. The value of the tag is converted to a string representation. If a data update is not received via an advise mechanism, then this field is empty.

<LatestAdvise Value>

117

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description

<LatestAdviseValu ASCII - Integer The quality of the latest advise value update. ProtocoleQuality> specific value: OPC: Quality value per OPC specification DDE: 192 = GOOD 0 = BAD CIP: FTD: 0 = GOOD Non-Zero = BAD Same as OPC If a advise data update is never received, then this field is empty. <LatestAdviseValu ASCII - String The timestamp associated with the most recent advise value. eTimestamp> This is not an OPC timestamp. This timestamp is recorded by the FactoryTalk Batch Server at the time it received the data update. The time is represented by a string in the format: "%m/%d/%Y %H:%M:%S" If a data update is never received, then this field is empty. <ReadStatus> ASCII - Integer Ordinal indicating current status of any read operation associated with the tag. 0 = NOT PENDING 1 = FAILED 2 = PENDING 9 = UNDEFINED/ERROR <LatestReadValue ASCII - String The latest data value received by the tag as the result of a > completed read operation. The value of the tag is converted to a string representation. If a read operation is never successfully completed, then this field is empty. <LatestReadValue ASCII - Integer Protocol-specific value. The quality of the latest read value Quality> update: OPC: Quality value per OPC specification DDE: 192 = GOOD 0 = BAD CIP: FTD: 0 = GOOD Non-Zero = BAD Same as OPC If an advise data update is not received, then this field is empty. <LatestReadValue ASCII - String The timestamp associated with the most recently read value. TimeStamp> This is not an OPC timestamp. This timestamp is recorded by the FactoryTalk Batch Server at the time it receives the read data. The time is represented by a string in the format: "%m/%d/%Y %H:%M:%S" If data is not successfully read, then this field is empty.

118

2 Item Reference

Field Name <WriteStatus>

Format

Description

ASCII - Integer Ordinal indicating current status of any write operation associated with the tag. 0 = NOT PENDING 1 = FAILED 2 = PENDING 9 = UNDEFINED/ERROR

<LastValueWritten ASCII - String The last value that the FactoryTalk Batch Server wrote to the > equipment phase attribute. The value is depicted as a string. If the equipment phase attribute is never written to, then this field is empty. <LastWriteResult> ASCII - Integer An ordinal that indicates the success or failure of the last attempted write. If the tag is associated with an OPC or FTD data server, then the complete set of OPC errors may be received; refer to the OPC standard for a list of the possible return values. If the tag is associated with a DDE server, then the result is constrained to either an S_OK or E_FAIL status. S_OK- Successful E_FAIL - Failed Additional vendor-specific error codes may be returned. It is not possible to know the values of these ordinals in advance. If the tag is never written to, this field is empty. <LastWriteTime stamp> ASCII - Integer The time at which the FactoryTalk Batch Server last received the results of a write attempt from the data server. The time is represented by a string in the format: %m/%d/%Y %H:%M:%S. If data is never successfully read, then this field is empty. <ConnFsm> <PendAdvs> <PendList> where: Field Name Format Description is is is <ConnMachState> \t <ParentStepName> \t <PendAdvs> <NullList> | <PendList> <PendTagName> | <PendTagName> \t <PendList>

where:

<ConnMachState> ASCII - Integer The current state of the connection state machine associated with the equipment phase. The possible states are: 0 = DORMANT 1 = PEND_SUBSCRIBE 2 = PEND_UNIT_ID 3 = CONNECTED 4 = RECONNECTING 5 = EXTERNAL_CONTROL <ParentStepName ASCII - String The batch step name connected to the equipment phase. If a > batch step is not currently connected, then this field is empty. <PendTagName> ASCII - String The tag name on which the connection state machine awaits an initial value before advancement to the next state is allowed.
119

FactoryTalk Batch Server API Technical Reference

where: <CmdFsm> <CmdQ> <CmdList> Field Name Format is is is <CmdMachState> \t <CurrCmd> \t <CurrCmdID> \t <CmdQ> $END \t <CmdEvents> <NullList> | <CmdList> <QueuedCmd> | <QueuedCmd> \t <CmdList>

Description

<CmdMachState> ASCII - Integer The current state of the Command state machine associated with the equipment phase. The possible states are: 0 = DORMANT 1 = INITIALIZING 3 = PEND_COMMAND_ACK 4 = PEND_WRITE_COMPLETE <CurrCmd> <CurrCmdID> <QueuedCmd> where: <CmdEvts> <CmdEvtList> <CmdEvent> is is is <NullList> | <CmdEvtList> <CmdEvent> | <CmdEvent> \t <CmdEvtList> <CmdInit> | <CmdSent> | <CmdAck> | <CmdNAck> | <CmdTime> | CmdQued> | <CmdCommErr> | <CmdNotYetProcessed> | <CmdProtocolViolate> | <CmdExternal> | <CmdQueueFlushed> | <CmdWriteFailed> | <CmdWriteSucceeded> 101 \t <EvtTstmp> \t <SpareParm> \t <InitialCmdID> 102 \t <EvtTstmp> \t <Cmd> \t <CmdID> 103 \t <EvtTstmp> \t <Cmd> \t <CmdID> 104 \t <EvtTstmp> \t <Cmd> \t <CmdID> 105 \t <EvtTstmp> \t <Cmd> \t <CmdID> 106 \t <EvtTstmp> \t <Cmd> \t <SpareParm> 108 \t <EvtTstmp> \t <Cmd> \t <CmdID> 109 \t <EvtTstmp> \t <Cmd> \t <CmdID> 110 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 111 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 112 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 113 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> ASCII - Integer If a Command is being processed, this field contains the current Command. Otherwise, this field is empty. ASCII - Integer If a Command is being processed, this field contains the ID of the current Command. Otherwise, this field is empty. ASCII - Integer A Command value in the Command queue waiting to be processed when the current Command completes.

<CmdInit> <CmdSent> <CmdAck> <CmdNAck> <CmdTime> <CmdQued> <CmdNotYetProcessed> <CmdProtocolViolate> <CmdExternal> <CmdQueueFlushed> <CmdWriteFailed> <CmdWriteSucceeded>

is is is is is is is is is is is is

120

2 Item Reference

Field Name <EvtTstmp>

Format

Description

ASCII - String The time at which the FactoryTalk Batch Server recorded the event. The time is represented as an eight byte float value. This is the DATE time as defined by OLE and encapsulated by the COleDateTime class. ASCII - String An unused event parameter field. It is populated with the value zero (0) by default. ASCII - Integer The Command ID used for the first Command issued after the Command state machine is initialized by reading the Command tags current value. Normally, a value of 1 is used, unless the current value of the tags high byte is 1, in which case Commands are started with an ID of 2. ASCII - Integer The Command value associated with the recorded event. ASCII - Integer The Command ID value associated with the recorded event. <ReqFSM> is <RqstMachState> \t <CurrRqst> \t <CurrRqstParm1> \t <CurrRqstParm2> \t <CurrRqstParm3> \t <ReqEvents>

<SpareParm> <InitialCmdID>

<Cmd> <CmdID> where:

where: Field Name Format Description

<RqstMachState> ASCII - Integer The current state of the request state machine associated with the equipment phase. The possible states are: 0 = DORMANT 1 = PEND_GET_DATA 2 = PERFORMING_REQ 3 = PEND_PUT_DATA 4 = PEND_VERIFY_DATA 5 = PEND_COMPLETE <CurrRqst> ASCII - Integer If a request is being processed, this is the value of the current request, otherwise this field is blank.

<CurrRqstParm1> ASCII - Integer If a request is being processed that requires request parameters, then this is the value of the first request parameter. Otherwise, this field is blank. <CurrRqstParm2> ASCII - Integer If a request is being processed that requires two or more request parameters, then this is the value of the second request parameter. Otherwise, this field is blank. <CurrRqstParm3> ASCII - Integer If a request is processed that requires three or more request parameters, then this is the value of the third request parameter. Otherwise, this field is blank. where <ReqEvents> is: <ReqEvents> is <ReqEvtList> <ReqEvent> is is <NullList> | <ReqEvtList> <ReqEvent> | <ReqEvent> \t <ReqEvtList> <ReqReq> | <ReqRSet> | <ReqAbrtAck> | <ReqAbrtFail> | <ReqGetParm> | <ReqProcsng> | <ReqCmpltd> | <ReqPutData> | <ReqVerData>
121

FactoryTalk Batch Server API Technical Reference

<ReqReq> <ReqRSet> <ReqAbrtAck> <ReqAbrtFail> <ReqGetParm> <ReqProcsng> <ReqCmpltd> <ReqPutData> <ReqVerData> where: Field Name <EvtTstmp> Format

is is is is is is is is is

203 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> 204 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 205 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 206 \t <EvtTstmp> \t <SpareParm> \t <SpareParm> 207 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> 208 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> 209 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> 210 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> 211 \t <EvtTstmp> \t <RqstValue> \t <SpareParm> Note: Items 212 through 315 are proprietary.

Description

ASCII - String The time at which the FactoryTalk Batch Server recorded the event. The time is represented as an eight-byte float value. This is the DATE time as defined by OLE and encapsulated by the COleDateTime class. ASCII - String An unused event parameter field. It is by default populated with the value zero. ASCII - Integer The value of the equipment phase request associated with the recorded event.

<SpareParm> <RqstValue>

122

2 Item Reference

Example: A request on object.GetItem(68EqData) could return:


NP_ADDDAIRY_M1 \crlf MBR_ADD \crlf NP_ADDDAIRY_M1_ST \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_ST \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 100 \t 192 \t 08/24/2004 16:20:57 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_OC \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_OC \t PHASES \t NP_ADDDAIRY_M1_OC \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 2816 \t 192 \t 08/24/2004 16:14:48 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_F \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_F \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/2004 16:14:49 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_W \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_W \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/2004 16:20:57 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_RQ \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_RQ \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/ 2004 16:21:18 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_P \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_P \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/2004 16:20:57 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_PD \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_PD \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/2004 16:20:57 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_SS \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_SS \t \t \t OPC \t 2 \t 3 \t \t 3 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf NP_ADDDAIRY_M1_SI \t OPC_SIM \t PHASES \t NP_ADDDAIRY_M1_SI \t \t \t OPC \t 2 \t 3 \t \t 3 \t 1 \t 0 \t 192 \t 08/24/2004 16:20:57 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf \t NP_ADDDAIRY_M1P02 \t PHASES \t NP_ADDDAIRY_M1P02 \t OPC \t 1 \t 5 \t \t 5 \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf ... \crlf 0 \t \t \crlf 1 \t 0 \t 0 \t $END \t 101 \t 08/24/2004 16:14:56 \t 0 \t 1 \crlf 0 \t 0 \t 0 \t 0 \t 0 \t

* The FactoryTalk Live Data (FTD) protocol provides services that read and write real-time manufacturing data from OPC servers and controllers for all participating FactoryTalk-enabled products in the FactoryTalk Directory. (See the FactoryTalk Batch Equipment Editor Users Guide for information on configuring an RSLinx Enterprise Live Data server for FactoryTalk Batch.)

123

FactoryTalk Batch Server API Technical Reference

RESOURCEIDH YPERLINKS
Description The ResourceIDHyperlinks item returns a tab-delimited list of hyperlinks that were configured in the area model for the equipment element identified by the resource ID. Input Format The FactoryTalk Batch Server supports an item named ResourceIDHyperlinks. The format of the data returned by this item is: <ResourceName> \t <Hyperlink1> \t <Hyperlink2> \t <Hyperlink3> \t <Hyperlink4> \t <Hyperlink5> Output Format The ResourceIDHyperlinks is returned in the following format: where: Field Name ResourceName Format Description

ASCII - String The resource name identified by the ResourceID included in the item. Can represent a process cell, unit, equipment phase or shared resource. ASCII - String The hyperlinks defined for the identified resource, where # is a number from 1 to 5. An empty string is returned for any hyperlink without an assigned a value in the area model.

Hyperlink#

Example: A request on object.GetItem(68Hyperlinks) could return: NP_ADDDAIRY_M1 \t HYPERLINK1 \t HYPERLINK2 \t HYPERLINK3 \t HYPERLINK4 \t HYPERLINK5

RESOURCEIDI NF O
Description This item returns the resource name denoted by the resource ID. Input Format Request: ResourceIDInfo ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A Resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output Format The ResourceIDInfo is returned in the following format: <ResourceInfo> where: Field Name <ResourceInfo> Format Description Procedure (for Operator) Process Cell Unit Phase Resource Example: A request on object.GetItem(68Info) could return: Phase NP_ADDDAIRY_M1 is <ResourceInfo>

ASCII - String The name of the resource prefaced with the type of resource:

124

2 Item Reference

RESOURCEIDO WNED
Description This item returns a resource list and their associated equipment IDs, which are currently owned by the resource denoted as ResourceID. A resource must be configured as a Needed Equipment item in the FactoryTalk Batch Equipment Editor or must be specifically requested by the Phase Logic in order to be considered Owned. The resource ID for the Operator is 0. Input Format Request: ResourceIDOwned ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A Resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output Format The ResourceIDOwned is returned in the following format: <ResourceIDOwned> <OwnedList> Resource> where: Field Name <ResourceID> Format ASCII Integer Description The unique equipment ID configured in the FactoryTalk Batch Equipment Editor. is is is <NullList> \crlf | <OwnedList> \crlf <Resource> | <Resource> <OwnedList> <ResourceID> \t <ResourceName> \crlf

<ResourceName> ASCII - String The name of the Procedure, Process Cell, Unit, Phase or Resource. Example: A request on object.GetItem(68Owned) could return: 125 \t P101 \crlf

125

FactoryTalk Batch Server API Technical Reference

RESOURCEIDO W N E R S
Description This item returns a list of all resource owners and the corresponding owner IDs. Input Format Request: ResourceIDOwners ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A Resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output The ResourceIDOwners is returned in the following format: Format <ResourceIDOwners> <OwnsList> <Resource> where: Field Name <ResourceID> Format ASCII Integer Description The unique equipment ID configured in the FactoryTalk Batch Equipment Editor. If the owner is the Batch operator, the ID is 0 (zero). is is is <NullList> \crlf | <OwnsList> \crlf <Resource> | <Resource> <OwnsList> <ResourceID> \t <ResourceName> \crlf

<ResourceName> ASCII - String The name of the Process Cell, Unit, Phase or Resource. Example: A request on object.GetItem(119Owners) could return: 0 \t OPERATOR \crlf

126

2 Item Reference

RESOURCEIDR E Q U E S T E D
Description This item returns a list of all resources and the corresponding Equipment IDs, requested by the resource owner indicated as ResourceID. The resource ID for the Operator is 0. Input Format Request: ResourceIDRequested ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A Resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output Format The ResourceIDRequested is returned in the following format: <ResourceID Requested> <RequestedList> <Resource> where: Field Name <ResourceID> Format ASCII Integer Description The unique equipment ID configured in the FactoryTalk Batch Equipment Editor. is is is <NullList> \crlf | <RequestedList> <Resource> | <Resource> <RequestedList> <ResourceID> \t <ResourceName> \crlf

<ResourceName> ASCII - String The name of the Process Cell, Unit, Phase or Resource. Example: A request on object.GetItem(68Requested) could return: 119 \t FV101 \crlf

127

FactoryTalk Batch Server API Technical Reference

RESOURCEIDR EQUESTERS
Description This item returns a list of all resource requesters and their corresponding owner IDs. Input Format Request: ResourceIDRequesters ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output Format The ResourceIDRequesters is returned in the following format: <ResourceIDRequesters> <RequestingList> <Resource> where: Field Name <ResourceID> Format ASCII Integer Description The unique equipment ID configured in the FactoryTalk Batch Equipment Editor. If the owner is the Batch operator, the ID is 0 (zero). is is is <NullList> \crlf | <RequestingList> <Resource> | <Resource> <RequestingList> <ResourceID> \t <ResourceName> \crlf

<ResourceName> ASCII - String The name of the Process Cell, Unit, Phase or Resource. Example: A request on object.GetItem(119Requesters) could return: 0 \t OPERATOR \crlf

RESOURCEIDS TRINGS
Description This item returns the list of five generic strings associated with the identified resource. Input Format Request: ResourceIDStrings ResourceID is ASCII - String, the unique Equipment ID corresponding to a specific resource. A Resource is an equipment entity (Process Cell, Unit, Phase or Shared Resource).

Output Format The ResourceIDStrings is returned in the following format: <ResourceName>\t<GenericString1>\t<GenericString2>\t<GenericString3> \t<GenericString4>\t<GenericString5> where: Field Name Format Description

<ResourceName> ASCII - String The name of the resource. Example: A request on object.GetItem(68Strings) could return: NP_ADDDAIRY_M1 \t CROSS INVOCATION LABEL 1 \t CROSS INVOCATION LABEL 2 \t CROSS INVOCATION LABEL 3 \t CROSS INVOCATION LABEL 4 \t CROSS INVOCATION LABEL 5

128

2 Item Reference

R ESOURCES L I S T
Description This item returns a list of all resources and their corresponding Equipment IDs. Input Format Request: ResourcesList Output Format The ResourcesList item is returned in the following format: <ResourcesList> <Resource> is is <Resource> | <Resource> <ResourcesList> <ResourceID> \t <ResourceName> \t <ResourceType> \t <ArbMask> \crlf

where <Resource> is: Field Name <ResourceID> Format ASCII Integer Description Unique Equipment ID for a Resource.

<ResourceName> ASCII - String The Resource Name. (Process Cells, Units and Shared Resources are included in this list.) <ResourceType> ASCII Integer 1: Process Cell 2: Unit 3: Phase 4: Resource 5: Procedure Arbitration (Refer to Arbitration Masks)

<ArbMask>

Encoded String

Example: A request on object.GetItem(ResourcesList) could return: -1138 \t 17:MCLS_FRENCHVANILLA\MCLS_TRANSFER_OUT_UP:1\MCL S_TRANSFER_OUT_OP:1 \t 5 \t 0 \crlf -1137 \t 17:MCLS_FRENCHVANILLA\MCLS_TRANSFER_OUT_UP:1 \t 5 \t 0 \crlf -1136 \t 17:MCLS_FRENCHVANILLA\MCLS_TRANSFER_IN_UP:1\MCLS_ TRANSFER_IN_OP:1 \t 5 \t 0 \crlf ... 119 \t FV101 \t 4 \t 1 \crlf

129

FactoryTalk Batch Server API Technical Reference

R UN M ODE
Description This item returns a string which indicates whether the FactoryTalk Batch Server is running in demo or production mode. Input Format Request: RunMode Output Format The RunMode is returned in the following format: <Mode> where: Field Name <Mode> Format Description

ASCII - String The mode in which the FactoryTalk Batch Server is running: Demo or Production

Example: A request on object.GetItem(RunMode) could return: Production

R UN W ITH OUT M AT S V R
Description This item returns the configured option of running when Material Server communication is lost as an ordinal data item. Input Format Request: RunWithoutMatSvr Output Format The RunWithoutMatSvr is returned in the following format: <Option> where: Field Name <Option> Format ASCII Integer Description 0 = FailureAndHold 1 = SwitchToManual

Example: A request on object.GetItem(RunWithoutMatSvr) could return: 1

130

2 Item Reference

SIGNATUREIDS I G
Description This item returns the signature information for a single signature (excluding those generated by private interfaces). Input Format Request: SignatureIDSig SignatureID is ASCII String, the unique Signature ID corresponding to a specific signature.

Output Format The SignatureIDSig is returned in the following format: <SigData> is <ActionID> /t <CreateID> /t <SigState> /t <SigCreateTime> /t <SigEndTime> /t <SigCancelable> /t <ReqSignOffs> /t <SigType> /t <reserved1> /t <reserved2> /t <SigContext> /crlf <LastSignOff> /t <SignOffList> <SignOff> | <SignOff> /crlf <SignOffList> <SignoffState> /t <CommentControl> /t <Meaning> /t <CompletionTime> /t <SignerName> /t <SignerID> /t <SignerComment> /t <PermissionList> <Permission> | <Permission> /t <PermissionList> <CommandContext > | <GeneralUsageContext> | <ParamDeviationContext> | <ParamValueAckContext> | <ReportDeviationContext> | <UnitBindContext> | <UnitBindAckContext> | <PhaseBindContext> | <PhaseBindAckContext> | <RemoveContext> | <ASCContext> | <AddEventContext> | <SetParmContext> | <SetAllLabelContext> | <SetAllLotContext> | <ForceTransitionContext> |<OverrideContext> | <OverrideClearContext> <ProcedureID> /t <Command> <ProcedureID> /t <StepIndex> <ProcedureID> /t <ParameterName> /t <NewValue> /t <CurrentValue> /t <DeviationType> /t <ParamLimits> <ProcedureID> /t <ParameterName> /t <NewValue> /t <DefaultValue> <ProcedureID> /t <ReportName> /t <UploadedValue> /t <TargetParamName> /t <TargetParamValue> /t <DeviationType> /t <ReportLimits> <UnitID> /t <ProcedureList> <<UnitID> /t <ProcedureList> <ProcedureID> /t <EquipmentPhaseID> /t <ContainerName> /t <MaterialName> /t <Lot> /t <Label>

<SignOffList> <SignOff>

is is

<PermissionList> <SigContext>

is is

<CommandContext> <GeneralUsageContext> <ParamDeviationContext>

is is is

<ParamValueAckContext> <ReportDeviationContext>

is is

<UnitBindContext> <UnitBindAckContext> <PhaseBindContext>

is is is

131

FactoryTalk Batch Server API Technical Reference

<PhaseBindAckContext>

is

<ProcedureID> /t <EquipmentPhaseID> /t <ContainerName> /t <MaterialName> /t <MaterialName> /t <Lot> /t <Label> <ProcedureID> <ProcedureID> /crlf <ActivateStepList> /crlf <DeactivateStepList> <ProcedureID> /crlf <Type> /crlf <Description> /crlf <Value> <ProcedureID> /t <ParameterName> /t <NewValue> /t <CurrentValue> <ProcedureID> /t <NewValue> <ProcedureID> /t <NewValue> <ProcedureID> /t <Parameter Name> /t <New Value> /t <Current Value> <ProcedureID> /t <Parameter Name> /t <New Value> /t <Current Value> <TransitionID> /t <Transition Condition Expression> <LLimit> /t <HLimit> /t <LLLimit> /t <HHLimit> /t <LLLLimit> /t <HHHLimit> <LLimit> /t <HLimit> /t <LLLimit> /t <HHLimit> /t <LLLLimit> /t <HHHLimit> <ProcedureID> | <ProcedureID> /t <ProcedureList> <NullList> | <StepList> <NullList> | <StepList> <StepName> | <StepName> /t <StepList>

<RemoveContext> <ASCContext> <AddEventContext> <SetParmContext> <SetAllLabelContext> <SetAllLotContext> <OverrideContext> <OverrideClearContext> <ForceTransitionContext> <ParamLimits> <ReportLimits> <ProcedureList> <ActivateStepList> <DeactivateStepList> <StepList> where: Field Name <ActionID> Format

is is is is is is is is is is is is is is is

Description

ASCII - Integer Action ID as a 32-bit unsigned integer. Action ID is used to associate multiple signatures that were generated from a single action (for example, SetParm). ASCII Integer ASCII Integer Unique CreateID of batch with which signature is associated. The signature state: 1 = Incomplete 2 = Complete 3 = Cancelled 4 = System Cancelled

<CreateID> <SigState>

<SigCreateTime >

ASCII String The time when the signature request was created, formatted as specified within the control panel.

132

2 Item Reference

Field Name <SigType>

Format ASCII Integer

Description The signature type: 1 = Command 2 = General Usage 3 = Recipe Parameter Deviation 4 = Parameter Value Ack 5 = Report Parameter Deviation 6 = Unit Bind 7 = Unit Bind Ack 8 = Phase Bind 9 = Phase Bind Ack 10 = Batch Removal 11 = Active Step Change 12 = Add Event Context 13 = Set Parameter Context 14 = SetAllLabel Context 15 = SetAllLot Context 16 = PhaseDisconnectContext 17 = PhaseResetContext 18 = ForceTransitionContext 19 = OverrideContext 20 = OverrideClearContext This field controls the type of the <SigContext> field as follows: 1 = <CommandContext> 2 = <GeneralUsageContext> 3 = <ParamDeviationContext> 4 = <ParamValueAckContext> 5 = <ReportDeviationContext> 6 = <UnitBindContext> 7 = <UnitBindAckContext> 8 = <PhaseBindContext> 9 = <PhaseBindAckContext> 10 = <RemoveContext> 11 = <ASCContext> 12 = <AddEventContext> 13 = <SetParmContext> 14 = <SetAllLabelContext> 15 = <SetAllLotContext> 16 = <PhaseDisconnectContext> 17 = <PhaseResetContext> 18 = <ForceTransitionContext> 19 = <OverrideContext> 20 = <OverrideClearContext>

<Reserved1> <Reserved2> <SigEndTime>

ASCII String Reserved for future use. ASCII String Reserved for future use. ASCII String The time when the signature was completed or cancelled, formatted as specified within the control panel. If the signature state is Incomplete, then this field is empty.

133

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description Cancelable property of Signature: 0 = Not Cancelable 1 = Cancelable Number of required signoffs. This field specifies the number of <SignOff> structures found in the <SignoffList>. The signoff state: 1 = Incomplete 2 = Complete 3 = Cancelled 4 = System Cancelled The configured comment control value: 0 = Optional 1 = Required 2 = Not Allowed Windows User or Group Identifiers permitted to perform the signoff. The identifier is always prepended with either a capitol G or U. A G indicates that the following string describes the name of a group, while a U indicates that the following string describes the name of a user.

<SigCancelable> ASCII Integer <ReqSignOffs> <SignoffState> ASCII Integer ASCII Integer

<CommentContr ASCII ol> Integer

<Permission>

ASCII - String

<Meaning>

ASCII String A description of the signatures meaning.

<CompletionTim ASCII String The time when the signoff was completed or cancelled, e> formatted as specified within the control panel. If the signoff state is Incomplete, then this field is blank. <SignerName> <SignerID> ASCII String The signers full name. This field is blank if the state of the signoff is Incomplete or Cancelled. ASCII String The signers user ID. This field is blank if the state of the signoff is Incomplete or Cancelled. If entered, the signers comment. This field is blank if the state of the signoff is Incomplete or Cancelled.

<SignerCommen ASCII - String t> <ProcedureID> <UnitID>

ASCII String Hierarchical path name to the procedure, unit procedure, operation, or phase associated with the signature. ASCII Integer The resource ID of the Unit specified by a Bind Unit execute. The resource ID of the equipment phase specified by a Bind Recipe Phase execute.

<EquipmentPhas ASCII eID> Integer

<ContainerName ASCII String The container specified by a Bind Phase Recipe execute. > <MaterialName> ASCII String The material specified by a Bind Phase or Bind Phase Ack execute. <Lot> <Label> <StepName> ASCII String The lot specified by a Bind Phase Recipe execute. ASCII String The label specified by a Bind Phase Recipe execute. ASCII String The step name inside a recipe.

134

2 Item Reference

Field Name <Command> <StepIndex>

Format ASCII Integer ASCII Integer

Description The command value queued pending signature collection. The Step Index of the equipment phase for which the signature was generated.

<ParameterName ASCII String The recipe phase parameters name for which a parameter > deviation generated a signature request. If this is the actual amount report in a material-based recipe step, then the type of material is appended to the actual amount report name. <NewValue> <CurrentValue> ASCII String The new value stored to a parameter when a signature is generated in response to a parameter deviation. ASCII String The current value of a parameter for which a signature has been generated in response to a parameter deviation. ASCII String The recipe phase reports name for which the signature was generated. If this is the amount parameter in a materialbased recipe step, then the material type is appended to the amount parameter name.

<Default Value> ASCII String The parameters default value. <ReportName>

<UploadedValue ASCII String The uploaded report value for which a signature was > generated. <Type> <Description> <Value> <TargetParam Name> <TargetParam Value> <DeviationType > ASCII String The Type field passed in the AddEvent, AddEvent_CI, or AddEvent_Phase execute. ASCII String The Description field passed in the AddEvent, AddEvent_CI, or AddEvent_Phase execute. ASCII - String The Value field passed in the AddEvent, AddEvent_CI, or AddEvent_Phase execute.

ASCII String The parameters name from which the report parameter deviation limits are calculated. ASCII String The parameters value from which the report parameter deviation limits are calculated (at the time the deviation was detected). ASCII Integer The type of deviation being recorded: 0 = Normal 11 = Low 12 = Low Low 13 = Low Low Low 21 = High 22 = High High 23 = High High High The 1-based ordinal of the Signoff in the SignoffList that must be the last completed. If none is configured as being required to be last, then the value is zero.

<LastSignOff>

ASCII Integer

<TransitionID>

ASCII String The unique ID of the transition, as assigned by the system.

<TransitionCond ASCII String The condition expression text of a transition element. itionExpression>
135

FactoryTalk Batch Server API Technical Reference

Field Name <LLimit>

Format

Description

ASCII String The reports Low Limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined. ASCII String The reports High Limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined. ASCII String The reports Low-Low Limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined. ASCII String The reports High-High Limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined. ASCII String The reports Low-Low-Low limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined. ASCII String The reports High-High-High limit or parameter for which a deviation signature has been generated. This field may be empty if the limit is not defined.

<HLimit>

<LLLimit>

<HHLimit>

<LLLLimit>

<HHHLimit>

S IG NA TURES
Description This item returns a list of all outstanding signature requests (excluding those generated by private interfaces). Input Format Request: Signatures Output Format The Signatures is returned in the following format: <Signatures> <SList> <Signature> where: Field Name <SignatureID> <CreateID> <ActionID> <SigState> Format Description is is is <NullList> | <SList> <Signature> | <Signature> \crlf<SList> <SignatureID> \t <CreateID> \t <ActionID> /t <SigState>

ASCII - Integer Unique ID as a 32-bit unsigned integer ASCII Integer ASCII Integer ASCII Integer Unique CreateID of batch with which signature is associated. Action ID as a 32-bit unsigned integer (an action may generate multiple Signatures, e.g. SetParm) The signature state: 1 = Incomplete 2 = Complete 3 = Cancelled 4 = System Cancelled

136

2 Item Reference

STARTTIME
Description The time stamp of when the FactoryTalk Batch Server was started. Input Format Request: StartTime Output Format The StartTime is returned in the following format: <Time> where: Field Name <Time> Format ASCII - String Description The time, formatted according to Windows internationalization and locality settings, that the FactoryTalk Batch Server was started.

Example

A request on object.GetItem(StartTime) could return: 2004.08.24 16:14:35

S T E P S L IST
Description This item returns a list of all dynamic owners (control recipes) and owner IDs. Input Format Request: StepsList Output Format The StepsList item is returned in the following format: <StepsList> <StepList> <Step> where <Step> is: Field Name <ResourceID> Format Description The hierarchical path name to the procedure. Owner Resource Type: 1. Process Cell 3. Phase 5. Procedure <ArbMask> Encoded String Arbitration Masks (Refer to Arbitration Masks). Example: A request on object.GetItem(StepsList) could return: -1128 \t 16:CLS_FRENCHVANILLA\CLS_TRANSFER_OUT_UP:1\CLS_TRAN SFER_OUT_OP:1 \t 5 \t 0 \crlf -1136 \t 17:MCLS_FRENCHVANILLA\MCLS_TRANSFER_IN_UP:1\MCLS_T RANSFER_IN_OP:1 \t 5 \t 0 \crlf ... -1114 \t 15:CLS_FRENCHVANILLA\CLS_SWEETCREAM_UP:1\CLS_SWEET CREAM_OP:1 \t 5 \t 0 \crlf
137

is is is

<NullList> | <StepList> <Step> \crlf | <Step> \crlf <StepList> <ResourceID> \t <ResourceName> \t <ResourceType> \t <ArbMask>

ASCII - Integer The unique ID for each step.

<ResourceName ASCII - String > <ResourceType> ASCII - String

2. Unit 4. Resource

FactoryTalk Batch Server API Technical Reference

S T R I N G L ABELS
Description This item returns the labels used for generic strings. There are four groups of five strings. The groups are ordered as follows: Process Cell labels, Unit labels, Phase labels, and Shared Resource labels. Input Format Request: StringLabels Output Format The StringLabels is returned in the following format: <StringLabels> <StringLabels> <ProcessCellLabels> <UnitLabels> <PhaseLabels> <SharedResourceLabels> where: Field Name <s1> <s2> <s3> <s4> <s5> Format ASCII - String ASCII - String ASCII - String ASCII - String ASCII - String Description Label for first generic string. Label for second generic string. Label for third generic string. Label for fourth generic string. Label for fifth generic string. is is is is is <ProcessCellLabels> \crlf <UnitLabels> \crlf <PhaseLabels> \crlf <SharedResourceLabels> \crlf <s1> \t <s2> \t <s3> \t <s4> \t <s5> <s1> \t <s2> \t <s3> \t <s4> \t <s5> <s1> \t <s2> \t <s3> \t <s4> \t <s5> <s1> \t <s2> \t <s3> \t <s4> \t <s5>

Example: A request on object.GetItem(StringLabels) could return: Cross Invocation Label 1 English Process Cell \t Cross Invocation Label 2 English Process Cell \t Cross Invocation Label 3 English Process Cell \t Cross Invocation Label 4 English Process Cell \t Cross Invocation Label 5 English Process Cell \crlf Cross Invocation Label 1 English Unit \t Cross Invocation Label 2 English Unit \t Cross Invocation Label 3 English Unit \t Cross Invocation Label 4 English Unit \t Cross Invocation Label 5 English Unit \crlf Cross Invocation Label 1 English Phase \t Cross Invocation Label 2 English Phase \t Cross Invocation Label 3 English Phase \t Cross Invocation Label 4 English Phase \t Cross Invocation Label 5 English Phase \crlf Cross Invocation Label 1 English Resource String \t Cross Invocation Label 2 English Resource String \t Cross Invocation Label 3 English Resource String \t Cross Invocation Label 4 English Resource String \t Cross Invocation Label 5 English Resource String \crlf

138

2 Item Reference

T AG V ER S TATUS
Description An internationalized string, indicating the current state of the tag verification process. Input Format Request: TagVerStatus Output Format The TagVerStatus is returned in the following format: <State> where: Field Name <State> Format ASCII - String Description The state of the current tag verification process. Valid states are: READY ABORTED RUNNING COMPLETE

Example: A request on object.GetItem(TagVerStatus) could return: RUNNING

T AG V ER S TATUS O RD
Description This item returns an integer indicating the current state of the tag verification process. Input Format Request: TagVerStatusOrd Output Format The TagVerStatusOrd is returned in the following format: <State> where: Field Name <State> Format Description

ASCII - Integer The state of the current tag verification process. Valid states are: 0 = READY 1 = RUNNING 2 = ABORTED 3 = COMPLETE

Example: A request on object.GetItem(TagVerStatusOrd) could return: 1

139

FactoryTalk Batch Server API Technical Reference

T H OUS AN D S S EPARATOR
Description This item returns the thousands separator used by the FactoryTalk Batch Server. Input Format Request: ThousandsSeparator Output Format The ThousandsSeparator is returned in the following format: <Separator> where: Field Name <Separator> Format ASCII - String Description The thousands separator for the language specific operating system.

Example: A request on object.GetItem(ThousandsSeparator) could return: ,

TIME
Description This item returns the FactoryTalk Batch Servers current time and the data servers conversation. Input Format Request: Time Output Format The Time item is returned in the following format: <TimeData> <DDESvrStatList> where: Field Name <Time> Format ASCII - String Description If the server has finished initializing, this is the current time, expressed using Windows internationalization and locality settings. If the server has not finished initializing, BOOTING will be displayed. <DDESvrStatus> ASCII - String The conversation status of the Batch Server to the configured DDE Server(s) Good / Bad / Suspect / Lost English: G / B / S / L French: B / E / S / P German: S / I / F / U Italian: B / C / S / P Spanish: B / E / D / P Example: A request on object.GetItem(Time) could return: 16:21:21 GG \crlf is is <Time> <DDESvrStatList> \crlf <DDESvrStatus> | <DDESvrStatus> <DDESvrStatList>

140

2 Item Reference

TIME2
Description This item returns the FactoryTalk Batch Servers time stamp and the most severe conversation status of all the data servers. The severity status from highest to lowest severity is: Lost, Bad, Suspect and Good. Input Format Request: Time2 Output Format The Time2 item is returned in the following format: <TimeData> where: Field Name <Time> Format ASCII - String Description If the server has finished initializing, the current time is expressed using Windows internationalization and locality settings. If the server has not finished initializing, BOOTING displays. <MostSevere Status> ASCII character The FactoryTalk Batch Servers conversation status to the configured DDE Server(s) Good / Bad / Suspect / Lost English: French: German: Italian: Spanish: G B S B B / / / / / B E I C E / / / / / S S F S D / / / / / L P U P P is <Time> <MostSevereStatus> \crlf

Example: A request on object.GetItem(Time2) could return: 16:21:21 G \crlf

141

FactoryTalk Batch Server API Technical Reference

T I M E R S T E PS
Description This item retrieves selected information about all of the Timer steps currently on the batch list. Input Format Request: TimerSteps Output Format The TimerSteps item is returned in the following format: <TimerList> <TLList> where <TimerStep> is: Field Name <TimerID> <BatchID> <Recipe Path> <Unit> Format Description is is <NullTimerList> | <TLList> <TimerStep> | <TimerStep> \t <TLList>

ASCII - String Internal Timer step ID used to specify a specific Timer on the Batch List. ASCII - String User Entered Recipe Batch ID. ASCII - String Path to the Timer Step in the Recipe (Includes Timer step name. ASCII - String Unit the Timer step is bound to. (Procedure Level: Blank Value Unit Procedure & Operation Level: shows Bound unit or Legal Binding option of Prompt or First Available)

Example: A request on object.GetItem(TimerSteps) could return: 2\tBATCH_432\t9:CLS_FRENCHVANILLA\CLS_FRENCHVANILLA _UP:1\CLS_FRENCHVANILLA_OP:1\TIMER_DN:1\tWP_FREEZER 1\r\n 3\tBATCH_432\t9:CLS_FRENCHVANILLA\CLS_FRENCHVANILLA _UP:1\CLS_FRENCHVANILLA_OP:1\TIMER_UP:1\tWP_FREEZER 1\r\n 4\tBATCH_432\t9:CLS_FRENCHVANILLA\CLS_FRENCHVANILLA _UP:1\TIMER_DN:1\tWP_FREEZER1\r\n 5\tBATCH_432\t9:CLS_FRENCHVANILLA\TIMER_COUNTUP:1\t \r\n 6\tBATCH_432\t9:CLS_FRENCHVANILLA\TIMER_DN:1\t \r\n

142

2 Item Reference

TIMERIDT IM ER D ATA
Description The TimerIDTimerData item retrieves information about the selected static information about a Tmer step on the batch list. Input Format Request: TimerIDTimerData Output Format The TimerIDTimerData item is returned in the following format: <StaticTimerData> is <CreateID> \t <Step Name> \t <State> \t <Mode> \t <CmdMask> \t <FailMsg> \t <UnitID> \t <Unit Name> \t <Recipe Path> \t <ParamList> \t <ParamList> \t <ParamLimitList> \t <RptList> \t <RptLimitList>

where <StaticTimerData> is: Field Name <CreateID> <Step Name> <Recipe Path> <ParamList> Format Description

ASCII - String CreateID of recipe timer step is associated with ASCII - String Name of the Timer Step (includes CreateID and path in recipe. ASCII - String For timer steps this field holds the phase class name from the area model. Variable List Parameters associated with the phase Parameter deviation limits associated with the phase Report parameters associated with the Phase Report parameter deviation limits associated with the phase. is is is is is $PARM \t <Parameters> \t $END <NullParamList> | <PList> <sp> <Parameter> | <Parameter> \t <PList> <ParmName> \t <ParmType> \t <ParmKind> \t <EUs> \t <MaxValue> \t <MinValue> \t <Value>

<ParamLimitList Variable List > <RptList> <RptLimitList> Variable List Variable List <ParamList> <Parameters> <NullParamList> <PList> <Parameter> where <Parameter> is: Field Name <ParmName> <ParmType> Format

where <ParamList> is:

Description

ASCII - String Parameter Name ASCII Integer ASCII Integer Data Type 1: Real 2: Long 3: String 5: Enumeration 4: Static 5: Material Data 6: Expression

<ParmKind>

Type of parameter 1: Value 2: UnAcked Prompt 3: Deferred

143

FactoryTalk Batch Server API Technical Reference

Field Name <EUs>

Format

Description If <ParmType> =5, then this is the enumeration set If <ParmType> =3, then it is a single space

ASCII - String Eng Unit

<MaxValue> <MinValue> <Value>

ASCII - String Maximum value (Use a single space for strings and enumerations) ASCII - String Minimum value (Use a single space for strings and enumerations) <ParmType> <ParamLimitList> <ParamLimits> Value assigned to parameter. is is is is is $PARAMLIMITS \t <ParamLimits> \t $END <NullParamLimitList> | <PLList> <sp> <ParameterLimit> | <ParameterLimit> \t <PList> <ParmName> \t <Verification Method> \t <HighHighHigh Limit> \t <HighHigh Limit> \t <High Limit> \t <Low Limit> \t <LowLow Limit> \t <LowLowLow Limit>

where <ParamLimitList> is:

<NullParamLimitList> <PLList> <ParameterLimit>

where <ParameterLimit> is: Field Name <ParmName> <Verification Method> Format Description

ASCII - String Parameter Name ASCII Integer Parameter Verification Method: 0 = No Limits 1 = High/Low 2 = High-High/Low-Low 3 = High-High-High/Low-Low-Low High-High-High Limit High-High Limit High Limit Low Limit Low-Low Limit Low-Low-Low Limit

<HighHighHigh Limit>

ASCII Integer

<HighHigh Limit> ASCII Integer <High Limit> <Low Limit> ASCII Integer ASCII Integer

<LowLow Limit> ASCII Integer <LowLowLow Limit> ASCII Integer

144

2 Item Reference

where <RptList> is: <RptList> <RptParameters> <RPList> <ReportParam> where <ReportParam> is: Field Name <RptName> <RptType> Format Description is is is is $REPORT \t <RptParameters> \t $END <NullRptList> | <RPList> <ReportParam> | <ReportParam> \t <RPList> <RptName> \t <RptType> \t <EUs> \t <Value>

ASCII - String Report parameter Name ASCII Integer Data Type 1: Real 2: Long 3: String 5: Enumeration

<EUs>

ASCII - String Eng Unit If <RptType> =5, then this is the enumeration set If <RptType> =3, then it is a single space

where <RptLimitList> is: <RptLimitsList> <RptLimits> <NullRptLimitList> <RLList> <ReportParmLimit> is is is is is $REPORTLIMITS \t <RptLimits> \t $END <NullRptLimitList> | <RLList> <sp> <ReportParmLimit> | <ReportParmLimit> \t <RList> <ReportParmName> \t <Verification Method> \t <HighHighHigh Limit> \t <HighHigh Limit> \t <High Limit> \t <Low Limit> \t <LowLow Limit> \t <LowLowLow Limit>

where <ReportParmLimit> is: Field Name <ReportParm Name> <Verification Method> Format Description

ASCII - String Parameter Name ASCII Integer Parameter Verification Method: 0 = No Limits 1 = High/Low 2 = High-High/Low-Low 3 = High-High-High/Low-Low-Low High-High-High Limit High-High Limit High Limit Low Limit

<HighHighHigh Limit>

ASCII Integer

<HighHigh Limit> ASCII Integer <High Limit> <Low Limit> ASCII Integer ASCII Integer

145

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description Low-Low Limit Low-Low-Low Limit

<LowLow Limit> ASCII Integer <LowLowLow Limit> ASCII Integer

Example: A request on object.GetItem(4TimerData) could return: 9\t9:CLS_FRENCHVANILLA\CLS_FRENCHVANILLA_UP:1\TIMER _DN:1\t$TIMER_DN_SECOND\r\n $PARM\tTIMER_TYPE\t5\t1\t$TIMER_TYPE\t \t \tCOUNT_DOWN\tHOLD_BEHAVIOR\t5\t1\t$HOLD_BEHAVIOR\t \t \tCONTINUE\tSETPOINT\t1\t1\tSECONDS\t4147200\t10\t300\t$END\ r\n $PARMLIMITS\tTIMER_TYPE\t0\t \t \t \t \t \t \tHOLD_BEHAVIOR\t0\t \t \t \t \t \t \tSETPOINT\t0\t \t \t \t \t \t \t$END\r\n $REPORT\tELAPSED_TIME\t1\tSECONDS\tREMAINING_TIME\t1\ tSECONDS\t$END\r\n $REPORTLIMITS\tELAPSED_TIME\t0\t \t \t \t \t \t \tREMAINING_TIME\t0\t \t \t \t \t \t \t$END\r\n

146

2 Item Reference

TIMERIDT IM ER S T A TU S
Description The TimerIDStatus item can be used to retrieve dynamic information about a specific Timer step. The TimerID is the internal reference number to a specific Timer on the batch list. This number is unique for all timers on the batch list. (The TimerSteps item can be used to get a list of all the TimerIDs currently on the batch list.) Input Format Request: TimerIDStatus Output Format The TimerIDStatus is returned in the following formats: For Timers of Type Count_Down: <DynamicTimerData> where <DynamicTimerData>: Field Name <State> <Mode> Format Description is <Elapsed_Time> \t <Remaining_Time> \t <State>

ASCII - Integer Current state of the Timer step. ASCII - String Mode of the Phase under Recipe Control: O_AUTO P_AUTO

<CmdMask> <Unit Name> <UnitID> <FailMsg> <Remaining_Ti me> <Setpoint>

ASCII - String ASCII - String

(Refer to Command Masks) Current Unit Name

ASCII - Integer Current Unit ID. ASCII - Integer Failure Message ASCII - Integer Amount of time remaining (Setpoint - Elapsed_Time)

<Elapsed_Time> ASCII - Integer Amount of time timer has been in the running state

<Hold Behavior> ASCII - Integer Current Value of the Hold_Behavior Parameter ASCII - Integer Current Value of the Setpoint Parameter For Timers of Type Count_Up: where <DynamicTimerData>: Field Name <State> <Mode> Format Description

ASCII - Integer Current state of the Timer step. ASCII - String Mode of the Phase under Recipe Control:

O_AUTO P_AUTO

<CmdMask> <Unit Name> <UnitID> <FailMsg>

ASCII - String ASCII - String

(Refer to Command Masks) Current Unit Name

ASCII - Integer Current Unit ID. ASCII - Integer Failure Message

147

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description

<Elapsed_Time> ASCII - Integer Amount of time timer has been in the running state <Hold Behavior> ASCII - Integer Current Value of the Hold_Behavior Parameter Example: A request on object.GetItem(4Status) could return the following for a COUNT_DOWN timer: READY\tP_AUTO\t0\tWP_FREEZER1\t4\t \t250\t50\tCONTINUE\t300\r\n A request on object.GetItem(4Status) could return the following for a COUNT_UP timer: RUNNING\tP_AUTO\t0\t \t\t \t40\tCONTINUE\r\n

T O T AL T AG C O UN T
Description An integer value indicating the total number of tags configured in the equipment database. Input Format Request: TotalTagCount Output Format The TotalTagCount is returned in the following format: <Count> where: Field Name <Count> Format Description

ASCII - Integer An integer value indicating the total number of tags configured in the equipment database.

Example: A request on object.GetItem(TotalTagCount) could return: 1053

148

2 Item Reference

UEA REA _ X
Description This item returns the Area Model field of the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEArea_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated, it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEArea_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEArea_x is returned in the following format: <AreaName> where: Field Name <AreaName> Format Description

ASCII - String The batchs Area Model name issuing the unacknowledged prompt.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time 8/24/2004 2:33:45 PM 8/24/2004 2:34:06 PM Batch ID BATCH_99 BATCH_100 Desc Charge_ Amount Hold_Time Value 35 5 Area Unit Phase

AREA1 UA_ P1 1 AREA1 UA_ P44 2

For the area associated with the prompt in the second row of the Unacknowledged Events List, request on object.GetItem(UEArea_2) would return: AREA1

149

FactoryTalk Batch Server API Technical Reference

UEB A TCH ID_ X


Description This item returns the Batch ID field of the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEBatchID_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated, it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEBatchID_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEBatchID_x item is returned in the following format: <Batch ID> where: Field Name <Batch ID> Format ASCII - String Description Operator entered batch identification value.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time 8/24/2004 2:33:45 PM 8/24/2004 2:34:06 PM Batch ID BATCH_99 BATCH_100 Desc Charge_ Amount Hold_Time Value 35 5 Area Unit Phas e

AREA1 UA_1 P1 AREA1 UA_2 P44

For the batch ID of the prompt in the first row of the Unacknowledged Events List, advise on
object.GetItem(UEBatchID_1) would return: BATCH_99

150

2 Item Reference

UED EFAULT _ X
Description This item returns the Default value for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEDefault_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated, it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEDefault_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEDefault_x item is returned in the following format: <DefaultValue> where: Field Name <DefaultValue> Format Description

ASCII - String The default value assigned to the parameter which issued the unacknowledged prompt.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Value Area 35 5 Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 P1 AREA1 UA_2 P44

For the default value of the prompt in the first row of the Unacknowledged Events List, advise on
object.GetItem(UEDefault_1) would return: 35

151

FactoryTalk Batch Server API Technical Reference

UED ESC _ X
Description This item returns the Description field of the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEDesc_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEDesc_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEDesc_x item is returned in the following format: <Description> where: Field Name <Description> Format Description

ASCII - String A description of the event, which is the name of the parameter into which the prompt will be stored.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Value Area 35 5 Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 P1 AREA1 UA_2 P44

For the description of the prompt in the first row of the Unacknowledged Events List, advise on
object.GetItem(UEDesc_1) would return: Charge_Amount

152

2 Item Reference

UEEU_ X
Description This item returns the Engineering Units field for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEEU_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEEU_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEEU_x item is returned in the following format: <EUs> where: Field Name <EUs> Format Description

ASCII - String Engineering units associated with the parameter. Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts:

Time

Batch ID

Desc Charge_ Amount Hold_Time

Value Area 35 5

Unit

EU

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 lbs AREA1 UA_2 minute s

For the engineering units of the prompt in the second row of the Unacknowledged Events List, a request on object.GetItem(UEEU_2) would return: minutes

153

FactoryTalk Batch Server API Technical Reference

UEE VENT _ X
Description This item returns the Event Type field for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEEvent_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEEvent_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEEvent_x item is returned in the following format: <EventType> where: Field Name <EventType> Format Description

ASCII - String The event type is assigned by the FactoryTalk Batch Server and can be used to sort events in the event journals. For unacknowledged prompts, the type will always be Prompt.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Value Area 35 5 Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 P1 AREA1 UA_2 P44

For the event type of the prompt in the second row of the Unacknowledged Events List, a request on object.GetItem(UEEvent_2) would return: Prompt

154

2 Item Reference

UEE VENT ID _ X
Description This item returns the unique ID assigned by the FactoryTalk Batch Server to the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEEventID_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEEventID_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEEventID_x item is returned in the following format: <EventID> where: Field Name <EventID> Format ASCII Integer Description The unique Event ID is assigned by the FactoryTalk Batch Server to keep track of issued prompts.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts. The Event ID is batch data that is not displayed in the Batch List window. Time Batch ID Desc Charge_ Amount Hold_Time Value Unit 35 5 UA_1 UA_2 Event Phase ID P1 P44 20 21

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

For the prompts event ID in the second row of the Unacknowledged Events List, advise on object.GetItem(UEEventID_2) could return: 21

155

FactoryTalk Batch Server API Technical Reference

UEH IG H _ X
Description This item returns the High Limit for the prompted parameter for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEHigh_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEHigh_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEHigh_x item is returned in the following format: <HighLimit> where: Field Name <HighLimit> Format ASCII Integer Description The maximum allowed value.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts. Shaded columns represent batch data that is not displayed in the Batch List window. Time Batch ID Desc Charge_ Amount Bake_ Time Value Unit 35 5 UA_1 UA_2 Phase High P1 P44 100 50

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

For the prompts high limit in the first row of the Unacknowledged Events List, advise on object.GetItem(UEHigh_1) would return: 100

156

2 Item Reference

UEL OW _ X
Description This item returns the Low Limit for the prompted parameter for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UELow_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UELow_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UELow_x item is returned in the following format: <LowLimit> where: Field Name <LowLimit> Format Description

ASCII - String The minimum allowed value.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts. Shaded columns represent batch data that is not displayed in the Batch List window. Time Batch ID Desc Charge_ Amount Hold_Time Value Unit 35 5 UA_1 UA_2 Phase Low P1 P44 10 0

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

For the prompts low limit in the second row of the Unacknowledged Events List, a request on object.GetItem(UELow_2) would return: 0

157

FactoryTalk Batch Server API Technical Reference

UEP H AS E _ X
Description This item returns the Phase field value for the prompted parameter for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEPhase_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEPhase_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEPhase_x item is returned in the following format: <PhaseName> where: Field Name <PhaseName> Format Description

ASCII - String The phase which originated the prompt.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Value Area 35 35 Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 P1 AREA1 UA_2 P44

For the phase associated with the prompt in the second row of the Unacknowledged Events List, a request on object.GetItem(UEPhase_2) would return: P44

158

2 Item Reference

UEP RO C C ELL _ X
Description This item returns the Process Cell field value for the prompted parameter for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEProcCell_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEProcCell_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEProcCell_x item is returned in the following format: <ProcCellName> where: Field Name <ProcCellName> Format Description

ASCII - String The process cell in which the phase originating the prompt is running.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Process Value Cell 35 5 PC_A PC_A Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

UA_1 P1 UA_2 P44

For the process cell with which the prompt in the second row of the Unacknowledged Events List is associated, a request on object.GetItem(UEProcCell_2) would return: PC_A

159

FactoryTalk Batch Server API Technical Reference

UER E C I PE _ X
Description This item returns the Recipe field value for the prompted parameter the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UERecipe_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UERecipe_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UERecipe_x item is returned in the following format: <UERecipe_x> <Recipe> where: Field Name <CreateID> <PathToPhase> <ConnectNum> Format ASCII Integer Description The unique identifier assigned by the FactoryTalk Batch Server to the batch where this prompt originated. is is <Recipe> <CreateID>:<PathToPhase>-<ConnectNum>

ASCII - String The path through the levels of the batchs recipe to the phase which made the download request then became this prompt. ASCII Integer The number of times this phase has been connected to via DDE while the recipe or subrecipe has been running (this is roughly but not always equal to the number of times the phase ran).

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Recipe 12: French_Vanilla 17:MCLS_FREN CHVANILLA\ P44:1-1 Desc Charge_ Amount Hold_Time Unit UA_1 UA_2 Phase P1 P44

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

For the recipe associated with the prompt in the first row of the Unacknowledged Events List, a request on object.GetItem(UERecipe_1) would return: 12:French_Vanilla:1-1
160

2 Item Reference

UER E S P T YPE _ X
Description This item returns the expected responses Data Type for the prompted parameter in the xth Unacknowledged Event of the Unacknowledged Event List. Input Format Request: UERespType_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UERespType_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UERespType_x item is returned in the following format: <DataType> where: Field Name <DataType> Format ASCII Integer Description Data type for the response: 1: Real3: String 2: Long Integer5: Enumeration

Example: The following example is an Unacknowledged Prompts List containing two unacknowledged prompts. Data Type does not display in the Batch List window. Time Batch ID Desc Charge_ Amount Hold_Time Value 35 5 Area Unit Data Type

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

AREA1 UA_1 2 AREA1 UA_2 2

For the data type associated with the prompt in the first row of the Unacknowledged Events List, a request on object.GetItem(UERespType_1) would return: 2

161

FactoryTalk Batch Server API Technical Reference

UET I M E _ X
Description This item returns the Time for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UETime_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UETime_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UETime_x item is returned in the following format: <Time> where: Field Name <Time> Format Description

ASCII - String The time the prompt was issued, formatted according to Windows internationalization and locality settings.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Manual_ Charge_ Amount Bake_ Time Value 100 35 Proces s Cell Unit PC_A PC_A Phase

8/24/2004 2:33:45 LotABC PM 8/24/2004 2:34:06 LotGHI PM

UA_1 P1 UA_2 P44

For the time associated with the prompt in the first row of the Unacknowledged Events List, a request on object.GetItem(UETime_1) would return: 8/24/2004 2:33:45 PM

162

2 Item Reference

UEU NI T _ X
Description This item returns the Unit field for the xth Unacknowledged Event in the Unacknowledged Event List. Input Request: UEUnit_<RowNumber> Format <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEUnit_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item, in other words, the maximum number of entries in the array. And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEUnit_x item is returned in the following format: <UnitName> where: Field Name <UnitName> Format Description

ASCII - String Name of the unit the phase originating the prompt is bound to.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Process Value Cell 35 5 PC_A PC_A Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

UA_1 P1 UA_2 P44

For the unit associated with the prompt in the first row of the Unacknowledged Events List, a request on object.GetItem(UEUnit_1) would return: UA_1

163

FactoryTalk Batch Server API Technical Reference

UEV A LU E _ X
Description This item returns the Value field for the xth Unacknowledged Event in the Unacknowledged Event List. Input Format Request: UEValue_<RowNumber> <RowNumber> is ASCII - Integer An array index. When an unacknowledged event is generated it is also added to an array. If the unacknowledged event list is not sorted, then x is the row number of the unacknowledged event appearing in the unacknowledged event list.

The UEValue_x item requires the Batchsvr.ini file to contain the following setting in the [CLIENT MGR DDE] section: MaxPromptTableLength = n where n is the maximum number of unacknowledged events accessible to this Item (the maximum number of entries in the array). And, where 0 x MaxPromptTableLength. If the number of unacknowledged events in the unacknowledged event list is larger than n, then this Item will only access the first n unacknowledged events in a non-sorted unacknowledged event list. When an unacknowledged event with an index of less than n is removed from the unacknowledged event list, all subsequent unacknowledged events will have their index decreased by one. The default value of MaxPromptTableLength is 0 (zero). Output Format The UEValue_x item is returned in the following format: <Value> where: Field Name <Value> Format Description

ASCII - String The value of the unacknowledged prompt prior to being answered by the Operator is the configured default value of the parameter.

Example: The following table is an example of an Unacknowledged Prompts List containing two unacknowledged prompts: Time Batch ID Desc Charge_ Amount Hold_Time Process Value Cell 35 5 PC_A PC_A Unit Phase

8/24/2004 2:33:45 BATCH_99 PM 8/24/2004 2:34:06 BATCH_100 PM

UA_1 P1 UA_2 P44

For the value associated with the prompt in the first row of the Unacknowledged Events List, a request on object.GetItem(UEValue_1) would return: 35

164

2 Item Reference

U N A CK N OW LED GED E VENTS


Description This item returns a list of all outstanding operator prompts. Input Format Request: UnAcknowledgedEvents Output Format The UnAcknowledgedEvents is returned in the following format: <UnAckEvents> <PromptsList> <Prompt> is is is <NullList> | <PromptsList> <Prompt> | <Prompt> /crlf <PromptsList> <OldPrompt> | <OldPrompt> /t <ActionID> /t <HighLimit> /t <HighHighLimit> /t <HighHighHighLimit> /t <LowLimit> /t <LowLowLimit> /t <LowLowLowLimit> <Time> /t <BatchID> /t <RecipePath> /t <Description> /t <Event> /t <Value> /t <EngUnits> /t <Area> /t <PCell> /t <Unit> /t <Phase> /t <UnAckedPromptID> /t <ParamDataType> /t <High> /t <Low> /t <Default>

<OldPrompt>

is

where: Field Name <ActionID> Format ASCII Integer Description Action ID as a 32-bit unsigned integer. If non-zero, it is the ActionID of an Ack that is pending for the UnacknowledgedEvent. If zero, then there is no Ack pending.

<HighLimit>

ASCII Value High deviation limit for prompts with <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty. ASCII Value High high deviation limit for prompts with <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty. ASCII Value High high high deviation limit for prompts with <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty. ASCII Value Low deviation limit for prompts with <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty. ASCII Value Low low deviation limit for prompts with <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty.

<HighHighLimit>

<HighHighHighLi mit>

<LowLimit>

<LowLowLimit>

165

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description

<LowLowLowLimi ASCII Value Low low low deviation limit for prompts with t> <ParamDataType> value of 1 or 2. A value is returned when the limit value is defined and a Signature Template is defined, otherwise this field is empty. <Time> <BatchID> <RecipePath> <Description> <Event> <Value> ASCII - String The time at which the event was generated, as formatted hh:mm within the Control Panel. ASCII - String Operator-entered batch identification number. ASCII - String The path within the recipe to the phase where the unacknowledged prompt originated. ASCII - String A description of the event. ASCII - String The type of event. Contains the string Prompt. ASCII - String The current value associated with the event. The value will be set to the parameters default value until the prompt is acknowledged. For binding prompts the value will be: unit, unitid, unit, unitid ASCII - String Engineering units associated with the event, if any. MATERIALS is returned for material phase binding. ASCII - String The Area from the Equipment database. ASCII - String The process cell in which the event occurred. ASCII - String The unit in which the event occurred. For binding prompts the Unit will contain the Alias name. ASCII - String The phase in which the event occurred. * ASCII - String Unique FactoryTalk Batch Server assigned identification number. ASCII - String Data type for the response 1=real, 2=long, 3=string, 5=enumeration, 10=binding, 20=phase binding. ASCII - String The maximum allowed value. ASCII - String The minimum allowed value.* ASCII - String The default value.

<EngUnits> <Area> <PCell> <Unit> <Phase> <UnAcked PromptID> <ParamData Type> <MaxValue> <MinValue> <Default>

Example: A request on object.GetItem(UnAcknowledgedEvents) could return: 8/24/2004 4:21:14 PM /t BATCH100 /t 17:FRENCHVANILLA\SWEETCREAMUP:1\SWEETCREAMOP:1 \t EMPCTL:1-1 \t HOLDTIME \t Prompt \t MINUTES \t AREA1 \t NORTHPARLOR \t NPMIXER2 \t NPHEATM2 \t 1 \t 60 \t 5 \t 64 \t 10 \t 20 \t 40 \t 3 \t 2 \t 1 Binding Example: A request on object.GetItem(UnAcknowledgedEvents) could return: 8/24/2004 4:21:14 PM /t BATCH100 /t 17:FRENCHVANILLA\SWEETCREAMUP:1\SWEETCREAMOP:1 \t EMPCTL:1-1 \t HOLDTIME \t Prompt \t MINUTES \t AREA1 \t NORTHPARLOR \t NPMIXER2 \t NPHEATM2 \t 1 \t 60 \t 5 \t 64 \t 10 \t 20 \t 40 \t 3 \t 2 \t 1
166

2 Item Reference

Phase Binding A request on object.GetItem(UnAcknowledgedEvents) could return: Example: 8/24/2004 4:21:14 PM /t BATCH100 /t 17:FRENCHVANILLA\SWEETCREAMUP:1\SWEETCREAMOP:1 \t EMPCTL:1-1 \t HOLDTIME \t Prompt \t MINUTES \t AREA1 \t NORTHPARLOR \t NPMIXER2 \t NPHEATM2 \t 1 \t 60 \t 5 \t 64 \t 10 \t 20 \t 40 \t 3 \t 2 \t 1 * Not used for binding prompts. Not used for binding prompts.

U NACKNOWLEDGED E V E N TS C T
Description This item returns the number of Unacknowledged Events in the Unacknowledged Events List. Input Format Request: UnacknowledgedEventsCt Output Format The UnacknowledgedEventsCt is returned in the following format: <NumberOfPrompts> where: Field Name <NumberOf Prompts> Format ASCII Integer Description The number of prompts currently in the Unacknowledged Events List.

Example: A request on object.GetItem(UnacknowledgedEventsCt) could return: 1

167

FactoryTalk Batch Server API Technical Reference

U N I T B I T M APS
Description This item returns the unit IDs and bitmap files for all the units in the system. Input Format Request: UnitBitMaps Output Format The UnitBitMaps is returned in the following format: <UnitBitMaps> <BitMapList> <BitMap> where <BitMap> is: Field Name <BitMapIndex> <UnitName> Format ASCII Integer Description Location of the bit map in the unit items. is is is <NullList> | <BitMapList> <BitMap> | <BitMap> \crlf <BitMapList> <BitMapIndex> \t <UnitName>

ASCII - String The name of the unit.

Example: A request on object.GetItem(UnitBitMaps) could return: 0 \t MIX-1.BMP \crlf 1 \t MIX-1.BMP \crlf ... 13 \t CompactSpray.BMP \crlf

UNITIDB A TCH ID
Description This item lists the operator-entered batch ID for the batch to which the unit belongs. Input Format Request: UnitIDBatchID UnitID is ASCII - Integer, the unique Equipment ID corresponding to the unit.

Output Format The UnitIDBatchID is returned in the following format: <BatchID> is ASCII - String (user defined) Example: A request on object.GetItem(55BatchID) could return: Batch_100

168

2 Item Reference

UNITIDP HA SE B I T M A P S
Description This item returns a filename list for the phase bitmaps within the unit specified by the Unit ID. This is a companion item to item UnitIDPhases. The order in which the files are returned is the same order as <BitMapIndex> in UnitIDPhases. Input Format Request: UnitIDPhaseBitmaps <UnitID > is ASCII String, the unique Equipment ID corresponding to the unit.

Output Format The UnitIDPhaseBitmaps is returned in the following format: <List> <List> <BitMap> where: Field Name <BitMapIndex> <FileName> Format ASCII Integer Description Location of bit map in the List of Phase Bitmap items same offset as returned in UnitIDPhases. is is <BitMap> \crlf <List> <BitMapIndex>\t<FileName>

ASCII - String The filename of the bitmap

Example: A request on object.GetItem(55PhaseBitmaps) could return: 0 \t dump2&.bmp \crlf 1 \t dump2&.bmp \crlf ... 5 \t t-in.bmp \crlf

169

FactoryTalk Batch Server API Technical Reference

UNITIDP HA SES
Description This item returns a list of all the phases within the unit specified by the Unit ID. Input Format Request: UnitIDPhases UnitID is ASCII - Integer, the unique Equipment ID corresponding to the unit.

Output Format The UnitIDPhases is returned in the following format: <PhaseList> <Phase> where <Phase> is: Field Name <PhaseID> <PhaseName> <MaxOwners> <XCord> <YCord> <BitMapIndex> Format ASCII Integer ASCII Integer ASCII Integer ASCII Integer ASCII Integer Description Phases resource ID. is is <Phase> \crlf <Phase> \crlf <PhaseList> <PhaseID> \t <PhaseName> \t <MaxOwners> \t <XCord> \t <Ycord> \t <BitMapIndex>

ASCII - String Phase Name. Max # of Owners. X Coordinate for Equip View. Y Coordinate for Equip View. Location of bit map in the List of Phase Bitmap items.

Example: A request on object.GetItem(55Phases) could return: 68 \t NP_ADDDAIRY_M1 \t 1 \t 95 \t 88 \t 1 \crlf 70 \t NP_ADDEGG_M1 \t 1 \t 362 \t 89 \t 2 \crlf 72 \t NP_HEAT_M1 \t 1 \t 343 \t 182 \t 3 \crlf 71 \t NP_AGITATE_M1 \t 1 \t 235 \t 183 \t 4 \crlf 73 \t NP_XFR_OUT_M1 \t 1 \t 233 \t 362 \t 5 \crlf

170

2 Item Reference

UNITIDP HA SES 2
Description This item returns a list of all the phases within the unit specified by the Unit ID, including whether or not there is an associated control strategy. Input Format Request: UnitIDPhases2 UnitID is ASCII - Integer, the unique Equipment ID corresponding to the unit.

Output Format The UnitIDPhases2 is returned in the following format: <PhaseList2> <Phase2> is is <Phase2> \crlf | <Phase2> \crlf <PhaseList2> <PhaseID> \t <PhaseName> \t <MaxOwners> \t <PhaseType> \t<XCord> \t <YCord> \t <BitMapIndex>

where <Phase2> is: Field Name <PhaseID> <PhaseName> <MaxOwners> <PhaseType> Format ASCII Integer ASCII Integer ASCII Integer ASCII Integer ASCII Integer ASCII Integer Description Phases resource ID.

ASCII - String Phase Name. Max # of Owners. Type of Phase: 0 = No Control Strategy 1 = Control Strategy X Coordinate for Equip View. Y Coordinate for Equip View. Location of bitmap in the List of Phase Bitmap items.

<XCord> <YCord> <BitMapIndex>

Example: A request on object.GetItem(55Phases2) could return: 68 \t NP_ADDDAIRY_M1 \t 1 \t 2 \t 95 \t 88 \t 1 \crlf 70 \t NP_ADDEGG_M1 \t 1 \t 2 \t 362 \t 89 \t 2 \crlf 72 \t NP_HEAT_M1 \t 1 \t 0 \t 343 \t 182 \t 3 \crlf 71 \t NP_AGITATE_M1 \t 1 \t 0 \t 235 \t 183 \t 4 \crlf 73 \t NP_XFR_OUT_M1 \t 1 \t 0 \t 233 \t 362 \t 5 \crlf

171

FactoryTalk Batch Server API Technical Reference

UNITIDU NIT T AG D ATA


Description This item returns the unit name, unit class, and tag status information for the specified unit. Input Format Request: UnitIDUnitTagData UnitID is ASCII - String, the unique ID corresponding to the unit.

Output Format The UnitIDUnitTagData is returned in the following format: <UnitTagData> <Tags> <TagList> <TagInfo> is is is is <UnitName> \crlf <UnitClassName> \crlf <Tags> <NullList> | <TagList> <TagInfo> | <TagInfo> \t <TagList> <TagName> \t <DataServerName> \t <ConfigString1> \t ConfigString2> \\t <ConfigString3> \t <ConfigString4> \t <Protocol> \t <ConfiguredDataType> \t <OPCAdviseItemDataType> \t <OPCReadItemDataType> \t <OPCWriteItemDataType> \t <AdviseStatus> \t <LatestAdviseValue> \t <LatestAdviseValueQuality> \t <LatestAdviseValueTimestamp> \t <ReadStatus> \t <LatestReadValue> \t <LatestReadValueQuality> \t <LatestReadValueTimestamp> \t <WriteStatus> \t <LastValueWritten> \t <LastWriteResult> \t <LastWriteTimestamp>

where: Field Name <UnitName> <UnitClassName> <TagName> Format Description

ASCII - String The unit name. ASCII - String The unit class name to which the unit belongs. ASCII - String Protocol-specific configuration string: OPC - Tag name DDE - Tag name CIP - Unused (<sp>) *FTD - Tag name

<DataServerName>

ASCII - String Protocol-specific configuration string: OPC - Data server name the tag uses. DDE - Data server name the tag uses. CIP - Unused (<sp>) FTD - Data server name the tag uses.

172

2 Item Reference

Field Name <ConfigString1>

Format

Description OPC - Read Item Access Path DDE - Read Item Topic Name CIP - Unused (<sp>) FTD - Read Item Access Path

ASCII - String Protocol-specific configuration string:

<ConfigString2>

ASCII - String Protocol-specific configuration string: OPC - Read Item Name DDE - Read Item Name CIP - Unused (<sp>) FTD - Read Item Name

<ConfigString3>

ASCII - String Protocol-specific configuration string. Usage per protocol is: OPC - Write Item Access Path DDE - Write Item Topic Name CIP - Unused (<sp>) FTD - Write Item Access Path

<ConfigString4>

ASCII - String Protocol-specific configuration string: OPC - Write Item Name DDE - Write Item Name CIP - Unused (<sp>) FTD - Write Item Name

<Protocol>

ASCII - String String indicating communication protocol for the tag: DDE, OPC, CIP or FTD. Ordinal indicating data type configured for tag in area model. 1 = FLOAT 2 = INTEGER 3 = STRING 5 = ENUMERATION

<ConfiguredDataTyp ASCII e> Integer

<OPCAdviseItem DataType>

ASCII Integer

Protocol-specific string. OPC Ordinal indicating OLE variant type returned by the data server for advises. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD - Same as OPC

173

FactoryTalk Batch Server API Technical Reference

Field Name <OPCReadItem DataType>

Format ASCII Integer

Description Protocol-specific string. OPC Ordinal indicating OLE variant type returned by the data server for advises. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD - Same as OPC

<OPCWriteItem DataType>

ASCII Integer

Protocol-specific string. OPC Ordinal indicating OLE variant type returned by the data server for writes. These ordinals are defined by Windows. Some common values are: 2 = Two byte integer 3 = Four byte integer 4 = Four byte real 5 = Eight byte real 8 = String 11 = Boolean 17 = Unsigned char (1 byte unsigned integer) DDE Unused (<sp>) CIP Unused (<sp>) FTD - Same as OPC

<AdviseStatus>

ASCII Integer

Ordinal indicating current status of any advise operation associated with the tag. 0 = NOT ADVISED 1 = ADVISED - Advise established and initial value received 2 = PENDING - Pending asynchronous establishment 3 = ENDING - Asynchronously ending advise 4 = FAILED 5 = ESTABLISHED - Advised, but no initial value received 9 = UNDEFINED/ERROR

<LatestAdviseValue >

ASCII - String The latest data value received by the tag resulting from an update of an advise or active item. The value of the tag is converted to a string representation. If a data update is not received via an advise mechanism, then this field is empty.

174

2 Item Reference

Field Name <LatestAdvise ValueQuality>

Format ASCII Integer

Description Protocol-specific value. OPC DDE CIP Quality value per OPC specification 192 = GOOD 0 = BAD 0 = GOOD Non-Zero = BAD

FTD - Same as OPC If an advise data update is not received, then this field is empty. <LatestAdviseValue Timestamp> ASCII - String The timestamp associated with the most recent advise value. This is not an OPC timestamp. This timestamp is recorded by the FactoryTalk Batch Server at the time it received the data update. The time is represented by a string in the format: %m/%d/%Y%H:%M:%S. If no data update has ever been received, then this field is empty. ASCII Integer Ordinal indicating current status of any read operation associated with the tag. 0 = NOT PENDING 1 = FAILED 2 = PENDING 9 = UNDEFINED/ERROR <LatestRead Value> ASCII - String The latest data value received by the tag as the result of a completed read operation. The tag value is converted to a string representation. If a read operation is never successfully completed, then this field is empty. ASCII Integer Protocol-specific value. OPC DDE CIP Quality value per OPC specification 192 = GOOD 0 = BAD 0 = GOOD Non-Zero = BAD

<ReadStatus>

<LatestRead ValueQuality>

FTD - Same as OPC If a read operation is not successfully executed, then this field is empty. <LatestReadValueTi ASCII - String The timestamp associated with the most recently read mestamp> value. This is not an OPC timestamp. The FactoryTalk Batch Server records this timestamp at the time it receives the read data. The time is represented by a string in the format: %m/%d/%Y %H:%M:%S. If data is never successfully read, then this field is empty.

175

FactoryTalk Batch Server API Technical Reference

Field Name <WriteStatus>

Format ASCII Integer

Description Ordinal indicating current status of any write operation associated with the tag. 0 = NOT PENDING 1 = FAILED 2 = PENDING 9 = UNDEFINED/ERROR

<LastValueWritten>

ASCII - String The last value (depicted as a string) the FactoryTalk Batch Server wrote to the tag. If the tag is never successfully written to, this field is empty. ASCII Integer An ordinal that indicates the success or failure of the last attempted write. If the tag is associated with an OPC or FTD data server, then the completed set of OPC errors may be received. Refer to the OPC standard for a list of possible return values. If the tag is associated with a DDE data server, then the result is constrained to either an S_OK or E_FAIL status. E_OK = Success E_FAOIL = Failed Additional vendor specific error codes may be returned. It is not possible to know the values of these ordinals in advance. If the tag has not been written to since the batch server startup, this field is empty.

<LastWriteResult>

<LastWriteTime stamp>

ASCII - String The time at which the FactoryTalk Batch Server last received the results of a write attempt from the data server. The time is represented as an eight byte float value. The time is represented by a string in the format: %m/%d/%Y %H:%M:%S. If data is never successfully written, then this field is empty.

Example: A request on object.GetItem(55UnitTagData) could return: NP_MIXER1 \crlf MBR_MIXER_CLS \crlf UNIT_TAG_2 \t OPC_SIM \t \t \t \t \t OPC \t 2 \t \t \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \t 0 \t \crlf * The FactoryTalk Live Data (FTD) protocol provides services that read and write real-time manufacturing data from OPC servers and controllers for all participating FactoryTalk-enabled products in the FactoryTalk Directory. (See the FactoryTalk Batch Equipment Editor Users Guide for information on configuring an RSLinx Enterprise Live Data server in FactoryTalk Batch.)

176

2 Item Reference

UNITREQIDB I ND I NG P R E F E R E NC E S
Description This item returns the set of Binding Requirements configured on the specified Unit Requirement. Input Format Request: UnitReqIDBindingPreferences UnitReqID is ASCII - Integer, the unique ID of a Unit Requirement. This value can be retrieved using the ProcedureIDUnitRequirements data item.

Output Format The UnitReqIDBindingPreferences is returned in the following format: <BindingPreferences> <BindingPrefList> <BindingPref> is is is <NullList> | <BindingPrefList> <BindingPref> | <BindingPref> \crlf <BindingPrefList> <BindingPrefType> /t <RecipePhaseName> /t <UnitAttributeName> /t <ExpressionText> /t <ExpressionID>

where: Field Name Format Description Binding Requirement Type Code 1 = Recipe Phase Inclusion 2 = Recipe Phase Exclusion 3 = Unit Attribute Inclusion 4 = Unit Attribute Exclusion 5 = Boolean Expression 6 = Maximize Expression 7 = Minimize Expression

<BindingPrefType> ASCII Integer

<RecipePhaseNam e> <UnitClass> <UnitAttribute Name> <ExpressionText <ExpressionID>

ASCII - String Name of Recipe Phase if BindingPrefType code is equal to 1 or 2. Else the field is populated with a single space. ASCII - String The Unit Class Name. ASCII - String Name of Unit Attribute if BindingPrefType code is equal to 3 or 4. Else the field is populated with a single space. ASCII - String Boolean Expression text if BindingPrefType code is equal to 5, 6 or 7. Else the field is populated with a single space. ASCII Integer Unique ID of expression if BindingPrefType code is equal to 5, 6 or 7. Else the field is populated with a single space.

Example: A request on object.GetItem(13BindingPreferences) could return: 1\tUNIQUE_TO_MIXER1\t \t \t \crlf 7\t \t \tCAPACITY\t36\r\n 4\t \tMAT_OF_CONSTRUCTION\t \t

177

FactoryTalk Batch Server API Technical Reference

UNITREQIDB I ND I NG R E Q UI R EM ENTS
Description This item returns the set of Binding Requirements configured on the specified Unit Requirement. Input Format Request: UnitReqIDBindingRequirements UnitReqID is ASCII - Integer, the unique ID of a Unit Requirement. This value can be retrieved using the ProcedureIDUnitRequirements data item.

Output Format The UnitReqIDBindingRequirements is returned in the following format: <BindingRequirements> <BindingReqList> <BindingReq> is is is <NullList> | <BindingReqList> <BindingReq> | <BindingReq> \crlf <BindingReqList> <BindingReqType> /t <RecipePhaseName> /t <UnitAttributeName> /t <ExpressionText> /t <ExpressionID>

where: Field Name Format Description Binding Requirement Type Code 1 = Recipe Phase Inclusion 2 = Recipe Phase Exclusion 3 = Unit Attribute Inclusion 4 = Unit Attribute Exclusion 5 = Boolean Expression

<BindingReqType> ASCII Integer

<RecipePhaseNam e> <UnitClass> <UnitAttribute Name> <ExpressionText <ExpressionID>

ASCII - String Name of Recipe Phase if BindingReqType code is equal to 1 or 2. Else the field is populated with a single space. ASCII - String The Unit Class Name. ASCII - String Name of Unit Attribute if BindingReqType code is equal to 3 or 4. Else the field is populated with a single space. ASCII - String Boolean Expression text if BindingReqType code is equal to 5. Else the field is populated with a single space. ASCII Integer Unique ID of expression if BindingReqType code is equal to 5. Else the field is populated with a single space.

Example: A request on object.GetItem(13BindingRequirements) could return: 5 \t \t \tOUT_OF_SERVICE = "NO"\t45 \crlf 1\tUNIQUE_TO_MIXER1\t \t \t \r\n 3\t \tMAT_OF_CONSTRUCTION\t \t

178

2 Item Reference

U N I TS L IST
Description This item returns a list of all units and corresponding equipment IDs and Unit Classes. Input Format Request: UnitsList Output Format The UnitsList item is returned in the following format: <UnitList> <Unit> where <Unit> is: Field Name <UnitID> <UnitName> <UnitClass> Format ASCII Integer Description Unique Equipment ID for a Unit. is is <Unit> \crlf | <Unit> \crlf <UnitList> <UnitID> \t <UnitName> \t <UnitClass>

ASCII - String The Unit Name. ASCII - String The Unit Class Name.

Example: A request on object.GetItem(UnitsList) could return: 3 \tWP_MIXER1 \tMIXER_CLS \crlf 2 \tWP_MIXER2 \tMIXER_CLS \crlf 26 \tSP_MIXER1 \tMIXER_CLS \crlf ... 46 \tMP_MIXERFREEZER2 \tMBR_MIXERFREEZER \crlf

V ERIF IED T AG C O UN T
Description An integer indicating the total number of tags verified. This includes both tags that verified successfully and those that failed verification. Input Format Request: VerifiedTagCount Output Format The VerifiedTagCount is returned in the following format: <Count> Field Name <Count> Format ASCII Integer Description The total number of tags that have been verified, regardless of the outcome of the verification.

Example: A request on the object.GetItem(VerifiedTagCount) could return: 156

179

FactoryTalk Batch Server API Technical Reference

VERSION
Description This item returns the version of the FactoryTalk Batch Server executable (.exe) file. Input Format Request only: Version Output Format The Version item is returned in the following format: <Version> where: Field Name <MajorRel> <MinorRel> <Compatibility> Format ASCII Integer ASCII Integer ASCII Integer Description The major release. The minor release. The compatibility identifier is used to show which releases of executables can communicate. EXE files with the same Major Release number and the same compatibility identifier can communicate and run together. Changing the compatibility identifier resets the revision number. <Revision> ASCII Integer The revision of the release. is <MajorRel>.<MinorRel>.<Compatibility>. <Revision>

Example: A request on object.GetItem(Version) could return: 8.00.00.022

180

2 Item Reference

W AR NI NG M ESSAGE
Description This item returns the most recent warning message in the FactoryTalk Batch Servers log file. Input Format Request: WarningMessage Output Format The WarningMessage item is returned in the following format: <Time> \t <Description> \t <AdditionalData> where: Field Name <Time> <Description> Format Description

ASCII - String The time when the message was generated. ASCII String General message description.

<AdditionalData> ASCII String More specific message information. May be <NullString> or a blank space character <sp>. Example: A request on object.GetItem(WarningMessage) could return: 2004.08.24 16:21:12:401 \t PARAMETER DATA SOURCE NOT FOUND \t $LABEL \crlf

181

FactoryTalk Batch Server API Technical Reference

182

CHAPTER 3

Execute Reference
An Execute commands the FactoryTalk Batch Server to perform some action. The following describes the formatting methods used for each Execute:
Use the List Separator and number format for your language. Examples used in this chapter are for English, and are as follows: List Separator: , Number Format: 1,234.56 For Spanish, use a semicolon ( ; ) instead of a comma for the List Separator. Title Description Function Describes the function of the Execute. Execute Format Describes the input format of the Execute statement. IMPORTANT: Do NOT use spaces, unless specifically directed to do so. Use this format: svrobject.Execute strExecute. For Example: svrobject.ACK(Item,STATION5/Operator,1,5) Action Describes what action is a result of the Execute. Return Format Describes that data and its format that is returned by the Execute. All data is returned in CFTEXT format, representing either strings or integers. A list of the key characters and what they symbolize follows: <TEXT> <TEXT> TEXT <NullString> \t is is is is is Denotes a variable. Denotes a variable which will be expanded. Any text that is not enclosed in the < > characters is a keyword and appears as the literal string. Denotes an empty string, CString.Empty( ), unless otherwise specified. Denotes a Tab character (ASCII - 9), which is used as a field delimiter. A space before and after the \t is included for readability. Do NOT include the spaces when formatting the command line. Used to denote an OR situation. Either the text on left of the bar, or the text to the right of the bar is used as the output. Denotes a Carriage Return and a Line Feed character which are used as a record delimiter. Denotes a space character (ASCII 32).

is

\crlf <sp>

is is

183

FactoryTalk Batch Server API Technical Reference

Title

Description Item is The name of the Item, as specified by the client. The FactoryTalk Batch Server creates the item. The value is stored in the item on the Server. The client must Advise on this item and wait for an update. Follow the naming rules listed here:

Clients should use response item names that are generated to be unique to the client (prepending of node names is common). Clients should ensure that they never have 2 or more outstanding EXECUTE instructions with the same response item name. Clients should use a fixed set of response item names instead of generating a unique name for each EXECUTE as this will cause a FactoryTalk Batch Server resource leak.

UserID

is

User identification that will be entered into the event journal associated with this event. For example: Machine Name/UserID.

Example: Defines an example for the EXECUTE statement in the following format: Return Format Execute String

Even though Item is used in examples, the naming rules above should be followed.

184

3 Execute Reference

ACK
Function The ACK execute acknowledges an entry in the Unacknowledged Events list. Execute Format A batch server supports an execute with the following format: [ACK(Item,UserID,EventID,EventResponse)] where: Item UserID EventID The Item name, as specified by the client. User identification to be entered into the event journal associated with this event. The unique Batch-generated ID for the event.

EventRespons The response to the unacknowledged event: e <PromptResponse> where: <PromptResponse> is <StandardPromptResponse> | <UnitBindingPromptResponse> | <RecipePhaseBindingResponse > <ParameterValue> <UnitID> <EqModName> - <ContainerName> - <Capacity> - <EU> - <LotName> - <LabelName>

<StandardPromptResponse> <UnitBindingPromptResponse> <RecipePhaseBindingResponse> where: Field Format

is is is

Description

<ParameterValue> ASCII - String The value to be stored into the parameter for the generated unacknowledged prompt. <UnitID> <EqModeName> ASCII Integer The unit resource ID that binds to the Unit Requirement generated by the bind prompt.

ASCII String The equipment phase name that binds to the recipe phase generated by the bind prompt.

<ContainerName> ASCII - String The container name that binds to the recipe phase generated by the bind prompt. <Capacity> <EU> <LotName> <LabelName> ASCII Integer The container capacity that binds to the recipe phase generated by the bind prompt.

ASCII String The <Capacity> value engineering units for the container that binds to the recipe phase generated by the bind prompt. ASCII String The Lot Name wills bind to the recipe phase generated by the bind prompt. ASCII String The Label Name that binds to the recipe phase generated by the bind prompt.

Action A successful ACK execute either responds to the specified prompt ID, or queue the response to the prompt ID pending one or more signatures that may have been generated for confirming the prompt response.

185

FactoryTalk Batch Server API Technical Reference

Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential prompt response. The prompt response will not actually be processed unless all signature requests are successfully signed off.

<message>

ASCII - String An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: Ack(Item,Station2/View,2,EP_ADDEGG_M1-COOLER\EGG_PALLET2 50-KG-GOLDEN_EGGS_SEPT_18-CARTON_9) This could return: SUCCESS:997

A C Q U I RE
Function The ACQUIRE execute acquires a resource for the Operator. Execute Format A batch server supports an execute with the following format: [ACQUIRE(Item,UserID,OwnerID,ResourceID)] where: Item UserID OwnerID ResourceID The Item name as specified by the client. User identification associated with this event. The identification of the Operator. The Equipment ID of the resource to be acquired. This value is configured in the FactoryTalk Batch Equipment Editor.

Action A successful ACQUIRE execute places Operator into the requesters specified resource list. When the resource determines that the Operator can become an Owner, then Operator is moved into the owners resource list. Return Format The item is populated with the following data: SUCCESS: | FAIL:<message> | FAILED Example An execute string could be formatted as follows: [ACQUIRE(Item,Station5\Operator,0,119)]

186

3 Execute Reference

A D D E VENT
Function The ADDEVENT execute allows an external application to append an event in one or all active FactoryTalk Batch electronic batch record files based on the BatchID. Execute Format A batch server supports an execute with the following format: [ADDEVENT(Item,UserID,BatchID,Type,Desc,Value,EU,Cell,Unit, Phase)] where: Item UserID BatchID Type Desc Value EU * Cell * Unit * Phase * The Item name as specified by the client. User ID to be entered into the event journal with this event. The operator entered batch identification. Use * to place the event information into all open electronic batch records. The type of event being added. The description of the event being added. The value of the event being added. The engineering units associated with the event. The process cell which is associated with the event. The unit which is associated with the event. The phase associated with the event.

Action A successful ADDEVENT execute places the event into the specified electronic batch record(s). The FactoryTalk Batch Server automatically fills in the following fields: TIME, AREA, RECIPE, PHASE_DESC, and UNIQUE_ID. If, however, the event is targeted at a single batch, and the batch product is configured for signature confirmation of comments, then the addition of the event record to the event journal is queued pending a successful signature request signoff. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential prompt response. The prompt response will not actually be processed unless all signature requests are successfully signed off.

<message>

ASCII - String An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: [ADDEVENT(Item,Station5\Operator,Batch_100,Comment, OperatorComment,This is a comment)] This could return: SUCCESS:997 * These fields are not required for a successful execute.

187

FactoryTalk Batch Server API Technical Reference

A D D E VENT _CI
Function The ADDEVENT_CI execute allows an external application to append an event in a FactoryTalk Batch electronic batch record file based on its unique CreateID. Execute Format A batch server supports an execute with the following format: [ADDEVENT_CI(Item,UserID,CreateID,Type,Desc,Value,EU,Cell,Unit,Phase)] where: Item UserID CreateID Type Desc Value EU * Cell * Unit * Phase * The response item name as specified by the client. User ID entered into the event journal with this event. The unique batch ID assigned by the FactoryTalk Batch Server. The type of event being added. The description of the event being added. The value of the event being added. The engineering units associated with the event. The process cell associated with the event. The unit associated with the event. The phase associated with the event.

Action A successful ADDEVENT_CI execute will place the event into the specified electronic batch record. The FactoryTalk Batch Server automatically fills in the following fields: TIME, AREA, RECIPE, PHASE_DESC, and UNIQUE_ID. If, however, the batch product is configured for signature confirmation of comments, then adding the event record to the event journal is queued pending successful signoff of a signature request. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential prompt response. The prompt response will not actually be processed unless all signature requests are successfully signed off. An error message, formatted appropriately for operator display.

<message>

ASCII - String

Example An execute string could be formatted as follows: [ADDEVENT_CI(Item,Station5\Operator,11,Comment,OperatorComme nt,This is a comment] * These fields are not required for a successful execute.

188

3 Execute Reference

A D D E VENT _I NS T RU C T I O N
Function The ADDEVENT_INSTRUCTION execute allows an external application to append an event associated with an eProcedure control step in an electronic batch record using the name of the equipment phase that is currently executing, the control step index, and the control step reactivation number. Execute Format A batch server supports an execute with the following format: [ADDEVENT_INSTRUCTION(Item,UserID,Phase,Type,Desc,StepIndex, ReactivationNumber,InstructionHTML)] where: Item UserID Phase Type Desc StepIndex The response item name as specified by the client. User ID entered into the event journal with this event. The phase associated with this event. The type of event being added. The description of the event being added. The Step Index of the control step associated with this event. This fields value is written to the PVALUE field in the event journal. The control step Reactivation Number associated with this event.

Reactivation Number

InstructionHTML HTML for the Instruction Step.* Action A successful ADDEVENT_INSTRUCTION execute places the event into the specified electronic batch record(s). The FactoryTalk Batch Server automatically fills in the following fields: TIME, AREA, RECIPE, PHASE_DESC, and UNIQUE_ID. If, however, the event is targeted at a single batch, and the batch product is configured for signature confirmation of comments, then adding the event record to the event journal is queued pending a successful signature request signoff. Return Format The item is populated with the following data: SUCCESS| FAIL:<message>| FAILED Example An execute string could be formatted as follows: [ADDEVENT_INSTRUCTION(Item,Earl\ADD_SUGAR,Instruction Complete,Step Completed,1,0,<FORM>Open the big green valve</ FORM>] * This field is not required for a successful execute.

189

FactoryTalk Batch Server API Technical Reference

A D D E VENT _P H AS E
Function The ADDEVENT_PHASE execute allows an external application to append an event in a FactoryTalk Batch electronic batch record file using an equipment module name that is currently executing. Unlike other AddEvent executes, the complete recipe path is automatically entered into the electronic batch record. Execute Format A batch server supports an execute with the following format: [ADDEVENT_PHASE (Item, UserID, Phase, Type, Desc, Value, EU)] where: Item UserID Phase Type Desc Value EU* The Item name as specified by the client. User ID entered into the event journal with this event. The phase associated with this event. The type of event being added. The description of the event being added. The value of the event being added. The engineering units associated with the event.

Action A successful ADDEVENT_PHASE execute places the event into the specified electronic batch record associated with the batch using the specified phase (equipment phase). The FactoryTalk Batch Server automatically fills in the following fields: TIME, AREA, RECIPE, PHASE_DESC, PHASE, PROCCELL, UNIT, and UNIQUE_ID. If, however, the batch product is configured for signature confirmation of comments, then adding the event record to the event journal is queued pending a successful signature request signoff. Return Format SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential prompt response. The prompt response will not actually be processed unless all signature requests are successfully signed off. An error message, formatted appropriately for operator display.

<message>

ASCII - String

Example An execute string could be formatted as follows: [ADDEVENT_PHASE(Item,Station5\Operator,NP_ADDDAIRY_M1, Comment,OperatorComment,This is a comment)] This could return: SUCCESS:997 * This field is not required for a successful execute.

190

3 Execute Reference

A R CH I VE R
Function The ARCHIVER execute allows an external application to start the FactoryTalk Batch Archiver. Execute Format A batch server supports an execute with the following format: [ARCHIVER (Item,UserID,INI,Queue)] where: Item UserID INI The Item name as specified by the client. User identification associated with this event. The INI file pathname used with the Archiver. The default is C:\Program Files\Rockwell\Software\Batch \bin\batcharc.ini. The pathname to the queue file used with the Archiver.

Queue

Action A successful ARCHIVER execute will initiate the Archiver application. Return Format There is no data returned to the item. Example An execute string could be formatted as follows: [ARCHIVER(Item,UserID, C:\Program Files\Rockwell Software\Batch\bin\ batcharc.ini, C:\Program Files\Rockwell Software\Batch\SampleApp\journals\archque.txt)]

191

FactoryTalk Batch Server API Technical Reference

A U T O B A TCH I D _ I NFO
Function The AUTOBATCHID_INFO execute server API returns the batchID from a call to BatchIDCreation. Execute Format AUTOBATCHID_INFO(Item, UserID, RecipeName) where: Item UserID The Item name on which to place the execute Computer Name/User Name performing the given execute as well as the user ID who issued the given execute. A string representing the recipe file name without an extension.

Recipe Name

Action A successful AUTOBATCHID_INFO execute causes the <BatchIDInfo> value, as defined in the CreateBatchID.dll, to be returned. Return Format The Item is populated with the following data: SUCCESS:<BatchIDInfo>$END|FAIL:<Message>$BATCHID:<Default -BatchID> where: Field Name <BatchID> Format ASCII Description Value generated by a custom batch ID implementation; or, if no customization is applied, the default batch ID as defined in the batchsvr.ini file. Custom or generic message specifying the context of an error.

<Message>

ASCII

Example An execute string could be formatted as follows: AUTOBATCHID_INFO (s, dev_bjwallwi01/bjwallwi, MCLS_FRENCHVANILLA) Example Output
SUCCESS:FRENCH_VANILLA_012790$END

OR
FAIL:DivideByZero$BATCHID:DefaultBatchID

FAIL: can indicate that an error took place at the boundary between the FactoryTalk Batch Server and BatchIDCreation application (COM failure), or that a failure was generated from within the BatchIDCreation code implementation (custom generated error or internal failure). In either case, following the FAIL: identifier is the message specifying the textual context of the error and the default batch ID, as configured in the Equipment Editor Server Options dialog box.

192

3 Execute Reference

A U T O R EMOVE
Function The AUTOREMOVE execute tells the server to automatically remove a batch when its state reaches COMPLETE or cancels a previous AUTOREMOVE execute. Execute Format A batch server supports an execute string with the AUTOREMOVE keyword. The format of the execute string is as follows: [AUTOREMOVE(ResponseItem, UserID, CreateID, AutoRemove)] where: ResponseItem UserID CreateID AutoRemove Name of the response item User identification associated with this event. Create ID of the batch to automatically remove ON to automatically remove the batch; OFF to allow the batch to stay on the batch list

Action A successful AUTOREMOVE (... ON) execute causes the FactoryTalk Batch Server to remove the batch when its state reaches COMPLETE. A successful AUTOREMOVE (... OFF) execute does not allow the Server to remove the batch without a REMOVE execute. When Electronic Signatures are enabled and a Remove Command Verification Policy is configured in the area model, then all AUTOREMOVE executes sent to the FactoryTalk Batch Server fail and an appropriate error message displays. Return Format
SUCCESS: | FAIL: <message>

Example An execute string could be formatted as follows: [AUTOREMOVE(Item_1,operator,17,on)]

193

FactoryTalk Batch Server API Technical Reference

B A TCH
Function The BATCH execute creates a control recipe and adds an entry in the batch list. Execute Format A batch server supports an execute with the following format: [BATCH(<Item>,<UserID>,<RecipeID>,<BatchID>,<Scale>,<Descripti on>,<StepList>PARMS, <ParmList><Mtrl_InfoList>)] where: <Item> <UserID> <RecipeID> <BatchID> The name of the Item, as specified by the client. User identification associated with this event. The file name, including extension, for the recipe to be used. The operator-entered batch identification. The BatchID can be comprised of any character except the following: The defined list separator, single or double quotes, brackets, parentheses, the percent sign (%), the tab character (\t), the carriage return character (\r), or the new line character (\n). The scale factor in percent. The description of the recipe. A list of steps and their associated units. A list of parameters and their associated values. PARMS must be included in the statement even if there are no parameters required. Optional list of Phase Material Records that begins with $MTRL_INFO and ends with $END. is is <NullList> | <StepPair><StepList> <Step>,<Unit>,

<Scale> <Description > <StepList> <ParmList>

<Mtrl_ InfoList> where: <StepList> <StepPair> <Step> <Unit>

The path to a step that must be bound to a unit alias or a step The unit to which the step is to be bound: > 0 value indicates the Unit ID 0, -1, or < -2 value indicates the Operator Prompt binding type. -2 value indicates the First Available binding type.

where: <ParmList> <ParmPair> is is <NullList> | <ParmPair><ParmList> <ParmName>,<Value>,

<ParmName> The parameter name required by the recipe. Must be all upper case. <Value> The value associated with the parameter.

194

3 Execute Reference

where: <Mtrl_InfoList> <PhaseMaterialList> is is <NullList> | $MTRLINFO,<PhaseMaterialList>,$END <PhaseMaterialRecord>|<PhaseMaterialRecord >, <PhaseMaterialList> <PhasePathName>,<MaterialName>

<PhaseMaterialRecord>

is

<PhasePathNa Full recipe pathname to the phase. me> <MaterialNam Name of a material configured in the Material Server. e> Action A successful BATCH execute will create a control recipe from the specified master recipe. If the recipe was based upon one or more unit classes and At Batch Creation binding was specified, then the recipe will be bound to the specified units or binding will be deferred to later, as specified in the execute. If the recipe required one or more parameter values, then the values that were entered will be inserted into the control recipe. The PARMS statement must not include any spaces. Return Format The item is populated with the following data: SUCCESS:<CreateID> | FAIL:<message> | FAILED where: <CreateID> specifies the Unique CreateID of the control recipe. <message> specifies why the FactoryTalk Batch Server could not create a control recipe. Example An execute string for a material-based recipe could be formatted as follows: Material-based [BATCH(Item,STATION5/operator2,MCLS_FRENCHVANILLA.BPC, recipe BATCH_100,100,French Vanilla Premium - class based/material based,MIXER,84,FREEZER,85,PARMS,CREAM_AMOUNT,2001,EGG_AM OUNT,230,FLAVOR_AMOUNT,20,MILK_AMOUNT,1999,SUGAR_ AMOUNT,750)] Example An execute string for a class-based recipe could be formatted as follows: Class-based [BATCH(Item,STATION5/operator2,CLS_FRENCHVANILLA.BPC, recipe BATCH_ID,100,FRENCH VANILLA PREMIUM - CLASS BASED , FREEZER,4,MIXER,3,PARMS, CREAM_AMOUNT,2001, EGG_AMOUNT,200,FLAVOR_AMOUNT,50,MILK_AMOUNT,1999, SUGAR_AMOUNT, 750)] Example An execute string for a material class-based recipe could be formatted as Material class- follows: based recipe [BATCH( Item, STATION5/operator2, VANILLA_ICE_CREAM.BPC, BATCH_100,100,French Vanilla Premium - class based/material based, MIXER, 84, FREEZER, 85, PARMS, CREAM_AMOUNT, 2001, EGG_AMOUNT, 230, FLAVOR_AMOUNT, 20,MILK_AMOUNT, 1999, SUGAR_AMOUNT, 750, $MTRL_INFO, PROC_1\UNITPROC_1:1\OPER_1:3\ADD:4, MILK, PROC_1\UNITPROC_1:1\OPER_2:1\ADD:1, SUGAR, $END )]

195

FactoryTalk Batch Server API Technical Reference

B IND
Function The BIND execute binds and unbinds a Unit Procedure or Operation to or from a specified unit. Execute Format A batch server supports an execute with the following format: [BIND(<Item>, <UserID>, <ProcedureID>, <UnitID>)] where: <Item > <UserID> The item name on which to place the response. The user ID who issued the execute is entered into the event journal associated with this event.

<ProcedureID The recipe procedure path being bound to the specified unit: > <FullPath> <UnitID> The unit Resource ID which binds to the step. If the recipe is a procedure, you can use: -1 to unbind and change to PROMPT (for prompted binding) -2 to unbind and change to FIRST_AVAIL (for first available unit) Note: Prompt (-1) and First_Available (-2) are not valid options for a unit procedure recipe. where: <FullPath> <Path> where: Field <CreateID> <StepIdentifier> Format ASCII Integer Description The unique batch ID assigned by the FactoryTalk Batch Server. is is <CreateID> | <CreateID> /t <Path> <StepIdentifier> | <StepIdentifier> /t <Path>

ASCII String Step Identifier (e.g. Mix:1)

Action A successful BIND execute results in the specified unit binding to the specified procedure or in the queueing of the bind request pending a signature. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the bind request. The bind request will not process unless all signature requests are successfully signed off.

<message>

ASCII - String An error message formatted appropriately for operator display.

Example An execute string could be formatted as follows: Procedure recipe example: Bind(Item,Station2/View,34 /t sweetcream_up:1,55) Unit procedure recipe example: [BIND(Item,UserID,35,55)] Either example could return: SUCCESS:997
196

3 Execute Reference

B IND P HA SE
Function The BINDPHASE execute binds and unbinds a material-enabled phase to or from a specified container and equipment module. The BINDPHASE execute does not check for valid Equipment Module, Container, Lot, or Label. You must ensure that the binding information provided to the Batch Server is accurate. The phase must not be active for the execute to be processed. Execute Format A batch server supports an execute with the following format: [BINDPHASE(Item,UserID,PhasePath,ContainerName,EqModuleID, Lot,Label)] The unbind requires: [BINDPHASE(Item,UserID,PhasePath, <sp>,PROMPT or AUTOMATIC,<sp>,<sp>)] where: Item UserID PhasePath The response item name as specified by the client. User Identification entered into the event journal associated with this event. The recipe phase path to be bound: <FullPath> Hierarchical phase paths: Procedure Level: CreateID \t UnitProcName \t OperName \t PhaseName Unit Procedure Level: CreateID \t OperName \t PhaseName Operation Level: CreateID \t PhaseName ContainerNam Name of the container to be selected for binding. Can be a e space character <sp>. EqModuleID Lot Label where: <BindPath> where: Field <ResourceID> <Prompt> Format ASCII - Integer ASCII String Description The equipment phase resource ID to which the recipe phase is binding. The string literal PROMPT. This indicates that the specified recipe phase is to be unbound and replaced with a prompt based binding mechanism. The string literal AUTOMATIC. This indicates that the specified recipe phase is to be unbound and replaced with a first-available based binding mechanism. is <ResourceID> | <Prompt> | <Automatic> The new bind target for the recipe phase: <BindTarget> The lot name to further specify the container for binding. Can be a space character <sp> or blank to match any lot. The label name to further specify the container for binding. Can be a space character <sp> or blank to match any label.

<Automatic>

ASCII String

197

FactoryTalk Batch Server API Technical Reference

Action A successful BINDPHASE execute results in the binding/unbinding of the specified recipe phase, or in the queueing of the bind request pending a signature. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format Description

ASCII Integer The action ID associated with signature(s) generated as a result of the bind request. The bind request is not processed unless all signature requests are successfully signed off. ASCII - String An error message, formatted appropriately for operator display.

<message>

Examples An execute string for binding could be formatted as follows: BINDPHASE(Item,STATION5/Operator,34 \t MCLS_SWEETCREAM _UP:1,TEMP_EGG,NP_ADDEGG_M1,,) An execute string for unbinding could be formatted as follows: BINDPHASE(Item,STATION5/Operator,34 \t MCLS_SWEETCREAM _UP:1, ,PROMPT,,) or BindPhase(Item,Station2/View,34 /t SWEETCREAM_UP:1 /t WHIPIT_OP:1 /t DOSE:1, TANK1, 23, LOT_A, LABEL_GOODSTUFF) This could return: SUCCESS:997

198

3 Execute Reference

C A N CE L S IGNATURE
Function The CANCELSIGNATURE execute allows a client to cancel a signature request on an incomplete signature, excluding those that were generated by private interfaces. Execute Format A batch server supports an execute with the following format: [CANCELSIGNATURE(Item, UserID, SignatureID)] where: Field Item UserID SignatureID Format Description ASCII - String The name of the response item, as specified by the client. ASCII - String User Identification entered into the event journal associated with this event. ASCII Integer The Unique ID of the signature to be cancelled.

Action A successful CANCELSIGNATURE request cancels the specified signature if it is in the incomplete state and not generated by a private interface. Return Format The response item is populated with the following data: SUCCESS: | FAIL:<message> where: Field <message> Format Description

ASCII - String An error message, formatted appropriately for operator display.

Examples An execute string could be formatted as follows:


CancelSignature(Item,Station2/View,993)

This could return: SUCCESS:

199

FactoryTalk Batch Server API Technical Reference

COMMAND
Function The COMMAND execute commands a procedure to a desired state or mode. Execute Format A batch server supports an execute with the following format: [COMMAND(Item,UserID,ProcedureID,Cmd)] where: Item UserID The name of the Item, as specified by the client. User identification to be entered into the event journal associated with this event. The unique hierarchical path name to the procedure, unit procedure, operation or phase: Procedure: CreateID Unit Procedure: CreateID \t UnitProcIDName Operation: CreateID \t UnitProcIDName \t OperIDName ProcedureID Phase: CreateID \t UnitProcIDName \t OperIDName \t PhaseIDName The desired command, either to change the state or mode. Commands which may be issued are: STARTSTOPAUTO-MODE PAUSEHOLDRESTART MAN-MODERESUMEABORT RESETDOWNLOADCLEAR_FAILURES DISCONNECTSEMIAUTO-MODE TIMER-CompleteTIMER-Reset Cmd where: <FullPath> <Path> where: Field <CreateID> <StepIdentifier> Format ASCII Integer Description The unique batch ID assigned by the FactoryTalk Batch Server. is is <CreateID> | <CreateID> /t<Path> <StepIdentifier> | <StepIdentifier> /t<Path> The command must be valid for the procedure level being commanded.

ASCII String Step Identifier (e.g. Mix:1)

Action A successful COMMAND execute results in either the command being issued to the specified procedure element, or in the command being queued pending completion of the confirmation signature. A COMMAND execute results in a failure message when the Command sent is equal to the current batch state. Example: If a batch is running and a START or RESTART execute is issued, the command will return a failure message.

200

3 Execute Reference

Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> <message> Format ASCII Integer Description The ActionID associated with the signature(s) generated in response to the execute.

ASCII - String An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: COMMAND(Item,Station2/View,36,START) This could return: SUCCESS:997

C O NT R OL S T RA T E G Y
Function The CONTROLSTRATEGY execute returns a list of control strategies configured for the specified phase. Execute Format A batch server supports an execute with the following format: [CONTROLSTRATEGY(Item,UserID,PhaseID)] where: Item UserID PhaseID The name of the Item, as specified by the client. User identification associated with this event. The Equipment ID for the phase as configured in the FactoryTalk Batch Equipment Editor.

Action A successful CONTROLSTRATEGY execute results in a list of control strategies configured for the specified phase. Return Format The item is populated with the following data: <ControlStrategyResponse> <ControlStrategyData> <ControlStrategyList> <ControlStrategy> Field Name <CStrategyID> <CStrategy Name> Format ASCII Integer is is is is SUCCESS:<ControlStrategyData> | FAIL:<message> | FAILED <NullList> \crlf | <ControlStrategyList> <ControlStrategy> \crlf | <ControlStrategy> \crlf <ControlStrategyList> <CStrategyID> \t <CStrategyName>

Description The ID assigned to the Control Strategy.

ASCII - String The name assigned to the Control Strategy.

Example An execute string could be formatted as follows: [CONTROLSTRATEGY(Item,UserID,68)]

201

FactoryTalk Batch Server API Technical Reference

E NU M
Function The ENUM execute obtains the enumerations from a specified enumeration set, as defined in the FactoryTalk Batch Equipment Editor. Execute Format A batch server supports an execute with the following format: [ENUM(Item,UserID,Enumset)] where: Item UserID Enumset The Item name as specified by the client. User identification associated with this event. The enumeration set name as defined in the Equipment database.

Action A successful ENUM execute will place the enumerations into the response item. Return Format The item is populated with the following data: <Enums> is <EnumList> \crlf | Cstring.Empty() \crlf | FAIL:<message> | FAILED CString.Empty() will be returned for Enumeration Sets that have no enumerations defined. <EnumList> <EnumString> is is <EnumString> | <EnumString> \t <EnumList> The enumeration string that belongs to the specified enumeration set.

Example An execute string consisting of: [ENUM(Station5Enums,Station5\Operator,MATERIALS)] could place the following data in the item Station5Enums for the client: WATER \t FUDGE \t DARK_CHOCOLATE \t STRAWBERRY WHITE_CHOCOLATE \t RASPBERRY \t IC_GERMAN_CHOCOLATE \t PECAN \t EGG_YOLK \t GOOD_EGG \t IC_TRIPLE_CHOCOLATE \t COCOA \t STRAWBERRY_IM \t SUGAR_GRANULATED \t CHAMBORD \t VANILLANEW \t MILK \t VANILLA \t NULL_MATERIAL \t C_CHOCOLATE_BLK_RBERRY_WC \t CARAMEL \t CREAM \t IC_FRENCH_VANILLA \t COCONUT \crlf

202

3 Execute Reference

E X P RES S I O N
Function The EXPRESSION execute obtains the transition data from the server. Execute Format A batch server supports an execute with the following format: [EXPRESSION(Item,UserID,TransitionID)] where: Item UserID TransitionID The Item name as specified by the client. User identification associated with this event. Element number for the transition.

Action A successful EXPRESSION places the transition data into the response item. Return Format The item is populated with the following data: <ExpData> <ExpList> <Expression> <ExpList> <failure_ message> <Level> is is is <ExpList> | FAIL:<message> | FAILED <Expression> \crlf | <Expression> \crlf <ExpList> <Level> \t <EvalEnum> \t <LhsExp> \t <Op1> \t <RhsExp> \t <LhsVal> \t <RhsVal>

List of transition expressions for a specified level. Explanation of why the EXPRESSION command failed to process. Expressions can contain sub-expressions. The expression treated as a whole is Level 0. Each sub-expression of Level 0 is marked as being Level 1. These sub-expressions are the Left Hand Expression and the Right Hand Expressions (described below) of Level 0. The Left and Right Hand Expressions are broken down, level by level, until simple terms are left and the values of those terms are displayed. Evaluation Enumeration (for coloring expressions) 0 = FALSE - red 1 = TRUE - green 2 = INFO - black Left Hand Side Expression. Operator between Left & Right. Right Hand Side Expression. Left Hand Side Value. Right Hand Side Value.

where <Expression> is:

<EvalEnum>

<LhsExp> <Op1> <RhsExp> <LhsVal> <RhsVal>

Example An execute string consisting of: [EXPRESSION(PC2Exps,UserID,641)] could place the following data in the item PC2Exps for the client: 0 \t 0 \t MCLS_FRENCHVANILLA_UP:1.STATE \t = \t COMPLETE \t RUNNING \t COMPLETE \crlf

203

FactoryTalk Batch Server API Technical Reference

F O R CE T RA NS I ST I ON
Function The ForceTransition execute allows the operator to force a transition to fire when the only thing preventing it from firing is a TRUE evaluation of its transition expression. The ForceTransition action is a transient and will either succeed immediately or have no effect on the targeted Transition object. For example, if a ForceTransition execute is targeted at a Transition that is not in a valid state to fire because not all the preceeding steps are active, the ForceTransition execute will fail and is NOT remembered when all preceeding steps become active chart elements. Execute Format A batch server supports an execute with the following format: [ForceTransition( Item, UserID, TransitionID)] where: Item UserID TransitionID The name of the response item, as specified by the client. User Identification to be entered into the event journal associated with this event. The unique ID, as assigned by the system, of the transition targeted by the override. The transition ID is typically retrieved by a client application using the ProcedureIDData3 data item.

Action A successful ForceTransition execute will cause a transition to fire when it is only being prevented from firing by not having a TRUE evaluation of its transition expression. Return Format The response item is populated with the following data: SUCCESS: | FAIL:<message> where: Field Name <message> Format ASCII-String Description Error message appropriate for display to user.

Example An execute string could be formatted as follows: ForceTransition(Item,Station2/View,89) This could return: SUCCESS:

204

3 Execute Reference

G ET C O NT AI N E R D ATA
Function The GETCONTAINERDATA execute retrieves a list of container and lot data entries that specify container binding options for the equipment module to be run using manual phase control. Execute Format A batch server supports an execute with the following format: [GETCONTAINERDATA(Item,UserID,UnitID,EqModID, FeedType, MaterialName)] where: Item UserID UnitID EqModID FeedType The Item name as specified by the client. User identification associated with this event. The unit Resource ID containing the equipment module to be run. The Resource ID for the equipment module to be run. Type of feed the equipment module will be performing. This is the literal value ADDITION or DISTRIBUTION. The name of the material that the step is configured to add or distribute.

MaterialNam e

Action A successful GETCONTAINERDATA execute returns a list of container and lot entries that may be legally bound to. Return Format The item is populated with the following data: SUCCESS:<ContainerData> | FAIL:<message> where: <ContainerData> <ContainerList> <BindEntry> where: Field Name <Container ControllerID> <Capacity> Format ASCII ASCII Description The container name. ID for container. For an addition: This is the quantity of material in the container. For a distribution: This is the remaining (available) volume of the container. <CEU> <LotName> <LabelName> ASCII ASCII ASCII The engineering units used to measure a containers volume. The name of the lot. The label assigned the quantity of material. is is is <NullList>|<ContainerList> <BindEntry>|<BindEntry><ContainerList> <ContainerName> \t <ContainerControllerID> \t <Capacity> \t <CEU> \t <LotName> \t <Label>\t

<ContainerName> ASCII

205

FactoryTalk Batch Server API Technical Reference

Example An execute string could be formatted as follows: GETCONTAINERDATA(DATA,STATION5/ Operator,55,70,ADDITION,EGG_YOLK) Requesting data from DATA will return: SUCCESS:TEMP_EGG \t 27 \t 660916 \t KG \t EGG_LOT3 \t EGGS3 \crlf

206

3 Execute Reference

G ET F EED T YPE A N D M A TE R I ALS


Function The GETFEEDTYPEANDMATERIALS execute retrieves a feed types and materials list supported by an equipment module run under manual phase control. Execute Format A batch server supports an execute with the following format: [GETFEEDTYPEANDMATERIALS(Item,UserID,EquipmentModuleN ame)] where: Item UserID Equipment ModuleName The Item name as specified by the client. User identification associated with this event. The name of the equipment module to retrieve the information from.

Action A successful GETFEEDTYPEANDMATERIALS execute returns a feed types and materials list supported by the current equipment module. Return Format The item is populated with the following data: SUCCESS:<FeedTypeID>\crlf <MaterialsEnmList> | FAIL:<message> where: Field Name <FeedTypeID> Format ASCII-Integer Description 1 = Addition 2 = Distribution 3 = Addition and Distribution is MaterialName \t | MaterialName \t <MaterialsEnmList>

<MaterialsEnmList> where: Field Name MaterialName Format ASCII-String

Description The name of the material.

Example An execute string could be formatted as follows: GETFEEDTYPEANDMATERIALS(Item,STATION5/ Operator,NP_ADDEGG_M1) Requesting data from Item will return: SUCCESS:1 \crlf CARAMEL \t CHAMBORD \t COCOA \t COCONUT \t COLD_STUFF \t CREAM \t DARK_CHOCOLATE \t EGG_YOLK \t FUDGE \t GOOD_EGG \t IC_CHOCOLATE_BLK_RBERRY_WC \t IC_FRENCH_VANILLA \t IC_GERMAN_CHOCOLATE \t IC_STRAWBERRY_IM \t IC_TRIPLE_CHOCOLATE \t MILK \t NULL_MATERIAL \t PECAN \t RASPBERRY \t SAM_STUFF \t STRAWBERRY \t SUGAR_GRANULATED \t TEST \t VANILLA \t VANILLANEW \t WATER \t WHITE_CHOCOLATE \t

207

FactoryTalk Batch Server API Technical Reference

G ET L EGAL E Q M O D UL E S
Function The GETLEGALEQMODULES execute retrieves a list of equipment module-container-lot entries to be considered for manually binding or rebinding a phase step. Execute Format A batch server supports an execute with the following format: [GETLEGALEQMODULES(Item,UserID,PhaseName)] where: Item UserID PhaseName The Item name as specified by the client. User identification associated with this event. The unique hierarchical path name to the phase: Procedure Level: CreateID \t ProcedureName \t UnitProcName \t OperName \t PhaseName Unit Procedure Level: CreateID \t UnitProcName \t OperName \t PhaseName Operation Level: CreateID \t OperName \t PhaseName Action A successful GETLEGALEQMODULES execute returns the alias name along with a list of names of the legal binding equipment module-containerlot entries for a phase steps manual binding or rebinding. Return Format The item is populated with the following data: SUCCESS:[<StepData>, <EqModuleList>,<UseAutoBind>] | FAIL:<message> where: <StepData> <EqModuleList> <EqModule> is is is <Material>,<Amount>,<MaterialEU>,<FeedType > <EqModule> | <EqModule>,<EqModuleList> <EqModuleName>, <ContainerName>, <Capacity>, <ContainerEU>, <LotName>, <Label> "AUTOMATIC,,0,,,,PROMPT,,0,,,,"

<UseAutoBind> where: Field Name <Material> <UseAutoBind> Format ASCII-String ASCII-String

is

Description The material name from the equipment modules MATERIAL parameter. Data passed to client applications permitting the operator to manually instruct the phase to use Automatic Phase Binding. The material quantity to process from the equipment modules AMOUNT parameter. This value is positive for a material addition and negative for a material distribution. Engineering units for measuring the quantities of material. The string ADD or DUMP

<Amount>

ASCII-Integer

<MaterialEU> <FeedType>

ASCII-String ASCII-String

208

3 Execute Reference

Field Name <EqModule Name> <Capacity>

Format ASCII-String

Description Equipment module name that could be selected for binding. Container name that could be selected for binding. Material Addition: Material quantity available in the container. Material Distribution: Remaining storage capacity in a container.

<ContainerName> ASCII-String ASCII-String

<ContainerEU> <LotName> <Label>

ASCII-String

Engineering units for measuring a containers volume. Name of the lot assigned to a specific material sublot in a container (if defined or known) - could be blank. String label assigned to a sublot (if defined or known) could be blank.

Example An execute string could be formatted as follows: GETLEGALEQMODULES(Item, Station5\Operator,42 \t MCLS_SWEETCREAM_UP:1 \t MCLS_SWEETCREAM_OP:1 \t MBR_ADD:2) Requesting data from Item will return: SUCCESS:EGG_YOLK,750,KG,ADD,NP_ADDSWEET_M1,SUGAR_S HACK1,66625366,KG,SUGARCANELOT3, ,AUTOMATIC, ,0, , , ,PROMPT, ,0, , , ,

209

FactoryTalk Batch Server API Technical Reference

G ET L EGAL U NITS
Function The GETLEGALUNITS execute retrieves the legal binding options for a non-statically bound unit procedure or operation. Execute Format A batch server supports an execute with the following format: [GETLEGALUNITS(Item,UserID,CreateID \t UnitProcName)] where: Item UserID CreateID The Item name as specified by the client. User identification associated with this event. The procedures unique ID, as assigned by the system, which contains the step that requires binding.

UnitProcNam The path to a step representing a Unit Procedure inside of a e Batch Procedure. <Path> where: <Path> where: Field <CreateID> <StepIdentifier> Format ASCII Integer Description The unique batch ID assigned by the FactoryTalk Batch Server. is <CreateID>/t <StepIdentifier>

ASCII String Step Identifier (e.g. Mix:1)

Action A successful GETLEGALUNITS execute returns the alias name along with a list of IDs and legal binding unit names or binding options for the specified unit procedure or operation. Return Format The item is populated with the following data: SUCCESS:[<Units>] | FAIL:<message> | FAILED <Units> <UnitList> <Unit> where: Field Name <UnitAlias> <UnitName> <UnitID> Format Description is is is <UnitAlias>,<UnitList> <Unit> | <Unit>,<UnitList> <UnitName>,<UnitID>

ASCII - String The alias associated with the specified unit procedure. ASCII - String The unit name to which the procedure may be bound, or a legal binding option (Prompt or First Available). ASCII - String The unit ID associated with the unit name. The legal binding options have the following associated Unit ID: Prompt = -1 First Available = -2

Example An execute string could be formatted as follows: GETLEGALUNITS(LegalUnits,UserID,36 \t MCLS_SWEETCREAM _UP:1) could place the following data in the item LegalUnits for the client: SUCCESS:MIXER,NP_MIXER1,55,NP_MIXER2,84,PROMPT,-1, FIRST AVAILABLE,-2,
210

3 Execute Reference

G ET P O SS I B LE L EGAL U NITS
Function The GETPOSSIBLELEGALUNITS execute retrieves the possible binding options for a non-statically bound unit procedure or operation. Execute Format A batch server supports an execute with the following format: [GETPOSSIBLELEGALUNITS(Item, UserID,CreateID \t UnitProcName)] where: Item UserID CreateID The name of the response item, as specified by the client. User Identification to be entered into the event journal associated with this event. The unique ID, as assigned by the system, of the procedure which contains the step which requires binding

UnitProcNam The path to a step representing a Unit Procedure inside of a e Batch Procedure. <Path> where: <Path> where: Field <CreateID> <StepIdentifier> Format ASCII Integer Description The unique batch ID assigned by the FactoryTalk Batch Server. is <CreateID>/t <StepIdentifier>

ASCII String Step Identifier (e.g. Mix:1)

Action A successful GETPOSSIBLELEGALUNITS will return the alias name along with a list of IDs and names of the possible binding units or binding options for the specified Unit Procedure or Operation. Return Format The response item is populated with the following data: SUCCESS:[<Units>] | FAIL:<message> | FAILED <Units> <UnitList> <Unit> where: Field Name <UnitAlias> <UnitName> Format Description is is is <UnitAlias>,<UnitList> <Unit> | <Unit>,<UnitList> <UnitName>,<UnitID>

ASCII - String The alias associated with the specified Unit Procedure. ASCII - String The name of a Unit that can be a legal bind target for the Unit Procedure, or a legal binding option (Prompt or First Available) ASCII - String The unit ID associated with the unit name. The legal binding options have the following associated Unit ID: Prompt = -1 First Available = -2

<UnitID>

211

FactoryTalk Batch Server API Technical Reference

Example An execute string could be formatted as follows: GETPOSSIBLELEGALUNITS(Item,Station2/View,36 \t ADDCREAM_UP:1) could return: SUCCESS:MIXER,NP_MIXER1,55,NP_MIXER2,84,PROMPT,1,FIRST AVAILABLE,-2

212

3 Execute Reference

I NFO
Function The INFO execute obtains information about a recipe. Execute Format A batch server supports an execute with the following format: [INFO(<Item>,<UserID>,<RecipeID><PhaseMaterialData>)] where: Item UserID RecipeID The Item name as specified by the client. User identification associated with this event. The file name of the recipe.

<PhaseMateri Optional list of Phase-Material pair data. alData> where: <PhaseMaterialList> <PhaseMaterialRecord> is where: <Phase Pathname> <Material Name> Full recipe pathname to the phase. (E.g., PROC_1\UNITPROC_1:1\OPER_1:3\ADD:4) Name of a material configured in the material server. (E.g., MILK) is <PhaseMaterialRecord >| <PhaseMaterialRecord >,<PhaseMaterialList> <PhasePathname>,<MaterialName>

Action A successful INFO execute places the recipe information into the item field. Return Format The item is populated with the following data: <RecList> \crlf where: <RecList> <StepList> <Step> <BindData> <UnitBindList> <UnitList> <ParmList> <ParmInfo> is is is is is is is is <StepList> PARMS \crlf <ParmList> <Step> | <Step> <StepList> <Alias> \t <BindData>\t <BindFlag> \crlf <Class> | <UnitBindList> $UNITLIST \t <UnitList> \t $END <UnitName> | <UniName> \t <UnitList> <ParmInfo> | <ParmInfo> <ParmList> <Parameter> \t <ResponseType> \t <ParmEdit> \t <EngUnits> \t <MaxValue> \t <MinValue> \t <Default> \crlf

where: Field Name PARMS <Alias> Format Description

ASCII - String A keyword to separate the Steps from the parameters in the return result. ASCII - String A Unit alias which requires binding.

213

FactoryTalk Batch Server API Technical Reference

Field Name <BindFlag>

Format ASCII Integer

Description Integer value containing bits indicating what types of late binding are permitted: Bit1 = PROMPT Bit2 = FIRST AVAILABLE Indicates the beginning of the unit names list that contains references to material-based phases. Indicates the end of the unit names list that contains references to material-based phases. Name of the unit. Data type for the response: 1 = real3 = string 2 = long5 = enumeration. 1 = obsolete field used to mark parameters as having values that could be edited or not. It always returns the value 1.

<Class> $UNITLIST $END <UnitName> <Parameter>

ASCII - String The Unit Class the previous step was configured to use. ASCII-String ASCII-String ASCII-String

ASCII - String The parameter name required to create the batch.

<Response Type> ASCII Integer <ParmEdit> <EngUnits> <MaxValue> <MinValue> <Default> ASCII Integer

ASCII - String Engineering units for the parameter. ASCII - String High range for the parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Low range for the parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Default value for the parameter.

Example An execute string consisting of: non-material [INFO(RCPINFO,STATION5/operator2,CLS_FRENCHVANILLA.BPC)] based recipe would place the following data in the item RCPInfo for the client: FREEZER \t FREEZER_CLS \t 0 \ r \ n MIXER \ t MIXER_CLS \t 0 \ crlf PARMS \crlf MILK_AMOUNT \ t 1 \ t 1 \ t KG \ t 5000 \ t 0 \ t 1999 \ crlf SUGAR_AMOUNT \ t 1 \ t 1 \ t KG \ t 1500 \ t 0 \ t 750 \ crlf CREAM_AMOUNT \ t 1 \ t 1 \ t K G \ t 5000 \ t 0 \ t 2001 \ crlf EGG_AMOUNT \ t 1 \ t 1 \ t KG \ t 500 \ t 0 \ t 200 \ crlf FLAVOR_AMOUNT \ t 1 \ t 1 \ t KG \ t 100 \ t 0 \ t 50 \ crlf Example An execute string consisting of: material-based [INFO(RCPINFO,STATION5/operator2,MCLS_FRENCHVANILLA.BPC)] recipe would place the following data in the item RCPInfo for the client: FREEZER \t $UNITLIST \t NP_FREEZER1 \t NP_FREEZER2 \t $END \t 0 \crlf PARMS \crlf MILK_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 1999 \crlf SUGAR_AMOUNT \t 1 \t 1 \t KG \t 1500 \t 0 \t 750 \crlf CREAM_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 2001 \crlf EGG_AMOUNT \t 1 \t 1 \t KG \t 500 \t 0 \t 230 \crlf FLAVOR_AMOUNT \t 1 \t 1 \t KG \t 100 \t 0 \t 20 \crlf

214

3 Execute Reference

Example An execute string consisting of: optional phase- [INFO(item,STATION5/operator2,ADD_SWEET.UOP, material list ADD_SWEET\MBR_ADD:1,SUGAR_GRANULATED)] would return: ALIAS_MBR_MIXER_CLS\t$UNITLIST\tNP_MIXER1\tNP_MIXER2 \t$END\t0\\crlf PARMS\\crlf

I NFO 2
Function The INFO2 execute obtains information about a recipe. Execute Format A batch server supports an execute with the following format: [INFO2(<Item>,<UserID><RecipeID>)] where: Item UserID RecipeID The Item name as specified by the client. User identification associated with this event. The file name of the recipe.

Action A successful INFO2 execute places the recipe information into the item field. Return Format The item is populated with the following data: <RecList> \crlf where: <RecList> <StepList> <Step> <BindData> <ParmList> <ParmInfo> is is is is is is <StepList> PARMS \crlf <ParmList> <Step> | <Step> <StepList> <Alias> \t <BindData>\t <BindFlag> \crlf <Class> | <UnitBindList> <ParmInfo> | <ParmInfo> <ParmList> <Parameter> \t <ResponseType> \t <ParmEdit> \t <EngUnits> \t <MaxValue> \t <MinValue> \t <Default> \t <ERPAlias> \crlf

where: Field Name PARMS <Alias> <BindFlag> Format Description

ASCII - String A keyword to separate the Steps from the parameters in the return result. ASCII - String A Unit alias which requires binding. ASCII Integer Integer value containing bits indicating what types of late binding are permitted: Bit1 = PROMPT Bit2 = FIRST AVAILABLE

<Class> <Parameter>

ASCII - String The Unit Class the previous step was configured to use. ASCII - String The parameter name required to create the batch. Data type for the response 1 = real, 2 = long, 3 = string, 5 = enumeration.
215

<Response Type> ASCII Integer

FactoryTalk Batch Server API Technical Reference

Field Name <ParmEdit>

Format ASCII Integer

Description 1 = obsolete field used to mark recipe parameters as having values that could be edited or not. It always returns the value 1.

<EngUnits> <MaxValue> <MinValue> <Default>

ASCII - String Engineering units for the recipe parameter. ASCII - String High range for the recipe parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Low range for the recipe parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Default value for the recipe parameter. Data type for the response 1 = real, 2 = long, 3 = string, 5 = enumeration.

<Response Type> ASCII Integer <ERPAlias>

ASCII - String The R/3 parameter name. This is used to map recipe parameters between the FactoryTalk Batch Server and R/3.

Example An execute string consisting of: [INFO2(RCPINFO,STATION5/operator2,CLS_SWEETCREAM_OP.UOP] would place the following data in the item RCPInfo for the client: MIXER_CLS \t MIXER_CLS \t 0 \crlf PARMS \crlf MILK_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 0 \t ERP ALIAS 3 \crlf SUGAR_AMOUNT \t 1 \t 1 \t KG \t 1500 \t 0 \t 0 \t ERP ALIAS 4 \crlf CREAM_AMOUNT \t 1 \t 1 \t KG \t 5000 \t 0 \t 0 \t ERP ALIAS 1 \crlf EGG_AMOUNT \t 1 \t 1 \t KG \t 500 \t 0 \t 0 \t ERP ALIAS 2 \crlf

216

3 Execute Reference

I NFO T R I M M E D
Function The INFOTRIMMED execute retrieves the information necessary for the formatting of a Batch execute that would be used to instantiate a batch. Execute Format A batch server supports an execute with the following format: [INFOTRIMMED(<Item>,<UserID>,<RecipeID><PhaseMaterialData>)] where: Item UserID RecipeID The name of the response item, as specified by the client. User identification associated with this event. The file name of the recipe.

<PhaseMateri Optional list of Phase-Material pair data. alData> where: <PhaseMaterialData> <PhaseMaterialList> <PhaseMaterialRecord> where: Field PhasePathName MaterialName Format Description is is is <NULLLIST>|,<PhaseMaterialList> <PhaseMaterialRecord> | <PhaseMaterialRecord>,<PhaseMaterialList> <PhasePathName>,<MaterialName>

ASCII - String Full recipe pathname to the phase. (e.g. PROC_1\UNITPROC_1:1\OPER_1:3\ADD:4) ASCII String Name of a material configured in the material server (e.g. Milk)

Action A successful INFOTRIMMED execute places the recipe information into the item field. Return Format The response item is populated with the following data: <RecList> | FAIL:<FailData> where: <RecList> <StepList> <Step> <UnitBindList> <UnitList> <ParmList> <ParmInfo> <FailData> <ZeroTargets> <ZeroTargsList> is is is is is is is is is <StepList> PARMS \crlf <ParmList> <Step> | <Step> <StepList> <Alias> \t <UnitBindList>\t <BindFlag> \crlf $UNITLIST \t <UnitList> \t $END <UnitName> | <UnitName> \t <UnitList> <ParmInfo> | <ParmInfo> <ParmList> <Parameter> \t <ResponseType> \t <ParmEdit> \t <EngUnits> \t <High> \t <Low> \t <Default> \crlf <message> | <ZeroTargets> <ZeroTargsMarker> \crlf <ZeroTargsList> <ZeroTargs> | <ZeroTargs> \crlf <ZeroTargsList>

217

FactoryTalk Batch Server API Technical Reference

<ZeroTargs>

is

<ZeroTargsText> ':' <Alias> \crlf <UnitErrList> \crlf <EndUnitErrList> \crlf <BindReqList> \crlf <EndBindReqList> \crlf <ExprDataList> \crlf <EndZeroTargsData> <UnitErr> | <UnitErr> /crlf <UnitErrList> <UnitIdLabel> ':' <UnitID> \t <UnitNameLabel> ':' <UnitName> \t <ReasonData>

<UnitErrList> <UnitErr>

is is

<ReasonData>

is

<LegalReason> | <FPathReason> | <FPathRqmReason> | FPathMatReason> | <BindReqReason> | <MaterialReason> | <NotRecordedReason> | <InvalidReason> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText>':'<BindRqmtID> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> \t <MaterialLabel> ':' <Material> \t <LotLabel> ':' <Lot> \t <LabelLabel> ':' <Label> \t <UseCodeLabel> ':' <UseCode> \t <UseTextlabel> ':' <UseText> \t <StepLabel> ':' <StepPath> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <ReasonCodeLabel> ':' <ReasonCode> \t <ReasonTextLabel> ':' <ReasonText> <BindReq> | <BindReq> /crlf <BindReqList> <BindReqID> ':' <BindReqText> <ExprData> | <ExprData> /crlf <ExprDataList> <ExprDataUnitIDLabel> ':' <ExprDataUnitID> /t <ExprDataUnitNameLabel> ':' <ExprDataUnitName> /t <ExprBindSpecIDLabel> ':' <ExprBindSpecID> /t <ExpressionValues> <ExpressionValue> <LeafValuePairs>

<LegalReason> <FPathReason> <FPathRqmReason> <FPathMatReason> <BindReqReason>

is is is is is

<MaterialReason>

is

<NotRecordedReason> <InvalidReason> <BindReqList> <BindReq> <ExprDataList> <ExprData>

is is is is is is

<ExpressionValues>

is

218

3 Execute Reference

<LeafValuePairs> <LeafValueList> <LeafPair> where: Field Name FAIL: Format

is is is

<NullList> | /t <LeafValueList> <LeafPair> | <LeafPair> /t <LeafValueList> <LeafName> /t <LeafValue>

Description

ASCII - String A keyword to indicate that the InfoTrimmed execute encountered an error. ASCII - String An error message, formatted appropriately for operator display.

PARMS <Alias> <BindFlag>

ASCII - String A keyword to separate the Steps from the parameters in the return result. ASCII - String A Unit alias which requires binding. ASCII Integer Integer value containing bits indicating what types of late binding are permitted: Bit1 = PROMPT Bit2 = FIRST AVAILABLE

$UNITLIST $END <UnitName> <Parameter>

ASCII - String Indicates the beginning of the list of unit names that contain references to material-based phases. ASCII - String Indicates the end of the list of unit names that contain references to material-based phases. ASCII - String Name of the unit. ASCII - String The parameter name required to create the batch. Data type for the response 1 = real, 2 = long, 3 = string, 5 = enumeration. 1 = obsolete field used to mark recipe parameters as having values that could be edited or not. It always returns the value 1.

<Response Type> ASCII Integer <ParmEdit> ASCII Integer

<EngUnits> <High> <Low> <Default> ZeroTargsMarker

ASCII - String Engineering units for the recipe parameter. ASCII - String High range for the recipe parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Low range for the recipe parameter. For parameters of type String and Enumeration, this field contains no data. ASCII - String Default value for the recipe parameter. ASCII - String The string constant "$ZEROLEGALBINDTARGSDATA" is used to indicate that the response item contains data elaborating the reasons why there are zero legal bind targets for one or more Unit Requirements. ASCII - String A localized displayable error message, indicating that the specified unit requirement (following the ':' character) has zero legal bind targets. ASCII - String The string constant "$ENDUNITDATA" is used to mark the end of the set of Unit Instance legality records. ASCII - String The string constant "$ENDBINDREQDATA" is used to mark the end of the set of Binding Requirement records.

ZeroTargsText

EndUnitErrList EndBindReqList

219

FactoryTalk Batch Server API Technical Reference

Field Name

Format

Description

EndZeroTargsData ASCII - String The string constant "$ENDUNITRQMTDATA" is used to mark the end of a Unit Requirements expression data records (and the end of the Unit Requirement's data). UnitIdLabel UnitId UnitNameLabel UnitName ASCII - String Non-localized English string label for the Unit ID field that follows. ASCII Integer The integer value identifier of the Unit for which bind illegality is being described.

ASCII - String Non-localized English string label for the Unit name that follows. ASCII - String The name of the unit or which bind illegality is being described.

ReasonCodeLabel ASCII - String Non-localized English string label for the Reason Code field that follows. ReasonCode ASCII Integer An integer field describing the legality of the Unit Instance for binding. Possible values are: 0 - Unit is a legal binding target 1 - Unit invalid due to material requirement 2 - Unit invalid due to binding requirement 3 - Unit invalid due to material requirement on flowpath 4 - Unit Invalid due to static binding requirement on flowpath 5 - Unit Invalid due to flowpath analysis 6 - Invalid reason code 7 - Unit invalidity reason not recorded ReasonTextLabel ReasonText MaterialLabel Material ASCII - String Non-localized English string label for the Reason Text field that follows. ASCII - String Non-localized English string that describes the reason the unit is an illegal bind target. ASCII - String Non-localized English string label for material name field that follows. ASCII - String The name of the material associated with the material requirement that made the unit instance an illegal bind target. ASCII - String Non-localized English string label for the Lot field that follows. ASCII - String The LOT specifier associated with the material requirement that made the unit instance an illegal bind target. ASCII - String Non-localized English string label for the Label field that follows. ASCII - String Non-localized English string label for the Use Code field that follows.

LotLabel Lot LabelLabel UseCodeLabel

220

3 Execute Reference

Field Name UseCode

Format ASCII Integer

Description An integer value indicating the usage type defined by the material requirement that made the unit instance an illegal bind target. Possible values are: 0 - Distribution 1 - Addition

UseTextLabel UseText

ASCII - String Non-localized English string label for the Use Text field that follows. ASCII - String Localized string describing the usage type defined by the material requirement that made the unit instance an illegal bind target. ASCII - String Non-localized English string label for the Step Path field that follows. ASCII - String The fully path to the step associated with the material requirement that made the unit instance an illegal bind target. ASCII Integer The integer value identifier of the Binding Requirement exposed in this record.

StepLabel StepPath

BindReqID BindReqText

ASCII - String A non-localized string that is a "readable" description of the binding requirement. Note, this may contain the ':' character.

ExprDataUnitIDL ASCII - String A non-localized English string label for the Unit ID field abel that follows. ExprDataUnitID ASCII Integer The integer value identifier of the Unit Resource associated with this data record.

ExprDataUnitNam ASCII - String A non-localized English string label for the Unit Name field eLabel that follows. ExprDataUnitNam ASCII - String The name of the Unit Resource associated with this data e record. ExprBindSpecIDL ASCII - String A non-localized English string label for the Bind Specifier abel ID field that follows. ExprBindSpecID ExpressionValue LeafName LeafValue ASCII Integer ASCII Variable ASCII Variable The integer value identifier of the Binding Specifier associated with this data record. The evaluated value of the expression.

ASCII - String The name of the leaf from the expression. The value of the leaf from the expression.

221

FactoryTalk Batch Server API Technical Reference

Example An execute string consisting of: INFOTRIMMED(Item,Station2/View,MAKE_SOUP.BPC) could return: FREEZER \t FREEZER_CLS \t 0 \ r \ n MIXER \ t MIXER_CLS \t 0 \ crlf PARMS \crlf MILK_AMOUNT \ t 1 \ t 1 \ t KG \ t 5000 \ t 0 \ t 1999 \ crlf SUGAR_AMOUNT \ t 1 \ t 1 \ t KG \ t 1500 \ t 0 \ t 750 \ crlf CREAM_AMOUNT \ t 1 \ t 1 \ t K G \ t 5000 \ t 0 \ t 2001 \ crlf EGG_AMOUNT \ t 1 \ t 1 \ t KG \ t 500 \ t 0 \ t 200 \ crlf FLAVOR_AMOUNT \ t 1 \ t 1 \ t KG \ t 100 \ t 0 \ t 50 \ crlf

M AT S V R C ONTRO L
Function The Material Server Control dialog uses the MATSVRCONTROL execute to reestablish communication. NOTE: This execute is only valid when the Option when Material Server Communication is lost is set to Switch to Manual. (See the FactoryTalk Batch Administrators Guide for more information.) Execute Format The FactoryTalk Batch Server supports an execute with the following format: [MATSVRCONTROL(Item,UserID,STATE)] where: Item UserID State The name of the item as specified by the client. User identification associated with this event. 2 represents the GOOD state. Returning to the GOOD state is the only control currently available.

Action A successful MATSVRCONTROL reestablishes communication with the Material Server. Return Format The MATSVRCONTROL execute is populated with the following data: SUCCESS:|FAIL:<message> Example An execute string could be formatted as follows: MATSVRCONTROL(PC2matsvrcontrol,PC2/Operator,2)

222

3 Execute Reference

M ESSAGES
Function The MESSAGES execute obtains a message list associated with a particular phase. Execute Format A batch server supports an execute string with the MESSAGE keyword. The execute string format is as follows: [MESSAGES(Item,UserID,PhaseID)] where: Item UserID PhaseID The Item name as specified by the client. User identification entered into the event journal associated with this event. The phases Equipment ID as configured in the FactoryTalk Batch Equipment Editor.

Action A successful MESSAGES execute places the message string into the item. Return Format The MESSAGES execute is returned in the following format: <MessageList> where: <MessageList> <Messages> where: Field Name <ID> <MessageString> Format Description is is <Messages> | FAIL:<message> | FAILED | NullString <ID>, <MessageString> \crlf <MessageList>

ASCII - String The unique ID of the message string. ASCII - String Message string associated with the ID. Example An execute string consisting of: MESSAGES(PC2Messg,UserID,36) could place the following data in the item PC2Messg for the client: 1,FV101_OPEN \crlf 2,FV101_CLOSED \crlf

223

FactoryTalk Batch Server API Technical Reference

M T RL _I NFO
Function MTRL_INFO returns the information necessary allowing material selection for a Material Manager phase written as material class-based. Execute Format A batch server supports an execute with the following format: [MTRL_INFO(Item,UserID,RecipeFileName)] where: Item UserID RecipeID The Item name as specified by the client. User identification associated with this event. The recipe filename.

Action A MTRL_INFO execute returns necessary information to select materials for Material Manager phases that have a MATERIAL_CLASS parameter set to a non-NULL_CLASS value. Return Format The MTRL_INFO execute is returned in the following format: SUCCESS:<Phase-Material Info> | FAIL:<Message> where: <Phase-MaterialInfo> <Phase-MaterialList> <Phase-MaterialRecord> <MaterialList> where: Field Name <Phase Pathname> <MaterialClass Name> <MaterialName> Format ASCII ASCII Description Full recipe pathname to the phase. (for example, PROC_1\UNITPROC_1:1\OPER_1:3\ADD:4) Name of material class referenced by the MATERIAL_CLASS parameter. (for example, SWEETENER) Name of a material of the designated material class. (for example, RAW_SUGAR) is is is is <Null List>|< Phase-Material List> <Phase-Material Record >|<Phase-Material Record>\crlf < Phase-Material List> <Phase Pathname>\t<Material Class Name>\t<Material List>$END < Material Name>|< Material Name>\t<Material List>

ASCII

Example An execute string formatted as follows: MTRL_INFO (Item,User,VANILLA_ICE_CREAM.BPC) Outputs the following: SUCCESS:YUMMY_STUFF\SWEETCREAM_UP:1\SWEETCREAM_ OP:2\ADD:1\tSWEETENERS\tRAW_SUGAR\tBROWN_SUGAR\tSY RUP$END\crlf YUMMY_STUFF\CHOCOLATE_UP:1\CHOCOLATE_OP:2\ADD:1\t DARK_CHOCOLATES\t68_PER_CENT_COCOA\t52_PER_CENT_C OCOA$END SUCCESS: followed by a null list indicates that no material class references exist to be resolved. SUCCESS: followed by a non-null list implies that all Material Lists returned must also be non-empty. If an empty Material List would have resulted (that is, no Material to choose for the Material Class), MTRL_INFO returns FAIL:.

224

3 Execute Reference

ORDER
Function The ORDER execute reorders the requesters list for a resource. Execute Format A batch server supports an execute with the following format: [ORDER(Item,UserID,ResourceID,OwnerID,NextOwnerID, Position)] where: Item UserID ResourceID OwnerID NextOwnerID The Item name as specified by the client. User identification entered into the event journal associated with this event. The resources Equipment ID whose requesters list is to be reordered. The resources unique ID to be moved in the requesters list. The resources unique ID, in the position within the requesters list, which the OwnerID is requesting. If Position is RELATIVE, the OwnerID resource will be positioned prior to the NextOwnerID resource. Position within the requesters list in which the resource should be placed: RELATIVE - indicates that the resource should be placed somewhere other than at the end of the list. TAIL - indicates that the resource should be placed at the end of the list. In this case the OwnerID and NextOwnerID parameters are ignored. Action A successful ORDER execute results in a change to the requesters list for the ResourceID. Return Format The item is populated with the following data: SUCCESS: | FAIL:<message> | FAILED Example An execute string could be formatted as follows: ORDER(Item,UserID,12,22,1,RELATIVE)

Position

225

FactoryTalk Batch Server API Technical Reference

P ARAM E XP C LEAR
Function The PARAMEXPClear execute allows the operator to remove an override of a specified expression that was created by a prior ParamExpOverride execute. When the override is cleared, the value of the parameter expression is determined by the current expression evaluation. Execute Format A batch server supports an execute with the following format: [ParamExpClear( Item, UserID, ParamExpressionID)] where: Item UserID ParamExpressionID The name of the response item, as specified by the client. User Identification to be entered into the event journal associated with this event. The unique ID, as assigned by the system, of the parameter expression targeted by the override. The parameter expression ID is typically retrieved by a client application using the ProcedureIDData3 data item.

Action A successful ParamExpClear execute will remove an existing expression value force and cause the value of the expression to revert to the value to which the expression currently evaluates. Return Format The response item is populated with the following data: SUCCESS: | FAIL:<message> where: Field Name <message> Format ASCII - String Description Error message appropriate for display to user.

Example An execute string could be formatted as follows: ParamExpClear(Item,Station2/View,27) This could return: SUCCESS:

226

3 Execute Reference

P ARAM E XP O VERRIDE
Function The PARAMEXPOVERRIDE execute allows the operator to override the result of a parameter expression evaluation with a specified value. The value of the parameter expression will remain overridden until a ParamExpClear execute is used to remove the override or an ensuing ParamExpOverride changes the value to which the expression is overridden. The value to which the expression is overridden is not permitted to violate the configured min/ max limits of the expression's associated parameter. Execute Format A batch server supports an execute with the following format: [ParamExpOverride(Item, UserID, ParamExpressionID, value)] where: Item UserID ParamExpressionI D The name of the response item, as specified by the client. User Identification to be entered into the event journal associated with this event. The unique ID, as assigned by the system, of the parameter expression targeted by the override. The parameter expression ID is typically retrieved by a client application using the ProcedureIDData3 data item. The value to which the parameter expression is to be forced.

value

Action A successful ParamExpOverride execute will force the expression parameter to hold the value specified in the execute and not the value to which the expression currently evaluates. Return Format The response item is populated with the following data: SUCCESS: | FAIL:<message> where: Field Name <message> Format ASCII - String Description Error message appropriate for display to user.

Example An execute string could be formatted as follows: ParamExpOverride(Item,Station2/View,27,3.14159) This could return: SUCCESS:

227

FactoryTalk Batch Server API Technical Reference

P ARMS
Function The PARMS execute obtains the parameters of a procedure. Execute Format A batch server supports an execute string with the PARMS keyword. The format of the execute string is as follows: [PARMS(Item,UserID,ProcedureID)] where: Item UserID ProcedureID The Item name as specified by the client. User identification associated with this event. The unique path name to the procedure, starting with the CreateID and followed by the step name(s), all of which are tab delimited.

Action A successful PARMS execute returns the parameter string into the item specified by the client. Return Format The PARMS execute is returned in the following format: <Parameter> \t <ResponseType> \t <EngUnits> \t <MaxValue> \t <MinValue> \t <Value> \t \crlf where: Field Name <Parameter> <Response Type> <EngUnits> <MaxValue> <MinValue> <Value> Format ASCII - String ASCII - Integer Description The parameter name required to create the batch. Data type for the response: 1 = real 2 = long ASCII - String ASCII - String ASCII - String ASCII - String 3 = string 5 = enumeration

Engineering units for the parameter. High range for the parameter. Low range for the parameter. The current value of the parameter.

Example An execute string consisting of: [PARMS(Item,UserID,41 \t CLS_SWEETCREAM_UP:1 \t CLS_SWEETCREAM_OP:1 \t TEMP_CTL:1) could place the following data in Item for the client: HOLD_TIME \t 1 \t MINUTES \t 60 \t 0 \t 5 \crlf TEMP_SP \t 1 \t DEG \t C \t 100 \t 0 \t 71.1 \crlf

228

3 Execute Reference

P ARMS 2
Function The PARMS2 execute obtains the procedures parameters. Execute Format A batch server supports an execute string with the PARMS keyword. The execute strings format is as follows: [PARMS2(Item,UserID,ProcedureID)] where: Item UserID ProcedureID The Item name as specified by the client. User identification associated with this event. The unique path name to the procedure, starting with the CreateID and followed by the step name(s), all of which are tab delimited.

Action A successful PARMS2 execute returns the parameter string into the item specified by the client. Return Format The PARMS2 execute is returned in the following format: <Parameter> \t <ResponseType> \t <EngUnits> \t <MaxValue> \t <MinValue> \t <Value> \t <HighHighHighLimit>\t<HighHighLimit>\t<HighLimit> \t <LowLimit> \t \<LowLowLimit>\t<LowLowLowLimit> \ctrlf where: Field Name <Parameter> <ResponseType> <EngUnits> <MaxValue> <MinValue> <Value> Format ASCII - String ASCII - Integer ASCII - String ASCII - String ASCII - String ASCII - String Description The name of the parameter. Data type for the response: 1=real, 2=long, 3=string, 5=enumeration Engineering units for the parameter. High range for the parameter. Low range for the parameter. The current value of the parameter. The High-High-High Limit. The High-High Limit. The High Limit. The Low Limit. The Low-Low Limit. The Low-Low-Low Limit.

<HighHighHighLimi ASCII - Integer t> <HighHighLimit> <HighLimit> <LowLimit> <LowLowLimit> <LowLowLowLimit > ASCII - Integer ASCII - Integer ASCII - Integer ASCII - Integer ASCII - Integer

Example An execute string consisting of: [PARMS2(Item,UserID,41 \t CLS_SWEETCREAM_UP:1 \t CLS_SWEETCREAM_OP:1 \t TEMP_CTL:1) could place the following data in Item for the client: HOLD_TIME \t 1 \t MINUTES \t 60 \t 0 \t 5 \crlf TEMP_SP \t 1 \t DEG \t C \t 100 \t 0 \t 71.1 \t90 \t83 \t78 \t65 \t45 \t35 \crlf

229

FactoryTalk Batch Server API Technical Reference

P H AS E
Function The PHASE execute commands a phase to a desired state. The operator must own the phase. Execute Format A batch server supports an execute with the following format: [PHASE(Item,UserID,PhaseID,Cmd,BatchID,Unit)] where: Item UserID PhaseID Cmd The Item name as specified by the client. User identification entered into the event journal associated with this event. The unique Equipment ID for the desired phase. The desired command. Valid commands are: START, STOP, RESET, RESUME, HOLD, RESTART, PAUSE, ABORT, DOWNLOAD, DISCONNECT, AUTO-MODE, SEMIAUTO-MODE, CLEAR_ FAILURES The BatchID required for journals associated with this phase. The Unit Name to use with the phase.

BatchID Unit

Action A successful PHASE execute results in the specified command either being queued pending a signature confirmation, or being issued to the specified phase. If the command was a START command and a batch did not already exist for manual phase control, then a batch will be created using the specified BatchID and Unit. One way a PHASE execute results in a failure message is when the Phase command sent equals the current phase state. Example: If a phase is running and a START or RESTART execute is issued, the command will return a failure message. Sending a PHASE execute to an External ownership phase results in a failure message. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> <message> Format ASCII Integer ASCII - String Description The ActionID associated with the signature(s) generated in response to the execute. An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: PHASE(Item,Station2/View,29,START,MAKESTUFF,BIGMIXER) This could return: SUCCESS:997

230

3 Execute Reference

P H AS E 2
Function The PHASE2 execute commands a phase associated with a control strategy to a desired state. The operator must own the phase. Execute A batch server supports an execute with the following format: Format [PHASE2(Item,UserID,PhaseID,Cmd,BatchID,Unit, ControlStrategyID)] where: Item UserID PhaseID Cmd The Item name as specified by the client. User identification entered into the event journal associated with this event. The unique Equipment ID for the desired phase. The desired command. Valid commands are: START, STOP, RESET, RESUME, HOLD, RESTART, PAUSE, ABORT, DOWNLOAD, DISCONNECT, AUTOMODE, SEMIAUTO-MODE, CLEAR_ FAILURES, TIMERComplete and TIMER-Reset The BatchID required for journals associated with this phase. The Unit Name to use with the Phase. The value of the control strategy to use with the phase. If the phase is not Control Strategy enabled, this field must contain -1.

BatchID Unit Control StrategyID

Action A successful PHASE2 execute results in the specified command either being queued pending a signature confirmation, or being issued to the specified phase. If the command was a START command and a batch did not already exist for manual phase control, then a batch will be created using the specified BatchID, Unit, and Control Strategy. One way a PHASE2 execute results in a failure message is when the Phase2 command sent equals the current phase state. Example: If a phase is running and a START or RESTART execute is issued, the command will return a failure message. Sending a PHASE2 execute to an External ownership phase results in a failure message. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> <message> Format ASCII Integer ASCII - String Description The ActionID associated with the signature(s) generated in response to the execute. An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: PHASE2(Item,Station2/View,29,START,MAKESTUFF,BIGMIXER,2) This could return: SUCCESS:997

231

FactoryTalk Batch Server API Technical Reference

P H AS E 3
Function The PHASE3 execute commands a phase that is material-enabled, or associated with a control strategy and material-enabled to a desired state. The operator must own the phase. Execute Format A batch server supports an execute with the following format: [PHASE3(Item,UserID,PhaseID,Cmd,BatchID,Unit, ControlStrategyID,ContainerName,ContainerControllerID, MaterialName,LotName,LabelName,FeedType)] where: Item UserID PhaseID Cmd The Item name as specified by the client. User identification entered into the event journal associated with this event. The unique Equipment ID for the desired phase. The desired command. Valid commands are: START, STOP, RESET, RESUME, HOLD, RESTART, PAUSE, ABORT, DOWNLOAD, DISCONNECT, AUTO-MODE, SEMIAUTO-MODE, CLEAR_ FAILURES The BatchID required for journals associated with this phase. The Unit Name to use with the phase. The value of the control strategy to use with the phase. If the phase is not Control Strategy enabled, this field must contain -1. The container name this phase is to bind with. For material-enabled phases, this is required data. The value returned by the GETCONTAINERDATA execute. This is the controller ID for the container. The name of the material required by the phase. For material-enabled phases, this is required data. The lot name to filter containers for material additions, optional for material-enabled phases. If the phase is not material-enabled, this field must be blank (single blank space character). The label name to filter containers for material additions, optional for material-enabled phases. If the phase is not material-enabled, this field must be blank (single blank space character). Material feed type: ADDITION or DISTRIBUTION.

BatchID Unit Control StrategyID ContainerName Container ControllerID MaterialName LotName

LabelName

FeedType

232

3 Execute Reference

Action A successful PHASE3 execute results in the specified command either being queued pending a signature confirmation, or being issued to the specified phase. If the command was a START command and a batch did not already exist for manual phase control, then a batch is created using the specified BatchID, Unit, Control Strategy, ContainerName, ContainerControllerID, MaterialName, LotName, LabelName, and Feedtype. The PHASE3 execute does not check that the equipment module can support an addition or distribution. You must ensure that the binding information provided to the FactoryTalk Batch Server is accurate. One way a PHASE3 execute results in a failure message is when the Phase3 command sent equals the current phase state. Example: If a phase is running and a START or RESTART execute is issued, the command returns a failure message. Sending a PHASE3 execute to an External ownership phase results in a failure message. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> <message> Format ASCII Integer ASCII - String Description The ActionID associated with the signature(s) generated in response to the execute. An error message, formatted appropriately for operator display.

Example An execute string to start a material-enabled phase could be formatted as follows: PHASE3(Item,Station2/View,29,START,MAKESTUFF, BIGMIXER,2,TEMP_EGG,27,EGG_YOLK, , ,ADDITION) This could return: SUCCESS:997 An execute string to start a Control Strategy and material-enabled phase could be formatted as follows: [PHASE3(Item,STATION5/Operator,71,START, BATCH_ID, NP_MIXER1, Strategy_1,TEMP_EGG,27,EGG_YOLK, , ,ADDITION)]

233

FactoryTalk Batch Server API Technical Reference

R EACTIVATE S T E P
Function The REACTIVATESTEP execute causes the batch server to journal a Step_Reactivation Request event. Execute Format A batch server supports an execute with the following format: [REACTIVATESTEP(Item,UserID,RecipePath,StepIndex, ReactivationNumber)] where: Item UserID RecipePath StepIndex Reactivation Number The Item name as specified by the client. User identification entered into the event journal associated with this event. A path that represents the part of the recipe where the step originated. Number representing the position of the step within the phase. Number representing the number of times the step has been reactivated.

Action A successful REACTIVATESTEP execute results in a Step_Reactivation_Request event being queued pending a Signature Confirmation or a Step_Reactivation_Request event being written to the event journal. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> <message> Format ASCII Integer ASCII - String Description The ActionID associated with the signature(s) generated in response to the execute. An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: [REACTIVATESTEP(Item321,JoeOperator,45133: CLS_FRENCHVANILLA\CLS_SWEETCREAM_UP:1\ CLS_SWEETCREAM_OP:1\ADD_EGG:1-1,4,0)]

234

3 Execute Reference

R ECIPE L IST
Function The RECIPELIST execute obtains information about the recipes from the FactoryTalk Batch Recipe Editor. To review the recipe information, you must issue a request against the RecipeList item. Execute Format A batch server supports an execute string with the RECIPELIST keyword. The format of the execute string is as follows: [RECIPELIST(Item,UserID)] where: Item UserID The Item name as specified by the client. User identification associated with this event.

Action A successful RECIPELIST execute returns the recipe list information into the response item on the client. Return Format The item is populated with the following data: SUCCESS: | FAIL:<message> | FAILED Example An execute string could be formatted as follows: [RECIPELIST(Item,STATION5/Operator)] Requesting data from Item could return: 3.0 \t FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_2_ U1.UPC \t FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_ OPT_2_U1 \t French Vanilla IceCream \t French Vanilla \t FVP-101 \t Premium 1 \t 9/1/2000 11:11:50 AM \t Administrator \t rpmServer ( STAGE1\rpmServer ) on computer STAGE1 \t UNIT PROCEDURE \t Instance \t The general recipe French_Vanilla, Variant= Premium, Version= 1 is successfully converted to master recipe FRENCH_ VANILLAPREMIUM1_MEGA_PARLOR \t 25 \t 50 \t 100 \t KG \t \t TRUE \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE \BATCH\SAMPLEAPP\RECIPES\ICE_CREAM4.CFG \t 9/1/2000 11:04:31 AM \t MP_MIXERFREEZER1 \t 9/1/2000 11:11:44 AM \crlf ... 3.0 \t CLS_STRAWBERRY_ICEMILK.BPC \t CLS_STRAWBERRY_ ICEMILK \t Strawberry Ice Milk - Reduced Fat Ice Cream - class based \t Strawberry Ice Milk \t SIM-101 \t 1.0 \t 9/1/2000 11:11:50 AM \t Mark Shepard \t MSS \t PROCEDURE \t Class \t \t 3000 \t 5000 \t 7000 \t KG \t 45 \t TRUE \t \\STATION5\PROGRAM FILES\ROCKWELL SOFTWARE\BATCH\SAMPLEAPP\RECIPES\ICE_CREAM4.CFG \t 9/1/2000 11:04:31 AM \t \t 9/1/2000 11:11:44 AM \crlf When using the DDE protocol, the RecipeList item returns a SUCCESS/FAIL response only. When using the COM interface, the RecipeList item returns the actual Recipe List data.

235

FactoryTalk Batch Server API Technical Reference

R ELEASE
Function The RELEASE execute releases a resource from the operator. Execute Format A batch server supports an execute with the following format: [RELEASE(Item,UserID,OwnerID,ResourceID)] where: Item UserID OwnerID ResourceID The Item name as specified by the client. User identification associated with this event. The ID of the operator configured in the Batchsvr.ini. The Equipment ID of the resource to be released. This value is configured in the FactoryTalk Batch Equipment Editor.

Action A successful RELEASE execute will remove the resource from either the requesters or owners list. (The owner is notified of the action and may elect to re-acquire the resource.) Return Format The item is populated with the following data: SUCCESS: | FAIL:<message> | FAILED where: Field <message> Format ASCII - String Description An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: [RELEASE(Item,Station5/Operator,0,68)]

236

3 Execute Reference

R EMOVE
Function The REMOVE execute removes a batch from the batch list. Execute Format A batch server supports an execute with the following format: [REMOVE(Item,UserID,CreateID)] where: Item UserID CreateID The response item name as specified by the client. User Identification to be entered into the event journal associated with this event. The unique identification number for a batch.

Action A successful REMOVE execute results in the removal of the specified batch from the batch list, or in the queuing of the removal pending a signature. In order to be successfully removed, a batch cannot be in Manual mode and must be in one of the following states: READY COMPLETE STOPPED ABORTED Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> <message> Format ASCII Integer ASCII - String Description The ActionID associated with the signature(s) generated in response to the execute. An error message, formatted appropriately for operator display.

Example An execute string could be formatted as follows: [REMOVE(Item,Station5/Operator,235)] This could return: SUCCESS:997

S ET A L L L ABEL
Function The SETALLLABEL execute sets the same label on all material steps within a recipe. The label helps identify specific material sublots for use. In material addition phases the label is used help identify specific material sublots for use. In material distribution phases, the label is applied to the material sublot distributed. The SETALLLABEL execute applies only to material-enabled phases. Execute Format A batch server supports an execute with the following format: [SETALLLABEL(Item,UserID,ProcedureID,LabelString)] where: Item UserID The Item name as specified by the client. User Identification entered into the event journal associated with this event.

237

FactoryTalk Batch Server API Technical Reference

ProcedureID

The unique hierarchical path name to the procedure, unit procedure, operation or phase: Procedure: CreateID Unit Procedure: CreateID \t UnitProcIDName Operation: CreateID \t UnitProcIDName \t OperIDName Phase: CreateID \t UnitProcIDName \t OperIDName \t PhaseIDName

LabelString where: <FullPath> <Path> where: Field <CreateID> <StepIdentifier> Format ASCII - Integer ASCII String

The label to be stored on the phase. is is <CreateID> | <CreateID> /t <Path> <StepIdentifier> | <StepIdentifier> /t <Path>

Description The unique batch ID assigned by the FactoryTalk Batch Server. Step Identifier (e.g. Mix:1)

Action A successful SETALLLABEL execute either changes the label values in the specified step(s), or queue the change(s) and return an action ID from which the signature requests generated can be detected. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential parameter value change. The parameter value will not actually change unless all signatures are successfully signed. An error message, formatted appropriately for operator display.

<message>

ASCII - String

Example An execute string could be formatted as follows: [SETALLLABEL(Item,Station5\Operator,887 \t PREMIX_B, CUSTOMJOB2)]

238

3 Execute Reference

S ET A L L L OT
Function The SETALLLOT execute sets the same Lot Name on all material phase steps within a recipe. In material addition phases, the Lot Name is used to help identify specific material sublots for use. In material distribution phases, the Lot Name is applied to the material lot distributed. The SETALLLOT execute applies only to material-enabled phases. The execute will result in no changes with non-material phases. Execute Format A batch server supports an execute with the following format: [SETALLLOT(Item,UserID,ProcedureID,LotString)] where: Item UserID ProcedureID The Item name as specified by the client. User Identification entered into the event journal associated with this event. The unique hierarchical path name to the procedure, unit procedure, operation or phase: Procedure: CreateID Unit Procedure: CreateID \t UnitProcIDName Operation: CreateID \t UnitProcIDName \t OperIDName Phase: CreateID \t UnitProcIDName \t OperIDName \t PhaseIDName LotString where: <FullPath> <Path> where: Field <CreateID> <StepIdentifier> Format ASCII - Integer ASCII String Description The unique batch ID assigned by the Batch Server Step Identifier (e.g. Mix:1) is is <CreateID> | <CreateID> /t <Path> <StepIdentifier> | <StepIdentifier> /t <Path> The Lot Name to be assigned.

Action A successful SETALLLOT execute changes the lot name values in the specified step(s). Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential parameter value change. The parameter value will not actually change unless all signatures are successfully signed. An error message, formatted appropriately for operator display.

<message>

ASCII - String

239

FactoryTalk Batch Server API Technical Reference

Example An execute string could be formatted as follows: SETALLLOT(Item,Station2/View, 99, 53) This could return: SUCCESS:997

S ET P ARM
Function The SETPARM execute sets the parameter value(s) of a control recipe step. The SETPARM execute will not change the MATERIAL formula parameter or the MATERIAL_CLASS formula parameter on all material phases. The MATERIAL formula parameter determines how a phase is bound and material availability for binding; because of this the value must not change during recipe execution. If storing the parameter results in deviation limits being violated that require signature confirmations, then an action ID returns identifying the signatures generated as a result of the SETPARM execute. Execute Format A batch server supports an execute with the following format: [SETPARM(Item,UserID,ProcedureID,ParamName,Value)] where: Item UserID ProcedureID The Item name as specified by the client. User identification entered into the event journal associated with this event. The unique hierarchical path name to the procedure, unit procedure, operation or phase: Procedure: CreateID Unit Procedure: CreateID \t UnitProcIDName Operation: CreateID \t UnitProcIDName \t OperIDName Phase: CreateID \t UnitProcIDName \t OperIDName \t PhaseIDName ParamName Value where: <FullPath> <Path> where: Field <CreateID> <StepIdentifier> Format ASCII - Integer ASCII String Description The unique batch ID assigned by the FactoryTalk Batch Server Step Identifier (for example, Mix:1) is is <CreateID> | <CreateID> /t <Path> <StepIdentifier> | <StepIdentifier> /t <Path> The parameter name requiring a value assignment. The value to be loaded in the steps parameter.

Action A successful SETPARM execute either changes the parameter value in the specified step or queue the value change and return an action ID. As a result of deviations triggered by the potential SETPARM, the signature requests generated can be detected.

240

3 Execute Reference

Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> | FAILED where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential parameter value change. The parameter value will not actually change unless all signatures are successfully signed. An error message, formatted appropriately for operator display.

<message>

ASCII - String

Example An execute string could be formatted as follows: SETPARM(Item, Station2/View, 37/tMakeStuff1:1/tFill1:1/tDose1:1, Amount, 3.14159) This could return: SUCCESS:997

S IG NO FF S I GN A T UR E
Function The SIGNOFFSIGNATURE execute allows a client to sign a signature request on an incomplete signature, excluding those generated by private interfaces. Execute Format A batch server supports an execute with the following format: [SIGNOFFSIGNATURE(Item, UserID, SignatureID, SignoffNumber, Domain, Comment, SignerID, Password)] where: Item UserID SignatureID SignoffNumber Comment The response item name as specified by the client. User Identification entered into the event journal associated with this event. The Unique ID of the signature for which the signoff is intended. The signoff number for which the signoff is intended (1 or 2). Comment string being passed with signoff. The localespecific list separator character should be escaped from the comment argument as follows:

The client application shall replace all instances of the / character with /FS. The client application shall then replace all instances of the list separator character with /LS. The tab character shall be considered illegal for the comment argument. If a tab character is detected in the comment string, the execute shall fail.

241

FactoryTalk Batch Server API Technical Reference

Domain SignerID Password

The Domain to be used when authenticating the SignerID parameter. The security-related User ID of the user attempting the signoff (not the full name). The security-related password of the User attempting the signoff.

Action A successful SIGNOFFSIGNATURE will fulfill a signoff on an incomplete signature. Return Format The response item is populated with the following data: SUCCESS: <ActionID>| FAIL:<message> Where action ID = integer value; the Action ID of the action that required the signature. (Only the final sign-off of a Signature will return and Action ID.) where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential parameter value change. The parameter value will not actually change unless all signatures are successfully signed. An error message, formatted appropriately for operator display.

<message>

ASCII - String

Example An execute string could be formatted as follows: SIGNOFFSIGNATURE(Item,Station2/View,993,1,Italy,What is this,LDVinci, helicopter) This could return: SUCCESS: or SUCCESS:Action ID

STEP
Function The STEP execute changes the active control step(s) within a control recipe. Execute Format A batch server supports an execute with the following format: [STEP(Item,UserID,ProcedureID,DeactivateList,STEP,ActivateList)] where: Item UserID ProcedureID The response item name as specified by the client. User Identification entered into the event journal associated with this event. The unique hierarchical path name to the procedure, unit procedure, or operation: <FullPath> Unit Procedure: CreateID Operation: CreateID \t UnitProcIDName Phase: CreateID \t UnitProcIDName \t OperationIDName

242

3 Execute Reference

<Deactivate List>

The step name list to be deactivated in the procedure: <DeactivateList> $INITSTEP and $TERMSTEP are recognized as the initial and terminal step names in a procedure and can deactivate the initial or terminal steps.

STEP <Activate List>

The literal STEP is passed separating the step list to be deactivated from the list to be activated. The list of step names to be activated in the procedure: <ActivateList> $INITSTEP and $TERMSTEP are recognized as the initial and terminal step names in a procedure and can activate the initial or terminal steps.

where: <FullPath> <Path> <Deactivate List> <ActivateList> <StepList> Field <CreateID> <StepIdentifier> Format ASCII Integer is is is is is <CreateID> | <CreateID> /t <Path> <StepIdentifier> | <StepIdentifier> /t <Path> <NullList | <StepList> <NullList> | <StepList> <StepIdentifier> | <StepIdentifier>, <StepList>

Description The unique batch ID assigned by the FactoryTalk Batch Server.

ASCII String Step Identifier (for example, Mix:1)

Action A successful STEP execute changes the active steps within a control recipe. Return Format The item is populated with the following data: SUCCESS: | SUCCESS:<ActionID> | FAIL:<message> where: Field <ActionID> Format ASCII Integer Description The action ID associated with signature(s) generated as a result of the potential parameter value change. The parameter value will not actually change unless all signatures are successfully signed.

<message>

ASCII - String An error message, formatted appropriately for operator display.

Examples An execute string could be formatted as follows: [STEP(Item,STATION5/Operator,9 \t FRENCH_VANILLAPREMIUM1_MEGA_PARLOR_OPT_1_O1:1,TEMP_CTL :2,RECIRC:1,STEP,MBR_DUMP:1)] or STEP(Item,Station2/View, 17\tMakePreMix:1\tChargeDryMats:1, DoseDust:1, STEP, DoseSand:1) This could return: SUCCESS:997

243

FactoryTalk Batch Server API Technical Reference

T AG _V E R I F Y
Function The TAG_VERIFY execute initiates or aborts the tag verification process. Execute Format A batch server supports an execute string with the TAG_VERIFY keyword. The execute string format is as follows: [TAG_VERIFY(Item,UserID,Cmd)] where: Item UserID Cmd The name of the item, as specified by the client. User identification associated with this event. The command to start or stop the tag verification. Valid choices are: START STOP Action A successful TAG_VERIFY START execute starts the tag verify operation, while a successful TAG_VERIFY STOP execute halts a tag verify operation that is in progress. Return Format The item is populated with the following data: SUCCESS: | FAIL:<message> | FAILED where: Field <message> Format ASCII - String Description An error message, formatted appropriately for operator display.

Example An execute string consisting of: [TAG_VERIFY(Verify,Operator,START)] could place the following data in the item Verify for the client: SUCCESS:

244

3 Execute Reference

U S E R _V E R I F Y
Function The USER_VERIFY execute determines if the password provided for the specified Windows user name is correct and if that user belongs to a specified Windows group. This execute verifies Windows users and groups only. Execute Format A batch server supports an execute string with USER_VERIFY as the keyword. The format of the execute string is as follows: [USER_VERIFY (Item,UserID,Password,Group)] where: Item UserID Password Group The Item name on which to place the execute. The ID of the Windows user being verified. Password to be checked for specified Windows user. Windows group name to check for user membership. Formatted as [authority \] principal, where authority is an optional computer or domain name, and principal is a Windows group name. The delimiting backslash should be omitted if the optional authority is not included.

Action A successful USER_VERIFY execute determines if the Windows user and password combination are valid and if the verified user belongs to the specified Windows group. Return Format SUCCESS | FAIL Example An execute string consisting of: USER_VERIFY (Item,Buck,Alligators,MasterRecipeViewer) could place the following data in Item for the client: SUCCESS

V ERIF ICATIO N I NFO


Function The VERIFICATIONINFO execute is no longer supported by the FactoryTalk Batch Server. Execution of VERIFICATIONINFO will return the following server response: FAIL: Bad execute argument.

245

FactoryTalk Batch Server API Technical Reference

246

APPENDIX A

Object Reference
This section describes the properties and methods associated with the BatchServer and BatchRemote objects, including syntax and example Visual Basic code.

G ET I T E M M E TH O D
Applies To: BatchServer object, BatchRemote object Description Retrieves data associated with a specified item within the FactoryTalk Batch Server application. Syntax strReturn = object.GetItem itemName

The GetItem method syntax has these parts:


Part object strExecute Description An object expression that evaluates to a BatchServer or BatchRemote object. Required. String representing an item supported by the FactoryTalk Batch Server application. (Refer to Available Items for a list of Items.) The data associated with the specified item. (For the format of this data, refer to .)

strReturn

Remarks The data for the item returns synchronously with this method. The FactoryTalk Batch Server waits, at most, a time period equal to the TimeoutPeriod property. If you pass an item string that the server does not recognize, then strReturn will contain FAILED. If the timeout period expires before the data is collected internally to the FactoryTalk Batch Server, then strReturn will contain TIMEOUT. See Also TimeoutPeriod property. Example
This code example is Visual Basic 6 syntax Dimension a Batch Server object and two strings Dim svr As New BatchControl.BatchServer Dim strItem As String Dim strReturn As string Set the item name to get the time item strItem = TIME Get the time from the server and display strReturn = svr.GetItem(strItem) MsgBox strReturn 247

FactoryTalk Batch Server API Technical Reference

E XECUTE M E T H O D
Applies to: BatchServer object, BatchRemote object Description Sends an execute command to the FactoryTalk Batch Server and retrieves a response string. Syntax strReturn = object.Execute strExecute The Execute method syntax has these parts: Part object strExecute Description An object expression that evaluates to a BatchServer or BatchRemote object. Required. String representing an execute supported by the FactoryTalk Batch Server application. (Refer to Available Executes for a list of executes, and Execute Reference for the executes syntax.) The data associated with the specified item. (For the format of this data, refer to the appropriate execute in Item Reference.)

strReturn

Remarks The data for the execute returns synchronously with this method. The FactoryTalk Batch Server waits, at most, a time period equal to the TimeoutPeriod property. If you pass an execute string that the server does not recognize, then strReturn contains FAILED. If the timeout period expires, then strReturn contains TIMEOUT. See Also TimeoutPeriod property. Example
This code example is Visual Basic 6 syntax 'Dimension a Batch Server object and two strings Dim svr As New BatchControl.BatchServer Dim strExecute As String Dim strReturn As String svr.TimeoutPeriod = 10000 'Format an Execute string. 'This example asks the Batch Server to acquire resource 'ID number 1 strExecute = ACQUIRE(response,user,0,1) 'Send the execute and print the response strReturn = svr.Execute(strExecute) MsgBox strReturn 'Message Box should display SUCCESS:

248

A Object Reference

C AL L T IMEO UT P R O PER T Y
Applies To: BatchRemote object Description Returns or sets a value indicating the number of milliseconds the object waits for the server to return requested data before assuming that communication with the server has been lost. Syntax object.CallTimeout [= value] The CallTimeout property syntax has these parts: Part object value Description An object expression that evaluates to a previously defined BatchRemote.RemoteSupport object. A numeric expression indicating the number of milliseconds the object waits for the server to return requested data before assuming that communication with the server has been lost. The default is 1000.

Remarks The data for the execute returns synchronously with this method. The FactoryTalk Batch Server waits, at most, a time period equal to the TimeoutPeriod property. If you pass an execute string that the server does not recognize, then strReturn contains FAILED. If the timeout period expires, then strReturn contains TIMEOUT. Example
'This code example is Visual Basic 6 syntax 'Dimension a Remote Batch Server object Dim svr As New BatchRemote.RemoteSupport 'Set the CallTimeout period svr.CallTimeout = 5000

249

FactoryTalk Batch Server API Technical Reference

C O NN E C T T IM EOUT P R O P E R TY
Applies To: BatchRemote object Description Returns or sets the number of milliseconds the control waits for the FactoryTalk Batch Server to acknowledge a connection before assuming that communication with the Server cannot be established. Syntax object.ConnectTimeout [= value] The ConnectTimeout property syntax has these parts: Part object value Description An object expression that evaluates to a previously defined BatchRemote.RemoteSupport object. A numeric expression specifying the length of time, in milliseconds, that the control waits for the FactoryTalk Batch Server to acknowledge a connection before assuming that communication with the Server cannot be established. The default is 5000.

Remarks Setting this property to a value less than one will cause an error.

Example

'This code example is Visual Basic 6 syntax 'Dimension a Remote Batch Server object Dim svr As New BatchRemote.RemoteSupport 'Set the ConnectTimeout period svr.ConnectTimeout = 4000

250

A Object Reference

N O DE P R O P E R T Y
Applies To: BatchRemote object Description Returns or sets the machine name or IP address of the specific computer running the FactoryTalk Batch Server application instance with which the control communicates. The default value is empty (a zero-length string). Syntax object.Node [= text] The Node property syntax has these parts: Part object text Description An object expression that evaluates to a previously defined BatchRemote.RemoteSupport object. A string expression specifying the IP address or specific computer name.
'This code example is Visual Basic 6 syntax 'Dimension a Remote Batch Server object Dim svr As New BatchRemote.RemoteSupport 'Set the Node name svr.Node = STATION_1

Example

251

FactoryTalk Batch Server API Technical Reference

T I M E OU T P ERIOD P RO P ERT Y
Applies To: BatchServer object, BatchRemote object Description Returns or sets the maximum time period that the FactoryTalk Batch Server client application should allow for responding to a data request. Syntax object.TimeoutPeriod [= value] The TimeoutPeriod property syntax has these parts: Part object value Description An object expression that evaluates to a BatchServer or BatchRemote object. An integer specifying the maximum time period that the FactoryTalk Batch Server should attempt to service a data request before giving up. The default is 5000.

Remarks The value is in milliseconds.

Example

'This code example is Visual Basic 6 syntax 'Dimension a Batch Server object Dim svr As New BatchControl.BatchServer 'Set the timeout period svr.TimeoutPeriod = 1000

Using the Command Prompt


You can use the FactoryTalk Batch Server methods at the command prompt. You may find this useful for trouble-shooting purposes.
If the Item or Execute command line contains any white space, such as tabs or spaces, be sure to enclose the command line in double-quotes. Otherwise, the Item or Execute can be issued as shown in this document.

When you use the command prompt, change to the Batch/bin directory and format the Item or Execute commands similar to the following examples: Execute Syntax: Execute ["]FormattedServerAPIExecuteString["] [options] Options: -a or /a enables the ASCII dump of data >filename places the data into a file

252

A Object Reference

Example:

GetItem Syntax: GetItem ["]ServerAPIItem["] [options] Options: -a or /a enables the ASCII dump of data and -t or /t removes any embedded time fields >filename places the data into a file Example:

253

FactoryTalk Batch Server API Technical Reference

254

APPENDIX B

Command and Arbitration Masks


Command and arbitration masks are used as flags to represent available FactoryTalk Batch commands. Commands that cause recipes or phases to change states are included in the Command Masks table. Commands that affect ownership of resources are included in the Arbitration Masks table.

Command Masks
The following table includes the individual commands used within the Command Masks table and their numeric values. The mask value in the Command Masks table is the sum of each of the commands decimal values. For example:
Command RESTART STOP ABORT COMMAND MASK Decimal 256 4 1 261

255

FactoryTalk Batch Server API Technical Reference

Command Values
COMMAND ABORT HOLD STOP RESET PAUSE SEMIAUTO DOWNLOAD RESUME RESTART START AUTO MANUAL STEP CLEARFAIL REMOVE BIND DISCONNECT CONNECT BINDPHASE TIMER-RESET TIMER-COMPLETE DECIMAL 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 BINARY 0000 0000 0000 0000 0001 0000 0000 0000 0000 0010 0000 0000 0000 0000 0100 0000 0000 0000 0000 1000 0000 0000 0000 0001 0000 0000 0000 0000 0010 0000 0000 0000 0000 0100 0000 0000 0000 0000 1000 0000 0000 0000 0001 0000 0000 0000 0000 0010 0000 0000 0000 0000 0100 0000 0000 0000 0000 1000 0000 0000 0000 0001 0000 0000 0000 0000 0010 0000 0000 0000 0000 0100 0000 0000 0000 0000 1000 0000 0000 0000 0001 0000 0000 0000 0000 0010 0000 0000 0000 0000 0100 0000 0000 0000 0000 1000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 HEX 00001 00002 00004 00008 00010 00020 00040 00080 00100 00200 00400 00800 01000 02000 04000 08000 10000 20000 40000 80000 100000

MASK 0 1 5 7 32 261 512 520 560 672

COMMANDS No Commands Enabled ABORT STOP ABORT STOP HOLD ABORT SEMIAUTO RESTART STOP ABORT START START RESET START SEMIAUTO PAUSE START RESUME SEMIAUTO

256

MASK 1024 1056 1536 1664 2080 2081 2085 2087 2341 3072 3073 3077 3079 3207 3333 4096 5152 8192 10272 10273 10277 10279 11264 11265 11269 11271 16392 16928 18472 18976 19464 19968 24608 26656 26664 27648 27656

COMMANDS AUTO AUTO SEMIAUTO AUTO START AUTO START RESUME MANUAL SEMIAUTO MANUAL SEMIAUTO ABORT MANUAL SEMIAUTO STOP ABORT MANUAL SEMIAUTO STOP HOLD ABORT MANUAL RESTART SEMIAUTO STOP ABORT MANUAL AUTO MANUAL AUTO ABORT MANUAL AUTO STOP ABORT MANUAL AUTO STOP HOLD ABORT MANUAL AUTO RESUME STOP HOLD ABORT MANUAL AUTO RESTART STOP ABORT ASC ASC AUTO SEMIAUTO CLEAR FAIL CLEAR FAIL MANUAL SEMIAUTO CLEAR FAIL MANUAL SEMIAUTO ABORT CLEAR FAIL MANUAL SEMIAUTO STOP ABORT CLEAR FAIL MANUAL SEMIAUTO STOP HOLD ABORT CLEAR FAIL MANUAL AUTO CLEAR FAIL MANUAL AUTO ABORT CLEAR FAIL MANUAL AUTO STOP ABORT CLEAR FAIL MANUAL AUTO STOP HOLD ABORT REMOVE RESET REMOVE START SEMIAUTO REMOVE MANUAL SEMIAUTO RESET REMOVE MANUAL START SEMIAUTO REMOVE MANUAL AUTO RESET REMOVE MANUAL AUTO START REMOVE CLEARFAIL SEMIAUTO REMOVE CLEARFAIL MANUAL SEMIAUTO REMOVE CLEARFAIL MANUAL SEMIAUTO RESET REMOVE CLEARFAIL MANUAL AUTO REMOVE CLEARFAIL MANUAL AUTO RESET

257

FactoryTalk Batch Server API Technical Reference

MASK 32768 32769 32773 32775 32800 33029 33280 33288 33328 33440 33792 33824 34304 34432 34848 34849 34853 34855 35109 35840 35841 35845 35847 35975 36101 36864 37920 40960 43040 43041 43045 43047 44032 44033 44037 44039 49160 49696

COMMANDS BIND BIND ABORT BIND STOP ABORT BIND STOP HOLD ABORT BIND SEMIAUTO BIND RESTART STOP ABORT BIND START BIND START RESET BIND START SEMIAUTO PAUSE BIND START RESUME SEMIAUTO BIND AUTO BIND AUTO SEMIAUTO BIND AUTO START BIND AUTO START RESUME BIND MANUAL SEMIAUTO BIND MANUAL SEMIAUTO ABORT BIND MANUAL SEMIAUTO STOP ABORT BIND MANUAL SEMIAUTO STOP HOLD ABORT BIND MANUAL RESTART SEMIAUTO STOP ABORT BIND MANUAL AUTO BIND MANUAL AUTO ABORT BIND MANUAL AUTO STOP ABORT BIND MANUAL AUTO STOP HOLD ABORT BIND MANUAL AUTO RESUME STOP HOLD ABORT BIND MANUAL AUTO RESTART STOP ABORT BIND ASC BIND ASC AUTO SEMIAUTO BIND CLEARFAIL BIND CLEARFAIL MANUAL SEMIAUTO BIND CLEARFAIL MANUAL SEMIAUTO ABORT BIND CLEARFAIL MANUAL SEMIAUTO STOP ABORT BIND CLEARFAIL MANUAL SEMIAUTO STOP HOLD ABORT BIND CLEARFAIL MANUAL AUTO BIND CLEARFAIL MANUAL AUTO ABORT BIND CLEARFAIL MANUAL AUTO STOP ABORT BIND CLEARFAIL MANUAL AUTO STOP HOLD ABORT BIND REMOVE RESET BIND REMOVE START SEMIAUTO

258

MASK 51240 51744 52232 52736 57376 59424 59432 60416 60424 65536 65568 65569 65573 65575 65584 65585 65589 65591 65696 65697 65701 65703 65829 65845 65957 66104 66216 66560 66561 66565 66567 66688 66689 66693 66695 66821 66949 67072

COMMANDS BIND REMOVE MANUAL SEMIAUTO RESET BIND REMOVE MANUAL START SEMIAUTO BIND REMOVE MANUAL AUTO RESET BIND REMOVE MANUAL AUTO START BIND REMOVE CLEARFAIL SEMIAUTO BIND REMOVE CLEARFAIL MANUAL SEMIAUTO BIND REMOVE CLEARFAIL MANUAL SEMIAUTO RESET BIND REMOVE CLEARFAIL MANUAL AUTO BIND REMOVE CLEARFAIL MANUAL AUTO RESET DISCONNECT DISCONNECT SEMIAUTO DISCONNECT SEMIAUTO ABORT DISCONNECT SEMIAUTO STOP ABORT DISCONNECT SEMIAUTO STOP HOLD ABORT DISCONNECT SEMIAUTO PAUSE DISCONNECT SEMIAUTO PAUSE ABORT DISCONNECT SEMIAUTO PAUSE STOP ABORT DISCONNECT SEMIAUTO PAUSE STOP HOLD ABORT DISCONNECT RESUME SEMIAUTO DISCONNECT RESUME SEMIAUTO ABORT DISCONNECT RESUME SEMIAUTO STOP ABORT DISCONNECT RESUME SEMIAUTO STOP HOLD ABORT DISCONNECT RESTART SEMIAUTO STOP ABORT DISCONNECT RESTART SEMIAUTO PAUSE STOP ABORT DISCONNECT RESTART RESUME SEMIAUTO STOP ABORT DISCONNECT START SEMIAUTO PAUSE RESET DISCONNECT START RESUME SEMIAUTO RESET DISCONNECT AUTO DISCONNECT AUTO ABORT DISCONNECT AUTO STOP ABORT DISCONNECT AUTO STOP HOLD ABORT DISCONNECT AUTO RESUME DISCONNECT AUTO RESUME ABORT DISCONNECT AUTO RESUME STOP ABORT DISCONNECT AUTO RESUME STOP HOLD ABORT DISCONNECT AUTO RESTART STOP ABORT DISCONNECT AUTO RESTART RESUME STOP ABORT DISCONNECT AUTO START

259

FactoryTalk Batch Server API Technical Reference

MASK 67080 67208 73728 73729 73733 73735 73736 73760 73761 73765 73767 74752 74753 74757 74759 74880 74881 74885 74887 81928 81960 82464 82952 83080 90120 90144 98304 98336 98337 98341 98343 98352 98353 98357 98359 98464 98465 98469

COMMANDS DISCONNECT AUTO START RESET DISCONNECT AUTO START RESUME RESET DISCONNECT CLEARFAIL DISCONNECT CLEARFAIL ABORT DISCONNECT CLEARFAIL STOP ABORT DISCONNECT CLEARFAIL STOP HOLD ABORT DISCONNECT CLEARFAIL RESET DISCONNECT CLEARFAIL SEMIAUTO DISCONNECT CLEARFAIL SEMIAUTO ABORT DISCONNECT CLEARFAIL SEMIAUTO STOP ABORT DISCONNECT CLEARFAIL SEMIAUTO STOP HOLD ABORT DISCONNECT CLEARFAIL AUTO DISCONNECT CLEARFAIL AUTO ABORT DISCONNECT CLEARFAIL AUTO STOP ABORT DISCONNECT CLEARFAIL AUTO STOP HOLD ABORT DISCONNECT CLEARFAIL AUTO RESUME DISCONNECT CLEARFAIL AUTO RESUME ABORT DISCONNECT CLEARFAIL AUTO RESUME STOP ABORT DISCONNECT CLEARFAIL AUTO RESUME STOP HOLD ABORT DISCONNECT REMOVE RESET DISCONNECT REMOVE SEMIAUTO RESET DISCONNECT REMOVE START SEMIAUTO DISCONNECT REMOVE AUTO RESET DISCONNECT REMOVE AUTO RESUME RESET DISCONNECT REMOVE CLEARFAIL RESET DISCONNECT REMOVE CLEARFAIL SEMIAUTO DISCONNECT BIND DISCONNECT BIND SEMIAUTO DISCONNECT BIND SEMIAUTO ABORT DISCONNECT BIND SEMIAUTO STOP ABORT DISCONNECT BIND SEMIAUTO STOP HOLD ABORT DISCONNECT BIND SEMIAUTO PAUSE DISCONNECT BIND SEMIAUTO PAUSE ABORT DISCONNECT BIND SEMIAUTO PAUSE STOP ABORT DISCONNECT BIND SEMIAUTO PAUSE STOP HOLD ABORT DISCONNECT BIND RESUME SEMIAUTO DISCONNECT BIND RESUME SEMIAUTO ABORT DISCONNECT BIND RESUME SEMIAUTO STOP ABORT

260

MASK 98471 98597 98613 98725 98872 98984 99328 99329 99333 99335 99456 99457 99461 99463 99589 99717 99840 99848 99976

COMMANDS DISCONNECT BIND RESUME SEMIAUTO STOP HOLD ABORT DISCONNECT BIND RESTART SEMIAUTO STOP ABORT DISCONNECT BIND RESTART SEMIAUTO PAUSE STOP ABORT DISCONNECT BIND RESTART RESUME SEMIAUTO STOP ABORT DISCONNECT BIND START SEMIAUTO PAUSE RESET DISCONNECT BIND START RESUME SEMIAUTO RESET DISCONNECT BIND AUTO DISCONNECT BIND AUTO ABORT DISCONNECT BIND AUTO STOP ABORT DISCONNECT BIND AUTO STOP HOLD ABORT DISCONNECT BIND AUTO RESUME DISCONNECT BIND AUTO RESUME ABORT DISCONNECT BIND AUTO RESUME STOP ABORT DISCONNECT BIND AUTO RESUME STOP HOLD ABORT DISCONNECT BIND AUTO RESTART STOP ABORT DISCONNECT BIND AUTO RESTART RESUME STOP ABORT DISCONNECT BIND AUTO START DISCONNECT BIND AUTO START RESET DISCONNECT BIND AUTO START RESUME RESET

106496 DISCONNECT BIND CLEARFAIL 106497 DISCONNECT BIND CLEARFAIL ABORT 106501 DISCONNECT BIND CLEARFAIL STOP ABORT 106503 DISCONNECT BIND CLEARFAIL STOP HOLD ABORT 106504 DISCONNECT BIND CLEARFAIL RESET 106528 DISCONNECT BIND CLEARFAIL SEMIAUTO 106529 DISCONNECT BIND CLEARFAIL SEMIAUTO ABORT 106533 DISCONNECT BIND CLEARFAIL SEMIAUTO STOP ABORT 106535 DISCONNECT BIND CLEARFAIL SEMIAUTO STOP HOLD ABORT 107520 DISCONNECT BIND CLEARFAIL AUTO 107521 DISCONNECT BIND CLEARFAIL AUTO ABORT 107525 DISCONNECT BIND CLEARFAIL AUTO STOP ABORT 107527 DISCONNECT BIND CLEARFAIL AUTO STOP HOLD ABORT 107648 DISCONNECT BIND CLEARFAIL AUTO RESUME 107649 DISCONNECT BIND CLEARFAIL AUTO RESUME ABORT 107653 DISCONNECT BIND CLEARFAIL AUTO RESUME STOP ABORT 107655 DISCONNECT BIND CLEARFAIL AUTO RESUME STOP HOLD ABORT 114696 DISCONNECT BIND REMOVE RESET 114728 DISCONNECT BIND REMOVE SEMIAUTO RESET

261

FactoryTalk Batch Server API Technical Reference

MASK

COMMANDS

115232 DISCONNECT BIND REMOVE START SEMIAUTO 115720 DISCONNECT BIND REMOVE AUTO RESET 115848 DISCONNECT BIND REMOVE AUTO RESUME RESET 122888 DISCONNECT BIND REMOVE CLEARFAIL RESET 122912 DISCONNECT BIND REMOVE CLEARFAIL SEMIAUTO

Arbitration Masks
MASK VALUE 0 1 2 4 5 6 VALID COMMANDS No Commands Enabled ACQUIRE RELEASE REORDER ACQUIRE, REORDER RELEASE, REORDER

262

APPENDIX C

Valid States and Modes


VALID STATES READY, IDLE, RUNNING, RESTARTING, HOLDING, HELD, STOPPING, STOPPED, ABORTING, ABORTED, and COMPLETE. VALID MODES O_AUTO P_AUTO The batch is sequencing normally. The operator can send commands to a recipe level that is in the O_AUTO mode. O_AUTO is a valid mode for all recipe levels. The batch is sequencing normally. The operator cannot send commands to a recipe level that is in the P_AUTO mode. P_AUTO is a valid mode for all recipe levels. The batch is sequencing normally, but pauses at a True transition and waits for the RESUME command. The operator can only issue a RESUME command to a recipe level that is in the S_AUTO mode. S_AUTO is a valid mode for all recipe levels. The automatic sequencing of the batch is stopped, allowing the operator to issue an Active Step Change command or command a lower recipe level. The operator can only issue the Active Step Change command to a recipe level that is in the MANUAL mode. MANUAL is not a valid mode for the phase level.

S_AUTO

MANUAL

263

FactoryTalk Batch Server API Technical Reference

264

INTEGRATED PRODUCTION & PERFORMANCE SUITE

PCD Programmers Technical Reference Production Management

Batch

PCD PROGRAMMER'S TECHNICAL REFERENCE

CHAPTER 1

Introduction to PCD Programming


This document provides information and instructions about the FactoryTalk Batch-PCD interface design. It is intended to be used as a reference guide.

Document Organization
The following subjects are presented in this document:

PCD Phases and Interface State Transition Logic Defining Phase Tags and Commands Understanding Communication Protocols Communication with the FactoryTalk Batch Server Steps to Program Phases or Phase Logic Phase Logic Interface Sequential Function Charts

267

PCD Programmers Technical Reference

268

CHAPTER 2

Introduction to Batch and PCD Phase Logic


The information in this guide only applies to programming phase logic for OPC and FactoryTalk Live Data (FTD) equipment modules. For information on developing phase logic in PhaseManager equipment modules assigned to a Logix5000 CIP data server, see the FactoryTalk Batch PhaseManager Users Guide or the Logix5000 Controllers PhaseManager User Manual.

FactoryTalk Batch is an automated batch processing application that allows you to control your batch process by communicating with your process-connected devices (PCD). Communication is enabled when your PCD contains phases that meet a specific set of criteria. First, your phases must have a phase logic interface (PLI) that complies with a specific set of protocols. Second, the phase must contain project-specific logic that communicates with the FactoryTalk Batch Server via the PLI using a standard set of data items. This document provides you with an overview of the FactoryTalk Batch-PCD interface and the specific information that you can use to develop your own interface.

Batch Manufacturing System


A typical Batch system would include the FactoryTalk Batch software, HMI software, a phase logic program, basic control for plant hardware, and an interface program that

269

PCD Programmers Technical Reference

allows the FactoryTalk Batch software to interface with the phase logic. The figure below depicts the relationships between these system components:
Computer or Workstation

HMI

View

Batch Server PCD Interface

Process-Connected Device (PCD)

System Software Schedules PLI, Phase Logic and Basic Control to Run Phase Logic Interface (PLI) Phase Logic Basic Control Equivalent to the S88.01 definition of a phase

FI

Sample Batch Manufacturing System

FactoryTalk Batch
FactoryTalk Batch is the most powerful solution available for batch automation. Developed around S88.01, the ISA international standard for batch control, FactoryTalk Batch uses modular batch automation to make jobs easier for all types of process professionals. FactoryTalk Batch is an open system that lets you choose the hardware, software and control system required to create a complete batch automation solution. The following describes the four main components of FactoryTalk Batch:

FactoryTalk Batch Equipment Editor The FactoryTalk Batch Equipment Editor is used to configure the area model and create a graphical representation of the process equipment. The components defined in the area model to interface with the process-connected devices in the facility. FactoryTalk Batch Recipe Editor The FactoryTalk Batch Recipe Editor is used to organize and configure recipes. You can graphically construct recipes using sequential function charts (SFCs). FactoryTalk Batch Server The FactoryTalk Batch Server is the core of the system, using a View/Server architecture. The Server allows for integration with process-connected devices and other software packages. FactoryTalk Batch View The FactoryTalk Batch View allows you to create batches from master recipes, execute the batches, and review batch-related information. It is designed to work in conjunction with a Human-Machine Interface (HMI) application.

270

2 Introduction to Batch and PCD Phase Logic

Phases
Phases are programmed with two components, the phase logic interface (PLI), and the phase logic. The figure below depicts the relationship between the FactoryTalk Batch Server, the PLI and the site-specific phase logic. The PLI should reside in the projectspecific controller and provide a standard interface to FactoryTalk Batch.

Phase Components

PLI The Phase Logic Interface (PLI) is a layer of software and a previously-defined data structure between the phase logic and FactoryTalk Batch. The PLI contains the state transition logic that directs the project-specific phase logic. The PLI may have multiple instances that communicate with multiple phases, or a single PLI subroutine may be reused for every phase. Multiple Instances This figure illustrates the use of a dedicated PLI structure for each custom phase.
Batch Server

Computer PLC or Process Controller

PLI

PLI

PLI

PLI

Add A

Add B

Heat Reactor A

Discharge Heat Reactor

Multiple Instances of PLI

271

PCD Programmers Technical Reference

Single Instance This figure illustrates a single PLI residing in the controller that can be used as a common subroutine for servicing all of the PCDs phases. In this configuration, the PLI subroutine is called once for each instance of a phase. This reduces the amount of code in the controller as well as commissioning time.
Batch Server

Computer

PLC or Process Controller

PLI

Add A

Add B

Heat Reactor A

Discharge Heat Reactor

Single Instance of PLI

A Batch PLI consists of two components:

Communications Interface The data structure necessary for moving commands and requests between the FactoryTalk Batch Server, the PLI and the phase logic. State Transition Logic Code that defines the sequence of states and transitions in the project-specific phase logic.

Phase Logic Phase logic is responsible for sending messages to Equipment Modules (EM) and Control Modules (CM) to perform a process-oriented action. Phase logic is the project-specific code that contains the control steps; for example, open a valve, start a pump, or stop a totalizer. The project-specific phase logic contains small modules of code that implement the operating sequences and a failure detection module for each phase. Modules of Code The following six modules of code must be programmed:

RUNNING ABORTING RESTARTING

STOPPING HOLDING FAILURE DETECTING

272

2 Introduction to Batch and PCD Phase Logic

Execution of the code modules is controlled by tags that are set by the state transition logic, a component of the PLI. When these modules of code terminate, they set a tag that indicates completion. This tag is read by the state transition logic in the PLI, allowing it to transition to the next state. The figure below illustrates the relationship between the project-specific phase logic, the Batch PLI and Basic Control. The project-specific phase logic resides in the processconnected device (PCD).
Batch Phase Logic Interface Product-Specific Logic

ProcessConnected Device

Phase Logic

Project-Specific Logic

Basic Control

Project-Specific Basic Control

Relationship between Phase Logic, PLI and Basic Control

Basic Control
Basic Control consists of software modules that provide control of the equipment in the facility. This includes EMs, CMs, and interlocking logic. For example, a pump CM would control the starting, stopping, interlocking, and alarming for a pump device.

HMI
The Human-Machine Interface (HMI) is the process control software that allows the user to view the graphical representation of all the automated devices in the selected plant. The HMI displays each configured piece of equipment and enables the interaction with the plant environment. The HMI also offers the user the ability to manually control the devices displayed on the screens.

273

PCD Programmers Technical Reference

274

CHAPTER 3

The FactoryTalk Batch PCD Interface


Communication between FactoryTalk Batch and the process-connected device is accomplished using a set of protocols that are built into the FactoryTalk Batch Server. The protocols were developed around a general set of rules that enable the server to communicate with virtually any process-connected device. The design ensures extremely reliable communication and substantially reduces the effort required for phase logic programming. Generally, FactoryTalk Batch requires a phase logic interface (PLI) in the processconnected device (PCD) to enforce specific rules, such as the state transition diagram and the handshaking protocols. Phase logic handles project-specific requirements. This section defines the philosophy behind the FactoryTalk Batch-PCD interface design, including the primary functions of the PLI and the phase logic.

Design Philosophy
The FactoryTalk Batch-PCD interface design was kept simple, allowing for the reading and writing of integer values to and from tags. It allows for two-way communication between FactoryTalk Batch and the PCD. FactoryTalk Batch can give commands to phase logic and phase logic can make requests from FactoryTalk Batch. A robust handshaking protocol between the FactoryTalk Batch Server and the phase is built into the interface to ensure the reliability of this two-way communication. In general, phase logic has control over application-specific events. FactoryTalk Batch starts the phase logic, but after that the phase logic takes control over all other events. The phase logic accomplishes this by performing application-specific actions, such as requesting the Server to upload reports and download parameters. There is a limit of 998 parameters and 998 reports that may be used by a phase. The FactoryTalk Batch Server has a relatively sophisticated set of services it can provide to the phase. These services allow phase programmers to write encapsulated code. This dramatically simplifies the programming effort required for phase logic development. Furthermore, it allows separate phases to be resident in separate PCDs, even those that cannot facilitate peer-to-peer communication. Finally, the interface generally expects a PLI to be used as the means of communication between the Server and the phase logic. The PLI may reside in the PCD or on a personal computer (for example, PC-based phases). The PLI is expected to enforce the state transition diagram and the handshaking protocols.

275

PCD Programmers Technical Reference

FactoryTalk Batch Requirements of the Phase (PLI and Phase Logic)


FactoryTalk Batch requires phases to conform to specific criteria. The following is an overview of these requirements:

Phases must follow the state transition diagram (STD). Phases must have a set of tags. Phases must follow the FactoryTalk Batch-PCD interface protocols. Phases must use the request protocol to access the services provided by FactoryTalk Batch.

Function of the PLI


Generally, a PLI is expected to be used as the interface between FactoryTalk Batch and the phase logic. The PLI functions as a standard part of the phase logic, handling the FactoryTalk Batch protocol concerns and making it possible for the project programmer to focus more on the project-specific requirements of his or her code. The PLI should be written to include the following functions:

Expose a set of Application Program Interface (API) tags that the FactoryTalk Batch Server can write to and read from. Implement and enforce the state transition diagram. Handle ownership issues between FactoryTalk Batch and an external device. Execute communications verification and timeout logic. Handle the failure protocol. Handle the watchdog protocol.

Function of the Phase Logic


Phase logic, which is designed to interact with FactoryTalk Batch, must meet specific requirements. The phase logic should be written implementing a user-defined sequence set for direct control of process equipment to accomplish some process-oriented task (for example: add, mix, heat). These sequences will perform normal logic as well as abnormal and shut-down logic. Finally, the phase logic should include logic that allows for failure detection and reporting of the step sequence.

276

CHAPTER 4

State Transition Logic


The state transition logic is the logic within the PLI that provides a standard interface to the project-specific phase logic. The state transition logic receives commands from the FactoryTalk Batch Server or the operator and initiates the appropriate components of the project-specific phase logic.

State Transition Diagram


The state transition diagram depicts the active and quiescent states that are supported by the PLI and the legal transitions between states. The PLI and phase logic must adhere to the rules of the state transition logic. Only valid state transitions, as displayed in the following diagram, may be used. The addresses applied to the PLI will vary site-to-site, but the logical constructs should conform to the state transition logic.

EXECUTING

LOGIC

RUNNING Semi_Auto

Semi_Auto

Done

RESTARTING

IDLE

Start SEMI_AUTO Programmed Break PAUSED PAUSING Hold Fail HOLDING Done

Restart HELD

Resume Stop STOPPING Abort ABORTING Done ABORTED

Done COMPLETE

Done STOPPED TERMINATED

REQUESTS
DORMANT

Request

REQUEST PENDING

Abort

ABORT PENDING Request not Aborted

Reset

RESET PENDING

State Transition Diagram

Phase logic is expected to exhibit state behavior as shown in the state transition diagram above. State Transitions There are three kinds of events that can cause transitions between states in the phase logic state transition diagram. These three event types are:

277

PCD Programmers Technical Reference

Event Batch Commands

Description The first type of state transition is referred to as a commanded state transition. As shown by the state transition diagram, the phase logic is expected to respond to legal Batch commands according to its current state. For example, when the phase logic is in the IDLE state, a START command should cause the phase logic to transition to the RUNNING state. If, however, the phase logic receives a STOP command while it is in the IDLE state, this is an invalid command and will be ignored. The state transition diagram clearly shows what commands are legal in each state. The first type of uncommanded state change is the completion of one of the ING (RUNNING, HOLDING, STOPPING, ABORTING, or RESTARTING) states. Each of these ING states is expected to transition to another state when its sequencing has completed. These end states are often referred to as the ED (STOPPED, ABORTED, HELD, COMPLETED) states, although the transition from RESTARTING to RUNNING is an exception.

Sequencing Complete

Failure Response The second type of uncommanded state change is a failure response. In the RUNNING and RESTARTING states, the phase logic is commanded to behave as if a HOLD command was issued when a failure is detected.

Phase States
There are ten states recognized by the FactoryTalk Batch Server; they are categorized into active states and quiescent states. Active States
RUNNING

This is the normal active state of the phase. The phase logic is processing its normal execution path. For example, with a material charge phase, the phase logic might be sequencing valves and pumps, and monitoring flow meters or load cells.
Legal Commands HOLD STOP ABORT Transition to HOLDING Transition to STOPPING Transition to ABORTING Transition to COMPLETE Transition to HOLDING

Sequencing Complete Failure Response

HOLDING

The phase logic is performing the necessary logic to transition phase devices to a safe state from which batch execution may later be resumed. The actual sequencing necessary may vary depending on the phases device and logic state when the transition to the HOLDING state occurred.
Legal Commands Sequencing Complete Failure Response STOP ABORT Transition to STOPPING Transition to ABORTING Transition to HELD None

278

4 State Transition Logic

RESTARTING

The phase logic is performing the necessary logic to transition from a HELD state back to the normal execution path. The actual sequencing necessary may vary depending on how far the phase logic processing has progressed prior to the transition of the phase logic to the HELD state.
Legal Commands HOLD STOP ABORT Transition to HOLDING Transition to STOPPING Transition to ABORTING Transition to RUNNING Transition to HOLDING

Sequencing Complete Failure Response

STOPPING

The phase logic is performing the necessary logic for a controlled transition from the current state to a safe state in which phase logic processing has completed. The actual sequencing necessary to execute the controlled normal transition to the STOPPED state may vary depending on the state of the phases devices and logic when the transition to the STOPPING state occurred.
Legal Commands Sequencing Complete Failure Response ABORT Transition to ABORTING Transition to STOPPED None

ABORTING

The phase logic is performing the necessary logic for an abnormal transition from the current state to a safe state in which phase logic processing has completed. The actual sequencing necessary for executing the controlled normal transition to the ABORTED state may vary depending on the state of the phases devices and logic when the transition to the ABORTING state occurred. The ABORTING logic is generally expected to perform, as rapidly as possible, a transition to the ABORTED state, differing from the STOPPING logic, which may be expected to perform a more orderly shutdown.
Legal Commands Sequencing Complete Failure Response None Transition to ABORTED None

Quiescent States
IDLE

The phase logic is dormant and inactive. IDLE is considered a safe state. IDLE is expected to be the default initial state of a phase.
Legal Commands Sequencing Complete Failure Response START Transition to RUNNING (if no failure present) N/A None

279

PCD Programmers Technical Reference

COMPLETE

This is the normal terminal state of the phase. COMPLETE is considered to be a safe state. Phase logic processing has been completed and the phase is ready to be reset for its next execution.
Legal Commands Sequencing Complete Failure Response RESET Transition to IDLE N/A None

HELD

The phase logic has transitioned to a safe state in the middle of phase logic execution from which batch execution may later be resumed. Note that the definition of a safe state does not infer that nothing is happening. The definition of safe state may require that functions such as agitation, temperature control, etc., continue due to process requirements such as material in the tank, etc.
Legal Commands RESTART STOP ABORT Sequencing Complete Failure Response Transition to RESTARTING (if no failure present) Transition to STOPPING Transition to ABORTING N/A None

STOPPED

This is an abnormal terminal state of the phase. STOPPED is considered to be a safe state. Phase logic processing has been completed and the phase is ready to be reset for its next execution.
Legal Commands Sequencing Complete Failure Response RESET Transition to IDLE N/A None

ABORTED

This is an abnormal terminal state of the phase. ABORTED is considered to be a safe state. Phase logic processing has been completed and the phase is ready to be reset for its next execution.
Legal Commands Sequencing Complete Failure Response RESET Transition to IDLE N/A None

The FactoryTalk Batch Server or external control application sends commands and parameter values to the phase logic via the PLI. The communications interface portion of the PLI interprets the commands and verifies them against the state transition logic. It then forwards the appropriate information to the phase logic. In turn, the phase logic sends requests, status information, and phase report values to the Server or external control application via the PLI. The communications portion of the PLI again interprets the requests and verifies it against the state transition logic. It then forwards the information to the controlling application(s).

280

4 State Transition Logic

Communication Protocol States


FactoryTalk Batch sends commands and parameter values to the phase logic via the communications protocol. In turn, the phase logic sends requests, status information, and report values to the Recipe Phase via the communication protocol. A simple state machine controls the flow of information. These states are described in detail in the PLI Communications Protocols section.

281

PCD Programmers Technical Reference

282

CHAPTER 5

Introducing Tags and Commands


The programming behind a phase is typically referred to as the phase logic. The phase logic programming is generally project-specific and typically runs in some sort of process control hardware, such as a programmable logic controller (PLC) or distributed control system (DCS), although other types of phase logic, such as Visual Basic running on a PC, are possible. Phase tags allow for two-way communication between the FactoryTalk Batch Server and the phase. The Server, or an operator through an external application, can command a phase by writing a command value to the phase tags. The phase tags and commands are described on the following pages.

Phase Logic API Tags


When you define the phases that exist in the plant using the Factory Talk Batch Equipment Editor, you must also define the tags that are used to communicate with the equipment modules. This set of tags is the method by which the FactoryTalk Batch Server and the phase logic communicate.
Tag PHASE_OC PHASE_ST PHASE_RQ PHASEQ## PHASE_W PHASE_F PHASE_P PHASE_PD PHASE_SS PHASE_SI Description Command State Request Request Params Owner Failure Pause Paused Single Step Step Index Batch Usage Function

Write/Subscribe Send commands to phase logic Subscribe Subscribe Indicate current state of phase Make request to the FactoryTalk Batch Server

Write/Subscribe Additional parameters for defining a request Subscribe Subscribe Subscribe Subscribe Subscribe Subscribe Permissive for Batch control of phase Indicates failure detected by phase logic Indicates the phase is pausing Indicates the phase is paused Indicates the phase is in Semi-Auto mode Indicates current step index of phase logic

PHASE_UN Unit PHASEP## PHASER## Parameter Report

Write/Subscribe Indicates which Unit the phase is associated with Write/Subscribe Parameter values for phase logic control Subscribe Report value generated by phase logic control

283

PCD Programmers Technical Reference

Batch Commands
The following describes the commands that may be issued from the FactoryTalk Batch Server or from an operator to the PLI, including the corresponding values that the Server writes to the phase.
Command ABORT Value 10 Description The ABORT command is sent by the FactoryTalk Batch Server to move the phase to the ABORTING state. This command results in an action in every phase state except IDLE, COMPLETE, STOPPED and ABORTED. If the phase is in any other state, it transitions to the ABORTING state and execute the ABORTING logic. The HOLD command is sent by the FactoryTalk Batch Server to move the phase to the HOLDING state. This command results in an action when the phase is in the RUNNING, RESTARTING, or HELD state. The STOP command is sent by the FactoryTalk Batch Server to move the phase to the STOPPING state. This command results in an action when the phase is in the RUNNING, HELD, HOLDING, or RESTARTING state. The RESET command is sent by the FactoryTalk Batch Server to move the phase to the IDLE state. This command results in an action when the phase is in the STOPPED, COMPLETE, or ABORTED state. The PAUSE command is sent by the FactoryTalk Batch Server to command the phase logic to set the PAUSE attribute (PHASE_P), which allows the phase to transition to the PAUSING and PAUSED state at the next pre-programmed breakpoint within its sequencing logic and wait for a RESUME command before proceeding. The PAUSE command results in an action when the phase logic is programmed to respond to this command. The SEMIAUTO (formerly SINGLE_STEP) command is sent by the FactoryTalk Batch Server to toggle the phase into and out of the Semi-Auto mode. This command causes the phase logic to set the Single Step attribute (PHASE_SS) that allows the phase to transition to the PAUSING and PAUSED state at each programmed pause transition and wait for the operator to issue a RESUME command. The SEMI_AUTO command results in an action when the phase logic is programmed to respond to this command.

HOLD

20

STOP

30

RESET

40

PAUSE

50

SEMIAUTO*

60

284

5 Introducing Tags and Commands

Command NEWPARAMETERS

Value 70

Description The NEWPARAMETERS (formerly DOWNLOAD) command is sent by the FactoryTalk Batch Server to indicate to the phase logic that the phase has crossed a recipe transition (transfer of control). This command can trigger the phase logic to request a download of parameters. Upon execution of this command, the PLI sets a Boolean value (_DL) which the phase logic can use to initiate a download parameters request. The NEWPARAMETERS command is valid only when the phase logic is programmed to respond to this command. Other phase logic ignores the _DL without responding in any manner. Typically, this command is used for non-terminating phases that may require setpoint changes during the execution of a batch, such as temperature control, agitation, etc. The RESUME command is sent by the FactoryTalk Batch Server to the phase to resume after the phase logic has paused at a pre-programmed transition. This command orders PAUSED phase logic to resume execution. It is also used to move the phase logic to the next step during Semi-Auto processing. This command results in an action when the PAUSED attribute is active. The RESTART command is sent by the FactoryTalk Batch Server to the phase to restart the phase logic after it has HELD. The phase transitions from the HELD state through the RESTARTING state to the RUNNING state. This command results in an action when the phase is in the HELD state. The START command is sent by the FactoryTalk Batch Server to the phase to start the phase logic. This command orders the phase to transition from the IDLE state to the RUNNING state. This command results in an action when the phase is in the IDLE state. The CLEARFAILURE command is sent by the FactoryTalk Batch Server to the phase to clear any outstanding phase failures.

RESUME

80

RESTART

90

START

100

CLEARFAILURE

130

The following commands are used as part of the request protocol: ReqComplete 140 The REQCOMPLETE command is sent by the FactoryTalk Batch Server to indicate to the phase logic that the current phase request completed successfully. The PLI responds by setting the REQUEST register to 10. The REQFAILED command is sent by the FactoryTalk Batch Server when the processing of a phase logic request experiences an error. The PLI responds by setting the REQUEST register to 15.

ReqFailed

145

285

PCD Programmers Technical Reference

Command ReqAbortAck

Value 150

Description The REQABORTACK command is sent by the FactoryTalk Batch Server to indicate to the phase logic that the previous request aborted successfully. The PLI responds by setting the REQUEST register to 20. The REQABORTFAIL command is sent by the FactoryTalk Batch Server to indicate to the phase logic that the previous request aborted successfully. The PLI responds by setting the REQUEST register to 30. The RESETFORNEXTREQUEST command is sent by the FactoryTalk Batch Server to indicate to the phase logic that the request is complete and can be reset to allow for a new request. The PLI responds by setting the REQUEST register to 0.

ReqAbortFail

160

ResetForNextRequest

170

* The SEMIAUTO command was formerly referred to as the SINGLE_STEP command. In an effort to become more consistent with the S88.01 standard, the term was changed to SEMI-AUTO. The NEWPARAMETERS command was formerly referred to as the DOWNLOAD command. This term was misleading because the FactoryTalk Batch Server did not actually download the parameters; it merely informed the phase logic that it could request a download of new parameters.

286

CHAPTER 6

PLI Communications Protocols


The PLI communications protocols define the behavior that must be provided by the project-specific phase logic interface in order for the FactoryTalk Batch Server to successfully coordinate the activities of phases. It also defines the expected behavior and services provided by the FactoryTalk Batch software for use by the phase logic. Any programmer of a new PLI should begin a project by developing a solid understanding of the FactoryTalk Batch PLI protocols. For many control systems, shell implementations of the protocols have been designed to allow FactoryTalk Batch to be used with specific brands of hardware. These implementations, often referred to as phase logic interfaces (PLIs), are typically reusable code that is expected to provide the core of the required protocol behavior for the phase logic programmer, thus freeing the programmer to concentrate on the actual control logic required for the phase. The FactoryTalk Batch phase protocols:

Obey the State Transition Diagram Support the Command Handshake Follow the Phase Logic Request Protocol Support the Pause/Semi-Auto Functionality Recognize the New Parameters Command Support the Program/External Phase Attribute Support the Failure Protocol Support the Watchdog Protocol

287

PCD Programmers Technical Reference

Obey the State Transition Diagram


The purpose of the phase logic state transition diagram is to ensure that phase logic exhibits the required behavior characteristics to be controllable by the FactoryTalk Batch Server. (See State Transition Diagram for more information.) Tags Used for State Transitions
PHASE_ST:

The PLI indicates the phases current state by storing an integer value into the phases state tag. The possible states and their values are:
ABORTING: STOPPING: RUNNING: COMPLETE: ABORTED: 10 30 50 70 90 HOLDING: RESTARTING: HELD: STOPPED: IDLE: 20 40 60 80 100

Optional PLI Boolean Communication with the Phase Boolean variable processing is simpler and more efficient in some process-connected devices. In those cases, the PLI can send Boolean values to the phase logic rather than the phase logic using the Status (_ST) to determine what to do. In those cases, the following Boolean variables, one for each state, can be added.
These tags are an internal communication method between the PLI and the phase logic and are not used in any way by the FactoryTalk Batch Server. Active State flags PHASE_R PHASE_T PHASE_A PHASE_H PHASE_S PHASE_OC: Running Restarting Aborting Holding Stopping Active State Complete flags PHASE_RC PHASE_TC PHASE_AC PHASE_HC PHASE_SC Running Complete Restarting Complete Aborting Complete Holding Complete Stopping Complete Final State flag: PHASE_SD PHASE_C PHASE_AD PHASE_HD PHASE_I Stopped Complete Aborted Held Idle

The command tag (in conjunction with the command handshake) is used by the FactoryTalk Batch Server to issue commands to the phase logic. The commands for the phase logic state transition diagram that are relevant to phase state are:
ABORT: STOP: RESTART: 10 30 90 HOLD: RESET: START: 20 40 100

288

6 PLI Communications Protocols

Support the Command Handshake Protocol


The purpose of the command handshake protocol is to guarantee that the FactoryTalk Batch Server cannot overwrite a command value in a command tag before the phase logic has a chance to see it. This figure depicts the state machine used for the command handshake protocol:
ACK DORMANT COMMAND

PENDING HANDSHAKE

Command Handshake State Machine State DORMANT Transition COMMAND The command handshake state machine initializes into the DORMANT state. In the DORMANT state, the FactoryTalk Batch Server can write to the phases command tag. The FactoryTalk Batch Server issues a command to the phase by writing to the command tag. The command value is a 16-bit integer. The low byte of the integer contains the command value and the high byte contains a command ID. The act of writing to the command tag changes the state of the command handshake state machine from DORMANT to PENDING HANDSHAKE.

State PENDING The FactoryTalk Batch Server is not permitted to write to the command tag of ACK a phase whose command handshake state machine is in the PENDING ACK state. This is to prevent the Server from overwriting a previous command value that the phase logic has not yet detected. Transition ACK The PLI acknowledges that it has received a command by clearing the low byte of the 16-bit command tag. Acknowledgement of a command changes the state of the command handshake state machine from PENDING HANDSHAKE back to DORMANT.

Command Handshake Protocol


Many process-connected devices work with a periodic scan. The FactoryTalk Batch Server issues commands to phase logic by writing to the phases command tag. Without a handshake protocol, this can lead to a problem. If the Server were to attempt to issue two or more commands in rapid succession, there would be no mechanism to prevent the Server from overwriting command values before the phase logic could detect them. To guarantee that phase logic detects every command issued to the phase by the Server, the FactoryTalk Batch command handshake protocol was defined. This protocol is used to guarantee that the phase logic gets the opportunity to detect each Batch command as it is issued. The phase logic command tag is treated as a 16-bit integer value. When the FactoryTalk Batch Server writes a command to a phase command tag, it stores separate values into the upper and lower bytes of the command tag. The low byte is used to hold the command value. The upper byte is used by the Server to write an ID associated with the command.

289

PCD Programmers Technical Reference

When the PLI detects the command, it is expected to clear the lower eight bits of the command tag to indicate to the Server that the command has been received and the Server can now issue queued commands. The clearing of the low byte is simply an acknowledgment that the command has been received. It is not intended to be an acknowledgment that the command has been processed! For example, if a STOP command is issued, the handshake (clearing of the low byte) should be done immediately. You should not wait until the state has changed to STOPPING or STOPPED before completing the handshake. The only purpose of the handshake is to prevent the FactoryTalk Batch Server from overwriting a command before the phase logic has received it. If this handshake were not present, it would be possible for serious problems to occur. For example, if two operators almost simultaneously issued ABORT and RESTART commands, and the RESTART command overwrote the ABORT command, the ABORT command would never be received by the phase logic. While programmers of PLCs and similar devices may be familiar with bit level logic, programmers of DCS systems may not be as familiar with bit manipulations. The programmer of a DCS can determine the command value stored in the command tags low byte by using a remainder function to determine the remainder of the current command tag values division by 256. To clear the low byte of the command tag, the phase logic programmer can subtract the command value from the command tag.

The Command Tags High Byte


While phase logic programmers do not need to concern themselves with the upper eight bits of the command tag, the following is a discussion of how they guarantee serialization of the Batch commands to the phases. One might ask why even have a command ID in the high byte of the command tag? Why not just have the user zero the command tag once the command has been seen? The change in value to zero could be the permissive to issue the next command. The problem with this approach comes with the manner in which most data servers are implemented. Most data servers are written as polling applications. A data server periodically polls the process-connected device for current values and then compares the current value with the last recorded value to determine if there was a change. If the value has changed, then all subscribers are notified of the change in value.

290

6 PLI Communications Protocols

Example - No Command ID in High Byte The following figure depicts the execution of a simple command handshake protocol where there is no command ID stored in the high byte. The phase logic would simply zero the entire command register to ack the command.
Data server reads value of 0 Data server reads value of 100, notifies subscribers of change Batch writes 100 to command tag PLI resets command tag value to zero Data server reads value of 0, notifies subscribers of change

COMMAND TAG VALUE

100

T1

T2

T3

T4

T5

TIME

Simplified Command Handshake Without Command ID in High Byte

At time T1, the data server polls the process-connected device and reads a value of zero for the command tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the FactoryTalk Batch Server writes a 100 value to the command tag for the phase, issuing a START command to the phase logic. The Server will not issue any commands until it is notified that the value of the command tag is zero, indicating that the PLI has seen the command. At time T3, the data server polls the process-connected device and reads a value of 100 for the command tag. This is a change from the previous value of zero, so the Server, as a subscriber, is notified of the new value of 100 in the command tag. Since the previous command had not yet been acknowledged, the Server will not issue any new commands to the phase. At time T4, the PLI detects the presence of a command and immediately resets the command tag to zero. At time T5, the data server polls the process-connected device and reads a value of zero for the command tag. This is a change from the last recorded value of 100, so the Server, as a subscriber, is notified of the new zero value in the command tag. Since the command tag has returned to zero, the command handshake is considered complete, and the Server is free to issue another command.

291

PCD Programmers Technical Reference

The simplified protocol appears to work. Lets now consider what happens when the data server doesnt poll fast enough to detect the change in value of the command tag to 100. Consider the figure below:
Data server reads value of zero Batch writes 100 to command tag COMMAND TAG VALUE Data server reads value of zero, no change so subscribers are not notified PLI resets command tag value to zero

100

T1

T2

T3

T4

TIME

Simplified Command Handshake with Data Server Polling Too Slowly

At time T1, the data server polls the process-connected device and reads a value of zero for the command tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the FactoryTalk Batch Server writes a 100 value to the command tag for the phase, issuing a START command to the phase logic. The Server will not issue any commands until it is notified that the value of the command tag is zero, indicating that the PLI has seen the command. At time T3, the PLI detects the presence of a command and immediately resets the command tag to zero. At time T4, the data server polls the connected device and reads a value of zero for the command tag. Since this is not a change from the previous value, the subscribers are NOT notified. The system stops responding. The Server will not send another command until it is notified that the current value of the command tag is zero. The data server never sends a data update to the FactoryTalk Batch Server because it never sees a change in value of the command tag. Example - Command ID in High Byte To prevent the kind of problem depicted in the previous example, the FactoryTalk Batch Server uses the command tags high byte in a manner guaranteeing that a change in the command tags value will occur. By forcing a change in value, the Server guarantees that it will receive a value update from the data server. The Server uses the command tags high byte to store a serial number or command ID on each command. After each command, the command IDs value is incremented. On startup, the Server checks the high bytes current value in the command tag to ensure that it will not use a command ID that matches the current high byte value.

292

6 PLI Communications Protocols

This figure depicts the actual Batch command handshake protocol:


Data server reads value of zero Data server reads value of 356, notifies subscribers of change Batch writes 356 (256 + 100) to command tag COMMAND TAG VALUE Data server reads value of 256, notifies subscribers of change

PLI clears low byte of command tag, changing value to 256

100

T1

T2

T3

T4

T5

TIME

Actual Command Handshake Protocol

At time T1, the data server polls the process-connected device and reads a value of zero for the command tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the FactoryTalk Batch Server writes a 356 value to the command tag for the phase, issuing a START command to the phase logic. Note that the value 356 is actually 256 + 100, where 256 is a value of one in the high byte, and 100 is the command value in the low byte. The Server will not issue any further commands until it is notified that the low bytes value of the command tag is zero, indicating that the PLI has seen the command. At time T3, the data server polls the process-connected device and reads a value of 356 for the command tag. This is a change from the previous value of zero, so the FactoryTalk Batch Server, as a subscriber, is notified of the new value of 356 in the command tag. Since the low byte of the command word has not been zeroed, the Server will not issue any new commands to the phase. At time T4, the PLI detects the presence of the command and immediately resets the low byte of the command tag to zero, changing the value of the command tag to 256. At time T5, the data server polls the process-connected device and reads a value of 256 for the command tag. This is a change from the last recorded value of 356, and the FactoryTalk Batch Server, as a subscriber, is notified of the new value of 256 in the command tag. Since the low byte of the command tag has returned to zero, the command handshake is considered complete, and the Server is free to issue another command.

293

PCD Programmers Technical Reference

The actual Batch command handshake protocol works. Now, lets verify that the protocol still works, even with a data server that polls too slowly to see the value of 356 in the command tag. Consider the following diagram:
Data server reads value of zero Batch writes 356 (256 + 100) to command tag COMMAND TAG VALUE Data server reads value of 256, notifies subscribers of change PLI clears low byte of command tag, changing value to 256

100

T1

T2

T3

T4

TIME

Actual Command Handshake with Data Server Polling Too Slowly

At time T1, the data server polls the process-connected device and reads a value of zero for the command tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the FactoryTalk Batch Server writes a 356 value to the command tag for the phase, issuing a START command to the phase logic. Note that the value 356 is actually 256 + 100, where 256 is a value of one in the high byte, and 100 is the command value in the low byte. The Server will not issue any further commands until it is notified that the low bytes value of the command tag is zero, indicating that the PLI has seen the command. At time T3, the PLI detects the presence of a command and immediately resets the low byte of the command tag to zero, changing the value of the command tag to 256. At time T4, the data server polls the process-connected device and reads a value of 256 for the command tag. This is a change from the last recorded value of 0, so the FactoryTalk Batch Server, as a subscriber, is notified of the new value of 256 in the command tag. Since the low byte of the command tag has returned to zero, the command handshake is considered complete, and the Server is free to issue another command. By using the high byte of the command word to ensure that the command tags value changes, the FactoryTalk Batch Server is guaranteed that a polling data server, no matter how slow, will see a change in the command tags value to report to the Server.

Summary of the Command Handshake Protocol


The command handshake protocol prevents the FactoryTalk Batch Server from overwriting commands before the PLI has had a chance to detect the command. The responsibilities of the PLI programmer to support the command handshake can be summarized as follows:

294

6 PLI Communications Protocols

1. Examine the low byte of the command word to detect Batch commands. In PLCs and similar devices, this can be done with masks. In DCS platforms, it may be easier to use the remainder function with a divisor of 256 to determine the command value. 2. As soon as a command is detected, clear the low byte of the command word to signal the FactoryTalk Batch Server that it is permissible to write another command into the command tag. In a PLC or similar device, this can be done in a straightforward manner. In a DCS, it may be easier to subtract the command value from the command tag. For example, if a START command (value 100) was received, the user would simply subtract 100 from the command tag to clear the command tags low byte.
Support for the command handshake protocol is critical. If the PLI does not support the command handshake protocol correctly, the FactoryTalk Batch Server may not be able to control the phase logic. This can result in command timeout failures and the inability to control the plant. Batch records command protocol activity in the Batch log. This can be useful for debugging problems in phase logic handling of the command handshake protocol.

Tags Used in the Command Handshake Protocol


PHASE_OC

The FactoryTalk Batch Server supports the command handshake protocol by writing to the PHASE_OC command tag. The PLI also writes to the low byte of the PHASE_OC command tag.

Follow the Phase Logic Request Protocol


The purpose of the Request Protocol is to control the rate at which phase logic makes requests to FactoryTalk Batch in order to ensure that the FactoryTalk Batch Server detects every request.
DORMANT REQUEST REQ PENDING ABORT ABORT PENDING

RESET

RESET PENDING

COMPLETE

ABORTED/NOT

Phase Logic Request Protocol State Machine

295

PCD Programmers Technical Reference

State DORMANT The request protocol state machine initializes into the DORMANT state. In the DORMANT state, the phase logic is free to write a request value into the request tag. Transition REQUEST The phase logic makes a request of the FactoryTalk Batch Server by writing a request value into the request tag. The act of making a phase logic request transitions a state machine in the DORMANT state to the REQ PENDING state. The REQ PENDING state indicates that the phase logic is waiting for the FactoryTalk Batch Server to finish processing an outstanding request. In this state, the phase logic is not permitted to write to the request register, unless it is attempting to abort the request currently being processed. When the FactoryTalk Batch Server has finished processing a phase logic request, it notifies the PLI of the completion of the request by sending a REQUEST COMPLETE command (140) to the phase logic. When the PLI receives this command, it is expected to write an intermediate request value of 10 into the request register. Receipt of this command by the phase logic will transition a state machine in the REQUEST PENDING state to the RESET PENDING state. In the RESET PENDING state, the PLI is waiting for a RESET FOR NEXT REQUEST command to be issued by the FactoryTalk Batch Server. In this state, the phase logic is not permitted to write to the request register.

State REQ PENDING

Transition COMPLETE

State RESET PENDING

Transition RESET When the PLI receives a RESET FOR NEXT REQUEST command (170) from the FactoryTalk Batch Server, it is a signal that the Server has seen the intermediate request value. In response to the command the PLI is expected to zero the request register. The reception of this command transitions a state machine in the RESET PENDING state to the DORMANT state. Transition ABORT If the phase logic decides that it does not need an outstanding request to be completed, the phase logic may initiate the aborting of the request by writing a 6000 into the request register (or 16000 if using enhanced phase logic requests). The act of aborting an outstanding phase logic request will transition a state machine in the REQ PENDING state to the ABORT PENDING state. The ABORT PENDING state indicates that the phase logic is waiting for the FactoryTalk Batch Server to finish processing the abort of an outstanding phase logic request. In this state, the phase logic is not permitted to write to the request register. When the FactoryTalk Batch Server finishes processing a request to abort an outstanding request, it will issue one of two commands to the PLI. A REQUEST ABORTED command (150) will be issued if the command was successfully aborted. A REQUEST NOT ABORTED command (160) is issued if the FactoryTalk Batch Server was unable to abort the request. In response to a 150 command, the PLI is expected to write an intermediate request value of 20 into the request register. If the command is a 160, the PLI is expected to write an intermediate request value of 30 into the request register. The reception of either command by the PLI causes the transition of a state machine in the ABORT PENDING state to the RESET PENDING state.

State ABORT PENDING

Transition ABORTED/NOT

296

6 PLI Communications Protocols

While the differentiation between the 150 and 160 command is defined in the communication protocol, FactoryTalk Batch does not yet fully support the differentiation between these two commands.

Phase Logic Request Protocol


The phase logic request protocol is similar to the command protocol in that it was defined in order to solve problems introduced by the nature of polling data servers. Lets begin by describing the nature of phase logic requests. There are numerous functions that may be performed by the Batch Server at the request of the phase logic. These functions include arbitration, messaging, reporting, etc. The phase logic makes a request to the FactoryTalk Batch Server by writing a request value into the request tag. Additional parameters describing the request may also be required and are written into the request parameter tags. Example - Request Tag Immediately Reset to Zero We once again face the challenges posed by the nature of a polling data server. If the FactoryTalk Batch Server detects requests by reported changes in the value of the request tag, how do we guarantee that the Server receives a data update with each request? Lets begin with an examination of a simple protocol that has a problem with the nature of a polling data server. Lets propose a protocol where, when a request is completed, the Server sends a command to the phase to let it know that it is completed, and the PLI then zeroes the request register. When this simple protocol works, a chart of the value of the request parameter might appear as follows:
Data server reads value of zero Phase logic makes 1000 request WATCHDOG REGISTER VALUE Data server reads value of 1000, notifies subscribers of change Data server reads value of 0, notifies subscribers of change Data server reads value of 1000, notifies subscribers of change Request Complete command received. Request value reset to zero by PLI.

Request Complete command received. Request value reset to zero by PLI.

Phase logic makes second 1000 request

T1

T2

T3

T4

T5

T6

T7

T8

TIME

Simplified Request Protocol with Request Tag Reset to Zero

At time T1, the data server polls the process-connected device and reads a value of zero for the request tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the phase logic makes a download parameters request, writing the value 1000 into the request tag. At time T3, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers,
297

PCD Programmers Technical Reference

including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the parameter download request. At time T4, the FactoryTalk Batch Server has completed the parameter download and sends a Request Completed command to the phase logic. In response to this command, the PLI resets the request register value to zero. At time T5, the data server polls the process-connected device and reads a value of zero for the request tag. This is a change from the previous value of 1000 so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch sees a value of zero as no request, and takes no action. At time T6, the phase logic makes a second download parameters request, writing the value 1000 into the request tag again. At time T7, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the parameter download request. At time T8, the FactoryTalk Batch Server has completed the second parameter download and sends a Request Completed command to the PLI. In response to this command, the PLI resets the request register value to zero. The problem with the above protocol occurs when the data server does not poll fast enough to detect the change in value of the request tag from 1000 to zero and then back to 1000. Consider the chart below:
Data server reads value of zero Phase logic makes 1000 request WATCHDOG REGISTER VALUE Data server reads value of 1000, notifies subscribers of change Request Complete command received. Request value reset to zero by PLI. Data server reads value of 1000, notifies subscribers of change Phase logic makes second 1000 request

T1

T2

T3

T4

T5

T6

TIME

Simplified Request Protocol with Data Server Polling Too Slowly

At time T1, the data server polls the process-connected device and reads a value of zero for the request tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the phase logic makes a download parameters request, writing the value 1000 into the request tag. At time T3, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers,

298

6 PLI Communications Protocols

including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the parameter download request. At time T4, the FactoryTalk Batch Server has completed the parameter download and sends a Request Completed command to the PLI. In response to this command, the PLI resets the request register value to zero. At time T5, the phase logic makes a second download parameters request, writing the value 1000 into the request tag again. At time T6, the data server polls the process-connected device, and reads a value of 1000 for the request tag. Since this is not a change from the previously read value, no subscribers are notified. The FactoryTalk Batch Server will never process the second 1000 request because the data server will never notify the FactoryTalk Batch Server of the value since there is no change from the previously read value. The batch is now hung. As you can see, a simple protocol where the value of the request tag is simply zeroed between requests can result in the FactoryTalk Batch Server missing a phase logic request when two identical phase logic requests are made in a row. Example - Request Tag Receives Intermediate Value The actual request protocol is designed to guarantee that the FactoryTalk Batch Server detects every phase logic request, regardless of the data servers poll rate. The FactoryTalk Batch request protocol uses a two-step acknowledge. When the FactoryTalk Batch Server completes a phase logic request, a Request Complete command is sent to the PLI. Rather than zeroing the request parameter in response to the request, however, the PLI is expected to write a value of 10 into the request register. The value of 10 is used simply because it is a value that can never be a valid request. The PLI then waits for the FactoryTalk Batch Server to see the value of 10. When the Server sees the value of 10 in the request register, it then sends a Reset for Next Request command to the PLI. When the PLI receives this command, it resets the request register value to zero (0). The phase logic can now make another request. Lets examine this protocol in the time line below:
Data server reads value of zero Phase logic makes 1000 request WATCHDOG REGISTER VALUE Data server reads value of 1000, notifies subscribers of change Data server reads value of 10, notifies subscribers of change Data server reads value of 0, notifies subscribers of change Phase logic makes 1000 request Data server reads value of 1000, notifies subscribers of change

Request Complete command received by PLI. Sets RQ to 10.

Reset for Next Request command received by PLI. Sets RQ to 0.

T1

T2

T3

T4

T5

T6

T7

T8

T9

TIME

Actual Request Protocol

At time T1, the data server polls the process-connected device and reads a value of zero for the request tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag.
299

PCD Programmers Technical Reference

At time T2, the phase logic makes a download parameters request, writing the value 1000 into the request tag. At time T3, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the parameter download request. At time T4, the FactoryTalk Batch Server has completed the parameter download and sends a Request Completed command to the PLI. In response to this command, the PLI changes the request value register to 10. At time T5, the data server polls the process-connected device and reads a value of 10 for the request tag. This is a change from the previous value of 1000 so all subscribers, including FactoryTalk Batch, are informed of the new value. At time T6, in response to seeing a value of 10 in the request register, the FactoryTalk Batch Server sends a Reset for Next Request command to the PLI. In response to this command, the PLI changes the request value to zero. At time T7, the data server polls the process-connected device and reads a value of zero for the request tag. This is a change from the previous value of 10 so all subscribers, including Batch, are informed of the new value. Since zero is not a valid request, the FactoryTalk Batch Server ignores the update. At time T8, the phase logic makes a second download parameters request, writing the value 1000 into the request tag again. At time T9, The data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the new download request. Now, lets examine the effectiveness of this new protocol when the data server polls too slowly to detect the change in value from 10 to zero to 1000:
Data server reads value of zero Phase logic makes 1000 request WATCHDOG REGISTER VALUE Data server reads value of 1000, notifies subscribers of change Data server reads value of 10, notifies subscribers of change Reset for Next Request command received by PLI. Sets RQ to 0. Phase logic makes 1000 request Data server reads value of 1000, notifies subscribers of change

Request Complete command received by PLI. Sets RQ to 10.

T1

T2

T3

T4

T5

T6

T7

T8

TIME

Actual Request Protocol with Data Server Polling Too Slowly

300

6 PLI Communications Protocols

At time T1, the data server polls the process-connected device and reads a value of zero for the request tag. This may or may not be a change from the previous value, but in any event, zero is stored in the data servers database as the latest value of the command tag. At time T2, the phase logic makes a download parameters request, writing the value 1000 into the request tag. At time T3, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previous value of zero so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server, seeing the 1000 value in the request tag, begins processing the parameter download request. At time T4, the FactoryTalk Batch Server has completed the parameter download and sends a Request Completed command to the PLI. In response to this command, the PLI changes the request value register to 10. At time T5, the data server polls the process-connected device and reads a value of 10 for the request tag. This is a change from the previous value of 1000 so all subscribers, including FactoryTalk Batch, are informed of the new value. At time T6, in response to seeing a value of 10 in the request register, the FactoryTalk Batch Server sends a Reset for Next Request command to the PLI. In response to this command, the PLI changes the request value to zero. At time T7, before the data server has had a chance to poll the process-connected device, the phase logic makes a download parameters request, writing the value 1000 into the request tag. At time T8, the data server polls the process-connected device and reads a value of 1000 for the request tag. This is a change from the previously read value of 10 so all subscribers, including FactoryTalk Batch, are informed of the new value. The FactoryTalk Batch Server seeing the 1000 value in the request tag, begins processing the new parameter download request. As you can see from the above analysis, successive identical requests are guaranteed to be detected as unique and separate requests. The FactoryTalk Batch Server detects and processes each request, regardless of the poll rate of the data server.

Aborting Phase Logic Requests


There is a second aspect of the FactoryTalk Batch request protocol, which involves the aborting of phase logic requests. Phase logic may find it necessary to cancel a pending phase logic request due to a change in state. For example, a phase that has an outstanding request to download recipe parameters may want to abort the request on a state change from RUNNING to ABORTING. An obvious approach for the aborting of phase logic requests would be for the phase logic to zero the value of the request tag. This approach, however, has the same problem shown previously, where a slow polling data server might not detect a change in value of the request register if a second request of the same value is made after the request was canceled.

301

PCD Programmers Technical Reference

In order to avoid the problems introduced by polling data servers, the FactoryTalk Batch request protocol uses a value of 6000 (or 16000 if using enhanced phase logic) in the request tag to indicate a request to abort an outstanding request. When the FactoryTalk Batch Server detects a value of 6000 (or 16000) in the request tag, it attempts to abort any request it may be currently processing. Once the request has been aborted, or immediately if no request was being processed, the Server sends one of two commands to the PLI. These two possible commands are Request Aborted and Request Not Aborted. The intentions of the two possible responses to the abort request are as follows: When the user asks for a request to be aborted, there are two possible scenarios. The request may have not yet been completed, and the FactoryTalk Batch Server can successfully abort the request. An example of this scenario would be a download request that caused the Server to generate Unacknowledged Prompts to the operator. If the prompts had not been responded to and the phase logic chose to abort the download request, then the Server could remove the unacknowledged prompts and the request would have been successfully aborted. In the scenario where a request is successfully aborted, the Server would be expected to send the command Request Aborted when the request was successfully aborted. The second scenario for the aborting of a phase logic request is a too late scenario. This means that the abort request came too late and the request was actually completed (and cannot be undone) before the abort request was received. An example of this would be a Send Message and Wait request. It is possible that when phase logic attempts to abort a Send Message and Wait request that the FactoryTalk Batch Server wont detect the abort request until just after the message was delivered to the partner phase. Once the message has been delivered to the phases message partner, there is no way to undeliver it. In this type of scenario, the Server is expected to send the command Request Not Aborted in response to the abort request. When the PLI receives a Request Aborted or Request Not Aborted command, it is expected to respond in a similar manner to the Request Completed command. However, rather than setting the value of the request tag to 10, the request tag is set to 20 upon receipt of a Request Aborted command and to 30 upon receipt of a Request Not Aborted command. Once the FactoryTalk Batch Server detects the presence of the 20 or 30 value in the request tag, a Reset for Next Request command is issued, exactly as occurs when the request tag holds a value of 10 at the end of a successful request. In response to the Reset for Next Request command, the PLI is expected to change the request tags value to zero. Tags Used in the Phase Logic Request Protocol
PHASE_RQ:

The request tag is used by the phase logic to make requests of the FactoryTalk Batch Server and to store intermediate values used by the handshake protocol. This tag is used by the PLI to indicate OK to reset - 10, 15, 20, or 30, and reset complete - 0.
PHASEQ##:

A set of tags used to hold additional parameters for the phase logic request.

302

6 PLI Communications Protocols

P H A S E _ O C:

The FactoryTalk Batch Server uses commands to inform the phase logic of completed requests, the results of an abort request, and for handshakes in the request protocol. The command tag (in conjunction with the command handshake) is used by the Server to issue commands to the phase logic. The relevant commands for the PLI request protocol are:
REQUEST COMPLETED REQUEST FAILED 140 145 ABORT SUCCESSFUL ABORT FAILED RESET FOR NEXT REQUEST 150 160 170

Miscellaneous Depending on the actual phase logic request being made, request parameter tags may be involved. For example, you need to request a specific piece of equipment (ID 125) for your phase. You will need to write 4000 (or 14000 if using enhanced phase logic) into the REQUEST tag, and the equipment ID (125) into the REQDATA_1 tag. The FactoryTalk Batch Server reads the equipment ID from the REQDATA_1 memory tag and then acquires the resource specified by the equipment ID. (Refer to Requesting Data from the FactoryTalk Batch Server for details on the functionality of the individual phase logic requests.)
Phase logic programmers should store request parameter values into request parameter tags before storing the request values into the request tag. This ensures that the FactoryTalk Batch Server does not detect the request before the parameters are set.

Support for Semi-Auto Functionality


The purpose of Semi-Auto1 functionality allows you to force phase logic execution to stop at programmed break points in the phase logic sequencing and wait for operator confirmation before proceeding. The following diagram depicts the state machine defined for the Semi-Auto functionality within the phase logic:

Semi-Auto Functionality State Machine


1 The SEMI-AUTO functionality was formerly referred to as SINGLESTEP. In an effort to become more consistent with the S88.01 standard, the term was changed to SEMI-AUTO. 303

PCD Programmers Technical Reference

State FREE RUNNING

The free running state is the default initial state of the phase logics Semi-Auto state machine. In this state, the phase logic sequencing proceeds normally. The sequencing does NOT pause at programmed breakpoints. The values of both the SingleStep, Pause, and Paused tags are all zero. Enabled Events: Semi-Auto The receipt of a SEMI_AUTO command while in the FREE RUNNING state will cause the phase logics Semi-Auto state machine to transition to the SS PAUSING state.

State SS PAUSING

The SS PAUSING state indicates that the phase logic is executing its sequence logic. However, it will pause execution when it reaches the next programmed breakpoint in the sequencing logic. In this state, the SingleStep and Pause tag have a value of one, while the Paused tag has a value of zero. Enabled Events: BREAK When the sequencing logic reaches a programmed breakpoint, the phase logic transitions to the SS PAUSED state. SEMI-AUTO The receipt of a SEMI_AUTO command while in the SS PAUSING state causes a transition of the phase logics SEMI_AUTO state machine to the FREE RUNNING state.

State SS PAUSED

The SS PAUSED state indicates that the phase logic has stopped at a programmed breakpoint in the phase logic and is awaiting a resume command from the operator. In the SS PAUSED state, both the SingleStep and Paused tags have values of one, and the Pause tag has a value of zero. Enabled Events: RESUME The receipt of a RESUME command while in the SS PAUSED state will cause the phase logics Semi-Auto state machine to transition to the SS PAUSING state. SEMI-AUTO The receipt of a SEMI_AUTO command while in the SS PAUSED state causes a transition of the phase logics Semi-Auto state machine to the FREE RUNNING state.

Semi-Auto Functionality
The Semi-Auto functionality within the PLI was defined to allow users to take advantage of programmed optional breakpoints in the phases sequencing logic. The actual programming of breakpoints into the phases sequencing logic is a completely optional feature that an individual project application team may choose to implement or ignore. Historically, Semi-Auto functionality has been useful during the startup and commissioning stage of a project. It is less common, although not unheard of, for a project to use Semi-Auto functionality as an optional part of normal batch execution. When the SingleStep bit is on, indicating that the phase is in Semi-Auto operation, the phase logic sequencing will pause at every programmed breakpoint in the phase logic. When a sequence breakpoint is reached, the phase logic halts sequencing and sets the Paused flag to indicate that the phase logic execution has stopped. The user may then issue a RESUME command triggering the phase logic to resume execution until the next breakpoint is reached, or may issue a SEMI_AUTO command for toggling the phase logic completely out of Semi-Auto mode, so the phase can resume normal execution.

304

6 PLI Communications Protocols

The sequence breakpoints may or may not be safe points in the phase logic. In the standard PLI implementation of the API developed by Rockwell, these breakpoints are not process safe points, as the breakpoints are used for startup/commissioning checkout of the phase logic. Tags Used with the Semi-Auto Functionality PHASE_OC: The command tag is (in conjunction with the command handshake) used by the FactoryTalk Batch Server for issuing commands to the phase logic. The relevant commands for the Semi-Auto functionality are:
SEMI_AUTO PAUSE RESUME PHASE_SS: 60 50 80

The SingleStep tag used by the phase logic indicates if the phase is in Semi-Auto operation. Semi-Auto operation means that the phase logic will pause at every programmed break point in the phases sequencing logic. A value of one indicates that the phase is in Semi-Auto operation. A value of zero indicates that it is not.
PHASE_PD:

The Paused tag used by the phase logic indicates that the phase has paused at a programmed breakpoint and will not continue execution until commanded to resume.
PHASE_P:

The Pause tag used by the phase logic indicates that the phase will transition to the Paused state at the next pre-programmed breakpoint in the phase logic and will not continue execution until commanded to resume.

Support for the NEW_PARAMETERS command


The purpose of the NEW_PARAMETERS1 command is to notify phase logic that a transfer of control (TOC) between two steps connected to the same phase has been completed. The phase logic may choose to download new parameter values when this occurs. When phase logic receives a NEW_PARAMETERS command, it may respond by making a 1000 series request (or 11000 if using enhanced phase logic) to request a download of the new parameters.

1 The NEW_PARAMETERS command was formerly referred to as the DOWNLOAD command. This term was misleading because the Batch Server did not actually download the parameters, it merely informed the phase that it should request a download of parameters.

305

PCD Programmers Technical Reference

NEW_PARAMETERS Command
The NEW_PARAMETERS Command is intended to support the Transfer of Control (TOC) feature within the FactoryTalk Batch product. Transfer of control occurs when steps representing the same phase are both above and below a transition and the transition expression does not require that the phase be in the COMPLETE state.
Transfer of Control is not supported with synchronized phases or with material-enabled phases.

The following diagram depicts an SFC of an operation in which transfer of control will occur:
TRUE

DOSE:1 A

MIX:1 15 RPM

LI1000.PV > 50

MIX:2 30 RPM

DOSE.STATE = COMPLETE

New Parameters Command State Machine

In this operation, mixing is supposed to occur while material A is being fed. Mixing is expected to change speed from 15 to 30 rpm when the signal from the LI1000 tag on the unit exceeds a value of 50. The MIX:1 and MIX:2 steps that bracket the LI1000.PV > 50 transition represent a transfer of control situation. In this case, when the transition fires, it does not stop the phase and then restart it for the next step, but merely transfers control of the phase from one step to the next. When this transfer of control occurs, the FactoryTalk Batch Server sends a NEW_PARAMETERS command to the phase. This is considered a notification that there are new recipe parameters present. In this case, the setpoint for the mixer speed has changed from 15 to 30. It is the PLIs responsibility to respond to the NEW_PARAMETERS command by notifying the phase logic that a transfer of control has occurred. The phase logic can then choose to download new parameters, if necessary. If a phase will NEVER be used in a transfer of control situation, it is possible that support for the NEW_PARAMETERS command could be removed from the phase logic, but remember, NEVER is a VERY LONG TIME.

306

6 PLI Communications Protocols

Tags Used with the NEW_PARAMETERS Command


PHASE_OC:

The command tag (in conjunction with the command handshake) is used by the FactoryTalk Batch Server to issue the NEW_PARAMETERS command to the phase logic. The value of the NEW_PARAMETERS command is:
NEW_PARAMETERS PHASE_RQ: 70

The request tag used by the phase logic makes a parameter download request in response to the NEW_PARAMETERS command.
PHASEQ##:

The request parameter tags may provide parameters for the download request made in response to the NEW_PARAMETERS command.

Support for the Program/External Attribute


The purpose of the Program/External attribute of a phase is to act as a permissive for FactoryTalk Batch Server control of the phase. When a phase is permitted to be controlled by the FactoryTalk Batch Server, a zero value should be stored into the owner tag. When a phase is not permitted to be controlled by the Server, a non-zero value should be stored into the owner tag.
A phase in EXTERNAL should never return to PROGRAM control unless it is in the IDLE state. You should expect to spend extra effort when planning how the phase logic will handle requests and synchronization if External Control is used.

Program/External Attribute
The owner attribute of a phase acts as a permissive for FactoryTalk Batch Server control of the phase logic. When the phase has an owner attribute value of PROGRAM, it is indicating that the Server is permitted to control the phase. When the phase has an owner attribute value of EXTERNAL, the Server is not permitted to attempt to control the phase. An owner attribute value of PROGRAM is the expected value for normal FactoryTalk Batch Server recipe execution. When all phases used by a recipe have an attribute value of PROGRAM, recipe execution can be expected to proceed normally. If, however, one or more phases used by a recipe have an owner attribute value of EXTERNAL, recipe execution will not proceed normally. There are two scenarios in which a recipe executing in the Server may encounter a phase with an owner attribute of EXTERNAL. The most common scenario is when the phase has an owner attribute of EXTERNAL prior to the FactoryTalk Batch Server attempting to connect to the phase. When a recipe detects that it is attempting to connect to a phase whose owner attribute is EXTERNAL, it

307

PCD Programmers Technical Reference

generates a failure and holds the batch. The step that attempted to connect to the EXTERNAL phase disconnects and returns to the READY (not connected) state. The second scenario that may occur is that a phase may transition from PROGRAM to EXTERNAL while it is being used by the FactoryTalk Batch Server. When this occurs, a failure is generated and the batch is held. The step that was connected to the phase, however, remains attached to the phase. This attachment is a view only attachment. No commands will be sent to the phase, nor will phase logic requests be processed, but the user will still be able to view the state of the phase on the SFC. Since the phase is under EXTERNAL control, however, the state of the phase is no longer included in the composite state calculations of the batchs higher levels.
Phases put into an external state will still be viewed as binding candidates by the FactoryTalk Batch Server. In order to remove a phase from being viewed as a binding candidate, you must first take ownership of the phase.

There are several ways in which phase logic might use the EXTERNAL owner attribute. Some projects provide an alternative operator interface for control of phase logic. These alternative operator interfaces often exist for use in a failure situation, such as a failure of the FactoryTalk Batch Server node. To prevent conflict between the FactoryTalk Batch Server and the alternative operator interface, the owner attribute is used. Some control systems use the owner attribute to indicate that the control hardware is not in the proper state for phase logic control by the FactoryTalk Batch Server. Tags Used with the Program/External Attribute
PHASE_W:

The owner tag is used by the PLI to indicate a permissive for Batch Server control of the phase. The tags value is treated as a Boolean with zero and non-zero values defined as follows:
False True 0 <>0 FactoryTalk Batch Server control of the phase is permitted. (Program Mode) FactoryTalk Batch Server control of the phase is not permitted. (External Mode)

Support for the Failure Protocol


The purpose of the failure protocol is to provide a mechanism by which the phase logic can report failures to the FactoryTalk Batch Server and through which the Server can respond.

308

6 PLI Communications Protocols

Phase logic is expected to exhibit failure behavior as depicted in the following state transition diagram:

Failure Protocol State Machine NORMAL The normal state indicates that the phase logic has not detected failures. In this state, the current value of the Failure tag for the phase should be zero. Enabled Events FAILURE If a failure occurs while the phase logic is in the NORMAL state, the phase logic transitions to the FAILED state and indicates the failure by storing a value between 1 and 32767 into its Failure tag. FAILED The failed state indicates that the phase logic has detected one or more failures. In this state, the Failure tag should have a value between 1 and 32767, indicating the most severe failure that the phase logic has detected. Higher numeric values indicate more severe failures. Enabled Events CLEAR FAILURES When a Clear Failures command is received while the phase logic is in the Failed state, the phase logic should check to see if any failure conditions still exist. If no failure conditions exist, the phase logic may transition back to the Normal state by storing a value of zero into its Failure tag. Clear Failures will clear any messages generated by the 3000 and 13000 requests.

Second, the failure codes allow for display prioritization of multiple failures. The failure codes are prioritized by increasing value. Thus, if two or more phases represented by active steps inside of the same operation have failures, the failure code of the operation will be the highest value of the phases failure codes. For example, if one phase had a failure code of 52 and a second phase had a failure code of 8899, the failure code of the operation would be 8899. Thus, if the step representing the operation were selected from the unit procedure SFC, the error message associated with the ordinal 8899 in the PHASE_FAILURES enumeration set would be displayed in the status bar of the SFC screen. This also implies that if phase logic detects more than one failure, the Failure tag of the phase should be set to the highest value failure that was detected. Lastly, but most importantly, the storing of a non-zero value into a phases failure tag gives the Batch Server a chance to respond to the failure. Depending upon the value that is specified in the Batch Servers .ini file for HoldPropagate1, as well as the modes of the recipe layers above the phase, some, all, or none of the batch may be held in response to the failure.

1 The term HoldPropagate implies that the FactoryTalk Batch Server will respond to a hold command, but in fact it does not, it actually responds to a detected failure.

309

PCD Programmers Technical Reference

Once a failure has been detected, the presence of the failure is effectively latched until a Clear Failures command is issued. When the phase logic receives a Clear Failures command, it should clear the value of the failure register only if no detected failures remain. Tags Used in the Failure Protocol
PHASE_OC:

The command tag (in conjunction with the command handshake) is used by the FactoryTalk Batch Server to issue the Clear Failures command to the phase logic. The value of the Clear Failures command is:
CLEAR FAILURES PHASE_F: 130

The Failure flag used by the phase logic provides indication to the FactoryTalk Batch Server of when the phase logic has detected a failure of some type. A value of zero is recognized as no failure, and the values 1 through 32767 are recognized as failures with larger numbers representing more severe failures.

Support for the Watchdog Protocol


The purpose of the Watchdog protocol is to verify the presence of communication between the FactoryTalk Batch Server and the phase logic. If the communication is deemed not present, then both the Server and phase logic are expected to take preventative action by transitioning any active batch elements to the HELD state. Currently, the FactoryTalk Batch Server supports two different implementations of the watchdog protocol. These are the Standard and the Enhanced watchdog protocols.
The watchdog protocol type can be defined for a data server using the Edit Server dialog box within the Equipment Editor. (Refer to the FactoryTalk Batch Equipment Editor Users Guide for information on configuring data server definitions.)

Standard Watchdog Protocol


The standard watchdog protocol is a simple set/reset protocol. The FactoryTalk Batch Server sets the watchdog register by writing a one (1) to the watchdog item. The process-connected device being accessed through the data server is expected to reset the watchdog register to zero whenever a non-zero value is detected. The FactoryTalk Batch Server can detect the presence of a healthy process-connected device by the resetting of the watchdog register. The process-connected device can detect the presence of a healthy Server by the periodic setting of the watchdog register. If the process-connected device determines that the FactoryTalk Batch Server has not written to the watchdog register for an unacceptably long period of time, then it is expected to assume that the Server is no longer present and respond by holding all active phases within itself.

310

6 PLI Communications Protocols

If the FactoryTalk Batch Server detects that the process-connected device is not resetting the watchdog bit, then it assumes communication to all tags defined in the data server is not reliable. Batches using any of these tags will be held in response to the communication problems. The following timeline illustrates how the standard watchdog protocol operates:
Data server reads value of zero Data server reads value of 1, notifies subscribers of change Process device resets watchdog register value to 0 Data server reads value of 0, notifies subscribers of change

Batch writes 1 to command tag WATCHDOG REGISTER VALUE

T1

T2

T3

T4

T5

TIME

At time T1, the data server reads a value of zero for the watchdog register. This is recorded as the current value of the watchdog register. Subscribers may or may not be notified, depending on whether this is a change from the previous value. At time T2, the FactoryTalk Batch Server writes a value of one (1) to the watchdog register, fulfilling its part of the watchdog protocol. At time T3, the data server reads a value of one for the watchdog register. Since this is a change from the previously recorded value, subscribers are notified, and one (1) is recorded as the new current value. At time T4, the phase logic resets the watchdog register value to zero (0), fulfilling its part of the watchdog protocol. At time T5, the data server reads a value of zero from the watchdog register. Since this is a change from the previously recorded value, subscribers are notified, and zero is recorded as the new value. When the FactoryTalk Batch Server receives the value notification, the cycle is considered to be a successful watchdog handshake. Standard Watchdog Protocol Problems In certain situations, the implementation of the standard watchdog protocol can fail to verify communication between the Batch Server and the phase logic. Because the FactoryTalk Batch Server determines the value of the watchdog register by remaining permanently advised on it, the lack of a data update is interpreted as a successful cycle. This may result in a situation where the standard watchdog protocol is unable to detect a communication failure.

311

PCD Programmers Technical Reference

The following timeline illustrates how the standard watchdog protocol can fail to correctly detect a communication failure:
Data server reads value of zero Batch writes 1 to command tag WATCHDOG REGISTER VALUE Process device resets watchdog register value to 0 Data server reads value of 0

T1

T2

T3

T4

TIME

At time T1, the data server reads a value of zero for the watchdog register. This is recorded as the current value of the watchdog register. Subscribers may or may not be notified depending on whether this is a change from the previous value. At time T2, the FactoryTalk Batch Server writes a value of one (1) to the watchdog register, fulfilling its part of the watchdog protocol. At time T3, before the data server has a chance to poll again, the process-connected device resets the watchdog register value to zero, fulfilling its part of the watchdog protocol. At time T4, the data server reads a value of zero (0) for the watchdog register. Since this is not a change from the previously read value, subscribers are not notified. As many process-connected devices have scan rates significantly faster than the poll rates of their respective data servers, this scenario in the standard watchdog protocol can occur frequently. In this scenario, the watchdog register is in the high state for such a brief period of time that the polling data server does not detect the high value. Since the FactoryTalk Batch Server is subscribed to the value of the watchdog register, no data update is ever sent. This means that the Server must interpret the lack of a data update as a successful cycle. The problem this introduces is that because the lack of a data update must be interpreted as a successful cycle, FactoryTalk Batch is not able to detect a communication problem where the data server is not sending any updates.

Enhanced Watchdog Protocol


The enhanced watchdog protocol is more robust than the standard protocol and avoids the situation described above. The enhanced protocol treats the watchdog register as a 16-bit integer value. Under the enhanced protocol, when the FactoryTalk Batch Server writes to the watchdog register, it writes a value of 1 to the low byte, and an ID in the high byte. The high byte ID value is treated as an 8-bit integer and incremented in every scan until it wraps. This means that initially, the high byte is set to a value of 256 and then incremented by 256 every scan until it reaches a value of 16384 where it is reset to 256 (because some

312

6 PLI Communications Protocols

systems use the highest bit of the high byte to determine positive and negative values, this bit is not used). The process-connected device being accessed through the data server is expected to reset the value of the watchdog registers low byte to zero whenever a non-zero value is detected. Both the FactoryTalk Batch Server and the process-connected device can detect the presence of healthy communication by the change in value of the watchdog register. If the process-connected device detects that the value of the watchdog register has not changed for an unacceptably long period of time, then it is expected to assume that the FactoryTalk Batch Server is no longer present and respond by holding all active phases within itself. If the FactoryTalk Batch Server detects that the value of the watchdog register has not changed for an unacceptably long period of time, then it assumes that communication to all tags serviced by the data server are not reliable. Batches using any of these tags will be held in response to the communication problems. The following timeline illustrates how the enhanced watchdog protocol operates:
Data server reads value of zero Batch writes 256 + 1 command tag Process device resets watchdog register low bit Data server reads value of 256, notifies subscribers of change

WATCHDOG REGISTER VALUE

256

T1

T2

T3

T4

TIME

At time T1, the data server reads a value of zero for the watchdog register. This is recorded as the current value of the watchdog register. Subscribers may or may not be notified, depending on whether this is a change from the previous value. At time T2, the FactoryTalk Batch Server writes a value of 257 (256 + 1) to the watchdog register, fulfilling its part of the watchdog protocol. At time T3, before the data server has a chance to poll again, the process-connected device resets the zero bit of the watchdog register, fulfilling its part of the watchdog protocol. At time T4, the data server reads a value of 256 for the watchdog register. This is a change from the previously recorded value so all subscribers are notified of the new value. The FactoryTalk Batch Server receives the change value notification and considers the watchdog cycle a success.

313

PCD Programmers Technical Reference

The use of the high byte to hold a different value in every cycle forces a detectable change in value of the watchdog register at the end of every cycle. This means that if the FactoryTalk Batch Server does not receive a data update, it can assume the conversation is bad. The advantage of the enhanced protocol from the phase logic programmers point of view is that because the phase logic still only sets the low bit of the register, there is only minimal change from the standard protocol. To support the enhanced protocol, the watchdog register must only be capable of storing a 16-bit integer value.

Watchdog Period
The frequency at which the FactoryTalk Batch Server writes to the watchdog register is controlled by the WatchdogPeriod entry in the [XMAN] section of the batchsvr.ini file. In each period, the Server begins by writing a value to the watchdog register. It then waits until the end of the period. If at the end of the period the value of the watchdog register has been modified appropriately by the process-connected device, then the period is considered to be a successful cycle. If the write fails, or the value of the watchdog register is not modified by the process-connected device at the end of the period, then the period is considered to be a failed scan. The FactoryTalk Batch Server uses the following state machine to determine the state of every data server with which it is communicating:
CONNECT BAD

LOST

NFailedCycles

GOOD CYCLE

DISCONNECT SUSPECT FAIL CYCLE GOOD

Watchdog Protocol State Machine State LOST This is the initial state of the FactoryTalk Batch Servers conversation status with a data server. In the LOST state, no connection exists between the FactoryTalk Batch Server and the data server. Enabled Events CONNECT A successful connection will cause the conversation status to transition from the LOST state to the BAD state. Note that the conversation transitions to BAD instead of GOOD, because it cannot be assumed that the watchdog logic is functioning correctly just because a connection is established.

314

6 PLI Communications Protocols

State BAD

In the BAD state, the FactoryTalk Batch Server is not observing successful watchdog cycles with the data server. Communication to all tags configured to be inside of this data server are considered unreliable. Enabled Events DISCONNECT - A disconnect will cause a conversation in the BAD state to transition to the LOST state. GOOD CYCLE - A single successful watchdog cycle will transition a conversation in the BAD state back to the GOOD state.

State GOOD

In the GOOD state, the most recent watchdog cycle was completed successfully. Communication with all tags configured to be inside of the data server associated with this conversation is assumed to be reliable. Enabled Events DISCONNECT - A disconnect will cause a conversation in the GOOD state to transition to the LOST state. Any batches using tag(s) associated with the conversation will hold, because communication with the tag(s) has been lost. FAILED CYCLE - A single failed watchdog cycle will transition a conversation in the GOOD state to the SUSPECT state.

State SUSPECT In the SUSPECT state, one or more consecutive watchdog cycles have failed. The number of failed cycles has not yet reached the limit specified in the WatchdogCycles ini value specified in the [XMAN] section of the batchsvr.ini file. Communication with all tags configured to be inside of the data server associated with this conversation is still assumed to be reliable. The purpose of the suspect state is primarily to indicate when there may be problems with communication, due to processor loading or other problems. Enabled Events DISCONNECT - A disconnect will cause a conversation in the SUSPECT status to transition to the LOST state. Any batches using tag(s) associated with the conversation will hold, because communication with the tag(s) has been lost. N FAILED CYCLES - When the number of consecutive failed watchdog cycles reaches the value defined in the WatchdogCycles ini value, a conversation in the SUSPECT state will transition to the BAD state. Any batches using tag(s) associated with the conversation will hold, because communication with the tag(s) is no longer considered reliable.

Because the FactoryTalk Batch Server and the process-connected device independently decide whether to trust the quality of the communication, it is important to see that the time limit tolerances in the FactoryTalk Batch Server and the process-connected device are appropriate in relation to each other. The Server will not transition a conversation from the GOOD state to the SUSPECT state to the BAD state, until the number of consecutive failed watchdog cycles reaches the value specified in the batchsvr.ini file. So, the total length of time before the Server will consider a conversation BAD is the watchdog period multiplied by the tolerance limit for the number of watchdog failures. For example, if the watchdog period is set at 10,000 milliseconds, and the WatchdogCycles ini parameter is set at 5, then the FactoryTalk Batch Server will not change the status of a GOOD conversation to bad until at least 50 seconds (5x10) has passed.

315

PCD Programmers Technical Reference

Process-connected devices typically program their watchdogs using a single timer that is reset every time a write from the FactoryTalk Batch Server is detected. If the timer times out, the communication is considered bad, and all active phases are held. Generally, we recommend that the tolerance in the process-connected device be set a little greater than that in the FactoryTalk Batch Server. For example, if the settings in the batchsvr.ini file specified a 10-second period and five timeouts, then the Server would have a tolerance of 50 seconds. In this case, the tolerance in the process-connected device should probably be set somewhere in the 70-second range. Tags Used in the Watchdog Protocol
WATCHDOG:

In the area model, a watchdog item is configured for each data server. The watchdog item is a Boolean value (16-bit integer for enhanced protocol) that is set by the server and reset by the data server.

316

CHAPTER 7

Requesting Data from the FactoryTalk Batch Server


The information in this guide only applies to programming phase logic for OPC and FactoryTalk Live Data (FTD) equipment modules. For information on developing phase logic for PhaseManager equipment modules assigned a Logix5000 CIP data server, see the FactoryTalk Batch PhaseManager Users Guide or the Logix5000 Controllers PhaseManager User Manual.

The request protocol is used as a means for phase logic to communicate with the FactoryTalk Batch Server. Much of the work involved with writing phase logic centers around defining a sequence of steps for a phase. Some of these steps will require interaction with the FactoryTalk Batch Server. For example, the phase logic for a charge phase may perform the following steps to add material to a unit:
STEP Download target amount Acquire pump PM102 Reset totalizer Open valve FV101 Start pump PM102 Wait for totalizer to reach target Stop pump PM102 Close valve Release pump PM102 Unload actual amount Interacts with FactoryTalk Batch Server FactoryTalk Batch Server Basic Control Basic Control Basic Control Basic Control Basic Control Basic Control FactoryTalk Batch Server FactoryTalk Batch Server

The request protocol is the mechanism used by the phase logic to interact with the FactoryTalk Batch Server. By following the protocol, the phase logic can cause the Server to notice that the phase needs attention and service the request. The intricacies of following the request protocol are normally handled by the PLI. This leaves the phase logic programmer with a simple programming model. The sequence that the phase logic typically needs to follow is: 1. Prepare for request (set reports, for example) 2. Set any request parameters, if needed 3. Set the request

317

PCD Programmers Technical Reference

4. Wait for the request to be reset to zero (or one if using enhanced phase logic requests)
Allowing the phase logic to transition the phase to a terminal state (STOPPED, ABORTED, COMPLETE) without first verifying that the request register has been set to 0 (zero) or 1 (one) by the FactoryTalk Batch Server can result in future executions of the phase logic receiving faulty parameter data and can also result in the phase logic failing to release needed equipment.

The balance of this chapter should be used as a reference when programming any of the following request types:

Download parameter values1XXX (or 11XXX) Upload report parameter values2XXX (or 12XXX) Send messages to the operator3XXX (or 13XXX) Make requests to acquire/release resources4XXX (or 14XXX) Send messages to other phases (coordination)5XXX (or 15XXX) Abort a request 6000 (or 16000) Download special values7XXX (or 17XXX)

Downloading Parameters
During batch execution, phase logic can send a request to the FactoryTalk Batch Server to download values associated with its recipe phase parameters. The request can specify the number of values to be downloaded, the parameter IDs of the parameter values to be downloaded, a specific subset of parameter values to be downloaded, and/or the destination location of the parameter values within the process controller. A phase parameter ID is a positive integer and assigned when a phase is created in the Equipment Editor. The parameter values may be specified when a phase is added to a recipe using the FactoryTalk Batch Recipe Editor. If the phase parameter value is not specified when the recipe is built, the FactoryTalk Batch Server sends the FactoryTalk Batch View a request for the value when a Download Phase Parameter Values request is received from the phase. The View displays an Unacknowledged prompt to request the phase parameter value from the operator. Some download requests refer to the phase parameter using a parameter ID. If, when a download request is received, a phase parameter with the requested parameter ID has not been configured, the parameter ID is incremented by one and the phase parameter configured with that ID is obtained. This process is repeated until the originally requested ID has been incremented up to 999. If the requested number of phase parameters has not been found after the parameter ID is incremented to 999, a failure is generated by the FactoryTalk Batch Server and the batch is held according to the configured Hold Propagation. Some requests do not use parameter IDs to specify the parameter values to be downloaded. The 1000 (or 11000) request will Download All Phase Parameter Values, including phase parameter limits that exist. The other requests are 1500, 1501 and 1502, which will download a specific subset of parameters as defined in the area model. 1501 (or 11501) will request the FactoryTalk Batch Server to download all phase parameter values belonging to the Download on Start subset. The 1502 (or 11502) request will request the FactoryTalk Batch Server to download all phase parameter values belonging to the
318

7 Requesting Data from the FactoryTalk Batch Server

Download on TOC (transfer of control) subset. Parameters are assigned to these subsets in the Equipment Editor. Requests that involve parameter subsets, control strategies and upload/download parameter subsets, require a one-to-one mapping between parameters and the tags. Parameter1 in control strategies will always be the control strategy parameter and must be downloaded to Tag1.

Phase Parameter Tags Array


When a phase is created in the process controller, the phase parameter tags defined in the area model are viewed by the FactoryTalk Batch Server as a logical array. The parameter tag built against tag class PARMTR01 is considered to be the first element in the array. The parameter built against tag class PARMTR02 is considered to be the second, and so on. Download requests that specify an index into the parameter tag array are indexing into the logical array. When a download request is processed, the phase parameter values are written into the phase parameter array, starting at the element specified by the array index. The manner in which the array index is determined varies based on the type of request.
Download Phase Parameter Values Request
Download Request
PHASE_RQ PHASEQ01 PHASEQ02 = 1103 = 101 =2

Phase Parameters
Parameter

Batch Server

PLC or Process Phase Parameter Array Controller


Element Value

Name: Temperature ID: 101 Value: 100 EU: Degrees C


Parameter Name: Speed ID: 107 Value: 50 EU: RPM Parameter Name: Duration ID: 110 Value: 4.5 EU: Minutes

1 2 3 4 5 6 7 8

0 100 50 4.5 0 0 0 0

The request illustrated above asks for the value for three phase parameters beginning with the parameter value associated with the parameter ID of 101. The values are downloaded to the phase parameter array with the first value going to element number 2. In this example, the phase has been configured with three parameters and the phase parameter values were specified when the recipe was created.

319

PCD Programmers Technical Reference

Types of Download Parameter Requests


The process controller may specify the following types of Download Phase Parameter Value requests.

Request all phase parameter values1 Request a range of phase parameter values Request a single phase parameter value Request a subset of phase parameter values

All Phase Parameter Values


You may download values for all configured phase parameters to the phase parameter array starting at the element specified by array index 1. If control strategies are enabled, only those parameters assigned to the recipes control strategy will be downloaded. The control strategy parameter will always be Parameter1. Set the phase request tag to the following value to request all phase parameter values:
Phase Tag PHASE_RQ Value/Range 1000 (or 11000) Descriptions Request a range of phase parameter values

Range of Phase Parameter Values


You may download values for a range of phase parameters. The number of values to download is specified in the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the parameter ID of the first parameter to download from the PHASEQ01 phase tag, and the index of the phase parameter array element into which the first value will be stored from the phase tag PHASEQ02. The FactoryTalk Batch Server downloads the range of parameter values, starting with the value associated with the requested parameter ID and then the values of the phase parameters with incrementally higher parameter IDs, until the number of parameters downloaded matches the number of parameters requested. The parameter IDs need not increase sequentially. If the phase associated with the parameter has Control Strategies enabled, only those parameters belonging to the enabled Control Strategy are included in the download. Set the phase tags to the following values to request a range of phase parameter values:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 Value/Range 11NN (or 111NN) Descriptions Request a range of phase parameter values Parameter ID of 1st phase parameter Index into the phase parameter array

1 Most common method

320

7 Requesting Data from the FactoryTalk Batch Server

Range of Phase Parameter Values - Indirect


This request is necessary only when the number of parameters to download exceeds 99 (two digits).

This request is functionally identical to the previously described 11NN (or 111NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 11NN (or 111NN) request, the number of values to be moved is stored in the third request parameter. This form of request is useful when the number of values to move exceeds two digits. The FactoryTalk Batch Server reads the parameter ID of the first parameter to download from the phase tag PHASEQ01. The index of the phase parameter array element into which the first value will be stored is read from the phase tag PHASEQ02. It reads the number of values to download from the PHASEQ03 phase tag. The FactoryTalk Batch Server downloads the range of parameter values starting with the value for the phase parameter associated with the requested parameter ID, and then the values of the phase parameters with incrementally higher parameter IDs until the number of parameters read matches the number of parameters requested. The parameter IDs need not increase sequentially. Set the phase tags to the following values to request a range of phase parameter values:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 1100 (or 11100) Descriptions Request a range of phase parameter values Parameter ID of 1st phase parameter Index into the phase parameter array Number of phase parameters

Single Phase Parameter Value


You can download the value for a single phase parameter. The parameter ID of the requested parameter value is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server downloads a single value for the recipe parameter associated with the parameter ID and stores the value to the phase parameter array at the element specified by array index (NN). Set the phase request tag to the following value to request a single phase parameter value:
Phase Tag PHASE_RQ Value/Range 12NN (or 112NN) Descriptions Request a range of phase parameter values

321

PCD Programmers Technical Reference

Single Phase Parameter Value - Indirect


This request is necessary only when the number of parameters to download exceeds 99 (two digits).

This request is functionally identical to the previously described 12NN (or 112NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 12NN (or 112NN) request, the FactoryTalk Batch Server reads the parameter ID associated with the requested parameter value, from the phase tag PHASEQ01. The FactoryTalk Batch Server downloads a single value for the recipe parameter associated with the parameter ID, and stores the value to the phase parameter array at the element specified by array index 1. Set the phase tags to the following values to request a single phase parameter value:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 1200 (or 11200) >=1 Description Request a single phase parameter value Parameter ID of phase parameter

Single Phase Parameter Value - Specify Location


You may download the value for a single phase parameter and specify the destination location of the value. The parameter ID of the requested parameter value is specified by the two least significant digits of the request (NN). The index of the phase parameter array element to which the first value will be stored is read from the phase tag PHASEQ01. The FactoryTalk Batch Server downloads a single value for the phase parameter specified by the parameter ID, and stores the value to the phase parameter array at the element specified by the array index found in the phase tag PHASEQ01. Set the phase tags to the following values to request a single phase parameter value and to specify the destination location:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 13NN (or 113NN) >=1 Description Request a single phase parameter value Index into the phase parameter array

Single Phase Parameter Value - Indirect/Specify Location


This request is necessary only when the number of parameters to download exceeds 99 (two digits).

This request is functionally identical to the previously described 13NN (or 113NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 13NN (or 113NN) request, the FactoryTalk Batch Server reads the parameter ID associated with the requested parameter, from the PHASEQ01 phase tag, and reads the index of the phase parameter array element to which the value will be stored, from the PHASEQ02 phase tag.

322

7 Requesting Data from the FactoryTalk Batch Server

The FactoryTalk Batch Server downloads a single value for the phase parameter specified by the parameter ID, and stores the value to the phase parameter array at the element specified by the array index found in the phase tag PHASEQ01. Set the phase tags to the following values to request a single phase parameter value and to specify the destination location:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 Value/Range 1300 (or 11300) >=1 >=1 Description Request a single phase parameter value Index into the phase parameter array Parameter ID of 1st phase parameter

Subset of Parameter Values


You can download the values for phase parameters assigned to either the Download on Start or Download on TOC parameter subsets. Each parameter value is downloaded to the tag number matching the parameters defined ID. If a tag with a matching ID does not exist, the download fails and an error generates that holds the batch according to the configured hold propagation setting. If the phase associated with the parameters has control strategies enabled, only those parameters belonging to both the enabled control strategy and the specified subset is included in the download. Set the phase tags to the following values to request a subset of parameter values:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 1500 (or 11500) =1 or =2 Description Request a subset of parameter values. Indicates the subset to be downloaded: 1 = Download on Start 2 = Download on TOC

Subset of Parameter Values Download on Start


You can download the values for phase parameters assigned to the Download on Start parameter subset. Each parameter value is downloaded to the tag number matching the parameters defined ID. If a tag with a matching ID does not exist, the download fails and an error generates that holds the batch according to the configured hold propagation setting. If the phase associated with the parameters has control strategies enabled, only those parameters belonging to both the enabled control strategy and the specified subset are included in the download. Set the phase request tag to the following value to request the Download on Start subset of parameter values:
Phase Tags PHASE_RQ Value/Range 1501 (or 11501) Description Request the Download on Start subset of parameter values.
323

PCD Programmers Technical Reference

Subset of Parameter Values Download on TOC


You can download the values for phase parameters assigned to the Download on TOC parameter subset. Each parameter value is downloaded to the tag number matching the parameters defined ID. If a tag with a matching ID does not exist, the download fails and an error generates that holds the batch according to the configured hold propagation setting. If the phase associated with the parameters has control strategies enabled, only those parameters belonging to both the enabled control strategy and the specified subset are included in the download. Set the phase request tag to the following value to request the Download on TOC subset of parameter values:
Phase Tags PHASE_RQ Value/Range 1502 (or 11502) Description Request the Download on TOC subset of parameter values.

Downloading Report Limits


During batch execution, phase logic can send this request to the FactoryTalk Batch Server to download report limits information for all reports or for a single report. This allows for the ability to take corrective action if a report value is outside the configured limits. The limit configuration consists of the reports verification method and each configured range of limits. The verification methods are written as values to the equipment modules phase tags. The values for the verification methods are:
Verification Method No_Limits High / Low High-High / Low-Low High-High-High / Low-Low-Low Value 0 1 2 3

Types of Download Report Limits Requests


The process controller may specify the following types of Report Limits requests:

Request all report limits information Request the report limit configuration for a single report

324

7 Requesting Data from the FactoryTalk Batch Server

All Report Limits Information


Set the phase request tag to the following value to request the download of all report limit values:
Phase Tags PHASE_RQ Value/Range 1600 (or 11600) Description Download All Report Parameter Verification configuration.

The FactoryTalk Batch Server downloads the entire phases report limit configuration to the equipment modules limit tags.

Download Single Report Parameter Limits Configuration


The FactoryTalk Batch Server supports a request to download a single report parameter limit configuration to the equipment modules limit tags. The value NNN is the parameter ID number of the report parameter of interest. This phase logic request is functionally the same as the All Report Parameter Limit request described above except only the specified report parameter limit configuration values are downloaded. Set the phase request to the following values to request the download of a single report parameter limit value:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 1601 (or 11601) NNN Description Download a Single Report Parameter Verification configuration. Parameter ID number of the report parameter of interest.

The FactoryTalk Batch Server responds to the request by writing the verification method and report limits to the limit tags.

Upload Report Values


During batch execution, phase logic can send a request to the FactoryTalk Batch Server to upload report values. The request specifies the number of values to be uploaded, the report IDs associated with the report values, and where to get the values. The report ID is assigned at the time a report is created within a phase in the Equipment Editor. The report ID is a positive integer. Requests to upload a report value refer to the report using a report ID. If, when an upload request is received, a report with the requested report ID has not been configured, the report ID is incremented by one and the report configured with that ID is obtained. This process is repeated until the originally requested ID has been incremented up to 999. If the requested number of reports has not been found after the report ID is incremented up to 999, a failure is generated and the batch is held according to the configured HOLD propagation.

325

PCD Programmers Technical Reference

Some requests do not use report IDs to specify the report values to be uploaded. The 2000 (and 12000) request upload all phase report values. The other requests are 2500, 2501 and 2502, upload a specific subset of parameters. 2501 (or 12501) request the FactoryTalk Batch Server to upload all report parameter values belonging to the Upload on Terminal State subset. The 2502 (or 12502) request will request the FactoryTalk Batch Server to upload all phase report values belonging to the Upload on TOC (transfer of control) subset. Reports are assigned to these subsets in the Equipment Editor. Requests that involve report subsets, control strategies and upload/download parameter subsets, require a one-to-one mapping between report parameters and report tags.

Report Array
When an equipment phase is created in the process controller, the phase report parameter tags defined in the area model are viewed by the FactoryTalk Batch Server as a logical array. The report parameter tag built against tag class REPORT01 is considered to be the first element in the array. The report parameter built against tag class REPORT02 is considered to be the second, and so on. Upload requests that specify an index into the report parameter tag array are indexing into the logical array.When an upload request is processed, the report values are read from the report array, starting at the element specified by the array index. The manner in which the array index is determined varies based on the type of request. The illustration below depicts an Upload Report request. The request is for three report values starting with the report ID of 321. The values are uploaded from the report array with the first value coming from element number 2. In this example the phase class has been configured with three reports.
Upload Report Values Request
Upload Request
PHASE_RQ PHASEQ01 PHASEQ02 = 2103 = 321 =2

Report Events
Report

Batch Server

PLC or Process Controller

Report Array
Element Value

Name: Temperature ID: 321 EU: Degrees C


Report Name: Speed ID: 327 EU: RPM Report Name: Duration ID: 330 EU: Minutes

1 2 3 4 5 6 7 8

0 102 50 4.33 0 0 0 0

326

7 Requesting Data from the FactoryTalk Batch Server

Electronic Batch Record Entries


The report values are combined with the following information, then written as entries into the electronic batch record. They are also stored in memory so they can be referenced by transition expressions.

Batch ID Time/Date Phase Name

Recipe Name Unit ID Engineering Units

Process Cell Area Report Description

Types of Upload Report Requests


The phase logic may specify the following types of report upload requests:

Upload all report values 1 Upload a range of report values Upload a single report value Upload a subset of report values

All Report Values


You can upload all report parameters. Upload values for all configured reports from the report array starting at the element specified by array index 1. Set the phase request tag to the following value to send a request to upload all report parameters:
Phase Tag PHASE_RQ Value/Range 2000 (or 12000) Description Upload all report parameters

If control strategies are enabled, only those reports assigned to the recipes control strategy are uploaded.

Range of Report Parameter Values


You can upload values for a range of reports. The number of values to upload is specified in the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the report ID associated with the first requested report from the PHASEQ01 phase tag, and the index of the first report array element from the phase tag PHASEQ02. The FactoryTalk Batch Server uploads the range of parameter values, starting with the value associated with the requested report ID and then the values of the report with incrementally higher report IDs until the number of reports for which values are uploaded matches the number of reports requested. The report IDs need not increase sequentially.

1 Most common request

327

PCD Programmers Technical Reference

Set the phase tags to the following values to send a request to upload a range of report parameters:
Phase Tag PHASE_RQ PHASEQ01 PHASEQ02 Value/Range 21NN (or 121NN) Description Upload a range of report parameters Report ID of 1st report Index into the report array

Range of Report Values - Indirect


This request is necessary only when the number of reports to download exceeds 99 (two digits).

This request is functionally identical to the previously described 21NN (or 121NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 21NN (or 121NN) request, the FactoryTalk Batch Server reads the number of values to upload from the PHASEQ03 phase tag, reads the report ID of the first report value to upload from the PHASEQ01 phase tag, and reads the index of the report array element from which the first value is obtained from the phase tag PHASEQ02. The FactoryTalk Batch Server uploads the value associated with the starting report ID and then the values of the reports with incrementally higher report IDs until the number of report values read matches the number of reports requested. The report IDs need not increase sequentially. Set the phase tags to the following values to send a request to upload a range of report parameters:
Phase Tag PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 2100 (or 12100) >=1 >=1 >=1 Description Upload a range of report parameters Report ID of 1st report Index into the report array Number of report values

Single Report Parameter Value


You may upload a value for a single report. The report ID of the associated report value is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server uploads a single report value from the report array at the element specified by array index 1. Set the phase request tag to the following value to send a request to upload a single report:
Phase Tag PHASE_RQ Value/Range 22NN (or 122NN) Description Upload a single report parameter

328

7 Requesting Data from the FactoryTalk Batch Server

Single Report Value - Indirect


This request is necessary only when the number of parameters to download exceeds 99 (two digits).

This request is functionally identical to the previously described 22NN (or122NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 22NN (or 122NN) request, the FactoryTalk Batch Server reads the report ID associated with the requested report value from the PHASEQ01 phase tag. Upload a single report value from the report array at the element specified by array index 1. Set the phase tags to the following values to send a request to upload a single report parameter:
Phase Tag PHASE_RQ PHASEQ01 Value/Range 2200 (or 12200) >=1 Description Upload single report parameter Report ID of report

Single Report Parameter Value - Specify Location


You can upload a value for a single report and specify the source location of the value. The report ID for the requested report value is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the index of the report array element from the PHASEQ01 phase tag. The index tells the Server where in the report array to get the report value. The FactoryTalk Batch Server uploads a single report value from the report array at the element specified by the array index. Set the phase tags to the following values to send a request to upload a single report parameter:
Phase Tag PHASE_RQ PHASEQ01 Value/Range 23NN (or 123NN) >=1 Description Upload a single report parameter Index into the report array

Single Report Parameter Value - Indirect/Specify Location


This request is necessary only when the number of parameters to download exceeds 99 (two digits).

This request is functionally identical to the previously described 23NN (or 123NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 23NN (or 123NN) request, the FactoryTalk Batch Server reads the report ID for the associated report value from the PHASEQ02 phase tag, and the index of the report array element from the phase tag PHASEQ01. The index tells the Server where in the report array to get the report value.

329

PCD Programmers Technical Reference

The FactoryTalk Batch Server uploads a single report value from the report array at the element specified by array index. Set the phase tags to the following values to send a request to upload a single report parameter:
Phase Tag PHASE_RQ PHASEQ01 PHASEQ02 Value/Range 2300 (or 12300) >=1 NN Description Upload single report parameter Index into the report array Report ID of report

Subset of Report Values


You can upload a subset of values for a group of reports. The FactoryTalk Batch Server reads the request and then refers to the appropriate subset and the reports assigned to that subset. The FactoryTalk Batch Server uploads the subset of report values that are assigned to the request number subset. The 2501 (or 12501) request uploads the report parameters for the Upload on Terminal State subset, and the 2502 (or 12502) request uploads the report for the Upload on TOC subset. Sets are defined in the area model using the Equipment Editor. If the phase associated with the report parameters has control strategies enabled, only those report parameters belonging to both the enabled control strategy and the specified subset will be included in the upload. Set the phase tags to the following values to request an Automatic Report Upload subset of report values and to specify the destination location:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 2500 (or 12500) >=1 or 2 Description Request a subset of report values. Index into the report array.

Subset of Report Parameter Values - Upload on Terminal State


You can upload a subset of values for a group of reports. The FactoryTalk Batch Server reads the request and then refers to the appropriate subset and the reports assigned to that subset. The FactoryTalk Batch Server uploads the subset of report values that are assigned to the request number subset. The 2501 (or 12501) request uploads the reports for the Upload on Terminal State subset. If the phase associated with the reports has control strategies enabled, only those reports belonging to both the enabled control strategy and the Upload on Terminal State subset will be included in the upload.

330

7 Requesting Data from the FactoryTalk Batch Server

Set the phase request tag to the following value to request an Automatic Report Upload subset of report values and to specify the destination location:
Phase Tags PHASE_RQ Value/Range 2501 (or 12501) Description Request the Upload on Terminal State subset of report parameter values.

Subset of Report Values - Upload on TOC


You can upload a subset of values for a group of report parameters. The FactoryTalk Batch Server reads the request and then refers to the appropriate subset and the report parameters assigned to that subset. The FactoryTalk Batch Server uploads the subset of report parameter values that are assigned to the request number subset. The 2502 (or 12502) request uploads the report parameters for the Upload on TOC subset. If the phase associated with the report parameters has control strategies enabled, only those report parameters belonging to both the enabled control strategy and the specified subset are included in the upload. Set the phase request tag to the following value to request an Automatic Report Parameter Upload subset of report parameter values and to specify the destination location:
Phase Tags PHASE_RQ Value/Range 2502 (or 12502) Description Request the Upload on TOC subset of parameter values.

Sending Messages to the Operator and Clearing Messages


The set of possible messages that may be sent by the phase logic is configured when the associated phase is defined in the area model using the Equipment Editor. Each operator message is configured with a message ID, a positive integer. Requests to send a message refer to the message using the message ID. During batch execution, phase logic can make a request to the FactoryTalk Batch Server to send a message to the FactoryTalk Batch View and place the message into the electronic batch record. A Send Message to Operator request displays a message to the operator. In the FactoryTalk Batch View it is displayed on the Phase Summary screen. However, this type of request does not provide a mechanism to solicit information from the operator. The phase logic can also be configured to send a Clear Message to Operator request. This request clears the currently displayed message.

Send Message
Send the message with a specified message ID to the FactoryTalk Batch Client. The message ID is specified in the two least significant digits of the request (NN).

331

PCD Programmers Technical Reference

Set the phase request tag to the following value to send the operator a message:
Phase Tags PHASE_RQ Value/Range 30NN (or 130NN) Description Send a message to the operator

Sending a Message - Indirect1


This request is necessary only when the message ID exceeds 99 (two digits).

This request is functionally identical to the previously described 30NN (or 130NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 30NN (or 130NN) request, the message ID is specified in the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the message ID from the PHASEQ01 phase tag, then sends the associated message to the FactoryTalk Batch Client. Set the phase tags to the following values to send the operator a message:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 3000 (or 13000) NN>=1 Description Send a message to the operator Message ID

Clear Message
Clear the currently displayed message. Set the phase request tag to the following value to clear the message:
Phase Tags PHASE_RQ Value/Range 3100 (or 13100) Description Clear a message

Acquire Resources
During batch execution, phase logic can issue a request to the FactoryTalk Batch Server to acquire a pre-configured resource. Each resource configured with the Equipment Editor is assigned an equipment ID, which is a positive integer. Requests to acquire a resource refer to the resource using the equipment ID. Resources are acquired when the Acquire Resources request is issued. Acquired resources are released either by the Release Resources phase request or when the phase step is removed from the set of active steps in the recipe.

Types of Acquire Requests


The phase logic may acquire resources using the following requests:

Acquire a Single Resource Acquire Multiple Resources

1 This request may be used when the message ID is greater than 99. 332

7 Requesting Data from the FactoryTalk Batch Server

The types of acquire requests are explained below.

Acquiring a Single Resource


You can send a request to acquire a single resource. The equipment ID of the resource is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server acquires the resource specified by the equipment ID. Set the phase request tag to the following value to send a request to acquire a single resource:
Phase Tag PHASE_RQ Value/Range 40NN (or 140NN) Description Send a request to acquire a single resource

Acquiring a Single Resource - Indirect


This request is necessary only when the equipment ID exceeds 99 (two digits). Otherwise, use the 40NN (or 140NN) request.

This request is functionally identical to the previously described 40NN (or 140NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 40NN (or 140NN) request, the FactoryTalk Batch Server reads the equipment ID from the PHASEQ01 phase tag then acquires the resource specified by the equipment ID. Set the phase tags to the following values to send a request to acquire a single resource:
Phase Tag PHASE_RQ PHASEQ01 Value/Range 4000 (or 14000) >=1 Description Acquire a single resource Equipment ID

Acquiring Multiple Resources


You can acquire up to 99 resources with this request. The number of resources to acquire is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the number of equipment IDs specified in the request from the phase tags. Then the Server acquires the resources associated with the equipment IDs. Set the phase tags to the following values to send a request to acquire multiple resources:
Phase Tag PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 41NN (or 141NN) >=1 >=1 >=1 Description Acquire multiple resources Equipment ID to acquire Equipment ID to acquire Equipment ID to acquire

333

PCD Programmers Technical Reference

Release Resources
During batch execution, phase logic can issue a request to the FactoryTalk Batch Server to release a resource. Each resource configured with the Equipment Editor is assigned an equipment ID, a positive integer. Requests to release a resource refer to the resource using the equipment ID. Only resources that were previously acquired with an Acquire Resources phase request can be released using the Release Resources phase request.

Types of Release Requests


The process controller may release resources using the following requests:

Release a Single Resource Release Multiple Resources Release All Currently Acquired Resources

The types of release requests are explained below.

Releasing a Single Resource


You can release a single resource. The equipment ID of the resource is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server releases the resource specified by the equipment ID if the phase had previously acquired the resource through an Acquire Resources request. Set the phase request tag to the following value to send a request to release a single resource:
Phase Tag PHASE_RQ Value/Range 42NN (or 142NN) Description Release a single resource

Releasing a Single Resource - Indirect


This request is necessary only when the equipment ID exceeds 99 (two digits). Otherwise, use the 42NN (or 142NN) request.

This request is functionally identical to the previously described 42NN (or 142NN) request. The difference is that rather than retrieving the number of values to be moved from the last two digits of the 42NN (or 142NN) request, the FactoryTalk Batch Server reads the equipment ID from the PHASEQ01 phase tag. The Server releases the resource associated with the equipment ID if the resource had been previously acquired by this phase via an Acquire Resource request. Set the phase tags to the following values to send a request to release a single resource:
Phase Tag PHASE_RQ PHASEQ01 Value/Range 4200 (or 14200) >=1 Description Release a single resource Equipment ID to release

334

7 Requesting Data from the FactoryTalk Batch Server

Release Multiple Resources


You can release up to 99 resources with this request. The number of resources to release is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the number of equipment IDs specified in the request, from the phase tags. The FactoryTalk Batch Server releases the resources associated with the equipment IDs if this phase previously acquired the resources through an Acquire Resources request. Set the phase tags to the following values to send a request to acquire multiple resources:
Phase Tag PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 43NN (or 143NN) >=1 >=1 >=1 Description Release multiple resources Equipment ID to release Equipment ID to release Equipment ID to release

Releasing all Currently Acquired Resources


You can release all the resources that have been acquired by a phase via an Acquire Resource request. The FactoryTalk Batch Server releases the resources associated with the equipment IDs if the resources had been previously acquired by this phase through an Acquire Resource request. Set the phase request tag to the following value to send a request to release all currently owned resources:
Phase Tag PHASE_RQ Value/Range 4400 (or 14400) Description Release a single resource

Send Messages to Other Phases


Phases controlled by phase steps that belong to a synchronization group are able to communicate with each other. In fact, this defines the role of the synchronization group. Messages are sent between the phase steps within the synchronization group. Each message is assigned a unique message ID, a positive integer. Requests to send a message to another phase through the synchronization group refer to the message using the message ID and the number of phases that will receive the message. Phase communication can be used for the following purposes:

Synchronization A synchronization function can be performed to ensure that multiple phases are in agreed upon states before they proceed. Since the phases can execute synchronization

335

PCD Programmers Technical Reference

through this messaging function, no additional phase synchronization is implemented in the phase, unit or batch executives.
Synchronization CANNOT be used in conjunction with FactoryTalk Batchs Transfer of Control feature.

Permissive A permissive function can be performed to ensure that one phase of the synchronization group has passed a certain point in its phase logic before other phases can proceed. Data Transfer A data passing function can be performed to move data from one phase to another.

Completion of Messages
A Send Message Wait and a Receive Message Wait request pair is complete only if the message IDs for each of the calls are identical. This prevents messages from being routed to the improper request. Additionally, the Send Message Wait call must specify the number of receives confirmed as a parameter. This number allows for synchronization groups with more than two members.

Processing Send and Receive Messages


Upon receiving the Send Message call, the FactoryTalk Batch Server stores the message into the message list and actively responds to outstanding or incoming Receive Message Wait calls from other phases within the synchronization group. When a Receive Message Wait call is received from a phase of the synchronization group, the Server checks the message ID and completes the message if appropriate. Upon completion of the message transfer, the Server removes the message from the message list.

Types of Messages to Other Phases


You can specify the following types of send message requests:

Send a Message Send a Message and Wait Send a Message and Wait for One Receiver

Each request is explained below.

Sending a Message
You can send a message to another phase. The message ID of the message is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the number of phases that will receive the message from the PHASEQ01 phase tag and the message values from the other phase tags.

336

7 Requesting Data from the FactoryTalk Batch Server

Set the phase tags to the following values to send a message to another phase:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 50NN (or 155NN) >=1 Description Send a message Number of receivers Message value 1 Message value 2

Sending a Message - Indirect


You can send a message to another phase indirectly by specifying the message ID in the PHASEQ01 phase tag. The FactoryTalk Batch Server reads the message ID from the PHASEQ01 phase tag. The FactoryTalk Batch Server reads the number of phases that will receive the message from the PHASEQ02 phase tag and the message values from the other phase tags.
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 PHASEQ04 PHASEQ05 Value/Range 5000 (or 15000) >=1 >=1 Description Send a message Message ID Number of receivers Message value 1 Message value 2 Message value 3

Send a Message and Wait


You can send a message and wait for a response. The message ID of the message is specified by the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the number of phases that will receive the message, from the PHASEQ01 phase tag and the message values from the other phase tags. The receiving partners must issue a request before the data is sent. The sending partner may send the data at anytime. The sending phase waits for confirmation of the responses from the total number of receivers before continuing. The data is cached in the FactoryTalk Batch Server until the receiving partner(s) makes a request to receive the data. Set the phase tags to the following values to send a message and wait for a response from another phase:
Phase Tags Value/Range Description

337

PCD Programmers Technical Reference

PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03

51NN (or 151NN) >=1

Send a message and wait Number of receivers for which to wait Message value 1 Message value 2

Send a Message and Wait - Indirect


You can send a message and wait for a response indirectly by specifying the message ID from the PHASEQ01 phase tag. The FactoryTalk Batch Server reads the message ID for the message from the PHASEQ01 phase tag, the number of phases that will receive the message, from the PHASEQ02 phase tag, and the message values from the remaining phase tags. The receiving partner must issue a request before the data is sent. The sending partner may send the data at anytime. The sending phase waits for confirmation of the responses from the total number of receivers before continuing. The data will be cached in the FactoryTalk Batch Server until the receiving partner makes a request to receive the data. Set the phase tags to the following values to send a message to another phase and wait for a response:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 PHASEQ04 PHASEQ05 Value/Range 5100 (or 15100) >=1 >=1 Description Send a message and wait Message ID Number of receivers for which to wait Message value 1 Message value 2 Message value 3

Send a Message and Wait for One Receiver


You can send a message and wait for one receiver. The message ID for the associated message is specified in the two least significant digits of the request (NN). The FactoryTalk Batch Server reads the message values from the other phase tags. The receiving partner must issue a request before the data is sent. The sending partner may send the data at anytime. The sending phase logic waits for confirmation of the responses from the one receiver before continuing. The data will be cached in the FactoryTalk Batch Server until the receiving partner makes a request to receive the data. Set the phase tags to the following values to send a message to another phase and wait for one receiver:
Phase Tags PHASE_RQ Value/Range 52NN (or 152NN) Description Send a message and wait for one receiver

338

7 Requesting Data from the FactoryTalk Batch Server

Phase Tags PHASEQ01 PHASEQ02

Value/Range

Description Message value 1 Message value 2

Send a Message and Wait for One Receiver - Indirect


You can send a message and wait for one receiver indirectly by specifying the message ID in the PHASEQ01 phase tag. The FactoryTalk Batch Server reads the message ID for the message from the PHASEQ01 phase tag, and the message values from the other phase tags. The receiving partner must issue a request before the data is sent. The sending partner may send the data at anytime. The sending phase logic waits for confirmation of the responses from the one receiver before continuing. The data is cached in the FactoryTalk Batch Server until the receiving partner makes a request to receive the data. Set the phase tags to the following values to send a message to another phase and wait for one receiver:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 5200 (or 15200) >=1 Description Send a message and wait for one receiver Message ID Message value 1 Message value 2

Cancel Messages to Other Phases


The Send Message to Linked Phase call can be canceled by the phase logic that sent the message. The phase logic can remove the message by using the Cancel Message to Linked Phase request. Upon receiving the Cancel Message to Linked Phase request, the FactoryTalk Batch Server removes the message from the message queue and clears the request on the phase.

Types of Cancel Message Requests


You can specify the following types of cancel message requests:

Cancel a Single Message Cancel All Messages

Each type of Cancel Message request is explained below.

Canceling a Single Message


You can cancel a message to another phase. The message number is specified in the two least significant digits of the request (NN). The FactoryTalk Batch Server cancels the message associated with the message ID. The message was previously issued using a send message request.
339

PCD Programmers Technical Reference

Set the phase request tag to the following value to send a request to cancel a message to another phase:
Phase Tag PHASE_RQ Value/Range 53NN (or 153NN) Description Send a request to cancel a message to another phase

Canceling a Message - Indirect


You can cancel a message to another phase indirectly by specifying the message ID in the PHASEQ01 phase tag. The FactoryTalk Batch Server reads the message ID from the PHASEQ01 phase tag and cancels the message associated with the message ID, if it was previously issued using a send message request. Set the phase tags to the following values to send a request to cancel all messages sent to another phase:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 5300 (or 15300) >=1 Description Cancel a message Message ID

Canceling All Messages


Cancels all messages to other phases. The FactoryTalk Batch Server cancels all messages that were previously issued with a Send Message to Linked Phase request. Set the phase request tag to the following value to send a request to cancel all messages sent to other phases:
Phase Tag PHASE_RQ Value/Range 5400 (or 15400) Description Cancel all messages

Receive Message from Linked Phases


The Receive Message from Linked Phase request allows phase logic to notify the FactoryTalk Batch Server that it is prepared to receive a message or a set of messages from a linked phase. The Server then scans the synchronization group for pending messages with matching message IDs. The Server completes the message transfer by storing the message values into PHASEQ01 through PHASEQNN, where NN is the number of Message Values received. The Server then clears the request code on the phase logic.

Receiving a Message from a Linked Phase


You can send a request to wait for a message from another phase. The message ID associated with the incoming message is specified in the two least significant digits of the message (NN). The FactoryTalk Batch Server stores the message values into the phase tags.

340

7 Requesting Data from the FactoryTalk Batch Server

Set the phase tags to the following values to send a request to wait for a message from another phase:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 55NN (or 155NN) Description Wait for a message from another phase Message value 1 Message value 2 Message value 3

Receiving a Message from a Linked Phases - Indirect


You can send a request to wait for a message from another phase indirectly by specifying the message ID in the PHASEQ01 phase tag. The message ID associated with the incoming message is specified in the PHASEQ01 phase location. The FactoryTalk Batch Server stores the message values into the other phase tags. Set the phase tags to the following values to send a request to wait for a message from another phase:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 PHASEQ03 Value/Range 5500 (or 15500) >=1 Description Wait for a message from another phase Message ID Message value 1 Message value 2

Abort Request
A request that is in process can be canceled by using the Abort Request call. Set the phase request tag to the following value to cancel the request that is in process:
Phase Tag PHASE_RQ Value/Range 6000 (or 16000) Description Cancel the request in process

Download Batch Data


While a batch is processing, Batch data may be downloaded to a specific tag. The request must specify the actual tag number to which the parameter is to be downloaded. The

341

PCD Programmers Technical Reference

exception is when the actual tag number exceeds 99. In those instances the FactoryTalk Batch parameter may be downloaded indirectly.
The 7600/17600 and 7700/17700 requests are exceptions to the rest of the requests in this category in that they do NOT require you to specify the tag to which the data will be stored. Instead, the parameter Min and Max values are downloaded to the actual controller tags associated with the parameters on the phase itself. Note that the Min and Max values are downloaded for ALL the parameters on the phase without exception (including Strings and Enumerations).

The data type of the requested item must match the data type of the specified parameter. Set the phase tags to the following values to download a FactoryTalk Batch parameter:
Phase Tags PHASE_RQ Value/Range 71NN (or 171NN) Description Batch ID: Download customers batch ID to tag number NN Server downloads an ASCII String value. PHASE_RQ 72NN (or 172NN) Unique Batch ID: Download unique batch ID to tag number NN Server downloads an ASCII Integer value. PHASE_RQ 73NN (or 173NN) Phase ID: Download phase equipment ID to tag number NN Server downloads an ASCII - Integer value. PHASE_RQ 74NN (or 174NN) Control: Download a value to indicate whether the phase is under recipe control or manual phase control, to tag number NN Server will download: 0 = Recipe Control 1 = Manual Phase Control PHASE_RQ 75NN (or 175NN) Mode: Download a value to indicate the current mode of the requesting phase to tag number NN Server will download: 1 = P-Auto 2 = O-Auto PHASE_RQ 7600 (or 17600) Parameter Min: Download all phase parameter MIN values to the controller tags associated with those parameters.* Parameter Max: Download all phase parameter MAX values to the controller tags associated with those parameters.*

PHASE_RQ

7700 (or 17700)

* The 7600/17600 and 7700/17700 requests do NOT require you to specify the tag to which the data will be stored.

342

7 Requesting Data from the FactoryTalk Batch Server

Generating an Electronic Signature Request


During batch execution, phase logic can issue a request to the FactoryTalk Batch Server to generate a Signature Request. Each Signature Template is assigned a unique ID, which is a positive integer. Requests to generate a Signature specify the desired Signature Template ID. The Signature Template ID of the Signature to be generated is specified by the two least significant digits of the request (NN). Set the phase tag to the following value to send a request to generate a Signature:
Phase Tags PHASE_RQ PHASEQ01 Value/Range 79NN (or 179NN) 0 or non-zero Description Send a request to generate a single Signature. Flag indicating if Signature is cancelable. 0 = NO non-zero = YES

General Signature Request - Indirect


This request is functionally identical to the previously described 79NN request. This request is necessary when the Signature Template ID exceeds 99. Set the phase tags to the following values to send a request to generate a Signature:
Phase Tags PHASE_RQ PHASEQ01 PHASEQ02 Value/Range 7900 (or 17900) >=1 0 or non-zero Description Send a request to generate a single Signature. Signature Template ID. Flag indicating if Signature is cancelable. 0 = NO non-zero = YES

Downloading Material-Based Data


For additional information on these requests see Requesting Data from the Material Server.
Series 7801 (or 17801) 7802 (or 17802) 7803 (or 17803) PHASEQ01 Attribute Id Attribute Id Attribute Id PHASEQ02 Tag # Tag # Tag # Description Download data about the container currently in use. Download data about the current material inside the container currently in use. Download data about the current lot inside the container currently in use.

343

PCD Programmers Technical Reference

Series 7811 (or 17811) 7812 (or 17812) 7813 (or 17813) 7821 (or 17821) 7822 (or 17822) 7831 (or 17831)

PHASEQ01 Attribute Id Attribute Id Attribute Id Tag # Tag # Tag #

PHASEQ02 Tag # Tag # Tag # >0 >0 >0

Description Upload data about the container currently in use. Upload data about the current material inside the container currently in use. Upload data about the current lot inside the container currently in use. Download the current binding's container priority. Upload a new container priority for the current binding. Download data about sufficient material for step.

Series 80NN (or 180NN) 81NN (or 181NN) 83NN (or 183NN) 84NN (or 184NN) 85NN (or 185NN) 86NN (or 186NN) 88NN (or 188NN) 89NN (or 189NN)

Description Download Material Attributes Download Lot Attributes Download Container Attributes Downloading Container Priority Assignments Uploading Material Attributes Uploading Lot Attributes Uploading Container Attributes Uploading Container Priority Assignments

Functionality Supported single attribute, single value downloaded single attribute, single value downloaded single attribute, single value downloaded single attribute, single value downloaded single attribute, single value uploaded single attribute, single value uploaded single attribute, single value uploaded single attribute, single value uploaded

344

CHAPTER 8

Requesting Data from the Material Server


The information in this guide only applies to programming phase logic for OPC and FactoryTalk Live Data (FTD) equipment modules. For information on developing phase logic for PhaseManager equipment modules assigned a Logix5000 CIP data server, see the FactoryTalk Batch PhaseManager Users Guide or the Logix5000 Controllers PhaseManager User Manual.

Most of the fields within FactoryTalk Batch Material Managers material database are made available to the phase logic programmer for reading, some for writing, through the Phase PLI. Access to the data requires two things: the controller ID for the database entity and the index of the data on that entity. There are three classifications of data in the material database; materials, lots, and containers. There are two types of data for each of these classifications:

Standard Attributes: Standard attributes are materials, lots and containers. Custom Attributes: Custom attributes are the properties of the materials, containers, and lots defined in the material database.

The priority used to select containers for use can also be accessed. Container priorities are runtime data that are dependent on the area model data uploaded into the database by the FactoryTalk Batch Server. They help the Server select a container to use given the material required, its feed type (addition or distribution), the unit and finally the container. This data is accessed with separate PCD interfaces from those used for standard attributes and custom attributes. All of the data is accessible by an attribute ID which specifies a field. Materials, lots, or containers are referenced directly using the 8000 (or 18000) series commands or indirectly using the 7800 (or 17800) series commands.
This chapter assumes familiarity with the concepts discussed in Downloading Parameters and Upload Report Values. It is highly recommended that you read these sections before continuing.

Standard Attributes
Standard attributes are attributes that exist by default on a data entity. The attribute ID for a standard attribute is the index.

345

PCD Programmers Technical Reference

Material Standard Attributes


Field Name ID Name Controller ID Description EU Inventory Key Description Unique Primary Key for a material Material name Data Type Index Integer String 1 2 3 4 5 6 PLI Access Read Read Read Read/Write Read Read

Integer ID for phase logic programmer to Integer reference this material Material description Engineering Units for measuring the material String String

Optionally used field for storing an String identifier for this material; used by thirdparty inventory control systems The user ID (Windows logon) of the last user who changed a data field of this material The time a change was made to a data field of this material String

Last Edited By

Read

Last Modification Date Label Usage

String

Read

Specifies that the selection of a container String holding this material may be filtered by an assigned label. Labels used are: 1 - Batch ID 2 - Product Name 3 - Custom Name Designation of this material belonging to Integer a particular class of materials. This is the ordinal of the Classification enumeration as defined by the Material Editor. Integer Integer

Read

Classification

10

Read

MaterialGroupI Primary key of the Material Group D assigned to the material DefaultLotState Primary key to the Lot State assigned to ID the material

11 12

Read Read

Lot Standard Attributes


Field Name ID Name Description Unique Primary Key for a lot Lot name Data Type Index Integer String 1 2 PLI Access Read Read

346

8 Requesting Data from the Material Server

Field Name Controller ID Description EU

Description

Data Type Index 3 4 5

PLI Access Read Read/Write Read

Integer ID for phase logic programmer to Integer reference this lot Lot description Engineering Units for measuring the material. Note that this data actually resides on the Material and not the Lot. The Material Server business rules are expected to return the correct value. Optionally used field for storing an identifier for this lot; used by third-party inventory control systems The user ID (Windows logon) of the last user who changed a data field of this material Time this lot was entered into the database String String

Inventory Key

String

Read

Last Edited By

String

Read

Creation Date

String String Integer Integer Real

8 9 10 11 12

Read Read Read Read/Write Read

Depletion Date The time when this lot was completely consumed Material State Quantity Material ID value The state of the lot 1 - Lot Available for Use Amount of material in the lot

Container Standard Attributes


Field Name ID Name Controller ID Description EU Capacity Description Unique Primary Key for a container Container name Data Type Index Integer String 1 2 3 4 5 6 PLI Access Read Read Read Read/Write Read Read/Write

Integer ID for phase logic programmer to Integer reference this container Container description Engineering Units for measuring the material The containers maximum capacity String String Real

347

PCD Programmers Technical Reference

Field Name ContainerType

Description Container Type defines what type of container the user is dealing with. The possible values are: 1=Composite Container 2=Plug-Flow Container 3=Pallet Container

Data Type Index Integer 7

PLI Access Read

StateID

The ID value that represents the current Integer State of the Container. ID values correlate to the tbContainerState table. The ID value for the Storage Location (zero if the container is not part of a storage location). The value (quantity) of the Container Heel (the amount of inventory that remains in a container after all the accessible inventory has been removed). Integer

Read/Write

Storage Location Heel

Read

Real

10

Read/Write

Custom Attributes
Custom attributes are user-defined properties of materials, lots or containers. Custom attributes can be accessed in addition to the standard attributes. Each property that is added in the FactoryTalk Batch Material Manager material database has a controller ID, which begins at 1000 and is incremented by 10. Several fields are made available for each attribute, which are indexes. The attribute ID of the custom attribute is calculated from the controller ID plus the index.
Field ID = 1 Field ID = 2 Field ID = 3 Field ID = 4 Field ID = 5

ID Controller ID = 1000 Controller ID = 1010 75394 58367

Name pH- Factor Density

Maximum 5.5 154

Minimum 6.25 165

EU pH grams/cm3

Maximum pH- Factor attribute ID is 1000 + 3 = 1003

Minimum Density attribute ID is 1010 + 4 = 1014

Material Custom Attribute Fields


Field Name ID Description Unique Primary Key for a material attribute Data Type Index String 1 PLI Access Read

348

8 Requesting Data from the Material Server

Field Name Name Controller ID Description EU Data Type

Description Material property name of the The ID for this attribute Material attribute description Engineering Units for measuring the material The data type of the maximum and minimum values: Real = 0, Integer = 1, and String = 2 Maximum of the range of values acceptable for this material. Minimum of the range of values acceptable for this material

Data Type Index String Integer String String Integer 2 3 4 5 6

PLI Access Read Read Read/Write Read Read

Maximum

Real, Integer or String Real, Integer or String.

Read

Minimum

Read

Lot Custom Attribute Fields


Field Name ID Name Controller ID Description EU Data Type Description Unique Primary Key for a lot attribute Lot property name The ID for this attribute Lot attribute description Engineering Units for measuring the material The data type of the maximum and minimum values: Real = 0, Integer = 1, and String = 2 Maximum of the range of values acceptable for this material. Minimum of the range of values acceptable for this material The attribute value. Data Type Index String String Integer String String Integer 1 2 3 4 5 6 PLI Access Read Read Read Read/Write Read Read

Maximum

Real, Integer or String Real, Integer or String. Real, Integer or String.

Read

Minimum

Read

Value

Read/Write

349

PCD Programmers Technical Reference

Container Custom Attribute Fields


Field Name ID Name Controller ID Description EU Data Type Description Unique Primary Key for a container attribute Container property name The ID for this attribute Container attribute description Engineering Units for measuring the contents of the container The data type of the maximum and minimum values: Real = 0, Integer = 1, and String = 2 The attribute value. Data Type Index String String Integer String String Integer 1 2 3 4 5 6 PLI Access Read Read Read Read/Write Read Read

Value

Real, Integer or String.

Read/Write

Writing a Material Phase


Writing phase logic for a material phase requires some additional consideration. The FactoryTalk Batch Server requires that a simple protocol be followed by the phase logic programmer to ensure that inventory levels are properly maintained within the material database and that the FactoryTalk Batch Event Journal contains entries identifying the inventory that was produced or consumed. The protocol is simply this:

The phase logic must request a download of the AMOUNT parameter. Before entering a terminal state (COMPLETE, STOPPED or ABORTED), the phase logic must upload the ACTUAL_AMOUNT and FEED_COMPLETE report parameters. The sign of the value in the ACTUAL_AMOUNT report parameter must match the configured feed type: Additions are positive or zero; Distributions are negative or zero. Deviating from this results in an error and the batch being HELD. The Automatic Upload/Download functionality can be used to meet this protocol requirement. When used, the AMOUNT parameter is downloaded by the FactoryTalk Batch Server before the phase (equipment module) is commanded to start and the

350

8 Requesting Data from the Material Server

ACTUAL_AMOUNT and FEED_COMPLETE report parameters is uploaded after the phase logic runs to a terminal state. This simplifies the writing of phase logic.
When the Automatic Upload function is enabled, the FactoryTalk Batch Server automatically uploads the appropriate report values when the batch transitions to a terminal state. If the Server is stopped while a material enabled phase is uploading its report parameters, these report parameters are uploaded again during a Warm or Warm All Batch Server Restart. This also occurs when a material enabled phase transitions to External while the report parameters are being uploaded. When the material enabled phase transitions back to Program mode, the report parameters are uploaded a second time. Sometimes this generates an error that puts the batch in Hold. You can issue a clear failures command, restart the batch, and execution will proceed normally. To avoid this, disable the Automatic Upload function and perform report parameter uploads using phase logic requests.

The following diagram is an example of a phase process:


Phase Logic 1. 2.
START command issued Request to download AMOUNT Parameter (required)

Batch Server

Material Server

3.

Batch Server requests Promise ID from Material Server

4. 5.
AMOUNT Parameter downloaded

Material Server sends Promise ID to the Batch Server

6.

Request to upload FEED_COMPLETE Report (required) Request to upload ACTUAL_AMOUNT Report (required)

7.

STATE = Terminal State (COMPLETE, STOPPED, ABORTED)

8.

If FEED_COMPLETE is TRUE, the batch continues running. or; If FEED_COMPLETE is FALSE, AMOUNT is recalculated.

a. If Hold on Split Feed is YES,


the batch is held.

b. If Hold on Split Feed is NO,


the batch continues running. Material Addition or Material Distribution Recorded.

9.

10.

Material, lot, and container data are returned to the Batch Server and recorded in the Batch Event Journal.

1. The command to START the equipment module is issued from the FactoryTalk Batch Server. The RUNNING program eventually begins.
351

PCD Programmers Technical Reference

2. The phase logic sends a request to download the AMOUNT parameter from the FactoryTalk Batch Server. 3. The FactoryTalk Batch Server requests a Promise ID from the Material Server. This establishes an accounting data entity for tracking the inventory used. 4. The Material Server returns SUCCESS for the Promise ID to the FactoryTalk Batch Server. This is used by the FactoryTalk Batch Server during warm restarts to restore the state of a batch if the FactoryTalk Batch Server failed as the batch was running. 5. The FactoryTalk Batch Server downloads the parameters to the phase logic. The PCD then runs its program to perform a material addition or distribution. 6. The FEED_COMPLETE and ACTUAL_AMOUNT parameters are uploaded to the Batch Server. 7. The phase logic transitions to a terminal state. 8. The value returned in the FEED_COMPLETE report parameter, and the Hold on Split Feed configuration determine what recipe execution will do next:.
Hold On Split Feed is set in the Material Policy tab in the Server Options dialog box in the Equipment Editor.

If FEED_COMPLETE is TRUE, the batch continues running. If FEED_COMPLETE is FALSE, and Hold on Split Feed is YES, the batch is held. If FEED_COMPLETE is FALSE, and Hold on Split Feed is NO, the batch continues running.

9. The amount of the material addition or distribution is sent to the Material Server. The inventory levels in the material database are updated, and for material additions, the sublot or sublots of inventory used are identified. 10. Material, lot, and container data are returned to the Batch Server and recorded in the Batch Event Journal.

Uploading Data Constraints


FEED_COMPLETE TRUE FALSE HoldOnSplitFeed Explanation N/A YES The addition or distribution of the step is complete so the SFC continues running. The addition or distribution is not complete. The recipe is HELD to prevent the next step in the SFC from beginning to execute. The step must be rebound to proceed. The operator must perform an active step change away from the unfinished step, rebind the step manually, active step change back and then restart the batch.

352

8 Requesting Data from the Material Server

FALSE

NO

The addition or distribution is not complete. In the recipe, the material phase step should have been built within a loop with the transitions testing the value of the FEED_COMPLETE report as well as the value of the step.state attribute. When FALSE, the branch looping around to rerun the phase should be taken.

Uploading data into the material database has two constraints:

Some fields are only editable at configuration time. Only fields that may be changed at runtime will support uploading values. (See Standard Attributes for more information.) Security may limit the set of users allowed to modify the database. The FactoryTalk Batch Server service must have adequate permissions to store to the material database.

Material Server Requests


There are several requests used for downloading/uploading information to the Material Server through the FactoryTalk Batch Server. The balance of this chapter should be used as a reference when programming any of the following request types:

Downloading and uploading data during batch execution 78XX (or 178XX) Downloading and uploading attributes 8XXX (or 188XX)

Using the Enhanced Phase Logic Requests


The enhanced phase logic requests (available in Batch version 6.0 and higher) can be used to request alternative action when the material database is not available. The following example shows one possible method for dealing with a phase logic request failure of this type. 1. The phase logic writes a 17801 request to the PHASE_RQ tag, which requests a download of data from the material database and asks for the improved phase logic request error handling. 2. The FactoryTalk Batch Server detects the 17801 request and attempts to access the material database to retrieve the requested data. 3. The material database access fails. 4. The FactoryTalk Batch Server writes a 145 (Request Failed) command to the PHASE_OC tag of the equipment phase. 5. The PLI responds to the 145 command by writing a value of 15 into the PHASE_RQ tag. 6. The FactoryTalk Batch Server detects the request value of 15 and responds by writing a 170 (Reset for Next Request) command to the PHASE_OC tag of the equipment phase.

353

PCD Programmers Technical Reference

7. The PLI responds to the combination of the 170 command and current request tag value of 15 by writing a 1 into the PHASE_RQ tag of the equipment phase. 8. The phase logic sees value of 1 in the PHASE_RQ tag, which indicates a failure, and decides to take the alternative action of requesting download of parameter to prompt the operator for equivalent data. 9. The phase logic writes an 11000 series request value into the PHASE_RQ tag requesting the download of a prompt type parameter. Unable to Communicate with Material Server Phases can normally access the Material Server via PLI requests to upload or download data from the material database. If the access to the material database fails for any reason, including a loss of communication between the FactoryTalk Batch Server and the Material Server, the request from the PLI determines the following action. In previous versions of Batch, the standard phase logic request codes (1000-8000 series requests) used error handling logic, which reacted to a failure by holding batches according to configured Hold Propagation settings. The batch could not be restarted until communication was reestablished. The enhanced phase logic requests are the same as the standard phase logic request codes plus 10,000 (i.e., 11000-18000). These upper range request codes use the improved error handling and must be used by the phase logic to effectively run material recipes without the Material Server.

Requests for Data from the Recipe Execution Environment


The 78XX and 178XX requests provide access to certain types of data available or meaningful only during batch execution. These commands are intended to give the phase logic programmer access to the data of the material entities that the phase logic is interacting with. The attribute ID for a standard attribute is the index. The attribute ID for a custom attribute is the sum of the controller ID and the index. The following is a summary of these recipe execution requests:
Phase Q02 Tag # Tag # Tag # Tag #

Series 7801 (or 17801) 7802 (or 17802) 7803 (or 17803) 7811 (or 17811)

Phase Q01 Attribute ID Attribute ID Attribute ID Attribute ID

Description Download data about the container currently in use. Download data about the current material inside the container currently in use. Download data about the current lot inside the container currently in use. Upload data about the container currently in use.

354

8 Requesting Data from the Material Server

Series 7812 (or 17812) 7813 (or 17813) 7821 (or 17821) 7822 (or 17822) 7831 (or 17831)

Phase Q01 Attribute ID Attribute ID Tag # Tag # Tag #

Phase Q02 Tag # Tag # >0* >0* >0*

Description Upload data about the current material inside the container currently in use. Upload data about the current lot inside the container currently in use. Download the current binding's container priority. Upload a new container priority for the current binding. Download data about sufficient material for step.

* The second request must be a value greater than zero. This value is not currently used by the Batch Server. It is reserved for future use.

Download Data from Container Currently in Use 7801 Request


The 7801 and 17801 requests download material data from the container the equipment module is currently running against.
Value/ Range 7801 (or 17801) >0 >0

Phase Tags Phase_RQ PhaseQ01 PhaseQ02

Description Download data about the Container currently in use Data Field to be downloaded (attribute ID) The phase parameter tag number the value is to be downloaded into

Examples: The recipe step is using the optional material-based parameters. These values are:
Parameter Name MATERIALS AMOUNT CONTAINER LOT LABEL Parameter Value CAUSTIC 100 DRY_BIN1 ABCDEFG1999 --

355

PCD Programmers Technical Reference

Container Standard Attributes (subset)


Attribute Name* ID Index Value 1 53672635252 Name 2 Tank101 Controller ID 3 25784 Description 4 Non-Volatile EU 5 Lbs.

* For a full description of container attributes, see Standard Attributes on page 345.

Container Custom Attributes


Property Name* ID Index Value1 Value2 1 38728 48774 Name 2 Number of Feeds Clean With Controller ID Description 3 1000 1010 4 --EU 5 --Data Type Value 6 1 (integer) 1 (integer) 7 3 4323

* For a full description of custom material attributes, see Custom Attributes on page 348.

Example 1: Download the current containers Name attribute into tag 22.
Phase Tags Phase_RQ 7801 (or 17801) PhaseQ01 2 PhaseQ02 22 Result PhaseP22 Tank101

Example 2: Download the current containers Clean With attribute value into tag 4. The Clean With attribute has the Controller ID of 1010 and the value field has the index of 7, so the attribute ID is 1017.
Phase Tags Phase_RQ 7801 (or 17801) PhaseQ01 1017 PhaseQ02 4 Result PhaseP04 4323

Download Data from Material in Container Currently in Use 7802 Request


The 7802 and 17802 requests download material data from the current material within the container the equipment module is currently running against.
Phase Tags Phase_RQ Value/Range Description

7802 (or 17802) Download data about the current material inside the container currently in use

356

8 Requesting Data from the Material Server

Phase Tags PhaseQ01 PhaseQ02

Value/Range >0 >0

Description Data field to be downloaded (attribute ID) The phase parameter tag number the value is to be downloaded into

Examples: The recipe step is using the optional material parameters, and the current values imply the steps binding:
Parameter Name MATERIALS AMOUNT CONTAINER LOT LABEL Parameter Value CAUSTIC 100 DRY_BIN1 ABC-123 --

Material Standard Attributes (subset)


Attribute Name* Attr. Index Value ID 1 36428736476 Name 2 Caustic Controller ID 3 2003 Description 4 -EU 5 Lbs.

* For a full description of material attributes, see Standard Attributes on page 345.

Material Custom Attributes


Property Name* ID Index Value1 Value2 1 Name 2 Controller ID Description 3 1000 1010 4 --EU 5 pH -Data Type 6 0 (real) 2 (string) Max 7 3.5 -Min 8 3.1 --

67385 pH-Factor 6 49847 Color 2

* For a full description of custom material attributes, see Custom Attributes on page 348.

357

PCD Programmers Technical Reference

Example 1: Download the current materials Name attribute into tag 1


Phase Tags Phase_RQ 7802 (or 17802) PhaseQ01 2 PhaseQ02 1 Result PhaseP01 Caustic

Example 2: Download the current materials pH-Factor attributes maximum value into tag 1. The pH-Factor attribute has the controller ID of 1000 and the maximum field has the index of 7, so the attribute ID to access the maximum pH-Factor is 1007.
Phase Tags Phase Tags 7802 (or 17802) PhaseQ01 1007 PhaseQ02 1 Result PhaseP01 3.5

Download Data from Lot in Container Currently in Use 7803 Request


The 7803 and 17803 requests download lot data from the current material and current lot within the container the equipment module is currently running against. This request will not download a field that is a list. Identifying the Lot The LOT formula parameter does not need to be configured on the phase of the running equipment module. If the LOT formula parameter is used, it must have the lot name stored in it (either before or after binding occurred). This ensures that the correct lot is referenced. If the lot name is invalid or the material does not exist, the batch is held according to the configured hold propagation setting. Finding the exact lot from which to get the information is simple for composite and plugflow containers because only one sublot is accessible at a time. Pallets allow random access to sublots, so that when more than one lot of a material is stored on a pallet, the FactoryTalk Batch Server does not know which lot to retrieve data from unless there is only one lot on the pallet or the LOT formula parameter is specified.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7803 (or 17803) Download data about the current material inside the container currently in use >0 >0 Data field to be downloaded (attribute ID) The phase parameter tag number the value is to be downloaded into

358

8 Requesting Data from the Material Server

Examples: The recipe step is using the optional material-based parameters:


Parameter Name MATERIALS AMOUNT CONTAINER LOT
LABEL

Parameter Value CAUSTIC 100 DRY_BIN1 ABC-123


--

Lot Standard Attributes (subset)


Attribute Name* Attr. Index Value ID 1 3772836327 Name 2 ABC-123 Controller ID 3 6473 Description 4 -EU 5 lbs.

* For a full description of lot attributes, see Standard Attributes on page 345.

Lot Custom Attributes


Property Name* ID Index Value1 Value2 1 Name 2 Controller ID Description EU 3 1000 1010 4 --5 pH -Data Type 6 0 (real) Max Min Value 7 3.5 8 3.1 -9 3.35 white

673856 pHFactor 498472 Color

2 (string) --

* For a full description of custom lot attributes, see Custom Attributes on page 348.

Example 1: Download the current binding lots EU attribute into tag 2


Phase Tags Phase_RQ 7803 (or 17803) PhaseQ01 5 PhaseQ02 2 Result PhaseP02 lbs.

359

PCD Programmers Technical Reference

Example 2: Download the current binding lots pH-Factor attributes value into tag 3. The pH-Factor attribute has the attribute ID of 1000 and the value field has the index of 9, so the attribute ID to access the pH-Factor value is 1009.
Phase Tags Phase_RQ 7803 (or 17803) PhaseQ01 1009 PhaseQ02 3 Result PhaseP03 3.35

Upload Container Data into Container Currently in Use 7811 Request


The 7811 and 17811 requests upload container data about the container the equipment module is currently running against. This request will fail (without notice) if the data field is read-only.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7811 (or 17811) Upload data about the container currently in use. >0 >0 Data field to be uploaded into (attribute ID). Report tag address of the value to be stored into the material database.

Examples: The recipe step is using the optional material-based parameters; their values are:
Parameter Name MATERIALS AMOUNT CONTAINER LOT LABEL Parameter Value CAUSTIC 100 DRY_BIN1 ABC-123 --

Container Standard Attributes (subset)


Attribute Name* Index Value ID 1 53672635252 Name 2 Tank101 Controller ID 3 25784 Description 4 Non-Volatile EU 5 lbs.

* For a full description of container attributes, see Standard Attributes on page 345.

360

8 Requesting Data from the Material Server

Container Custom Attributes


Property ID Name* Index Value1 Value2 1 38728 48774 Name 2 Controller ID Description 3 4 --EU 5 --Data Type 6 1 (int) 1 (int) Value 7 3 4323

Number of 1000 Feeds Clean With 1010

* For a full description of custom container attributes, see Custom Attributes on page 348.

Example 1: Upload an updated value (index 4) for the Description attribute from Tag 2.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 2 Data PhaseR02 Volatile Result Caustics Description Volatile

7811 (or 17811) 4

Example 2: Upload an updated value (index of 7) for the Clean With attribute from Tag 8.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 8 Data PhaseR08 4323 Result Caustics Clean With Value 4323

7811 (or 17811) 1017

Upload Material Data into Material in Container Currently in Use 7812 Request
The 7812 and 17812 requests upload material data about the current material inside the container the equipment module is currently running against. This request will fail (without notice) if the data field is read-only.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7812 (or 17812) Upload data about the current material inside the container currently in use. >0 >0 Data Field to be uploaded into Report tag address of the value to be stored into the material database

Examples: Material Classifications: 4 = Waste, 1 = Raw, 2 = Intermediate, 3 = Finished

361

PCD Programmers Technical Reference

Material Standard Attributes (subset)


Attribute Name*
Index Value

ID
1 36428736476

Name
2 Caustic

Controller ID
3 2003

Classification
9 1 (Raw)

* For a full description of material attributes, see Standard Attributes on page 345.

Material Custom Attributes


Property ID Name* Index Value1 Value2 1 Name 2 Controller ID 3 1000 1010 Description EU 4 --5 pH -Data Type 6 Max 7 Min 8 3.1 --

673856 pHFactor 498472 Color

0 (real) 3.5 2 -(string)

* For a full description of custom material attributes, see Custom Attributes on page 348.

Example 1: Upload an updated classification for the material from Tag 1.


Phase_RQ Phase Tags 7812 (or 17812) PhaseQ01 9 PhaseQ02 1 Data PhaseR01 4 Result Caustic Classification 4(waste)

Example 2: Upload a new maximum pH-Factor for this material from Tag 3. The pHFactor custom attribute has an ID of 1000 and the maximum field has the index of 7, so the attribute ID to access the maximum pH-Factor is 1008.
Phase Tags Phase_RQ 7812 (or 17812) PhaseQ01 1008 PhaseQ02 3 Data PhaseR03 3.66 Result pH-Factor Min 3.5*

* Although syntactically correct, this request fails because the maximum value of a custom attribute is read-only, so it may only be changed at configuration time and not at runtime.

362

8 Requesting Data from the Material Server

Upload Lot Data into Lot in Container Currently in Use 7813 Request
The 7813 and 17813 requests upload lot data into the current lot of the current material inside the container the equipment module is currently running against. This request will fail if the data field is read-only. Identifying the Lot The LOT formula parameter does not need to be configured on the phase of the running equipment module. If the LOT formula parameter is used, it must have the lot name stored in it (either before or after binding occurred). This ensures that the correct lot is referenced. If the lot name is invalid or the material does not exist, the batch is held according to the configured hold propagation setting. Finding the exact lot from which to get the information is simple for composite and plugflow containers because only one sublot is accessible at a time. Pallets allow random access to sublots, so that when more than one lot of a material is stored on a pallet, the FactoryTalk Batch Server does not know which lot to retrieve data from unless there is only one lot on the pallet or the LOT formula parameter is specified.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7813 (or 17813) Upload data about the current lot inside the container currently in use. >0 >0 Data field to be uploaded into (attribute ID). Report tag address of value to be stored into the material database

Examples: Lot State Enumeration: 2 = Waiting to Test, 3 = In Test, 1 = Ready to Use Lot Standard Attributes (subset)
Attribute Name* Index Value ID 1 36428736476 Name 2 Caustic Controller ID 3 2003 State 11 2 (Waiting to Test)

* For a full description of lot attributes, see Standard Attributes on page 345.

In Batch 5.0 Service Pack 1, the 7813 request, which changes the lot state, used the PKID. However, in later versions of Batch (5.02 or higher), the 7813 (and 17813) requests will use the Controller ID instead.

363

PCD Programmers Technical Reference

Lot Custom Attributes


Property ID Name* Index Value1 Value2 1 Name 2 Controller ID Description EU 3 4 --5 pH -Data Type 6 0 (real) 2 (string) Max Min 7 3.5 -8 3.1 -Value 9 3.35 white

67385 pH-Factor 1000 6 49847 Color 2 1010

* For a full description of custom lot attributes, see Custom Attributes on page 348.

Example 1: Upload an updated state value (index 11) for the Lot from Tag 13.
Phase Tags Phase_RQ 7813 (or 17813) PhaseQ01 11 PhaseQ02 13 Data PhaseR13 3 Result Caustic.State 3

Example 2: Upload a new Value for the color for this lot from Tag 33. The color custom attribute has a controller ID of 1010 and the Value field has an index of 9; the attribute ID to access the color value is 1019.
Phase Tags Phase_RQ 7813 (or 17813) PhaseQ01 1019 PhaseQ02 33 Data PhaseR33 Green Result Caustic. Color.Value Green

Download the Current Bindings Container Selection Priority 7821 Request


The 7821and 17821 requests download the container selection priority for the material, container, feed type and unit currently in use by this equipment module. The value is stored into a specified tag.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7821 (or 17821) Download the current bindings container selection priority. NN >0 Phase parameter tag number Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The example uses a value of 999 to indicate a request data tag that is expected by the server but not used.

364

8 Requesting Data from the Material Server

Example: The container, Tank101, is currently in use and has a selection priority of 100 to be downloaded into Tag 2:
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 999 Result PhaseP02 100

7821 (or 17821) 2

Upload a Container Selection Priority for the Current Binding 7822 Request
The 7822 and 17822 requests upload a new container selection priority for the material, container, feed type and unit currently in use by this equipment module.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 Value/Range Description

7822 (or 17822) Upload a new selection priority for the container currently in use. >0 >0 Report tag address of priority to be assigned. Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The example uses a value of 999 to indicate a request data tag that is expected by the server but not used.

Example: The container, Tank101, has a new selection priority of 95 in Tag 8 to be uploaded:
Phase Tags Phase_RQ 7822 (or 17822) PhaseQ01 8 PhaseQ02 999 Data PhaseR08 95 Result Selection Priority 95

Download Sufficient Material Data 7831 Request


The 7831and 17831 requests download information regarding the availability of sufficient material, across all the valid binding candidates, to complete the addition before starting the material addition for the step.
Phase Tags Phase_RQ Value/Range Description

7831 (or 17831) Download data about sufficient material for step: 0 - Insufficient material was available across the valid binding candidates at the time the binding query was performed. 1 - Sufficient material was available across the valid binding candidates at the time the binding query was performed.

365

PCD Programmers Technical Reference

Phase Tags PhaseQ01 PhaseQ02

Value/Range >0 >0

Description Phase parameter tag address of priority to be assigned. Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The example uses a value of 999 to indicate a request data tag that is expected by the server but not used.

The FactoryTalk Batch Server will also, when running without the Material Server, return a 0 or 1 depending on when communication is lost.

Example: The step requires 500 gallons of Material B, there is 1250 available across all the valid binding candidates.
Phase Tags Phase_RQ 7831 (or 17831) PhaseQ01 10 PhaseQ02 999 Result PhaseP10 1

Requests for Data from the Material Database


The 8XXX (and 18XXX) request series provide access to the material data within the material database. These requests provide a means for accessing or storing a value to or from the material database. This provides the greatest flexibility for customization of phase logic and use of the database. The following is a summary of the material database requests:
Series* Description Functionality Supported single attribute, single value downloaded single attribute, single value downloaded single attribute, single value downloaded single attribute, single value downloaded single attribute, single value uploaded single attribute, single value uploaded

80NN (or Download Material Attributes 180NN) 81NN (or Download Lot Attributes 181NN) 83NN (or Download Container Attributes 183NN) 84NN (or Downloading Container Priority 184NN) Assignments 85NN (or Uploading Material Attributes 185NN) 86NN (or Uploading Lot Attributes 186NN)

366

8 Requesting Data from the Material Server

Series*

Description

Functionality Supported single attribute, single value uploaded single attribute, single value uploaded

88NN (or Uploading Container Attributes 188NN) 89NN (or Uploading Container Priority Assignments 189NN)

* All 8XXX series requests are available with the enhanced phase logic by using the upper range request codes (18XXX).

Download One Attribute of a Material - 80NN Request Series


The 80NN and 180NN commands download one attribute of a material to a specified tag. The attribute identified by the attribute ID is downloaded into the tag specified.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range Description

80NN (or 180NN) Download Material Data to phase parameter tag number NN >0 >0 >0 Material Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

Examples: The material Caustic has the following standard attributes and custom attributes: Material Standard Attributes
Attribute Name* ID Name Controller ID Description EU

Index 1 2 3 4 5

Value 36428736476 Caustic 2003 -lbs.

* For a full description of material attributes, see Standard Attributes on page 345.

367

PCD Programmers Technical Reference

Material Custom Attributes


Property ID Name* Index Value1 Value2 1 673856 498472 Name 2 pH-Factor Color Controller ID Description EU 3 1000 1010 4 --5 pH -Data Type 6 Max. Min. 7 8 3.1 --

0 (real) 3.5 2 -(string)

* For a full description of custom material attributes, see Custom Attributes on page 348.

Example 1: Download the materials Name attribute into Tag 1.


Phase Tags Phase_RQ 8001 (or 18001) PhaseQ01 2003 PhaseQ02 2 PhaseQ03 999 Result PhaseP01 Caustic

Example 2: Download the materials pH-Factor attributes minimum value into Tag 1. The pH-Factor custom attribute has the controller ID of 1000 and the minimum field has the index of 8, so the attribute ID to access the minimum pH-Factor is 1008.
Phase Tags Phase_RQ 8001 (or 18001) PhaseQ01 2003 PhaseQ02 1008 PhaseQ03 999 Result PhaseP01 3.1

Downloading Lot Attributes 81NN Request Series


The 81NN and 181NN commands download one attribute of a lot to a specified tag. The attribute identified by the attribute ID is downloaded into the tag specified. Only one value may be downloaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range Description

81NN (or 181NN) Download Material Lot Data to phase parameter tag number NN >0 >0 >0 Lots Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

368

8 Requesting Data from the Material Server

Examples: For the material Caustic, there exists a lot named ABC-123 that has the following standard attributes and custom attributes: Lot Standard Attributes
Attribute Name* ID Name Controller ID Description EU

Index 1 2 3 4 5

Value 3772836327 ABC-123 6473 -lbs.

* For a full description of material attributes, see Standard Attributes on page 345.

Lot Custom Attributes


Property Name* ID Index Value1 Value2 1 Name 2 Controller ID Description EU 3 1000 1010 4 --5 pH -Data Type 6 0 (real) 2 (string) Max. Min. Value 7 3.5 -8 3.1 -9 3.35 white

67385 pHFactor 49847 Color

* For a full description of Custom Lot Attributes, see Lot Custom Attribute Fields on page 349.

Example 1: Download the lots EU attribute into tag 2.


Phase Tags Phase_RQ 8102 (or 18102) PhaseQ01 6473 PhaseQ02 5 PhaseQ03 999 Result PhaseP02 lbs.

Example 2: Download the lots pH-Factor attributes value into tag 3. The pH-Factor custom attribute has the property ID of 1000 and the value field has the index of 9, so the attribute ID to access the pH-Factor value is 1009.
Phase Tags Phase_RQ 8103 (or 18103) PhaseQ01 6473 PhaseQ02 1009 PhaseQ03 999 Result PhaseP03 3.35

369

PCD Programmers Technical Reference

Downloading Container Attributes 83NN Request Series


The 83NN and 183NN commands download one attribute of a container to a specified tag. The attribute identified by the attribute ID is downloaded into the tag specified. Only one value may be downloaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range Description

83NN (or 183NN) Download Container Data to phase parameter tag number NN >0 >0 >0 Containers Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

Examples: There is a container, Tank101 that has the following standard attributes and custom attributes: Container Standard Attributes
Attribute Name* ID Name Controller ID Description EU

Index 1 2 3 4 5

Value 53672635252 Tank101 25784 Vessel for storing non-volatile materials lbs.

* For a full description of container attributes, see Standard Attributes on page 345

Container Custom Attributes


Property Name* ID Index Value1 1 38728 Name 2 Controller ID 3 Description EU 4 -5 -Data Type 6 1 (integer) Value 7 3

Number of 1000 Feeds

370

8 Requesting Data from the Material Server

Property Name* ID Value2 48774

Name Clean With

Controller ID 1010

Description EU ---

Data Type 1 (integer)

Value 4323

* For a full description of custom material attributes, see Custom Attributes on page 348

Example 1: Download the containers Name attribute into tag 22.


Phase Tags Phase_RQ 8322 (or 18322) PhaseQ01 25784 PhaseQ02 2 PhaseQ03 999 Result PhaseP22 Tank101

Example 2: Download the value field of the containers Clean With attribute into tag 4. The Clean With custom attribute has the controller ID of 1010 and the value field has the index of 7, so the attribute ID to access the Clean With value is 1017. This value is the Controller ID for the material to be used to clean this vessel, STANDARD DETERGENT, after the container is empty.
Phase Tags Phase_RQ 8304 (or 18304) PhaseQ01 25784 PhaseQ02 1017 PhaseQ03 999 Result PhaseP04 4323

Downloading Container Priority Assignments 84NN Request Series


The 84NN and 184NN commands download the Selection Priority of a container and load that value to a specified tag. A container's selection priority is assigned given a material, container, feed type and unit. The first three parameters are defined by values in the request registers. The unit is always restricted to the unit the equipment module is currently running in. Only one value may be downloaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range Description

84NN or 184NN Download the containers priority to phase parameter tag number NN. Tag data type = Integer >0 >0 Materials Controller ID Containers Controller ID

Positive or Feed Type: negative number 1 = Addition. 2 = Distribution.

371

PCD Programmers Technical Reference

Examples: The Operation Recipe is running in unit MIXER_1. All 84NN (and 184NN) requests will be for materials and containers within this unit. Example 1: Download the selection priority for adding CREAM to TANK_65 into tag 2.

Controller ID for CREAM = 10001 in PhaseQ01 Controller ID for TANK_65 = 20065 in PhaseQ02 Feed Type is an Addition so 1 must be in PhaseQ03. The Selection Priority for adding Cream to Tank_65 running in MIXER_1 is 100.
Phase Tags Phase_RQ 8402 (or 18402) PhaseQ01 10001 PhaseQ02 20065 PhaseQ03 1 Result PhaseP02 100

Example 2: Download the selection priority for distributing SUGAR from STAGING\PALLET_122 into tag 1.

Controller ID for SUGAR = 10110 in PhaseQ01 Controller ID for STAGING\PALLET_122 = 20222 in PhaseQ02 Feed Type is a Distribution, so 2 must be in PhaseQ03. The Selection Priority for distributing sugar to Staging\Pallet_122 running in MIXER_1 is 80.
Phase Tags Phase_RQ 8402 (or 18402) PhaseQ01 10110 PhaseQ02 20222 PhaseQ03 2 Result PhaseP01 80

Uploading Material Attributes 85NN Request Series


The 85NN and 185NN commands upload one attribute of a material from a specified tag. The attribute identified by the attribute ID is uploaded from the specified tag into the database if security and write-protections allow. Only one value may be uploaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range 85NN or 185NN >0 >0 >0 Description Upload Material Data from report parameter tag number NN Materials Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

372

8 Requesting Data from the Material Server

The material Caustic has the following standard attributes and custom attributes: Material Standard Attributes
Attribute Name* ID Name Controller ID Description EU Classification

Index 1 2 3 4 5 10

Value 36428736476 Caustic 2003 -lbs. 0 (raw)

* For a full description of material attributes, see Standard Attributes on page 345

Material Custom Attributes


Property Name* Property Index Value1 Value2 ID 1 Name 2 Controller ID 3 1000 1010 Description 4 --EU 5 pH -Data Type 6 Max. Min. 7 8 3.1 --

673856 pH-Factor 498472 Color

0 (real) 3.5 2 -(string)

* For a full description of custom material attributes, see Custom Attributes on page 348

Example 1: Upload an updated classification for the material from Tag 1.


Phase Tags Phase_RQ 8501 (or 18501) PhaseQ01 2003 PhaseQ02 10 PhaseQ03 999 Data PhaseR01 4 Result Caustic Classification 4 (waste)

373

PCD Programmers Technical Reference

Example 2: Upload a new maximum pH-Factor for this material from Tag 3. The pHFactor custom attribute has a controller ID of 1000 and the maximum field has the index of 7, so the attribute ID to access the maximum pH-Factor is 1007
Phase Tags Phase_RQ 8503 (or 18503) PhaseQ01 2003 PhaseQ02 1007 PhaseQ03 999 Data PhaseR03 3.66 Result Caustic Classification 3.5*

* Although syntactically correct, this request fails because the maximum value of a custom attribute is read-only so it may only be changed at configuration time, not at runtime.

Uploading Lot Attributes 86NN Request Series


The 86NN and 186NN commands upload one attribute of a lot from a specified tag. The attribute identified by the attribute ID is uploaded from the specified tag into the database if security and write-protections allow. Only one value may be uploaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range Description

86NN or 186NN Upload Lot Data from report parameter tag number NN >0 >0 >0 Lots Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

Examples: The material Caustic has the following standard attributes and custom attributes: Lot Standard Attributes
Attribute Name* ID Name Controller ID Description

Index 1 2 3 4

Value 36428736476 Caustic 2003 --

374

8 Requesting Data from the Material Server

Attribute Name* EU State

Index 5 11

Value lbs. 0 (raw)

* For a full description of lot attributes, see Standard Attributes on page 345

Lot Custom Attributes


Property ID Name* Property Index Value1 Value2 1 Name 2 Controller ID Description EU 3 1000 1010 4 --5 pH -Data Type 6 0 (real) Max . Min. Value 7 3.5 8 3.1 -9 3.35 white

67385 pH6 Factor 49847 Color 2

2 (string) --

* For a full description of custom lot attributes, see Custom Attributes on page 348.

Example 1: Upload an updated state value (index 11) for the Lot from tag 13.
Phase Tags Phase_RQ 8613 (or 18613) PhaseQ01 2003 PhaseQ02 11 PhaseQ03 999 Data PhaseR1 3 3 Result Caustic.State 3

Example 2: Upload a new value for the Color for this lot from tag 33. The Color custom attribute has a controller ID of 1010 and the Value index of index of 9, so the attribute ID to access the Color value is 1019.
Phase Tags Phase_RQ 8633 (or 18633) PhaseQ01 2003 PhaseQ02 1019 PhaseQ03 999 Data PhaseR33 Green Result Caustic. Color.Value Green

Uploading Container Attributes 88NN Request Series


The 88NN and 188NN commands upload one attribute of a container from a specified tag. The attribute identified by the attribute ID is uploaded from the specified tag into the

375

PCD Programmers Technical Reference

database if security and write-protections allow. Only one value may be uploaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range 88NN or 188NN >0 >0 >0 Description Upload Container Data from report parameter tag number NN Containers Controller ID Attribute ID Any value greater than zero. This value is not currently used by the FactoryTalk Batch Server. Reserved for future use. The examples use a value of 999 to indicate a request data tag that is expected by the server but not used.

Examples: The container Tank101 has the following standard attributes and custom attributes: Container Standard Attributes
Attribute Name* ID Name Controller ID Description EU

Index 1 2 3 4 5

Value 53672635252 Tank101 25784 Vessel for storing non-volatile materials lbs.

* For a full description of container attributes, see Standard Attributes on page 345.

Container Custom Attributes


Property Name* ID Index Value1 Value2 1 38728 48774 Name 2 Number of Feeds Clean With Controller ID 3 1000 1010 Description 4 --EU 5 --Data Type Value 6 1 (int) 1 (int) 7 3 4209

* For a full description of custom container attributes, see Custom Attributes on page 348.

376

8 Requesting Data from the Material Server

Example 1: Upload an updated value (index of 7) for the Clean With custom attribute from Tag 8.
Phase Tags
Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03

Data
PhaseR08

Result
Caustic.Clean With. Value

8808 (or 18808)

25784

1017

999

4328

4328

Uploading Container Priority Assignments 89NN Request Series


The 89NN and 189NN commands upload a Selection Priority for a container from a specified tag. A containers selection priority is assigned given a material, container, feed type and unit. The first three parameters are defined by values in the request registers. The unit is always restricted to the unit the equipment module is currently running in. Only one value may be uploaded at a time.
Phase Tags Phase_RQ PhaseQ01 PhaseQ02 PhaseQ03 Value/Range 89NN or 189NN >0 >0 Positive or negative number Description Upload the containers priority from report parameter tag number NN. Tag data type = Integer Materials Controller ID Containers Controller ID Feed Type: 1 = Addition. 2 = Distribution.

Examples: The Operation Recipe is running in unit MIXER_1. All 89NN (and 189NN) requests will be for materials and containers within this unit. Example 1: Upload the new selection priority of 95 for adding CREAM to TANK_65 from Tag 2.

Controller ID for CREAM = 10001 in PhaseQ01 Controller ID for TANK_65 = 20065 in PhaseQ02 Feed Type is an Addition so 1 must be in PhaseQ03. The Selection Priority for adding Cream to Tank_65 running in MIXER_1 is 95.
Phase Tags Phase_RQ 8902 (or 18902) PhaseQ01 10001 PhaseQ02 20065 PhaseQ03 1 Data PhaseR0 2 95 Result Selection Priority 95

377

PCD Programmers Technical Reference

Example 2: Upload the new selection priority 70 for distributing SUGAR to STAGING\PALLET_122 into tag 1

Controller ID for SUGAR = 10110 in PhaseQ01 Controller ID for STAGING\PALLET_122 = 20222 in PhaseQ02 Feed Type is a Distribution, so 2 must be in PhaseQ03. The Selection Priority for distributing sugar to Staging\Pallet_122 running in MIXER_1 is 70.
Phase Tags Phase_RQ 8901 (or 18901) PhaseQ01 PhaseQ02 10110 20222 PhaseQ03 2 Data PhaseR0 1 70 Result Selection Priority 70

378

CHAPTER 9

Modularizing the Process


The most critical step of the entire Automation project is the modularization of the process. According to S88.01: All control related sections of the standard assume that the process cell in question (both physical equipment and related control activities) has been subdivided into well-defined equipment entities such as units, equipment modules and control modules. Effective subdivision of the process cell into well-defined equipment entities is a complex activity, highly dependent on the individual requirements of the specific environment in which the batch process exists. Inconsistent or inappropriate equipment subdivisions can compromise the effectiveness of the modular approach to recipes suggested by this standard. Subdivision of the process cell requires a clear understanding of the purpose of the process cells equipment. Such understanding allows the identification of equipment entities that must work together to serve an identifiable processing purpose.

About Process Modules


Here we discuss the physical partitioning of the process into Process Cell, Units, Equipment Modules and Control Modules. This partitioning should be performed in a top down manner. That is, the process should first be identified. Once its boundaries are identified, the Units within the Process Cell are identified. Once they are identified, the Equipment Modules within the Units within the Process Cell are identified. Finally, all Control Modules within all other levels are identified.
PHYSICAL MODEL Top-Down
PROCESS CELL

PROCEDURAL MODEL Bottom-Up


PROCEDURES

UNITS

UNIT PROCEDURES

EQUIPMENT MODULES

OPERATIONS

CONTROL MODULES

PHASES

Modularization Steps

379

PCD Programmers Technical Reference

Unit
A unit is comprised of equipment modules and control modules. Some of these modules are permanently engineered to be a part of the unit and some can be acquired as needed. Units should be able to operate relatively independently of each other. A unit can temporarily acquire the services of another equipment module or control module to carry out specific tasks. A unit will typically contain or hold the batch and cause some change to occur. By definition, a unit cannot make two products (execute two batches) at the same time. A unit is capable of executing procedural control in order to make product.

Equipment Module
An equipment module (EM) is comprised of other EMs and control modules. As with a unit, an EM can acquire the services of another EM or control module temporarily to carry out specific tasks. Since an EM can be a shared resource, it can be designed to operate on more than one batch at a time (i.e. vacuum system). An EM is capable of executing procedural control (phases). The primary difference between a unit and an EM is that an EM is typically called on by a unit to perform a specific task as opposed to acting on a batch independently.

Control Module
A control module (CM) is comprised of other CMs and devices. Since a CM can be a shared resource, it can be designed to operate on more than one batch at a time (i.e. header valve). A CM cannot execute procedural control, it is only called upon by procedural control to perform a specific action.

Define Tags
When defining units, decide on a tag naming convention. If units are grouped as a class, define a scheme that will consistently name devices. If dissimilarities between a unit and other members of its class are severe, consider moving the unit to its own class. This process will help in automatic tag generation by control systems. An example is level transmitters named by appending an _LV suffix to their associated unit name.

Define Resources
A resource is an entity (either EM or CM) that can provide services to a unit. In the previous section on process models, we described resources as either exclusive or shared resources. An example of an exclusive use resource is an analyzer. If another reactor wants to use the services of the analyzer, it must wait for the first reactor to release it. A shared resource can provide services to several units at the same time. An example of a shared use resource is a vacuum system. However, if the capability of the shared resource is limited, then arbitration of the resource becomes critical.

380

9 Modularizing the Process

Modularization Criteria
Here are the criteria that can be used to determine the boundaries between modules:

Purpose Use Portability Flexibility

Independence Expansion Isolation Physical Process Constraints

Purpose
What is the intended purpose of the module? All of the elements of the module (inside the boundary) should have a similar purpose. A module should operate somewhat as a selfcontained system. For example, the purpose of a vacuum system is to maintain a constant vacuum pressure on the inlet, and pull vacuum on upstream customers. The purpose of a solvent recovery system is to condense solvent from a process stream and collect the solvent. The solvent recovery system may use the vacuum system to pull the solvent from a tank, but the purpose of the vacuum system is different from the purpose of the solvent recovery system. The vacuum system may be used independently of the solvent recovery system, therefore they should be separate modules.

Use
Use refers to how the module interacts with other modules. Is it acquired by another module (Unit or Equipment Module) or does it operate independently? If it is acquired by another module, can more than one module acquire it at a time? Any module that can be acquired by more than one other module must be outside of the boundaries of both modules that can acquire it. For example, if a block valve control module can be acquired and used by two different reactor units, then the CM must be outside of the boundary of either unit.

Portability
Portability refers to the ability of a module to be duplicated or moved to another process or location. Will this module ever be duplicated in another process cell? Will this module ever be moved into another controller in the future? If so, then the boundary of the module needs to be appropriate so that it is self-contained and can be moved.

Flexibility
If there is a grouping of equipment that will increase or decrease the flexibility of the process, then the modules need to be defined so as not to limit the flexibility of the overall process.

Independence
Independence refers to the ability of the module to operate on its own to the greatest extent possible. Sometimes that requires adding a recycle or reflux capability to the module. Independence is not always required, but it allows the process to operate much more smoothly.

381

PCD Programmers Technical Reference

Expansion
Expansion refers to the ability to add capacity to the process by adding new modules. If there is a portion of the process that can or will be a bottleneck, then it is usually a good idea to draw the module boundaries so that new capacity could be added by duplicating the module.

Isolation
Isolation refers to the ability to minimize the effect of process upsets by containing them within the module where the upset occurs. This goes hand in hand with independence.

Physical Process Constraints


A physical process constraint is any equipment limitation that may force modularization to occur in a certain manner. For example, if two tanks share a common pump, then the pump must be defined outside the boundary of either of the tank modules. The tank module then acquires the pump when it is needed.

Identifying the Phases in the Selected Process


An equipment module is capable of performing an independent process-oriented action called a phase. There may be one or more control steps within a phase that may be executed sequentially or concurrently. You will need to identify the phases in the process that need to be programmed to interact with FactoryTalk Batch. By looking at the Process and Instrumentation Diagram (P&ID) drawings and reviewing a copy of the plants process description, you should be able to identify the individual phases that exist in the process. P&ID drawings show all of the equipment and flow paths between equipment. The process description defines how the process operates. After all phases have been identified, you will need to calculate the memory and processing requirements of the phases. The following is an example process with all phases identified within one of the units.

382

9 Modularizing the Process

P & ID Drawing - Example


The following diagram is an example of a P&ID drawing that may be used to identify the phases that exist in the process cell:

P&ID Example Drawing

383

PCD Programmers Technical Reference

Unit #2 Phases This figure shows the four phases (equipment modules) associated with Unit #2. The following describes each of these four phases:
XV105

LI603 L1 Ing. B Store Ing. C Store WI204 W1 RV208 FI602 F1 XV205 PM602 Premix B Unit #2 AG200 SC207 LI203 L1

XY201 PM202

Equipment modules in Unit 2 (Example P&ID)

Phase ADD ADD MIX DISCHARGE

Equipment Module Charge B Charge C Agitate Transfer Out

Description Charge material B into Unit #2 Charge material C into Unit #2 Agitate material in Unit #2 Transfer material out of Unit #2 into Reactor Unit #3. (The Transfer Out phase must be coordinated with a Transfer In phase in the reactor unit.)

384

CHAPTER 10

Programming Phase Logic


Equipment module phase logic is programmed to enable equipment to respond to and interact with the FactoryTalk Batch batch automation software. This chapter describes the steps necessary to program phase logic that will interact with the FactoryTalk Batch Server. Some of the sections are purposely written in a general context since the specific phase logic programming requirements will depend upon the selected plants process controller. For information regarding the process controllers programming requirements, refer to the manufacturers supporting literature. Any programming language may be used to program a phase for interaction with the FactoryTalk Batch Server. Generally, you should use the programming language that the process controller supports. However, the process controller must be able to communicate with the hardware platform on which the Server is running. Once the phase logic has been programmed, you need to configure the corresponding equipment modules using the FactoryTalk Batch Equipment Editor. Programming phase logic is a multiple-step process. The steps necessary to program phase logic are listed below. It is recommended that these steps be performed in the following order: 1. Modularize the process. (See Modularizing the Process for more information.) 2. Identify the phases in the selected process. (See Identifying the Phases in the Selected Process for more information.) 3. Build the Equipment Modules and Control Modules (device drivers). (See Define Resources for more information.) 4. Design the phase logic. 5. Program the phase logic. 6. Test the phase logic.

Allocating Phase Memory Tags


Phase memory tags store values for the 15 unique data items that the FactoryTalk Batch Server and phase use for communication purposes. You must allocate phase memory tags for each phase. When allocating phase memory tags, a name and possibly a memory location must be designated for each of the following data items:

Batch Requests Batch Commands Status Request Data Owner

External Requests External Commands Failure Paused Phase Report Values

Phase Parameter Values Unit Request Pause Single Step*

* This tag is set when the SEMI_AUTO command is sent to the phase.
385

PCD Programmers Technical Reference

Before allocating the phase memory tags, you should have a good understanding of the process controller and the physical devices in the selected plant. Identify the phases in the process. (See Identifying the Phases in the Selected Process for more information.) Calculate the memory and processing requirements for the identified phases. Build the Equipment Modules and Control Modules needed for the process. When finished, program the state transition logic.

It is important to note that when using control strategies in your area model, you must allocate one tag for each phase parameter and each phase report to be used, as well as one tag for the control strategy parameter. This is true even if each of your control strategies for the phase use only a portion of the total number of parameters and reports. In addition, Parameter1, Control Strategy, must always download to Tag1.

Steps to Allocate Phase Memory Tags


The following lists the steps necessary to allocate phase memory tags: 1. Identify the phase memory tags, including the number of array elements for the phase report values, phase parameter values, and request data values. 2. Assign the memory location and associate a symbol or a tag name to each memory location depending on the type of process controller being used.
PLC Select the memory location. Associate a tag name or symbol to the memory location. DCS Assign a tag name or symbol to the phase memory tag. Depending upon the DCS, you may also assign a memory location.

Phase Memory Tags


The following shows the 15 phase memory tags that may be allocated for each phase, and the recommended naming convention. The tags marked with Req are required by the FactoryTalk Batch Server. The phase memory tag name may begin with the phase name followed by an underscore character then a two or three character extension, as shown in the following table:
Phase Memory Tag Batch Command Req External Command Batch Request External Request Parameter Values Recommended Naming Convention [PHASE NAME]_OC [PHASE NAME]_EC [PHASE NAME]_OR [PHASE NAME]_ER [PHASE NAME]PNN, where NN is a number. You may allocate an array or several memory tags for the phase parameter values.

386

10 Programming Phase Logic

Phase Memory Tag Unit Req Status Req Step Index Req Failure Req Request Req Request Data Values

Recommended Naming Convention [PHASE NAME]_UN [PHASE NAME]_ST [PHASE NAME]_SI [PHASE NAME]_F [PHASE NAME]_RQ [PHASE NAME]QNN, where NN is a number. You may allocate an array or several memory tags for the request data values. [PHASE NAME]_P [PHASE NAME]_PD [PHASE NAME]_W [PHASE NAME]RNN, where NN is a number. You may allocate an array or several memory tags for the phase report values. [PHASE NAME]_SS

Pause Req Paused Req Owner Req Report Values

Single Step *Req

* This tag is set when the SEMI_AUTO command is sent to the phase.

Phase logic programming should be based on a clearly defined set of templates. The actual work to be performed during execution of the phase logic is then plugged into the template for each individual phase. There are three common forms of phase logic programming: SFC, Structured Text, and Ladder Logic. This document focuses on SFC and Structured Text programming (see illustration below for examples of an SFC).
Sequential State Machine Structured Text
WHILE (not complete) DO If Step=1 THEN S1 ELSE_IF Step=2 THEN S2 ELSE_IF Step=3 THEN S3 ELSE_IF Step=4 THEN S4 END_IF END_WHILE

Step=1
S1

Step=2
S2

complete Step=3
S1

Step =1
S2

Step =2
S3

Step =3
S4

Step =4

S3

Step <>1

Step <>2

Step <>3

Step <>4

Step=4
S4

complete

State Machine Programming

Parallel vs. Sequential Programming for Phase Logic


When programming phase logic using SFCs, there are two common programming paradigms: Sequential and state machine. There are advantages and disadvantages of each.

387

PCD Programmers Technical Reference

Sequential phase logic programming is more intuitive and easier to troubleshoot. The SFC shows the order of step execution and most control systems will show what step is active. They are, on the other hand, more difficult to change. They also have problems with recovery from an exception. Whenever an SFC is started, it must start at the first step and progress only through connected steps and transitions. If, after an exception, you would like to restart at a step other than 1, you must create a transition from the starting point to each and every step in the SFC (see figure below). Also, in order to change the order of steps, the SFC must be redrawn.

Step =4

Step =3

Step =2
S1

Step =1

Step =2
S2

Step =3
S3

Step =4
S3

Complete

Phase Recovery

State machine-based programming (see State Machine Programming) can be implemented in either SFC or Structured Text. With this implementation, the phase logic can move from any step to any step, based on transitions. This allows new steps to be added and /or steps to be re-sequenced very easily. It also allows recovery from an exception without any changes. One drawback though, is that this form of programming is less intuitive. It doesnt show the sequential nature of the steps.

Semi-Auto
Semi-Auto1 phase processing is a powerful mechanism that can be implemented to aid in troubleshooting and commissioning. When a phase is in the Semi-Auto mode, the phase logic will halt at pre-programmed breakpoints. When a Resume command is received, the phase logic will resume processing until it reaches the next breakpoint where it will wait for another Resume command. This can allow someone to verify the control actions taken by each step within the phase logic.
If a phase somehow ends up in a Semi-Auto mode during normal processing, it could cause serious problems. Care should be taken to never allow a phase to get into a SemiAuto mode except during troubleshooting and checkouts. This can be accomplished through a security feature or by disabling the Semi-Auto functionality.

1 Semi-Auto was formerly referred to as the Single-Step command. In an effort to become more consistent with the S88.01 standard, the term was changed to Semi-Auto.

388

10 Programming Phase Logic

It is important to note that Semi-Auto phase logic processing works differently than Semi-Auto processing of operations, unit procedures, and procedure levels. Semi-Auto phase logic processing requires pre-programmed breakpoints in the phase logic. SemiAuto processing of operations, unit procedures, and procedures does not require these pre-programmed breakpoints.

An example of the code that could be used to implement a breakpoint is:


IF PHASE_P THEN PHASE_PD:= TRUE; END_IF;

The Paused flag is then used to disable the processing of the phase logic.

Pause
Pause is a mechanism that allows the operator to halt execution of phase logic at a preprogrammed breakpoint. The programmer must place the breakpoints in the code at safe points within the processing. When a phase has the Pause attribute set, the phase will pause at the next pre-programmed breakpoint. The next step is not processed until the operator issues a Resume command. Once a Resume command is received, the phase logic continues normal execution.
Pause and Semi-Auto work in a similar manner. Each will force the phase logic to pause at the next pre-programmed breakpoint until a Resume command is received. When a Resume command is received by Paused phase logic, it will continue normal execution. However, when a Resume command is received by a phase in Semi-Auto, it will continue to execute until it reaches the next pre-programmed breakpoint.

Treat Modules as Objects


Phase logic should always treat equipment modules and control modules as objects. That is to say, that it should never act directly on an output. It should send a message to a control module requesting it to take an action. For example, when a phase wants to start a pump, it should send a start message to the pump control module (see illustration below). The pump control module would then take the appropriate actions to start the pump and verify the status of the motor. The phase logic would then verify that the pump is running by looking at the pump control modules status attribute rather than looking directly at the

389

PCD Programmers Technical Reference

pump motor status input. In this way, the control module can take all other things that affect the pump into account before setting the status.
Phase 1 Phase 2
Message Status Message Status

Phase 3

Status Message

Pump Control Module Pump Device


Motor Status

Starter

Phase logic to CM Communication

Modules of Code
The project-specific phase logic contains modules of code that implement the operating sequences, plus a failure-detection module for each. The various modules are:

RUNNING STOPPING ABORTING HOLDING RESTARTING FAILURE-DETECTION

390

10 Programming Phase Logic

Tags that are set by the state transition logic in the PLI initiate these modules of code. When these modules of code terminate, they set a tag that indicates completion and which is read by the state transition logic in the PLI, allowing it to transition to the next state.

PLI
State Transition Logic

Communications Interface

Equivalent to the S88.01 Phase

Running Logic

Holding Logic

Aborting Logic

Stopping Logic

Restarting Logic

Failure Logic

Project-Specific Phase Logic

Basic Control

Modules of Code in Phase Logic

Obey the State Transition Diagram


The project-specific phase logic must adhere to the state transition diagram. (See State Transition Diagram for more information.)
When designing your project-specific phase logic, you should take the following into consideration: You DO need to program breakpoints within the logic if you want to take advantage of the Semi-Auto functionality. These should not be used if you need your phase logic to stop in a safe state.

Project-Specific Phase Logic


The following defines the six types of project-specific phase logic, and the status value that causes the logic to execute. Boolean variable processing is simpler and more efficient in some process-connected devices. In those cases, the PLI can send Boolean values to the phase logic rather than the phase logic using the Status (_ST) tag to determine what to do. In this case, you may choose to implement the Suggested Tag Name. PHASE represents a

391

PCD Programmers Technical Reference

unique character identifier for the phase. The information in this table is used in later examples.
Logic RUNNING HOLDING Description Normal operating sequence of a phase. Batch Status Value PHASE_ST=50 Suggested Tag Name PHASE_R PHASE_H

PHASE_ST=20 Temporarily suspends the operation of a phase. The phase logic transitions to the HELD state. For example, if a valve malfunctions, you may want to hold the operation of a phase while the valve is being repaired. After repairs are complete, issue a RESTART command to begin the RESTARTING logic and transition the phase logic to the RUNNING state. PHASE_ST=10 Abnormal termination of the phase logic sequence of operation. The aborting logic is typically reserved for termination of the operation of phase logic when an unsafe condition develops. For example, if a pump begins pumping an ingredient onto the plant floor, issue an ABORT command to transition the phase logic through the ABORTING state to the ABORTED state and abruptly terminate the execution of the phase logic. An ABORT command does not normally interrupt to upload parameters. PHASE_ST=30 Termination of the operation of the phase logic before normal transition to the COMPLETE state. For example, an operator may decide to transfer 150 gallons of an ingredient to a mixer, but the running recipe allows 200 gallons of an ingredient to fill a mixer. The operator may enter a STOP command to terminate the operation of the phase logic before the recipe amount of 200 gallons is transferred to the mixer. PHASE_ST=40 PHASE_ST=60*

ABORTING

PHASE_A

STOPPING

PHASE_S

RESTARTING Begins the operation of the phase logic from the HELD state. FAILURE DETECTION Detects abnormal events within the phase.

PHASE_T PHASE_F

* If Hold Propagation is set to None, the status will remain unchanged from previous status.

392

10 Programming Phase Logic

Phase Logic Modules


An example phase, shown below, is used to illustrate the sequence in each phase logic module.

Example Phase

This section provides sequential function chart representations of the RUNNING, HOLDING, ABORTING, STOPPING and RESTARTING logic for the sample charge phase. (Refer to Building a Sequential Function Chart for more information on sequential function charts.)

Running Logic
Running logic is the module of code that controls the phase during the RUNNING state. The following diagram is the sequential function chart (SFC) representation of the running logic for the sample Charge phase.
Step 1 Transition 1 Step 2 Transition 2 Step 3 Transition 3 Step 4 Transition 4 Request the parameter values; Reset the totalizer; Parameter values downloaded; Store parameter value 1 into the totalizer setpoint; Open the valve; Totalizer at setpoint; Close the valve; The valve is closed; Stop the totalizer; store totalized value into the report array; request to upload report values; Report values uploaded

Running Logic SFC

393

PCD Programmers Technical Reference

Each of the steps and transitions in this example SFC is discussed in greater detail in the following table.
Step 1 The state transition logic initiates (starts) the running graph with the tag CHARGE_R. The running graph responds by executing the first step. The first step makes a Request to download the parameter values and resets the totalizer. The first transition verifies that the parameters are downloaded. When the Request tag equals zero, the download is complete. Step 3 Step 4 The fourth step stops the totalizer, stores the amount totalized into the report array, and requests the Batch Server to upload the report values. The fourth transition verifies that the report parameters values are uploaded by again verifying that the Request tag equals zero. Step 2

The second step stores the parameter value into the totalizer setpoint, starts the totalizer, and opens the valve. The second transition verifies the totalized value is at the totalizer setpoint.

The third step closes the valve. The third transition verifies that the valve is closed.

Completion

Upon termination of this graph, the running graph sets the CHARGE_RC tag. This tag indicates to the state transition logic that the RUNNING sequence has run to completion.

394

10 Programming Phase Logic

Holding Logic
The figure below is the Sequential Function Chart (SFC) representation of the holding logic for the sample Charge phase.

Holding Logic SFC

Holding logic is the module of code that controls the phase during the HOLDING state. Each of the steps and transitions in the SFC is discussed in greater detail below.
Step 1 The state transition logic initiates (starts) the holding graph with the tag CHARGE_H. The holding graph responds by executing step one. Step one closes the fill valve. The first transition checks if the valve is closed. Completion Step 2

The second step stops the totalizer. The second transition is always true.

Upon termination of this graph, the holding graph sets the CHARGE_HC. This tag indicates that the HOLDING sequence has run to completion.

395

PCD Programmers Technical Reference

Aborting Logic
Aborting logic is the module of code that controls the phase during the ABORTING state. The figure below is the Sequential Function Chart (SFC) representation of the aborting logic for the sample Charge phase.

Aborting Logic SFC

Each of the steps and transitions in the SFC is discussed in greater detail below.
Step 1 The state transition logic initiates (starts) the aborting graph with the tag CHARGE_A. The aborting graph responds by executing the first step in the graph that closes the valve and stops the totalizer. The transition checks if the valve is closed. Completion Upon termination of this graph, the aborting graph sets the CHARGE_AC tag. This tag indicates to the state transition logic that the ABORTING sequence has run to completion.

Stopping Logic
Stopping logic is the module of code that controls the phase during the STOPPING state. The figure below is the Sequential Function Chart (SFC) representation of the stopping logic for the sample Charge phase.
Stopping Step 1

Close the valve;

Valve is closed;

Stopping Step 2

Stop the totalizer;

True;

Stopping Logic SFC

396

10 Programming Phase Logic

Each of the steps and transitions in the SFC is discussed in greater detail below.
Step 1
Stopping Step 1

Step 2
Close the valve;

Valve is closed;

Stopping Step 2

Stop the totalizer

True;

The state transition logic initiates (starts) the stopping graph with the tag CHARGE_S. The stopping graph responds by executing the first step in the graph that closes the valve. The first transition checks if the valve is closed.

Stopping Step 1

Close the valve;

Valve is closed;

Stopping Step 2

Stop the totalizer;

The second step stops the totalizer, stores the amount totalized into the report array, and Requests the Batch Server to upload the report values. The second transition checks if the report parameters values are uploaded by checking if the request parameter is equal to zero.

True;

Completion
Stopping Step 1

Close the valve;

Upon termination of this graph, the stopping graph sets the CHARGE_SC tag. This tag indicates to the state transition logic that the STOPPING sequence has run to completion.

Valve is closed;

Stopping Step 2

Stop the totalizer;

True;

Restarting Logic
Restarting logic is the module of code that controls the phase during the RESTARTING state. The figure below is the Sequential Function Chart (SFC) representation of the restarting logic for the sample Charge phase.
Restarting Step 1

Null;

If in Run Step 2;

If in Run Step 1, 2 or 3; Null

Restarting Step 2

Start the totalizer; Open the valve; True;

Restarting Step 3

True;

Restarting Logic SFC

397

PCD Programmers Technical Reference

Each of the steps and transitions in the SFC is discussed in greater detail below.
Step 1 Step 2

Restarting Step 1

Null;

Restarting Step 1

Null;

If in Run Step 2;

If in Run Step 1, 2 or 3; Null

If in Run Step 2;

If in Run Step 1, 2 or 3; Null

Restarting Step 2

Start the totalizer; Open the valve; True;

Restarting Step 3

Restarting Step 2

Start the totalizer; Open the valve; True;

Restarting Step 3

True;

True;

Step two responds by starting the totalizer and The state transition logic initiates (starts) the restarting graph with the tag CHARGE_T. The opening the valve. restarting graph responds by executing Step one, Step three is Null and does nothing. which is Null (or does nothing). Transitions three and four are always true. The first and second transitions determine which step the running graph is in and either executes Step two or Step three. Completion

Restarting Step 1

Null;

If in Run Step 2;

If in Run Step 1, 2 or 3; Null

Restarting Step 2

Start the totalizer; Open the valve; True;

Restarting Step 3

Upon termination of this graph, the restarting graph sets the CHARGE_TC tag. This tag indicates to the state transition logic that the restarting sequence has run to completion.

True;

398

CHAPTER 11

Phase Logic Interface


The FactoryTalk Batch Server communicates with the project-specific phase logic by way of the Phase Logic Interface (PLI). The PLI provides the data structure necessary for moving commands and requests between the FactoryTalk Batch Server and the phase logic. The PLI receives, interprets and translates commands from the Server and forwards the appropriate information to the phase logic. In turn, the PLI also receives, interprets and translates information from the phase logic and forwards the translated information to the Server. The PLI must perform the following critical functions in order to maintain communication between the FactoryTalk Batch Server and the phase logic.

Enforce the state transition diagram (See State Transition Diagram for more information.) Support the watchdog protocol (See Support for the Watchdog Protocol for more information.) Support the request handshake protocol (See Follow the Phase Logic Request Protocol for more information.) Support command handshake protocol (See Support the Command Handshake Protocol for more information.) Enable switching between external and Batch control

Communications Interface
The FactoryTalk Batch Server, or an external control application, sends commands and phase parameter values to the phase logic via the PLI. The PLI interprets the commands and verifies them against the state transition logic. It then forwards the appropriate information to the phase logic. In turn, the phase logic sends requests, status information and report values to the Server, or external control application, via the PLI. The PLI again

399

PCD Programmers Technical Reference

interprets the requests and verifies it against the state transition logic. It then forwards the information to the controlling application(s).

Batch Server / External

COMMAND

STATUS

EXTERNAL

PLI
OWNER PAUSE SEMI_AUTO

REQUEST

FAILURE

REPORTS

PARAMETERS

UNITS

Phase Logic

PAUSED

STEP INDEX

Communications Interface Example

Required Phase Tags


The following describes the pre-defined set of data items that allow the FactoryTalk Batch Server to communicate with the phase. These tags are created for each phase created in the FactoryTalk Equipment Editor.
Data Item Command Tag Name/Description PHASE_OC Used to command the phase to a new state. Failure PHASE_F Indicates if the phase is experiencing a failure. 0=No Failure, 1 = Failure Owner PHASE_W Defines what is commanding the phase: 0 = Program (Batch), 1 = External (HMI) Pause PHASE_P Used to command the phase to a new state. Paused PHASE_PD Set when the phase logic reaches a pre-programmed break point and the single step tag (PHASE_SS) is on. Request PHASE_RQ This is used to request service from the Batch Server.
400

Data Type Integer

Used By PLI

Written By FactoryTalk Batch Server Phase Logic

Integer

PLI

Integer

Batch Server, HMI, or PLI

HMI

Integer

PLI

Phase Logic

Integer

Phase Logic

PLI

Integer

Batch Server

Phase Logic

11 Phase Logic Interface

Data Item Single Step

Tag Name/Description PHASE_SS Allows the phase logic to pause at each pre-programmed break point.

Data Type Integer

Used By Phase Logic

Written By PLI

Status

PHASE_ST Defines the current state of the phase.

Integer

Batch Server

PLI

Step Index Unit

PHASE_SI Defines the step index of the phase. PHASE_UN Defines the current unit for common phases.

Integer Integer

Phase Logic Phase Logic

Phase Logic FactoryTalk Batch Server

Communication from the FactoryTalk Batch Server


The following table contains a list of data items that the FactoryTalk Batch Server may send to the phase. Some of these data items are required by the Server, as indicated by Req. The remaining data items are merely recommended in the implementation of the PLI. The tag names shown here are used throughout this document.
Data Item Batch CommandBatchReq Tag Name /Description PHASE_OC The FactoryTalk Batch Server may command the phase to go to a particular state as defined by the state transition diagram. (Refer toBatch Commandsfor a complete description of the commands that may be issued.) Data Type Used By Integer FactoryTalk Batch

Parameter Values

Integer, PHASEPNN Real or where NN is the number of parameters String The parameter values are stored in a virtual parameter array within the controller. The FactoryTalk Batch Server can write a single parameter value or an array of parameter values. For example, the parameter values may contain information about the amount of ingredient the phase should add, or the amount of time that the phase logic should run. Integer PHASE_EC The operator may command the phase to go to a particular state as defined by the state transition diagram. The FactoryTalk Batch Server does not use this data item. It is provided to be used by the HMI to manually control the phase.

Phase Logic

External Command (optional)

Phase Logic

401

PCD Programmers Technical Reference

Data Item Batch RequestBatch

Tag Name /Description

Data Type Used By PLI

Boolean PHASE_RQ The FactoryTalk Batch request flag can be turned on to switch the mode from External to Batch mode. PLI changes the value of PHASE_W owner based on this request. Boolean PHASE_ER If the operator wishes to take control of a phase, he/ she turns on the External request flag. Upon execution of the request by the PLI, the PLI would place the owner into External mode. The operator may then control the phase manually. The FactoryTalk Batch Server does not use this data item. The preferred method is to be used by the HMI to manually control the phase. PHASE_W This tag determines whether FactoryTalk Batch or the HMI can control the phase. Integer

External Request (optional)

PLI

Owner Req

Batch PLI HMI Phase Logic

Unit Req

Integer PHASE_UN The unit contains an integer that corresponds to a particular unit. This is used only when a phase is common to two or more units. For example, when a Charge phase in the PLC has the ability to charge two different units, the unit tag indicates which unit the phase should charge at the current time.

Communication from the Phase Logic


The following table shows the data items that the phase logic may send to the FactoryTalk Batch Server or an external interface application. The PLI must interpret and translate the data items, then forward the appropriate information. Some of these data items are required by the Server, as indicated by Req. The remaining data items are not mandatory, but are recommended in the implementation of the PLI. The tag names shown here are used throughout this document.
Data Type Integer

Data Item Status Req

Tag Name /Description PHASE_ST The status tag contains values that correspond to the state of the phase.

Used By State Transition Logic FactoryTalk Batch Server

Step Index Req PHASE_SI The Step Index contains an integer to indicate which step the phase logic is currently executing. All of the active states (Running, Holding, Restarting, Aborting, and Stopping) use the same Step Index.

Integer

402

11 Phase Logic Interface

Data Item Request

Tag Name /Description REQUEST The request tag initiates the request from the phase logic to the Batch Server. For more detail see Requests in the Communication Interface section of this manual. REQDATA_# where # can be from 1 to 5 The request data buffer stores values that clarify the request initiated with the REQUEST tag. For more detail see Requests in the Communication Interface section of this manual. PHASE_F A failure number can be set by the phase exception (interlocking) logic. The phase programmer writes this logic. When it detects an exception condition or whenever a process condition occurs that requires a HELD state the failure integer is set to a non-zero value. An increase in the failure priority when the phase is in the RUNNING or RESTARTING state causes the phase to transition to the HOLDING logic (HELD if _RE is set). A failure number greater than zero will also inhibit the state transitions of IDLE to RUNNING and HELD to RESTARTING. PHASE_P The operator can request a single pause by issuing a PAUSE command (Command 50) to the phase logic. This sets the PAUSE bit, indicating that the phase logic will pause at the next programmed transition. The PLI resets the PAUSE and PAUSED bits when the next RESUME command occurs, thus causing only a single pause to occur.

Data Type Integer

Used By Phase Logic and PLI

Request Data

Integer

Phase Logic

Failure Number Req

Integer

Phase Logic

Pause Req

Boolean

State Transition Logic, Batch Server, and PLI

PausedReq

Boolean PHASE_PD The operator can request a single pause by issuing a PAUSE command (Command 50) to the phase. Once the phase logic has paused at the programmed pause transition, it sets the PAUSED bit, indicating that it has paused at the programmed transition. The pause bit will be reset when the next RESUME command occurs, thus causing only a single pause to occur.

Phase Logic

403

PCD Programmers Technical Reference

Data Item Owner Req

Tag Name /Description PHASE_W The owner of the phase logic is determined by the external interface. Two request tags are provided in the standard phase logic to toggle the mode between the FactoryTalk Batch Server and External. These request tags are Batch Request and External Request. False= Batch True=External PHASERNN where NN is the number of report values The report values are stored in a virtual report array within the controller in which the PLI can write a single report value or an array of report values. The FactoryTalk Batch Server can read these report values from the array. PHASE_SS The single step attribute indicates when the phase logic is in the Semi-Auto mode. Semi-Auto mode causes the phase logic to transition to the next programmed break point and wait for the operator to issue a RESUME command.

Data Type Boolean

Used By State Transition Logic

Report Value

Integer, Real or String

FactoryTalk Batch Server

Single Step Req

Boolean

State Transition Logic

Watchdog Communication
One of the requirements of the PLI is that it support the watchdog protocol. Each PCD must support watchdog logic. This logic monitors the communication with the FactoryTalk Batch Server. This can be accomplished through the watchdog protocol.
Alternate Name WATCHDOG

Tag Name WATCHDOG

Type

Description

Boolean or The FactoryTalk Batch Server sets the Integer Watchdog flag on a configured time interval. This flag is reset by the PLI every scan.* Used for either standard or enhanced watchdog protocol.

* The timeout period is configurable in the Batchsvr.ini file, entered in milliseconds. The default settings are in the [XMAN] section: WatchdogPeriod=10000 and WatchdogCycles=5. The default time period for the FactoryTalk Batch Server is ten (10) seconds. The PCD timer should be set to a value slightly larger than the product of the WatchdogPeriod and the WatchdogCycles.

404

11 Phase Logic Interface

PLI Variables
The following describes variables that may be used by a PLI to communicate with the FactoryTalk Batch Server or external interface. Some of these data items are required by the Server, as indicated by Req. Other tags represent a recommended implementation of the PLI. The tag names shown here will be used throughout this document.
Tag Name PHASE_CD Alternate Name COMMAND Type Integer Description This is the PLI command register. Commands received from the FactoryTalk Batch Server (PHASE_OC) or external controlling application (PHASE_EC) are copied into this register. This register is then used within the PLI to change states and properties of the phase. This is the PLI command register for external control. Applications such as an HMI may store to this register to control the Phase. Commands are stored into this register by the external application to change states and properties of the phase. This is the PLI command register. Commands are stored into this register by the FactoryTalk Batch Server to changes states and properties of the phase. This is the Phase Status register. The PLI processes commands and updates the phase state in this register accordingly. This is the Owner flag. This flag is set/reset by the HMI, or force to zero (0) in the PLI. This is the Unit ID register. The Unit ID of the Operating unit is stored in this register for the phase. If a particular phase is shared between two or more units, programmed phase logic decisions can be made to change the operating characteristics of the phase logic. This is the Single Step flag. the FactoryTalk Batch Server or the external source can toggle this flag by sending a SEMI_AUTO command to the command register. Whenever this flag is set, the phase pauses at every pre-programmed break point.

PHASE_EC

EXT_ COMMAND

Integer

PHASE_OC
Req

BS_COMMAND

Integer

PHASE_ST
Req

STATUS

Integer

PHASE_W Req OWNER PHASE_UN


Req

Boolean Integer

UNIT

PHASE_SS
Req

SINGLE_ STEP *

Boolean

405

PCD Programmers Technical Reference

Tag Name PHASE_P Req

Alternate Name PAUSE

Type Boolean

Description This is the Pause flag. This flag is set by sending a PAUSE command to the phase or if the phase is in Semi-Auto mode. Sending a RESUME command to the phase resets this flag. The user phase logic can examine this flag to pause at any transition within the phase logic. If the phase is in Semi-Auto mode, a RESUME command resets this flag for only one (1) scan. This is the Paused flag. This flag is set by the phase logic at a valid pause point when the Pause flag is set or by the phase logic at a valid Semi-Auto point if the phase is in SEMI_AUTO mode. Sending a RESUME command to the phase resets this flag. This is the External Request flag. This flag is usually set externally, such as from an HMI system. When this flag is set, the PLI changes ownership of the phase to external. This is the FactoryTalk Batch Request flag. This flag is usually set externally, such as from an HMI system. When this flag is set, the PLI changes ownership of the phase to FactoryTalk Batch. This is the Phase Step Buffer register. When the PLI changes from any active state to any other active state, the value in the Step Buffer is copied into the Step Index register. When changing from the RUNNING state to the HOLDING state, the Step Index value is copied to the Step Buffer. When changing states from the RESTARTING state to the RUNNING state, the value in the Step Buffer register is copied back to the Step Index Register. This is the Phase Hold Index register file. This register is user-configurable by the STATE_STORE configuration flag. When the STATE_STORE flag is on, the Hold Index register holds the value from the last state. The users phase logic can make decisions in the new state based on the value in the Hold Index and the Step Buffer registers. If the STATE_STORE flag is off, the users phase logic controls the value in the Hold Index register. The users phase logic makes decisions in different states by setting and reading the Hold Index register.

PHASE_PD
Req

PAUSED

Boolean

PHASE_ER

EXT_REQUEST

Boolean

PHASE_OR

BS_REQUEST

Boolean

PHASE_SB

STEP_BUFFER

Integer

PHASE_HI

406

11 Phase Logic Interface

Tag Name PHASE_RB

Alternate Name PHASEB01-

Type PHASEB Xn Integer Boolean

Description REQUEST_ BUFFER This is the Buffered Phase Request Data Array. This is the Download Request flag. The Download Request flag is set by a NEW_PARAMETERS command (70). The NEW_PARAMETERS command is sent to the phase whenever there is Transfer of Control within the recipe. The phase programmer can use this flag to determine when the phase has transitioned between two (2) steps within the recipe. The programmer may choose to download new parameters when this flag is set. The phase programmer must reset this flag immediately upon making the request in order to detect another Transfer of Control.

BUF_DATA01 BUF_DATA0n PHASE_DL DOWNLOAD

* The PHASE_SS flag is set when the SEMI_AUTO command is sent to the command register.

Phase Logic Variables


The following describes variables that may be used by the phase logic to communicate with the FactoryTalk Batch Server or external interface by way of the PLI. Some of these data items are required by the Server, as indicated by Req. Other tags represent a recommended implementation of the phase logic. The tag names shown here are used throughout this document.
Tag Name PHASE_SI
Req

Alternate Name STEP_INDEX

Type Integer

Description This is the Phase Step Index register. When the PLI changes the state to any active state, the PLI initializes the Step Index register. The initial value is user-configurable (see _SI) and is usually set to zero (0) or one (1). The users phase logic can then use the Step Index Register to step through different steps or states by changing the value in the Step Index register.

407

PCD Programmers Technical Reference

Tag Name PHASE_RQ


Req

Alternate Name REQUEST REQ_DATA01REQ_DATA0n

Type Integer

Description This is the virtual Request Data Array. The phase logic can make requests to the FactoryTalk Batch Server with this set of registers. When the PLI changes from any active state to any other active state, the values in the Request Data Array are cleared to zero (0). This is the Restore Request flag. This flag is a user-configurable setting. When the phase transitions from RUNNING to HOLDING, then any current request is buffered. If the phase programmer wants to restore the buffered request to the Request Data Array when transitioning from RESTARTING to RUNNING, then this flag must be set. This is the Clear flag. This flag is a userconfigurable setting. When the phase transitions from RUNNING to HOLDING, ABORTING or STOPPING, the current request is cleared if this flag is set. If the phase programmer wants to clear the request in the Request Data Array, the phase programmer must set this flag. This is the Aborting Complete flag. The users phase logic must set this flag to indicate to the PLI that the ABORTING logic has run to completion. The PLI monitors this flag and transitions to the ABORTED state when this flag is set. This is the Stopping Complete flag. The users phase logic must set this flag to indicate to the PLI that the STOPPING logic has run to completion. The PLI monitors this flag and transitions to the STOPPED state when this flag is set. This is the Holding Complete flag. The users phase logic must set this flag to indicate to the PLI that the HOLDING logic has run to completion. The PLI monitors this flag and transitions to the HELD state when this flag is set. This is the Restarting Complete flag. The users phase logic must set this flag to indicate to the PLI that the RESTARTING logic has run to completion. The PLI monitors this flag and transitions to the RUNNING state when this flag is set.

PHASEQ01PHASEQXn

PHASE_RR

RESTORE_ REQUEST

Boolean

PHASE_CR

CLEAR_ REQUEST

Boolean

PHASE_AC

ABORT_ COMPLETE

Boolean

PHASE_SC

STOP_ COMPLETE

Boolean

PHASE_HC

HOLD_ COMPLETE

Boolean

PHASE_TC

RESTART_ COMPLETE

Boolean

408

11 Phase Logic Interface

Tag Name PHASE_RC

Alternate Name RUN_ COMPLETE

Type Boolean

Description This is the Running Complete flag. The users phase logic must set this flag to indicate to the PLI that the RUNNING logic has run to completion. The PLI monitors this flag and transitions to the COMPLETE state when this flag is set. This is the Phase Failure register. The users phase logic can detect abnormal conditions within the phase and store a failure code into this register. When the PLI detects a nonzero value in this register, the phase changes states from RUNNING to HOLDING

PHASE_F
Req

FAILURE

Integer

PLI Configuration Parameters


The following describes a recommended set of tags for the implementation of the PLI. These parameters are used for communication between the FactoryTalk Batch Server, or external interface, and the phase. The tag names shown here are used throughout this document.
Name PHASE_II Alternate Name IDLE_INIT Type Boolean Description This is the Idle Initialization flag. If this flag is set, the phase will transition to the IDLE state on First Scan. The first scan bit is set when the processor mode changes from Program Mode to Run Mode or when the processor powers up in Run Mode. This is the Set Active Phases to Hold on First Scan Configuration flag. If this flag is set and the phase is RUNNING or RESTARTING it will transition to the HOLDING state on First Scan. The first scan bit is set when the processor mode changes from Program Mode to Run Mode or when the processor powers up in Run Mode. The PHASE_II flag will override this flag. This is the Re-execute Hold Configuration flag. This flag determines if the phase can transition from the HELD state to the HOLDING state upon an increase in Phase Failure. This register holds the initial value of the Step Index. The value in this register should be set to the desired initial Step Index value.

PHASE_HA

HOLD_ACTIVE

Boolean

PHASE_RE

REEXECUTE_ HOLD

Boolean

PHASE_IS

INITIAL_STEP

Integer

409

PCD Programmers Technical Reference

Name PHASE_WC

Alternate Name HOLD_ON_WAT CHDOG

Type Boolean

Description This flag tells the phase logic whether to go to hold when the PLI loses Watchdog communication with the Batch Server. If this flag is set and the Watchdog time-out goes true and the phase is running or restarting, the phase will transition to holding. Recommended value = TRUE.

Programming the PLI


The following components are required to implement the state transition logic in the PLI. Each section describes a specific event, the states which are affected by the event, and the suggested code to implement the required action.

PLI Response to Watchdog Event


Each process-connected device (PCD) must have one instance of the watchdog logic to coordinate with the Batch Server. This logic must reset the WATCHDOG flag whenever the Batch Server sets it. If the WATCHDOG_TIMER times out, then the WATCHDOG_TIMEOUT flag is set1. This is used by the phase logic to toggle transitions to the HOLDING state if appropriate. Example
IF WATCHDOG = 0 THEN ENABLE WATCHDOG_TIMER; ELSE WATCHDOG = 0; ENDIF; IF WATCHDOG_TIMER = TIMED_OUT THEN WATCHDOG_TIMEOUT = TRUE; ELSE WATCHDOG_TIMEOUT = FALSE; ENDIF;

Standard Protocol

Processing Non-State Commands and Events for a Phase


If the phase owner (_W) flag is set, then the Batch command register value is stored into a temporary register. Only the lower byte of the Batch command register is moved into the temporary command register. The FactoryTalk Batch Server uses the lower byte of the Batch command register for the phase command, and the upper byte as serial number to determine which command has been processed by the PLI.

1 The timeout period is configured in the Batchsvr.ini file, entered in milliseconds. The default settings are in the [XMAN] section: WatchdogPeriod=10000 and WatchdogCycles=5. The default time period for the Batch Server is ten (10) seconds. The PCD timer should be set to a value slightly larger than the product of the WatchdogPeriod and the WatchdogCycles.

410

11 Phase Logic Interface

Example
IF NOT PHASE_W AND PHASE_CD = 0 THEN PHASE_CD = PHASE_OC MOD 256; PHASE_OC = PHASE_OC PHASE_CD; ENDIF;

PLI Response to a CLEAR_FAILURE Command


If the phase failures (_F) are latched values (are not reset automatically), then the phase failure value can be cleared through Batch. Example
IF PHASE_CD = 130 THEN PHASE_F = 0; ENDIF;

PLI Response To a REQ_COMPLETE Command


The REQ_COMPLETE command is part of the communication handshaking that is required by FactoryTalk Batch. If the request (_RQ) has been changed to a CANCEL_REQUEST, then the REQ_COMPLETE is ignored. Example
IF (PHASE_CD = 140) AND (PHASE_RQ <> 6000) THEN PHASE_RQ = 10; ENDIF;

PLI Response To a REQ_ABORTACK Command


The REQ_ABORTACK command is part of the communication handshaking that is required by FactoryTalk Batch. If the request (_RQ) has been changed to a CANCEL_REQUEST, then the REQ_ABORTACK is ignored. Example
IF (PHASE_CD = 150) AND (PHASE_RQ = 6000) THEN PHASE_RQ = 20; ENDIF;

PLI Response To a REQ_ABORTFAIL Command


The REQ_ABORTFAIL command is part of the communication handshaking that is required by FactoryTalk Batch. If the request (_RQ) has been changed to a CANCEL_REQUEST, then the REQ_ABORTFAIL is ignored. Example
IF (PHASE_CD = 160) AND (PHASE_RQ = 6000) THEN PHASE_RQ = 30; ENDIF;

411

PCD Programmers Technical Reference

PLI Response To a REQ_RESET Command


The REQ_RESET command is part of the communication handshaking that is required by FactoryTalk Batch. This resets the request (_RQ) to 0 allowing the phase logic to issue another request. Example
IF (PHASE_CD = 170) THEN PHASE_RQ = 0; ENDIF;

PLI Response To a REQ_FAILED Command


The REQ_FAILED command is part of the communication handshaking that is required by FactoryTalk Batch. It uses the enhanced phase logic request error handling, which resets the request (_RQ) to 1, signifying a failure and allowing the phase to issue another request. Example
IF (PHASE_CD = 145) AND (PHASE_RQ <> 6000) THEN PHASE_RQ = 15; IF (PHASE_CD = 170) AND (PHASE_RQ = 15) THEN PHASE_RQ = 1; ENDIF;

PLI Response To a SEMI_AUTO Command


When the SEMI_AUTO command is received, the SingleStep flag (_SS) is toggled. When the SingleStep flag is set on, the Pause (_P) flag is also set on. Example
IF (PHASE_CD = 60) THEN PHASE_SS = NOT (PHASE_SS); IF PHASE_SS = 0 THEN PHASE_P = FALSE; ELSE PHASE_P = TRUE; ENDIF; ENDIF;

PLI Response To a RESUME Command


The RESUME command clears the PAUSED (_PD) flag. Example
IF (PHASE_CD = 80) THEN PHASE_PD = FALSE; ENDIF;

412

11 Phase Logic Interface

PLI Response To a NEW_PARAMETERS Command


The NEW_PARAMETERS command sets the download flag (_DL). This indicates to the phase logic that there could be new parameter values to download. The phase programmer can then use this information to issue a download parameter request. Example
IF (PHASE_CD = 70) THEN PHASE_DL = TRUE; ENDIF;

PLI Phase State Processing


The following sections refer to the phase states that are required by FactoryTalk Batch. An example defining which events can be acted upon while in the specified state is supplied for each state. For active states, a second example is given showing the STATE COMPLETE event. ABORTING The only thing that is acted upon while a phase is in the ABORTING state is an ABORT COMPLETE (_AC) from the phase logic. Example
CASE PHASE_ST OF 10: {ABORTING} CASE PHASE_CD OF 10: {ABORT} 20: {HOLD} 30: {STOP} 40: {RESET} 90: {RESTART} 100: {START} END_CASE Example ABORT COMPLETE IF PHASE_AC THEN PHASE_AC = FALSE; IF (PHASE_ST=10) THEN PHASE_ST = 90; ENDIF; ENDIF;

{COMMAND {COMMAND {COMMAND {COMMAND {COMMAND {COMMAND

IS IS IS IS IS IS

IGNORED} IGNORED} IGNORED} IGNORED} IGNORED} IGNORED}

HOLDING While HOLDING, an ABORT or STOP command are acted upon as is a HOLD COMPLETE (_HC) from the phase logic. Example
20: {HOLDING} CASE PHASE_CD OF 10: {ABORT} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM];

413

PCD Programmers Technical Reference

PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 20: {HOLD} {COMMAND IS IGNORED} 30: {STOP} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 30; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 40: {RESET} {COMMAND IS IGNORED} 90: {RESTART} {COMMAND IS IGNORED} 100: {START} {COMMAND IS IGNORED} END_CASE Example HOLD COMPLETE IF PHASE_HC THEN PHASE_HC = FALSE; IF (PHASE_ST = 20) THEN PHASE_ST = 60; ENDIF; ENDIF;

STOPPING While STOPPING, an ABORT command is acted upon as is a STOP COMPLETE (_SC) from the phase logic. Example
30: {STOPPING} CASE PHASE_CD OF 10: {ABORT} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM] ; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 20: {HOLD} {COMMAND IS IGNORED} 30: {STOP} {COMMAND IS IGNORED} 40: {RESET} {COMMAND IS IGNORED} 90: {RESTART} {COMMAND IS IGNORED}

414

11 Phase Logic Interface

100: {START} END_CASE Example STOP COMPLETE IF PHASE_SC THEN PHASE_SC = FALSE; IF (PHASE_ST = 30) THEN PHASE_ST = 80; ENDIF; ENDIF;

{COMMAND IS IGNORED}

RESTARTING While RESTARTING, an ABORT, HOLD, or STOP command are acted upon as is a RESTART COMPLETE (_TC) from the phase logic. Example
40: {RESTARTING} CASE PHASE_CD OF 10: {ABORT} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 20: {HOLD} IF ((WTCHDG_T.TOUT AND PHASE_WC[PHASE_NUM) R (PHASE_FI[PHASE_NUM])) THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 20; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; ENDIF; 30: {STOP} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 30; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 40: {RESET} {COMMAND IS IGNORED} 90: {RESTART} {COMMAND IS IGNORED} 100: {START} {COMMAND IS IGNORED} END_CASE

415

PCD Programmers Technical Reference

IF WTCHDG_T.TOUT AND PHASE_WC[PHASE_NUM] OR PHASE_F[PHASE_NUM] THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 20; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; ENDIF; Example RESTART COMPLETE IF PHASE_TC THEN PHASE_TC = FALSE; IF (PHASE_ST = 40) THEN PHASE_ST = 50; PHASE_SI = PHASE_SB[X]; IF PHASE_RR THEN PHASE_RQ = PHASEBRQ; PHASEQ01 = PHASEB01; PHASEQ02 = PHASEB02; PHASEQ03 = PHASEB03; PHASEQ04 = PHASEB04; PHASEQ05 = PHASEB05; ENDIF; ENDIF; ENDIF;

RUNNING While RUNNING, an ABORT, HOLD, or STOP command are acted upon as is a Running Complete (_RC) from the phase logic. Example
50: {RUNNING} CASE PHASE_CD OF 10: {ABORT} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 20: {HOLD} PHASE_ST[PHASE_NUM] := 20; PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; IF PHASE_RQ[PHASE_NUM] > 999 THEN IF PHASE_CR[PHASE_NUM] THEN PHASE_RQ[PHASE_NUM] := 6000; ELSE

416

11 Phase Logic Interface

PHASEBRQ[PHASE_NUM] PHASEB01[PHASE_NUM] PHASEB02[PHASE_NUM] PHASEB03[PHASE_NUM] PHASEB04[PHASE_NUM] Example RUN COMPLETE IF PHASE_RC THEN PHASE_RC = FALSE; IF (PHASE_ST = 50) THEN PHASE_ST = 70; ENDIF; ENDIF;

:= := := := :=

PHASE_RQ[PHASE_NUM]; PHASEQ01[PHASE_NUM]; PHASEQ02[PHASE_NUM]; PHASEQ03[PHASE_NUM]; PHASEQ04[PHASE_NUM];

HELD While HELD, an ABORT, STOP, or RESTART command is acted upon. Example
60: {HELD} CASE PHASE_CD OF 10: {ABORT} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 20: {HOLD} {COMMAND IS IGNORED} 30: {STOP} PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 30; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; 40: {RESET} {COMMAND IS IGNORED} 90: {RESTART} IF (PHASE_CD[PHASE_NUM]=90) THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 40; ENDIF; 100: {START} {COMMAND IS IGNORED} END_CASE IF (PHASE_F[PHASE_NUM] AND PHASE_RE[PHASE_NUM])THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 20; IF PHASE_CR[PHASE_NUM] AND

417

PCD Programmers Technical Reference

PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; ENDIF;

COMPLETE While COMPLETE, a RESET or MANUAL command is the only thing acted upon. Example
70: {COMPLETE} CASE PHASE_CD OF 10: {ABORT} {COMMAND 20: {HOLD} {COMMAND 30: {STOP} {COMMAND 40: {RESET} PHASE_ST[PHASE_NUM] = 100; PHASE_F[PHASE_NUM] = 0; PHASE_SI[PHASE_NUM] = 0; PHASE_RQ[PHASE_NUM] = 0; PHASE_DL[PHASE_NUM] = 0; 90: {RESTART} {COMMAND 100: {START} {COMMAND END_CASE

IS IGNORED} IS IGNORED} IS IGNORED}

IS IGNORED} IS IGNORED}

STOPPED While STOPPED, a RESET or MANUAL command is the only thing acted upon. Example
80: {STOPPED} CASE PHASE_CD OF 10: {ABORT} {COMMAND 20: {HOLD} {COMMAND 30: {STOP} {COMMAND 40: {RESET} PHASE_ST[PHASE_NUM] = 100; PHASE_F[PHASE_NUM] = 0; PHASE_SI[PHASE_NUM] = 0; PHASE_RQ[PHASE_NUM] = 0; PHASE_DL[PHASE_NUM] = 0; 90: {RESTART} {COMMAND 100: {START} {COMMAND END_CASE

IS IGNORED} IS IGNORED} IS IGNORED}

IS IGNORED} IS IGNORED}

418

11 Phase Logic Interface

ABORTED While ABORTED, a RESET or MANUAL command is the only thing acted upon. Example
90: {ABORTED} CASE PHASE_CD OF 10: {ABORT} {COMMAND 20: {HOLD} {COMMAND 30: {STOP} {COMMAND 40: {RESET} PHASE_ST[PHASE_NUM] = 100; PHASE_F[PHASE_NUM] = 0; PHASE_SI[PHASE_NUM] = 0; PHASE_RQ[PHASE_NUM] = 0; PHASE_DL[PHASE_NUM] = 0; 90: {RESTART} {COMMAND 100: {START} {COMMAND END_CASE

IS IGNORED} IS IGNORED} IS IGNORED}

IS IGNORED} IS IGNORED}

IDLE While IDLE, a START or MANUAL command is the only thing acted upon. Example
100: {IDLE} CASE PHASE_CD OF 10: {ABORT} {COMMAND IS IGNORED} 20: {HOLD} {COMMAND IS IGNORED} 30: {STOP} {COMMAND IS IGNORED} 40: {RESET} {COMMAND IS IGNORED} 90: {RESTART} {COMMAND IS IGNORED} 100: {START} IF (PHASE_CD[PHASE_NUM]=100) THEN PHASE_SI[PHASE_NUM] = PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] = 50; ENDIF; END_CASE END_CASE

419

PCD Programmers Technical Reference

420

APPENDIX A

Building a Sequential Function Chart


In addition to batch terminology, FactoryTalk Batch uses a sequence technology called sequential function charts. This extremely powerful method is well worth the small investment of time required to learn it.

SFC Graphical Structures


Sequential function charts (SFC) are composed of six graphical structures that are linked together into a chart. Each of the structures represents an element in the phase logic. The rules of execution for SFCs unambiguously describe how the phase logic executes. The following describes each of the graphical structure used in SFCs:
Element Initial Step Description The logical start of the SFC. Graphical Structure

Step

A control step of the phase. Write the control actions statements to the right of the steps. The logical end of the SFC.

Final Step

Transition

Defines how control moves from step to step. Write conditional statements to the right side of the transitions. Represents decisions.

OR Structure

AND Structure

Represents parallel procedures.

Rules for Building an SFC

The sequential function chart must follow a step - transition - step sequence

Benefits of an SFC

Unambiguous representation of logic Supports simple and complex logic


421

PCD Programmers Technical Reference

Supports all important logic structures: decisions, loops, parallelism Standardized in IEC 1131-3 specification

SFC Execution
The following table illustrates the construction of an SFC and how an SFC executes:
Step 1 Upon activation of this chart, the initial step is active as indicated by the color of the step). Step 2 Control is passed to Step A after Transition 1 becomes true.

Step 3 After Transition 2 becomes true, Step 1 is inactivated and Steps B and C become active.

Step 4 After Transition 3 becomes true, Step B is inactivated and Step D is activated.

Step 5 When Transition 4 becomes true, Steps C and D are inactivated and Step E is activated.

Step 6 When Transition 5 becomes true, Step E is inactivated and the final step is activated. This indicates that the entire chart is complete.

422

APPENDIX B

Tag Naming Conventions


The following lists the commonly used tag names and their associated descriptions:
Tag PHASE_AC PHASE_CD PHASE_CT PHASE_EC PHASE_ER PHASE_F PHASE_HC PHASE_HE PHASE_HI PHASE_OC PHASE_OR PHASE_P PHASE_PD PHASE_RC PHASE_RQ PHASE_SC PHASE_SS PHASE_ST PHASE_TC PHASE_UN PHASE_W PHASEPNN PHASEQNN PHASERNN Description Message from ABORTING logic has completed the sequence. Command. The command value to which the state transition logic responds. Continue Logic Bit. External Command. Request for External Mode. Failure number. 0 = no failure. > 0 indicates a failure has occurred. Higher numbers indicate more severe failures. Message from HOLDING logic has completed the sequence. Held. On indicates that the Holding/Held/Restarting logic is active and the running logic should not continue. Hold identification. Specifies the action to take upon a hold request or failure. Batch Command. This is the command value written from Batch. Request for Batch Mode. Pause: On = pause active / off = pause inactive. Paused: On = the phase logic is currently paused. Message from RUNNING logic has completed the sequence. Request. This is the request value from the phase logic to Batch. Message from STOPPING logic has completed the sequence. Single Step attribute. on = in Semi-Auto Mode. off = in Free Running Mode. State or Status. (IDLE, RUNNING, Etc.) Message from RESTARTING logic has completed the sequence. Phase unit number. Owner: off = Batch mode / on = External Mode. Parameter ID NN. Request Parameter ID NN. Report Parameter ID NN.

423

PCD Programmers Technical Reference

Tag

Description

Optional Boolean Variables PHASE_R PHASE_S PHASE_H PHASE_T PHASE_A PHASE_C PHASE_SD PHASE_HD PHASE_AD PHASE_I Request to execute the RUNNING logic. Request to execute the STOPPING logic. Request to execute the HOLDING logic. Request to execute the RESTARTING logic. Request to execute the ABORTING logic. Phase is in the COMPLETE state. Phase is in the STOPPED state. Phase is in the HELD state. Phase is in the ABORTED state. Phase is in the IDLE state.

424

APPENDIX C

Structured Text Phase Template


IF (PHASE_ST = 10) THEN (*TEMPLATE FOR 1 STEP ABORT*) IF (PHASE_SI= 1) THEN (*PERFORM STEP 1*) (******PUT THE WORK FOR ABORT STEP 1 HERE *) (******PUT THE ABORT COMPLETE CRITERIA HERE *) (*IF CONDITIONX THEN*) PHASE_AC:= TRUE; (*SET THE ABORT COMPLETE FLAG*) (*ENDIF*) END_IF; ELSIF (PHASE_ST = 30) THEN (*TEMPLATE FOR 2 STEP STOP*) IF (PHASE_SI= 1) AND (NOT PHASE_PD) THEN (*PERFORM STEP 1*) (******PUT THE WORK FOR STOP STEP 1 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 1 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 2; (*END_IF*) (*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP1 IS ACTIVATED*) (***THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; ELSIF (PHASE_SI= 2) AND (NOT PHASE_PD) THEN (*PERFORM STEP 2*) (******PUT THE WORK FOR STOP STEP 2 HERE *) (******PUT THE STOP COMPLETE CRITERIA HERE *) (*IF CONDITIONX THEN*) PHASE_SC:= TRUE; (*SET THE STOP COMPLETE FLAG*) (*END_IF*) END_IF; ELSIF (PHASE_ST = 20) THEN (*TEMPLATE FOR 2 STEP HOLD*) IF (PHASE_SI= 1) AND (NOT PHASE_PD) THEN (*PERFORM STEP 1*) (******PUT THE WORK FOR HOLD STEP 1 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 1 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 2; (*END_IF*) 1 The Single-Step attribute is set when the SEMI_AUTO command is received.

425

PCD Programmers Technical Reference

ELSIF (PHASE_SI= 2) AND (NOT PHASE_PD) THEN (*PERFORM STEP 2*) (******PUT THE WORK FOR HOLD STEP 2 HERE *) (******PUT THE HOLD COMPLETE CRITERIA HERE *) (*IF CONDITIONX THEN*) PHASE_HC:= TRUE; (*SET THE HOLD COMPLETE FLAG*) (*END_IF*) END_IF; ELSIF (PHASE_ST = 40) THEN (*TEMPLATE FOR 2 STEP RESTART*) IF (PHASE_SI= 1) AND (NOT PHASE_PD) THEN (*PERFORM STEP 1*) (******PUT THE WORK FOR RESTART STEP 1 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 1 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 2; (*END_IF*) (*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP1 IS ACTIVATED*) (******THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; (******INSERT THIS CODE IF AFTER THIS STEP IS A PAUSE POINT*) (*IF PAUSE_COMMAND THEN PHASE_PD:= TRUE; END_IF;*) ELSIF (PHASE_SI= 2) AND (NOT PHASE_PD) THEN (*PERFORM STEP 2*) (******PUT THE WORK FOR RESTART STEP 2 HERE *) (******PUT THE RESTART COMPLETE CRITERIA HERE *) (*IF CONDITIONX THEN*) PHASE_TC:= TRUE; (*SET THE RESTART COMPLETE FLAG*) (*END_IF*) END_IF; ELSIF (PHASE_ST = 50) THEN (*TEMPLATE FOR 5 STEP RUN*) IF (PHASE_SI= 1) AND (NOT PHASE_PD) THEN (*PERFORM STEP 1*) PHASE_RQ:= 1000; (*DOWNLOAD ALL PARAMETERS*) (******ONLY WRITE ON TIME******) (******PUT THE WORK FOR RUN STEP 1 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 1 HERE*) IF (PHASE_RQ=0) THEN PHASE_SI:= 2; END_IF 1 The Single-Step attribute is set when the SEMI_AUTO command is received.

426

C Structured Text Phase Template

(*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP21 IS ACTIVATED*) (******THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; (****INSERT THIS CODE IF AFTER THIS STEP IS A PAUSE POINT*) (*IF PHASE_P THEN PHASE_PD:= TRUE; END_IF;*) ELSIF (PHASE_SI= 2) AND (NOT PHASE_PD) THEN (*PERFORM STEP 2*) (******PUT THE WORK FOR RUN STEP 2 HERE *)

(******PUT THE TRANSITIONS OUT OF STEP 2 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 3; (*END_IF*) (*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP21 IS ACTIVATED*) (******THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; (******INSERT THIS CODE IF AFTER THIS STEP IS A PAUSE POINT*) (*IF PHASE_P THEN PHASE_PD:= TRUE; END_IF;*) ELSIF (PHASE_SI= 3) AND (NOT PHASE_PD) THEN (*PERFORM STEP 3*) (******PUT THE WORK FOR RUN STEP 3 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 3 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 4; (*END_IF*) (*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP1 IS ACTIVATED*) (***THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; 1 The Single-Step attribute is set when the SEMI_AUTO command is received.

427

PCD Programmers Technical Reference

(******INSERT THIS CODE IF AFTER THIS STEP IS A PAUSE POINT*) (*IF PHASE_P THEN PHASE_PD:= TRUE; END_IF;*) ELSIF (PHASE_SI= 4) AND (NOT PHASE_PD) THEN (*PERFORM STEP 4*) (******PUT THE WORK FOR RUN STEP 4 HERE *) (******PUT THE TRANSITIONS OUT OF STEP 4 HERE*) (*IF CONDITIONX THEN*) PHASE_SI:= 5; (*END_IF*) (*THIS PAUSES THE PHASE AFTER THIS STEP IF SINGLE STEP22 IS ACTIVATED*) (***THIS CODE SHOULD BE DELETED IF SEMI-AUTO ISNT ALLOWED AT THIS POINT*) IF PHASE_SS THEN PHASE_PD:= TRUE; END_IF; (******INSERT THIS CODE IF A PAUSE POINT IS AFTER THIS STEP *) (*IF PHASE_P THEN PHASE_PD:= TRUE; END_IF;*)

ELSIF (PHASE_SI= 5) AND (NOT PHASE_PD) THEN (*PERFORM STEP 5*) PHASE_RQ:= 2000; (*UPLOAD ALL REPORTS*) (****ONLY WRITE ON TIME****) (******PUT THE WORK FOR RUN STEP 2 HERE *) (******PUT THE RUN COMPLETE CRITERIA HERE *) IF (PHASE_RQ = 0) THEN PHASE_RC:= TRUE; (*SET THE RUN COMPLETE FLAG*) END_IF; ELSIF (PHASE_RQ = 1) THEN PHASE_F:= 1; (*PHASE HELD*)1 END_IF; END_IF; END_IF;

1 Any non-zero value will cause the phase logic to fail. Failures will hold batches according to configured Hold Propagation settings.

428

APPENDIX D

Structured Text Full PLI Example


The following is an example of a PLI. Explanatory comments are provided in italics surrounded by curly braces {}. The comments are placed just above the section of code being described.
PHASE_NUM := 1; WHILE (PHASE_NUM<(NUM_PHASES+1)) LOOP

{If this phase is in the IDLE state, and there are no commands in the External or the Batch command registers, and there is not a request to change ownership of this phase, then the phase logic is not processed.}
If (PHASE_ST[PHASE_NUM]<>100) OR (PHASE_OC[PHASE_NUM] MOD 256 <> 0) OR (PHASE_EC[PHASE_NUM]<> 0) OR (PHASE_ER[PHASE_NUM]) OR (PHASE_OR[PHASE_NUM]) THEN

{The phase owner (_W) flag determines if Batch can command the phase. If the flag is set, then Batch cannot command the phase. This allows equipment and control modules to be commanded manually, without the possibility of Batch interference. The phase owner flag is usually set-reset from an HMI. If the phase owner (_W) flag is set, then the Batch command register value is stored into a temporary register. Only the lower byte of the Batch command register is moved into the temporary command register. Batch uses the lower byte of the Batch command register for the phase command, and the upper byte as a serial number to determine which command has been processed by the PLI.} {The users phase logic sets an ABORTING STATE COMPLETE bit to indicate to the PLI that the ABORTING logic has run to completion. This rung then changes the phase state to ABORTED. The previous state is reset and the ABORTING STATE COMPLETE bit is reset.}
IF PHASE_AC[PHASE_NUM] THEN PHASE_AC[PHASE_NUM] := FALSE; IF (PHASE_ST[PHASE_NUM]=10) THEN PHASE_ST[PHASE_NUM] := 90; ENDIF; ENDIF;

{The users phase logic sets a STOPPING STATE COMPLETE bit to indicate to the PLI that the STOPPING logic has run to completion. This rung then changes the phase state to STOPPED. The previous state is reset and the STOPPED STATE COMPLETE bit is reset.}
IF PHASE_SC[PHASE_NUM] THEN PHASE_SC[PHASE_NUM] := FALSE; IF (PHASE_ST[PHASE_NUM]=30) THEN PHASE_ST[PHASE_NUM] := 80; ENDIF; ENDIF; 429

PCD Programmers Technical Reference

{The users phase logic sets a HOLDING STATE COMPLETE bit to indicate to the PLI that the HOLDING logic has run to completion. This rung then changes the phase state to HELD. The previous state is reset and the HOLDING STATE COMPLETE bit is reset.}
IF PHASE_HC[PHASE_NUM] THEN PHASE_HC[PHASE_NUM] := FALSE; IF (PHASE_ST[PHASE_NUM]=20) THEN PHASE_ST[PHASE_NUM] := 60; ENDIF; ENDIF;

{The users phase logic sets a RESTARTING STATE COMPLETE bit to indicate to the PLI that the RESTARTING logic has run to completion. This rung then changes the phase state back to RUNNING. If the Restore Request flag is set then the contents of the Request Buffer is stored back to Request Data Array. The Step Index is restored from the Step Buffer. The previous state is reset and the RESTARTING STATE COMPLETE bit is reset}
IF PHASE_TC[PHASE_NUM] THEN PHASE_TC[PHASE_NUM] := FALSE; IF (PHASE_ST[PHASE_NUM]=40) THEN PHASE_ST[PHASE_NUM] := 50; PHASE_SI[PHASE_NUM] := PHASE_SB[PHASE_NUM]; IF PHASE_RR[PHASE_NUM] THEN PHASE_RQ[PHASE_NUM] := PHASEBRQ[PHASE_NUM]; PHASEQ01[PHASE_NUM] := PHASEB01[PHASE_NUM]; PHASEQ02[PHASE_NUM] := PHASEB02[PHASE_NUM]; PHASEQ03[PHASE_NUM] := PHASEB03[PHASE_NUM]; PHASEQ04[PHASE_NUM] := PHASEB04[PHASE_NUM]; PHASEQ05[PHASE_NUM] := PHASEB05[PHASE_NUM]; ENDIF; ENDIF; ENDIF;

{The users phase logic sets a RUNNING STATE COMPLETE bit to indicate to the PLI that the RUNNING logic has run to completion. This rung then changes the phase state to COMPLETE. The previous state is reset and the RUNNING STATE COMPLETE bit is reset.}
IF PHASE_RC[PHASE_NUM] THEN PHASE_RC[PHASE_NUM] := FALSE; IF (PHASE_ST[PHASE_NUM]=50) THEN PHASE_ST[PHASE_NUM] := 70; ENDIF; ENDIF;

{If the ABORT command (10) is processed and the phase is HOLDING, STOPPING, RESTARTING, RUNNING or HELD, then the phase state is changed to ABORTING. If the Clear Request Config. flag is set, the current request is cleared. The Step Index is Stored to Step Buffer, and reinitialized. If the State Store Config. Flag is set, the previous state is stored into the Hold Index.}
IF (PHASE_CD=10) AND ((PHASE_ST[PHASE_NUM]=20) OR (PHASE_ST[PHASE_NUM]=30) OR (PHASE_ST[PHASE_NUM]=40) OR

430

D Structured Text Full PLI Example

(PHASE_ST[PHASE_NUM]=50) OR (PHASE_ST[PHASE_NUM]=60)) THEN PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 10; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; ENDIF;

{If the HOLD command (20) is processed or there is a phase failure and the phase is RESTARTING or RUNNING, or if _WC is set and the watchdog timer timed out, then the phase state is changed to HOLDING. Additionally, if the Re-execute Hold flag is on while in the HELD state and the phase has increase in failure, the HOLDING state is re-executed. The current request is buffered and cleared if the Clear Request flag is on. The Step Index is buffered, and reinitialized.}
IF ((PHASE_CD=20 OR PHASE_FI[PHASE_NUM] OR (WTCHDG_T.TOUT AND PHASE_WC[PHASE_NUM])) AND ((PHASE_ST[PHASE_NUM]=50) OR (PHASE_ST[PHASE_NUM]=40))) OR (PHASE_FI[PHASE_NUM] AND (PHASE_ST[PHASE_NUM]=60) AND PHASE_RE[PHASE_NUM] THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 20; IF (PHASE_ST[PHASE_NUM]=50) AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASEBRQ[PHASE_NUM] := PHASE_RQ[PHASE_NUM]; PHASEB01[PHASE_NUM] := PHASEQ01[PHASE_NUM]; PHASEB02[PHASE_NUM] := PHASEQ02[PHASE_NUM]; PHASEB03[PHASE_NUM] := PHASEQ03[PHASE_NUM]; PHASEB04[PHASE_NUM] := PHASEQ04[PHASE_NUM]; PHASEB05[PHASE_NUM] := PHASEQ05[PHASE_NUM]; ENDIF; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; IF (PHASE_ST[PHASE_NUM] = 50) THEN PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; ENDIF; ENDIF;

{If the STOP command (30) is processed and the phase is HOLDING, RESTARTING, RUNNING or HELD, then the phase state is changed to STOPPING. If the Clear Request config. flag is set, the current request is cleared. The Step Index is Stored to Step Buffer, and reinitialized. If the State Store Config. Flag is set the previous state is stored into the Hold Index.}
IF (PHASE_CD=30) AND ((PHASE_ST[PHASE_NUM]=20) OR (PHASE_ST[PHASE_NUM]=40) OR

431

PCD Programmers Technical Reference

(PHASE_ST[PHASE_NUM]=50) OR (PHASE_ST[PHASE_NUM]=60)) THEN PHASE_SB[PHASE_NUM] := PHASE_SI[PHASE_NUM]; PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_HI[PHASE_NUM] := PHASE_ST[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 30; IF PHASE_CR[PHASE_NUM] AND PHASE_RQ[PHASE_NUM] > 999 THEN PHASE_RQ[PHASE_NUM] := 6000; ENDIF; ENDIF;

{If the Reset command (40) is processed, and the phase is in the COMPLETE, ABORTED or STOPPED state, or the phase logic is being reinitialized, then the phase state changes to IDLE. Any failures are reset. The Step Index and the Request Data Array are reinitialized.}
IF PHASE_CD = 40 AND ((PHASE_ST[PHASE_NUM]=70) OR (PHASE_ST[PHASE_NUM]=90) OR (PHASE_ST[PHASE_NUM]=80)) THEN PHASE_ST[PHASE_NUM] := 100; PHASE_F[PHASE_NUM] := 0; PHASE_SI[PHASE_NUM] := 0; PHASE_RQ[PHASE_NUM] := 0; ENDIF;

{If the RESTART command (90) is processed and the phase is HELD and the phase is not in MANUAL and there are no failures, then the phase state changes to RESTARTING. The Step Index is reinitialized.}
IF PHASE_CD = 90 AND PHASE_F[PHASE_NUM] = 0 AND (PHASE_ST[PHASE_NUM]=60) THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 40; ENDIF;

{If the START command (100) is processed and the phase is IDLE and the phase is not in MANUAL and there are no failures, then the phase state changes to RUNNING. The Step Index is reinitialized.}
IF PHASE_CD = 100 AND PHASE_F[PHASE_NUM] = 0 AND (PHASE_ST[PHASE_NUM]=100) THEN PHASE_SI[PHASE_NUM] := PHASE_IS[PHASE_NUM]; PHASE_ST[PHASE_NUM] := 50; ENDIF;

{If the CLEAR FAILURE command (130) is processed then the failure register clears. The phase programmer may choose to latch in the failure register. If this is the case, a CLEAR FAILURE command must be issued from the Batch Server to clear the failure register.}
IF PHASE_CD = 130 THEN PHASE_F[PHASE_NUM] := 0; ENDIF;

{When the phase logic makes a request, the Batch Server services the request and then sends a REQUEST CONFIRMED (140) command to the PLI. The PLI then
432

D Structured Text Full PLI Example

stores a (10) in the request register indicating to the Batch Server that it has received the confirmation. The Batch Server then sends a CLEAR REQUEST (170) command to the PLI.}
IF PHASE_CD = 140 AND PHASE_RQ[PHASE_NUM] <> 6000 THEN PHASE_RQ[PHASE_NUM] := 10; ENDIF;

{When the PLI changes the state of the phase, the PLI will enter a CANCEL PREVIOUS REQUEST request (6000) into the request register. The Batch Server will try to cancel the previous request. If the previous request was successfully canceled, the Batch Server sends down a REQUEST SUCCESSFULLY CANCELLED command (150). The PLI will then set the request register to 20 indicating that the previous request was cancelled.}
IF PHASE_CD = 150 AND PHASE_RQ[PHASE_NUM] = 6000 THEN PHASE_RQ[PHASE_NUM] := 20; ENDIF;

{When the PLI logic changes the state of the phase, the PLI will enter a CANCEL PREVIOUS REQUEST request (6000) into the request register. The Batch Server will try to cancel the previous request. If the previous was unsuccessfully cancelled, the Batch Server sends down a REQUEST UNSUCCESSFULLY CANCELLED command (160). The PLI will then set the request register to 30 indicating that the previous request was not cancelled.}
IF PHASE_CD = 160 AND PHASE_RQ[PHASE_NUM] = 6000 THEN PHASE_RQ[PHASE_NUM] := 30; ENDIF;

{After a request was made, the Batch Server will process the request and send a command indicating that the request was processed. The PLI will then set the Request register to a value of 10, 20, 30 depending on the type of request that was made. When the Batch Server receives the acknowledgement of the command, the Batch Server sends CLEAR REQUEST REGISTER command. The PLI then clears the request register}
IF PHASE_CD = 170 THEN PHASE_RQ[PHASE_NUM] := 0 ; ENDIF;

{The Download Request flag is set by a NEW_PARAMETERS command (70). The NEW_PARAMETERS command is sent to the phase whenever there is Transfer of Control within a recipe. The programmer can use this flag to determine when the phase has transitioned between two(2) steps within the recipe. The programmer would make a new request for parameters if necessary and reset this flag.}
IF PHASE_CD = 70 THEN PHASE_DL[PHASE_NUM] := TRUE; ENDIF;

433

PCD Programmers Technical Reference

{The Semi-Auto function is used in conjunction with the Pause function. When the SEMI_AUTO command is processed, the Single Step1 flag is set on unless it is already on, then it is set off. If the Single Step flag is on, the Pause flag turns on. A Resume command resets the Pause flag to off for one scan. The programmer can reference the Pause flag within the phase logic to pause at predefined transitions.}
IF PHASE_CD = 60 THEN PHASE_SS[PHASE_NUM] := NOT(PHASE_SS[PHASE_NUM]); ENDIF;

{The phase logic programmer can write logic at transitions within the phase logic to check the status of the PAUSE flag. If the PAUSE flag is on, then the transition to the next state should not be allowed. The PAUSE flag is set by a Pause command (50) or the phase being in Semi-Auto mode. Only a resume command resets the PAUSE flag. If the phase is in Semi-Auto mode, the RESUME command resets the PAUSE flag until the next transition.}
IF PHASE_CD = 50 OR PHASE_SS[PHASE_NUM] THEN PHASE_P[PHASE_NUM] := TRUE; ENDIF;

{When the Resume command (80) is processed the PAUSE flags are reset}
IF PHASE_CD = 80 THEN PHASE_P[PHASE_NUM] := FALSE; PHASE_PD[PHASE_NUM] := FALSE; ENDIF; ENDIF; PHASE_NUM:= PHASE_NUM + 1; END LOOP;

1 The Single-Step attribute is set when the SEMI_AUTO command is received. 434

INTEGRATED PRODUCTION & PERFORMANCE SUITE

System Files Reference Production Management

Batch

SYSTEM FILES REFERENCE

CHAPTER 1

Understanding Batch File Types


This document provides the technical information for configuration and maintenance of a FactoryTalk Batch system. It can be used as a reference guide by implementation engineers and the system administrator.

Document Organization
This document contains detailed information on the structure and purpose of the various files used by the FactoryTalk Batch software. The System Files Technical Reference is organized into the following topics:

Understanding FactoryTalk Batch File Types Working with Area Model Files Working with Recipe RDB Files Working with Electronic Batch Records

Batch File Types - Descriptions


FactoryTalk Batch uses a variety of input, output, and configuration files, each associated with a unique one- to four-letter file extension. The following is a description of all Batchspecific files and file extensions, including files installed by and/or created by FactoryTalk Batch:
File Extension .axml File Name Configuration Description Contains the area model structure for a single physical area. Created using the FactoryTalk Batch Equipment Editor. XML format. Unit, Unit Backgrounds, Process Cell and Phase icons displayed in the FactoryTalk Batch Equipment Editor are stored as bitmap images. Contains the recipe structure for a single Procedure level recipe. Created using the FactoryTalk Batch Recipe Editor. Binary format. Supports the building of client software in C or C++. Contains the area model structure for a single physical area. Created using the FactoryTalk Batch Equipment Editor. Displays online help topics.

.bmp

Bitmap Image

.bpc

Procedure

.c .cfg .chm

Source Code Configuration Help

437

FactoryTalk Batch System Files Reference

File Extension .cp .dat .dir .dll

File Name Check Point Data

Description Contains supplemental batch data for use during warm restarts with eProcedure. Contains supplemental batch data for use during FactoryTalk Batch Server warm restarts.

Recipe Directory Contains a list of all recipes, created in the Rebuild Recipe Directory. Dynamic Link Library WordPad Document Data Server Definition Uploadable Image Extensions to the FactoryTalk Batch application programs (.exe files) that contain utility functions that are used between multiple applications. Contains the Readme document, which contains information about using FactoryTalk Batch. Contains configuration information for a specific type of data server to be used by FactoryTalk Batch. Every data server type must have a corresponding data server. Contains a formatted record of batch events for a single batch, based on specified event filtering and formatting.

.doc .dsdf

.eva .evt

Electronic Batch Contains a complete record of events for a single batch. Record Created by the FactoryTalk Batch Server during batch execution. Report Formatting Header Initialization Log Contains information used by the report server to format uploadable image files and report text files. Created using the FactoryTalk Batch Report Editor. Supports the building of client software. Contains important configuration information used by a specified application upon startup. Contains log entries pertaining to the activity of a particular FactoryTalk Batch component. Log files are created by the FactoryTalk Batch Archiver, FactoryTalk Batch Server, the FactoryTalk Batch View, and upon installation of FactoryTalk Batch.

.fmt

.h .ini .log

.ocx

ActiveX Control A library of ActiveX controls for managing control recipes Library and the functions of the FactoryTalk Batch Server application. Operation Contains the recipe structure for a single Operation level recipe. Created using the FactoryTalk Batch Recipe Editor. XML format. Contains the recipe structure for a single Procedure level recipe. Created using the FactoryTalk Batch Recipe Editor. XML format. Registers a specific application or service in the Windows registry.

.oxml

.pxml

Procedure

.reg

Registration Entry

438

1 Understanding Batch File Types

File Extension .sim .sql .tlb .txt

File Name Simulator SQL Scripts Type Library Text Document

Description Data file used by the FactoryTalk Batch Simulator. The SQL Scripts are used to create tables in SQL Server or Oracle. Enables COM communication between FactoryTalk Batch components. Contains a document in ASCII text format that can be viewed using Microsoft Notepad, WordPad, or other word processing application. Contains the recipe structure for a single Operation level recipe. Created using the FactoryTalk Batch Recipe Editor. Binary format. Contains the recipe structure for a single Unit Procedure level recipe. Created using the FactoryTalk Batch Recipe Editor. Binary format. Contains the recipe structure for a single Unit Procedure level recipe. Created using the FactoryTalk Batch Recipe Editor. XML format.

.uop

Operation

.upc

Unit Procedure

.uxml

Unit Procedure

439

FactoryTalk Batch System Files Reference

440

CHAPTER 2

Working with Area Model Files


The following is an example of the structure detail of an area model that was exported using the FactoryTalk Batch Equipment Editor. The area model is exported to a text file or an XML format (.axml). The same file format must be used to import an area model file into the Equipment Editor. The first line in the file is always blank with a carriage return/ line feed (crlf). Between each configured component and the next component heading is another blank line with a carriage return/line feed.
Use the XML format (.axml) when importing/exporting area models in the FactoryTalk Batch Equipment Editor. The text file format is unsupported, not tested and used here for demonstration purposes only.

Structure Detail
The following is the structure detail of the FactoryTalk Batch Equipment Editor text file. The file is organized as shown in the area model file structure outlined in the previous section. Each structure field is followed by the fields and/or sub-structure fields that comprise it. Example:
<COLUMN HEADING STRUCTURE> LITERAL COLUMN HEADINGS <DATA STRUCTURE> <DATA SUB-STRUCTURE> where <DATA SUB-STRUCTURE> <data item 1>...<data item #> | <DATA SUB-STRUCTURE>

The text file sub-structure list contains the following fields:


\crlf \t <NULL LIST> | UPPERCASE TEXT <lowercase text> = Denotes a carriage return and a line feed character. Used as a record delimiter. = Denotes a tab character. Used as a field delimiter. = Denotes an empty string. = Denotes an OR situation. Only one segment of the statement is used. = Denotes literal text. = Denotes a data item within the structure.

441

FactoryTalk Batch System Files Reference

Area Model File Format


The text file representation of the area model uses the following file format1. Data items are described in a table following the area model representation. The fields are organized in the order that they appear within the area model text file.
\crlf <AR EA STRU CTURE> AREA \t NAME \t REVISION \crlf <AR EA > \t <area model name> \t <area model revision number> \crlf \crlf <PROC ESS CELL CLASS STRU CTURE> PROCESS CELL CLASS \t NAME \t ICON PATH \crlf <PROC ESS CELL CLASS ES> <NULL LIST> | <PROCESS CELL CLASS LIST> where <PROC ESS CELL CLASS LIS T> <PROCESS CELL CLASS> \crlf | <PROCESS CELL CLASS> \crlf <PROCESS CELL CLASS LIST> where <PROC ESS CELL CLASS > \t <process cell class name> \t <process cell icon path> \crlf \crlf <PROC ESS CELL STRUC TU RE> PROCESS CELL \t NAME \t CLASS \t ID \t MAXOWNERS \t X \t Y \t GENERIC_STR1 \t GENERIC_STR2 \t GENERIC_STR3 \t GENERIC_STR4 \t GENERIC_STR5 \t ERP_ALIAS \t HYPERLINK1 \t HYPERLINK2 \t HYPERLINK3 \t HYPERLINK4 \t HYPERLINK5 \t UID \crlf <P ROC ESS CELLS > <NULL LIST> | <PROCESS CELL LIST> where <PROCESS CELL LIST> <PROCESS CELL> \crlf | <PROCESS CELL> \crlf <PROCESS CELL LIST> where <P ROC ESS CELL> \t <process cell name> \t <class name of process> \t <process cell resource ID> \t <process cell max owners> \t <process cell X coordinate> \t <process cell Y coordinate> \t <process cell cross invocation string 1> \t <process cell cross invocation string 2> \t <process cell cross invocation string 3> \t <process cell cross invocation string 4> \t <process cell cross invocation string 5> \t <process cell ERP alias> 1 An area model can also be converted to XML. (See the FactoryTalk Batch Equipment Editor Users Guide for information.)

442

2 Working with Area Model Files

\t <process cell hyperlink 1> \t <process cell hyperlink 2> \t <process cell hyperlink 3> \t <process cell hyperlink 4> \t <process cell hyperlink 5> \t <unique ID>1\crlf \crlf <S ER VER S TR UCTURE> SERVER \t NAME \t DSDF FILE NAME \t APPLICATION \t TOPIC \t WATCHDOG ITEM \t BADVALUE \t LCID \t WATCHDOG PROTOCOL \t READ ACCESS PATH \t READ ITEM NAME \t WRITE ITEM PATH \t WRITE ITEM NAME \t ON_CNTRL_SCANRATE \t OFF_CNTRL_SCANRATE \t LOCAL SERVER \t REMOTE SERVER LOC \t DEFAULT ACCESS PATH \t CIP FILE PATH \t CIP NETWORK PATH \t CIP TIMEOUT \t CIP RETRIES \t CONTROLLER TYPE \t LOGIX5000 REV \t DRIVER NAME \t RAW COMM PATH \t SYNC TIME \t SYNC STATUS \crlf <S ER VERS> <NULL LIST> | <SERVER LIST> where <S ER VER LIS T> <SERVER> \crlf | <SERVER> \crlf <SERVER LIST> where <S ER VER> \t <server name> \t <data server definition file name> \t <server application> \t <server topic> \t <server watchdog item> \t <server bad value> \t <server locale ID> \t <watchdog protocol> \t <watchdog read item access path> \t <watchdog read item name> \t <watchdog write item access path> \t <watchdog write item name> \t <on control scan rate> \t <off control scan rate> \t <local server> \t <remote server location> \t <default access path> \t < project file path> \t < controller network path > \t <controller timeout> \t <controller retries> \t <controller type> \t <controller revision> \t <driver name> \t <raw communication path> \t <CIP server synchronization time> \t <CIP server synchronization status> /crlf \crlf <RES OURC E CLASS S TR UCTURE> RESOURCE CLASS \t NAME \crlf <RES OURC E CLASS ES> <NULL LIST> | <RESOURCE CLASS LIST> where <RES OURC E CLASS LIS T> <RESOURCE CLASS> \crlf | <RESOURCE CLASS> \crlf <RESOURCE CLASS LIST> where <RES OURC E CLASS > \t <resource class name> \crlf \crlf

1 Used for RSLogix 5000 synchronization.

443

FactoryTalk Batch System Files Reference

<RES OURC E STRUC TURE> RESOURCE \t NAME \t CLASS \t ID \t MAXOWNERS \t GENERIC_STR1 \t GENERIC_STR2 \t GENERIC_STR3 \t GENERIC_STR4 \t GENERIC_STR5 \t HYPERLINK1 \t HYPERLINK2 \t HYPERLINK3 \t HYPERLINK4 \t HYPERLINK5 \crlf <RESOURCES> <NULL LIST> | <RESOURCE LIST> where <RESOURCE LIST> <RESOURCE> \crlf | <RESOURCE> \crlf <RESOURCE LIST> where <RESOURCE> \t <resource name> \t <class name of resource> \t <resource ID> \t <resource max owners> \t <resource cross invocation string 1> \t <resource cross invocation string 2> \t <resource cross invocation string 3> \t <resource cross invocation string 4> \t <resource cross invocation string 5> \t <resource hyperlink 1> \t <resource hyperlink 2> \t <resource hyperlink 3> \t <resource hyperlink 4> \t <resource hyperlink 5> \crlf \crlf <TAG CLA SS STRUCTURE> TAG CLASS \t NAME \t TYPE \t ENUM SET \t GLOBAL\t DESCRIPTION \t TAG CLASS EU \crlf <TAG CLA SSES> <NULL LIST> | <TAG CLASS LIST> where <TAG CLA SS LI ST> <TAG CLASS> \crlf | <TAG CLASS> \crlf <TAG CLASS LIST> where <TAG CLA SS> \t <tag class name> \t <tag class type> \t <tag class enum set> \t <tag class description> \t <tag class engineering units> \crlf \crlf <ENUMERATION S ET STRUC TURE> ENUMERATION SET \t NAME \t TYPE \crlf <ENUMERATION S ETS> <NULL LIST> | <ENUMERATION SET LIST> where <ENUMERATION S ET LIST> <ENUMERATION SET> \crlf | <ENUMERATION SET> \crlf <ENUMERATION SET LIST> where <ENUMERATION S ET> \t <enumeration set name> \t <enumeration set type> \crlf

444

2 Working with Area Model Files

\crlf <ENUMERATION S TRUCTURE> ENUMERATION \t SET \t NAME \t VALUE \crlf <ENUMERATIONS> <NULL LIST> | <ENUMERATION LIST> where <ENUMERATION LI ST> <ENUMERATION> \crlf | <ENUMERATION> \crlf <ENUMERATION LIST> where <ENUMERATION> \t <enumeration type name> \t <enumeration name> \t <enumeration value> \crlf \crlf <UN IT CLAS S S TRUCTURE> UNIT CLASS \t NAME \t ICON PATH \crlf <UN IT CLAS SES> <NULL LIST> | <UNIT CLASS LIST> where <UN IT CLAS S LI ST> <UNIT CLASS> \crlf | <UNIT CLASS> \crlf <UNIT CLASS LIST> where <UN IT CLAS S> \t <unit class name> \t <unit class icon path> \crlf \crlf <UN IT STR UCTURE> UNIT \t NAME \t CLASS \t ID \t MAXOWNERS \t X \t Y \t GENERIC_STR1 \t GENERIC_STR2 \t GENERIC_STR3 \t GENERIC_STR4 \t GENERIC_STR5 \t ERP_ALIAS \t HYPERLINK1 \t HYPERLINK2 \t HYPERLINK3 \t HYPERLINK4 \t HYPERLINK5 \t DEFAULT SERVER \t UID \crlf <UN ITS> <NULL LIST> | <UNIT LIST> where <UNIT LIST> <UNIT> \crlf | <UNIT> \crlf <UNIT LIST> where <UN IT> \t <unit name> \t <unit class> \t <unit resource ID> \t <unit max owners> \t <unit X coordinate> \t <unit Y coordinate> \t <unit cross invocation string 1> \t <unit cross invocation string 2> \t <unit cross invocation string 3> \t <unit cross invocation string 4> \t <unit cross invocation string 5> \t <unit erp alias>

445

FactoryTalk Batch System Files Reference

\t <unit hyperlink 1> \t <unit hyperlink 2> \t <unit hyperlink 3> \t <unit hyperlink 4> \t <unit hyperlink 5> \t <default server> \t <unique ID>1 \crlf \crlf <PHAS E STRU CTURE> PHASE \t NAME \t CATEGORY \t ICON PATH \t NO OF PARAMETER TAGS \t NO OF REPORT TAGS \t NO OF REQUEST TAGS \t MESSAGE PARTNERS \t TYPE \t TAG_LOCK \t SYSTEM_CREATED\crlf <P HAS ES> <NULL LIST> | <PHASE LIST> where <P HAS E L IS T > <PHASE> \crlf | <PHASE> \crlf <PHASE LIST> where <P HAS E> \t <phase name> \t <phase category> \t <phase icon path> \t <number of parameter tags> \t <number of report tags> \t <number of request tags> \t <message partners> \t <phase type> \t <phase tag lock> \crlf \crlf <EQUIPMENT MOD ULE STRU CTURE> EQUIPMENT MODULE \t NAME \t PHASE \t ID \t MAXOWNERS \t X \t Y \t GENERIC_STR1 \t GENERIC_STR2 \t GENERIC_STR3 \t GENERIC_STR4 \t GENERIC_STR5 \t ON_CNTRL_SCANRATE \t OFF_CNTRL_SCANRATE \t AUTO_UPDNLOAD_FLAGS \t AUTOMATED PHASE \t INSTRUCTION FILE \t ERP_ALIAS \t HYPERLINK1 \t HYPERLINK2 \t HYPERLINK3 \t HYPERLINK4 \t HYPERLINK5 \t UID \t CIPSERVER \t CIP_PARM_LIMIT_TAGS \t CIP_RPT_LIMIT_TAGS \crlf <EQUIPMENT MODULES> <NULL LIST> | <EQUPMENT MODULE LIST> where <EQUIPMENT MODULE LIST> <EQUIPMENT MODULE> \crlf | <EQUIPMENT MODULE> \crlf <EQUIPMENT MODULE LIST> where <EQ UIP MENT MOD ULE> \t <equipment module name> \t <equipment module phase> \t <equipment module resource ID> \t <equipment module max owners> \t <equipment module X coordinate> \t <equipment module Y coordinate> \t <equipment module cross invocation string 1> \t <equipment module cross invocation string 2> \t <equipment module cross invocation string 3> \t <equipment module cross invocation string 4> \t <equipment module cross invocation string 5> \t <equipment module on-control scan rate> \t <equipment module off-control scan rate> 1 Used for RSLogix 5000 synchronization.

446

2 Working with Area Model Files

\t <equipment module auto upload/download flags> \t <equipment module automated phase> \t <equipment module instruction file> \t <equipment module erp alias> \t <equipment module hyperlink 1> \t <equipment module hyperlink 2> \t <equipment module hyperlink 3> \t <equipment module hyperlink 4> \t <equipment module hyperlink 5> \t <unique ID>1 \t <CIP server name> \t <CIP parameter limit tag indication> \t <CIP report limit tag indication> \crlf \crlf <S IGN ATURE TEMPLATE S TRUCTURE> SIGNATURE TEMPLATE \t NAME \t INDEX \t LAST SIGNOFF \crlf <SIGNATURE TEMPLATES> <NULL LIST> | <SIGNATURE TEMPLATE LIST> where <S IGN ATURE TEMPLATE LIS T> <SIGNATURE TEMPLATE> \crlf | <SIGNATURE TEMPLATE> \crlf <SIGNATURE TEMPLATE LIST> where <S IGN ATURE TEMPLATE> \t <signature template name> \t <signature template index> \t <signature template last signoff> \crlf \crlf <S IGN OFF STRUCTURE> SIGNOFF \t NAME \t INDEX \t MEANING \t COMMENT \crlf <S IGN OF FS> <NULL LIST> | <SIGNOFF LIST> where <S IGN OF F LI ST> <SIGNOFF> \crlf | <SIGNOFF> \crlf <SIGNOFF LIST> where <S IGN OF F> \t <signoff name> \t <signoff index> \t <signoff meaning> \t <signoff comment> \crlf \crlf <S IGN OFF PERMISSI ON STRUCTU RE> SIGNOFF PERMISSION \t NAME \t INDEX \t DomainOrComputer \t UserOrGroup \t UserIsGroup \crlf <S IGN OF FS> <NULL LIST> | <SIGNOFF PERMISSION LIST>

1 Used for RSLogix 5000 synchronization.

447

FactoryTalk Batch System Files Reference

where <S IGN OF F PERM ISSI ON LIST> <SIGNOFF PERMISSION> \crlf | <SIGNOFF PERMISSION> \crlf <SIGNOFF PERMISSION LIST> where <S IGN OFF PERM ISSI ON> \t <signoff permission name> \t <signoff permission index> \t <signoff permission domainorcomputer> \t <signoff permission userorgroup> \t <signoff permission userisgroup> \crlf \crlf <COMMAND STRUCTUR E> COMMAND VERIFICATION POLICY \t ABORT \t ACK \t AUTO \t BIND \t BIND AC \t FAI \t COMMENT \t DISCONNECT \t HOLD \t MANUAL \t PARAM CHANGE \t PAUSE \t REMOVE \t REACTIVE \t RESET \t RESTART \t RESUME \t SEMI AUTO \t SET LABELS \t SET LOTS \t START \t STEP \t STOP\t TIMER COMPLETE \t TIMER RESET \crlf <COMMANDS > <NULL LIST> | <COMMAND LIST> where <COMMAND LIST> <COMMAND> \crlf | <COMMAND> \crlf <COMMAND LIST> where

<CO M M A N D >
\t <command verification policy> \t <command abort> \t <command ack> \t <command auto> \t <command bind> \t <command bind ac> \t <command fail> \t <command comment> \t <command disconnect> \t <command hold> \t <command manual> \t <command param change> \t <command pause> \t <command remove> \t <command reactivate> \t <command reset> \t <command restart> \t <command resume> \t <command semi auto> \t <command set labels> \t <command set lots> \t <command start> \t <command step> \t <command stop> \crlf \crlf <GLOBAL UNIT BINDIN G REQUI REMENTS STRUCTUR E> GLOBAL UNIT BINDING REQUIREMENT \t EXPRESSION \crlf <GLOBAL UNIT BINDING REQUIREMENTS> <NULL LIST> | <GLOBAL UNIT BINDING REQUIREMENT LIST> where <GLOBAL UNIT BINDING REQUIREMENT LIST> <GLOBAL UNIT BINDING REQUIREMENT> \crlf | <GLOBAL UNIT BINDING REQUIREMENT> \crlf <GLOBAL UNIT BINDING REQUIREMENT LIST> where <GLOBAL UNIT BINDING REQUIREMENT>\t <global unit binding requirement> \crlf \crlf

448

2 Working with Area Model Files

<MESSAGE S TR UCTURE> MESSAGE \t NAME \t PHASE \t ID \t ARCHIVE \crlf <M ESSAGES> <NULL LIST> | <MESSAGE LIST> where <M ESSAGE LIS T> <MESSAGE> \crlf | <MESSAGE> \crlf <MESSAGE LIST> where <M ESSAGE> \t <message name> \t <message phase> \t <message ID> \t <message archive flag> \crlf \crlf <PARAMETER STRU CTURE> PARAMETER \t NAME \t PHASE \t ID \t TYPE \t EU \t DEFAULT \t MIN \t MAX \t SCALE \t ENUMERATION SET \t DOWNLOAD_FLAGS \t VERIFICATION METHOD \t SCALE LIMIT \t NORMAL ACTION \t NORMAL_SIGNATURE \t HL_ACTION \t HL_SIGNATURE \t HIGH VALUE \t LOW VALUE \t HHLL_ACTION \t HHLL_SIGNATURE \t HIGH_HIGH VALUE \t LOW_LOW VALUE \t HHHLLL_ACTION \t HHHLLL_SIGNATURE TEMPLATE \t HHHLLL_HIGH \t HHHLLL_LOW \crlf <PARAMETER S> <NULL LIST> | <PARAMETER LIST> where <PARAMETER LIST> <PARAMETER> \crlf | <PARAMETER> \crlf <PARAMETER LIMIT> where <PARAMETER S> \t <parameter name> \t <parameter phase> \t <parameter ID> \t <parameter type> \t <parameter engineering units> \t <parameter default value> \t <parameter minimum value> \t <parameter maximum value> \t <parameter scalable flag> \t <parameter enumeration set name> \t <parameter download flags> \t <parameter verification method> \t <parameter scale limit> \t <parameter normal action> \t <parameter normal_signature> \t <parameter hl_action > \t <parameter hl_signature> \t <parameter high value> \t <parameter low value> \t <parameter hhll_action> \t <parameter hhll_signature> \t <parameter high_high value> \t <parameter low_low value> \t <parameter hhhlll_action> \t <parameter hhhlll_signature template> \t <parameter hhhlll_high> \t <parameter hhhlll_low> \crlf \crlf <REPOR T STRUC TU RE> REPORT \t NAME \t PHASE \t ARCHIVE \t OPERATOR \t ID \t TYPE \t EU \t ENUMERATION SET \t UPLOAD_FLAGS \t VERIFICATION METHOD \t LIMIT CALCULATION \t TARGET PARAMETER \t SCALE LIMIT \t NORMAL ACTION \t NORMAL_SIGNATURE \t HL_ACTION \t HL_SIGNATURE \t HIGH VALUE \t LOW VALUE \t HHLL_ACTION \t HHLL_SIGNATURE \t HIGH_HIGH VALUE \t LOW_LOW VALUE \t HHHLLL_ACTION \t HHHLLL_SIGNATURE TEMPLATE \t HHHLLL_HIGH \t HHHLLL_LOW \t ERP_ALIAS \crlf 449

FactoryTalk Batch System Files Reference

<REP OR TS > <NULL LIST> | <REPORT LIST> where <REPORT LIST> <REPORT> \crlf | <REPORT> \crlf <REPORT LIST> where <REPORT> \t <report parameter name> \t <report parameter phase> \t <report parameter archive flag> \t <report parameter operator flag> \t <report parameter ID> \t <report parameter type> \t <report parameter engineering units> \t <report parameter enumeration set> \t <report parameter upload flags> \t <report parameter verification method> \t <report parameter limit calculation> \t <report parameter target parameter> \t <report parameter scale limit> \t <report parameter normal action> \t <report parameter normal signature> \t <report parameter hl_action> \t <report parameter hl_signature> \t <report parameter high value> \t <report parameter low value> \t <report parameter hhll_action> \t <report parameter hhll_signature> \t <report parameter high_high value> \t <report parameter low_low value> \t <report parameter hhhlll_action> \t <report parameter hhhlll_signature template> \t <report parameter hhhlll_high> \t <report parameter hhhlll_low> \t <report parameter erp_alias> \crlf \crlf <CONTROL STRA TEGY STRUCTURE> CONTROL STRATEGY \t NAME \t PHASE \crlf <CONTROL STRATEGIES> <NULL LIST> | <CONTROL STRATEGY LIST> where <CONTROL STRATEGY LI ST> <CONTROL STRATEGY> \crlf | <CONTROL STRATEGY> \crlf <CONTROL STRATEGY LIST> where <CONTROL STRATEGY> \t <control strategy name> \t <control strategy phase> \crlf \crlf <CONTROL STRA TEGY PARA METERS STRUCTURE> CONTROL STRATEGY PARAMETERS \t NAME \t STRATEGY \t PHASE \t ID \t TYPE \t EU \t DEFAULT \t MIN \t MAX \t SCALE \t ENUMERATION SET \t DOWNLOAD_FLAGS \t VERIFICATION METHOD \t SCALE LIMIT \t NORMAL ACTION \t NORMAL_SIGNATURE \t HL_ACTION \t HL_SIGNATURE \t HIGH VALUE \t LOW VALUE \t HHLL_ACTION \t HHLL_SIGNATURE \t HIGH_HIGH VALUE \t LOW_LOW VALUE \t HHHLLL_ACTION \t HHHLLL_SIGNATURE TEMPLATE \t HHHLLL_HIGH \t HHHLLL_LOW \crlf <CONTROL STRATEGY PARAMETERS> <NULL LIST> | <CONTROL STRATEGY PARAMETER LIST>

450

2 Working with Area Model Files

where <CONTROL STRATEGY PARAMETER LIST> <CONTROL STRATEGY PARAMETER> \crlf | <CONTROL STRATEGY PARAMETER> \crlf <CONTROL STRATEGY PARAMETER LIST> where <CONTROL STRATEGY PARAMETER> \t <control strategy parameter name> \t <control strategy parameter strategy> \t <control strategy parameter phase> \t <control strategy parameter ID> \t <control strategy parameter type> \t <control strategy parameter engineering units> \t <control strategy parameter default value> \t <control strategy parameter minimum value> \t <control strategy parameter maximum value> \t <control strategy parameter scale flag> \t <control strategy parameter enumeration set> \t <control strategy parameter download flags> \t <control strategy parameter verification method> \t <control strategy parameter scale limit> \t <control strategy parameter normal action> \t <control strategy parameter normal signature> \t <control strategy parameter hl_action> \t <control strategy parameter hl_signature> \t <control strategy parameter high value> \t <control strategy parameter low value> \t <control strategy parameter hhll_action> \t <control strategy parameter hhll_signature> \t <control strategy parameter high_high value> \t <control strategy parameter low_low value> \t <control strategy parameter hhhlll_action> \t <control strategy parameter hhhlll_signature template> \t <control strategy parameter hhhlll_high> \t <control strategy parameter hhhlll_low> \crlf \crlf <CONTROL STRA TEGY REPORTS S TRUCTURE> CONTROL STRATEGY REPORTS \t NAME \t STRATEGY \t PHASE \t ARCHIVE \t OPERATOR \t ID \t TYPE \t EU \t ENUMERATION SET \t UPLOAD_FLAGS \t VERIFICATION METHOD \t LIMIT CALCULATION \t TARGET PARAMETER \t SCALE LIMIT \t NORMAL ACTION \t NORMAL_SIGNATURE \t HL_ACTION \t HL_SIGNATURE \t HIGH VALUE \t LOW VALUE \t HHLL_ACTION \t HHLL_SIGNATURE \t HIGH_HIGH VALUE \t LOW_LOW VALUE \t HHHLLL_ACTION \t HHHLLL_SIGNATURE TEMPLATE \t HHHLLL_HIGH \t HHHLLL_LOW \crlf <CONTROL STRATEGY REPO RTS> <NULL LIST> | <CONTROL STRATEGY REPORT LIST> where <CONTROL STRATEGY REPO RT LIST> <CONTROL STRATEGY REPORT> \crlf | <CONTROL STRATEGY REPORT> \crlf <CONTROL STRATEGY REPORT LIST> where <CONTROL STRATEGY REPO RT> \t <control strategy report name> \t <control strategy report strategy> \t <control strategy report phase> \t <control strategy report archive flag>

451

FactoryTalk Batch System Files Reference

\t <control strategy report operator flag> \t <control strategy report ID> \t <control strategy report type> \t <control strategy report engineering units> \t <control strategy report enumeration set> \t <control strategy report upload flags> \t <control strategy report verification method> \t <control strategy report limit calculation> \t <control strategy report target parameter> \t <control strategy report scale limit> \t <control strategy report normal action> \t <control strategy report normal signature> \t <control strategy report hl_action> \t <control strategy report hl_signature> \t <control strategy report high value> \t <control strategy report low value> \t <control strategy report hhll_action> \t <control strategy report hhll_signature> \t <control strategy report high_high value> \t <control strategy report low_low value> \t <control strategy report hhhlll_action> \t <control strategy report hhhlll_signature template> \t <control strategy report hhhlll_high> \t <control strategy report hhhlll_low> \crlf \crlf <TAG S TRUCTURE> TAG \t NAME \t CLASS \t TYPE \t ENUM SET \t SERVER \t ITEM \t EQUIPMENT MODULE/UNIT \t READ ACCESS PATH \t READ ITEM NAME \t WRITE ITEM PATH \t WRITE ITEM NAME \t STATIC VALUE \t TAG EU \crlf <TAG S> <NULL LIST> | <TAG LIST> where <TAG LI ST> <TAG> \crlf | <TAG> \crlf <TAG LIST> where <TAG > \t <tag name> \t <tag class> \t <tag data type> \t <tag enumeration set> \t <tag server name> \t <tag item name> \t <tag equipment module/unit> \t <read access path> \t <read item name> \t <write item path> \t <write item name> \t <tag static value> \t <tag engineering units> \crlf \crlf <UN IT FLOWPA TH STRUCTURE> UNIT FLOWPATH LIST \t NAME \t DESTINATION \crlf <UNIT FLOWPATHS> <NULL LIST> | <FLOWPATH LIST> where <FLOWPATH LIST> <FLOWPATH> \crlf | <FLOWPATH> \crlf <FLOWPATH LIST> where <F LOWP ATH> \t <flowpath source unit> \t <flowpath destination unit> \crlf \crlf <PROC ESS CELL UNITS STRU CTURE> PROCESS CELL UNIT LIST \t NAME \t UNIT \crlf

452

2 Working with Area Model Files

<PROC ESS CELL UNITS > <NULL LIST> | <PROCESS CELL UNIT LIST> where <PROC ESS CELL UNI T LIST> <PROCESS CELL UNIT> \crlf | <PROCESS CELL UNIT> \crlf <PROCESS CELL UNITS> where <PROC ESS CELL UNI T> \t <process cell unit list process cell name> \t <process cell unit list unit name> \crlf \crlf <UN IT EQUIPMENT N EED ED STRU CTURE> UNIT EQUIPMENT NEEDED \t NAME \t EQUIPMENT \crlf <UNIT EQUIPMENT NEED ED > <NULL LIST> | <UNIT EQUIPMENT NEEDED LIST> where <UNIT EQUIPMENT NEED ED LIST> <UNIT EQUIP NEEDED> \crlf | <UNIT EQUIP NEEDED> \crlf <UNIT EQUIPMENT NEEDED LIST> where <UNIT EQUIP NEEDED> \t <unit equipment needed unit name> \t <unit equipment needed equipment name> \crlf \crlf <RESOURCE EQUIPMENT NEEDED STRUCTU RE> RESOURCE EQUIPMENT NEED \t NAME \t EQUIPMENT \crlf <RESOURCE EQUIPMENT NEEDED> <NULL LIST> | <RESOURCE EQUIP NEEDED LIST> where <RESOURCE EQUIP NEEDED LIST> <RESOURCE EQUIP NEEDED> \crlf | <RESOURCE EQUIP NEEDED> \crlf <RESOURCE EQUIP NEED LIST> where <RESOURCE EQUIP NEEDED> \t <resource equipment needed resource name> \t <resource equipment needed equipment name> \crlf \crlf <PROC ESS CELL EQU IPMENT NEEDED STRUCTU RE> PROCESS CELL EQUIPMENT NEEDED \t NAME \t EQUIPMENT \crlf <PROCESS CELL EQUIPMENT NEEDED> <NULL LIST> | <PROCESS CELL EQUIPMENT NEEDED LIST>

453

FactoryTalk Batch System Files Reference

where <PROCESS CELL EQUIPMENT NEEDED LIST> <PROCESS CELL EQUIP NEEDED> \crlf | <PROCESS CELL EQUIP NEEDED> \crlf <PROCESS CELL EQUIPMENT NEEDED LIST> where <PROCESS CELL EQUIP NEEDED> \t <process cell equipment needed process cell name> \t <process cell equipment needed equipment name> \crlf \crlf <EQUIPMENT MODULE EQUIPMENT NEEDED STRUCTU RE> EQUIPMENT MODULE EQUIPMENT NEEDED \t NAME \t EQUIPMENT \crlf <EQUIPMENT MODULE EQUIPMENT NEEDED> <NULL LIST> | <EQUIPMENT MODULE EQUIPMENT NEEDED LIST> where <EQUIPMENT MODULE EQUIPMENT NEEDED LIST> <EQUIPMENT MODULE EQUIP NEEDED> \crlf | <EQUIPMENT MODULE EQUIP NEEDED> \crlf <EQUIPMENT MODULE EQUIPMENT NEEDED LIST> where <EQUIPMENT MODULE EQUIP NEEDED> \t <equipment module equipment needed equipment module name> \t <equipment module equipment needed equipment name> \crlf \crlf <UNIT EQUIPMENT MODULE STRUCTURE> UNIT EQUIPMENT MODULE LIST \t NAME \t PHASE \t RESOURCE \crlf <UNIT EQUIPMENT MODULES> <NULL LIST> | <UNIT EQUIPMENT MODULE LIST> where <UNIT EQUIPMENT MODULE LIST> <UNIT EQUIP MODULE> \crlf | <UNIT EQUIP MODULE> \crlf <UNIT EQUIPMENT MODULE LIST> where <UNIT EQUIP MODULE> \t <unit equipment module list unit name> \t <unit equipment module list phase name> \t <unit equipment module list resource name> \crlf \crlf <CONTAIN ER AS SOC IATIONS STRUCTURE> CONTAINER ASSOCIATIONS \t NAME \t EQUIPMENT MODULE \t RESOURCE \t FEED TYPE \t SUPPORTED FEED TYPE \crlf

454

2 Working with Area Model Files

<CONTAIN ER AS SOC IATIONS> <NULL LIST> | <CONTAINER ASSOCIATIONS LIST> where <CONTAIN ER AS SOC IATIONS LI ST> <CONTAINER ASSOCIATION> \crlf |<CONTAINER ASSOCIATION> \crlf <CONTAINER ASSOCIATIONS LIST> where <CONTAIN ER AS SOC IATION> \t <container name> \t <equipment module name> \t <container resource> \t <container feed type> \t <supported container feed type> \crlf

\crlf

Field Definitions
The following table defines the individual fields contained within the area model text file:
Data AREA area model name The name of the area model, as assigned by the user. Description

area model revision number The version number of the area model, as assigned by the user. PROCESS CELL CLASSES process cell class name process cell icon path The name of the process cell class defined in the PROCESS CELL CLASS record. The name of the icon associated with the process cell class defined in the PROCESS CELL CLASS record, preceded by the letter C (for cell). Example: Cprocess0.bmp

PROCESS CELLS process cell name class name of process cell The name of the process cell defined by the PROCESS CELL record. The name of the process cell class to which the process cell defined by the PROCESS CELL record belongs. The named process cell class must also be found among the process cell classes defined in the PROCESS CELL CLASS records. This string represents an integer value that is the resource ID of the process cell defined by the PROCESS CELL record. This string represents an integer value that defines the maximum number of owners of the process cell defined by the PROCESS CELL record. This string represents an integer value that is the on-screen X coordinate of the process cell defined by the PROCESS CELL record.
455

process cell resource ID process cell max owners

process cell X coordinate

FactoryTalk Batch System Files Reference

Data process cell Y coordinate

Description This string represents an integer value that is the on-screen Y coordinate of the process cell defined by the PROCESS CELL record.

process cell cross invocation Where # is a number 1-5. This is a cross invocation string associated string # with the PROCESS CELL record. process cell erp alias process cell hyperlink # unique ID SERVERS server name data server definition file name server application server topic server watchdog item server bad value server locale ID watchdog protocol The name of the server as defined by the SERVER record. The name of the Data Server Definition (DSDF) file that defines the data server type. The DDE application name of the data server defined by the SERVER record. The DDE topic name of the server defined by the SERVER record. The item name to be used for watchdog communication with the server defined by the SERVER record. This defines the bad value string used by the server defined by the SERVER record. This string represents an integer value that defines the locale ID of the server defined by the SERVER record. This string represents an integer value that defines which watchdog protocol will be used to communicate with this data server. Legal values are: 0 Standard 1 Enhanced watchdog read item access path watchdog read item name The watchdog read item access path to be used for OPC communication. The watchdog read item name to be used for OPC communication. This is an ERP alias string associated with the PROCESS CELL record. Where # is a number 1-5. This is a hyperlink string associated with the PROCESS CELL record. Unique ID for the Process Cell (currently set to zero). For future use.

watchdog write item access The watchdog write item access path to be used for OPC path communication. watchdog write item name on control scan rate The watchdog write item name to be used for OPC communication. This string represents an integer value that is the on-control scan rate to be used for communications with the defined OPC server.

456

2 Working with Area Model Files

Data off control scan rate local server

Description This string represents an integer value that is the off-control scan rate to be used for communications with the defined OPC server. This string represents an integer value that defines whether the specified data server definition file (DSDF) is located on the local machine or on a remote machine. Legal values are: 0 Remote 1 Local

remote server location

This is the path and name of the remote machine where the data server definition file (DSDF) is located. The remote server location can be specified using either the UNC or DNS naming convention. This is the currently assigned default data server. This is used for setting item access paths. This is the full pathname of the RSLogix 5000 project file (for CIP servers only). This is the network path to the Logix5000 controller (for CIP servers only). This is the user-configured timeout for the Logix5000 controller (for CIP servers only). Valid values are 500 to 1000000, inclusive. This is the user-configured retries for the Logix5000 controller (for CIP servers only). Valid values are: 4, 8, 16, 32, 64. This is the type of the Logix5000 controller (for CIP servers only). This is the revision of the Logix5000 controller (for CIP servers only). This is the RSLinx Classic driver name; it is the first part of the controller network path (for CIP servers only). This is the internal (binary) version of the controller network path (for CIP servers only). This is the time of the last synchronization of this server with the project file indicated by the project file path (for CIP servers only). Valid values are: Date, time in the following format: yyyy.mm.dd HH:MM:SS Note: When CIP server synchronization status is NEVER SYNCHRONIZED, the value is ----- (5 dashes).

default server default access path project file path controller network path controller timeout controller retries controller type controller revision driver name raw communication path CIP server synchronization time

CIP server synchronization status

This is the status of the last synchronization of this server with the project file indicated by the project file path (for CIP servers only). Valid values are: NEVER SYNCHRONIZED, SUCCESSFUL, INCOMPLETE.

457

FactoryTalk Batch System Files Reference

Data RESOURCE CLASSES resource class name resource name class name of resource

Description

The name of the resource class defined in the RESOURCE CLASS record. The name of the resource defined by the RESOURCE record. The name of the resource class to which the resource defined by the RESOURCE record belongs. The named resource class must be located among the resource classes defined in the RESOURCE CLASS records. This string represents an integer value that is the ID of the resource defined by the RESOURCE record. This string represents an integer value that is the maximum number of owners of the resource defined by the RESOURCE record. Where # is a number 1-5. This is a cross invocation string associated with the resource. Where # is a number 1-5. This is a hyperlink string associated with the resource.

resource ID resource max owners resource cross invocation string 1 resource hyperlink # TAG CLASSES tag class name tag class type tag class enum set tag class global tag class description tag class engineering unit ENUMERATION SETS enumeration set name enumeration set type

The name of the tag class defined by the TAG CLASS record. The type of the tag class defined by the TAG CLASS record. (INTEGER, ENUMERATION, REAL, or STRING) The enumeration of the TAG CLASS record. The globality of the TAG CLASS record. The description of the TAG CLASS record. The engineering unit of the TAG CLASS record.

The name of the enumeration set defined by the ENUMERATION SET record. This string represents an integer value that defines the enumeration set type. Legal values are: 0 - Normal 1 - System 2 - Control Strategy 3 - Material-Enabled

ENUMERATIONS enumeration type name The name of the enumeration set of which the enumeration defined by the ENUMERATION record is a member. The named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records.

458

2 Working with Area Model Files

Data enumeration name enumeration value UNIT CLASSES unit class name unit class icon path

Description The enumeration defined by the ENUMERATION record. This string represents an integer value that is the ordinal of the enumeration defined by the ENUMERATION record.

The name of the unit class defined by the UNIT CLASS record. The name of the icon associated with the unit class defined in the UNIT CLASS record, preceded by the letter U (for unit). Example: Ufilter.bmp

UNITS unit name unit class The name of the unit defined by the UNIT record. The name of the unit class to which the unit defined by the UNIT record belongs. The named unit class must be located among the unit classes defined in the UNIT CLASS records. This string represents an integer value that is the ID of the unit resource defined by the UNIT record. This string represents an integer value that is the maximum number of owners of the unit resource defined by the UNIT record. This string represents an integer value that is the X coordinate of the unit resource defined by the UNIT record. This string represents an integer value that is the Y coordinate of the unit resource defined by the UNIT record.

unit resource ID unit max owners unit X coordinate unit Y coordinate

unit cross invocation string # Where # represents a number 1-5. This is a cross invocation string associated with the unit. unit erp alias unit hyperlink # default data server unique ID PHASES phase name phase category phase icon path The name of the phase defined by the PHASE record. The category of the phase defined by the PHASE record. The name of the icon associated with the phase defined in the PHASE record, preceded by the letter P (for phase). Example: Pagitator.bmp
459

This is an ERP alias associated with the unit. Where # represents a number 1-5. This is a cross invocation string associated with the unit. User-configured default server assignment for any equipment modules subsequently created under the Unit. This is the unique ID for the Unit (currently set to zero). For future use.

FactoryTalk Batch System Files Reference

Data number of parameter tags

Description This string represents an integer value that is the number of message parameter tags associated with the phase defined by the PHASE record. This string represents an integer value that is the number of report parameter tags associated with the phase defined by the PHASE record. This string represents an integer value that is the number of request parameter tags associated with the phase defined by the PHASE record. This string represents an integer value that is the number of message partners associated with the phase defined by the PHASE record. This string represents an integer value that defines the phase type. Legal values are: 0 - Normal 1 - Control Strategy Enabled 2 - Material-Enabled

number of report tags

number of request tags

message partners phase type

phase tag lock

This string represents an integer value that defines whether the tag lock functionality is enabled or disabled. Legal values are: 0 Disabled 1 Enabled

EQUIPMENT MODULES equipment module name equipment module phase The name of the equipment module defined by the EQUIPMENT MODULE record. The phase of the equipment module defined by the EQUIPMENT MODULE record. The named phase must be located among the phases defined in the PHASE records.

equipment module resource The resource ID of the equipment module defined by the ID EQUIPMENT MODULE record. equipment module max owners equipment module X coordinate equipment module Y coordinate equipment module cross invocation string # equipment module on control scan rate This string represents an integer value that is the maximum number of owners of the equipment module defined by the EQUIPMENT MODULE record. This string represents an integer value that is the X coordinate of the equipment module defined by the EQUIPMENT MODULE record. This string represents an integer value that is the Y coordinate of the equipment module defined by the EQUIPMENT MODULE record. Where # represents a number 1-5. This is a cross invocation string associated with the equipment module. This string represents an integer value that is the on-control scan rate to be used for communications with the defined OPC server.

460

2 Working with Area Model Files

Data equipment module off control scan rate equipment module auto upload/download flags equipment module automated phase

Description This string represents an integer value that is the off-control scan rate to be used for communications with the defined OPC server. This string represents an integer value that defines the auto upload/ download flag for the equipment module. The default is 0 (zero). This string indicates if the phase is automated or instruction based. 0 = Instruction based 1 = Automated The instruction file defined by the EQUIPMENT MODULE record.

equipment module instruction file

equipment module erp alias This is an ERP alias associated with the equipment module. equipment module hyperlink # unique ID Where # represents a number 1-5. This is a hyperlink string associated with the equipment module. This is the unique ID for the Unit, set by synchronization with the associated Logix5000 server. This exported integer value is intended for debugging purposes only and is set to zero on importation (CIP equipment modules only). Valid values: 0 to 4294967295 [232 -1] CIP server name CIP parameter limit tag indication CIP report limit tag indication This is the name of the user-configured CIP server assigned to this equipment module (CIP equipment modules only). This indications whether parameter limit tags are enabled for this equipment module (CIP equipment modules only). Valid values: TRUE, FALSE This indications whether report limit tags are enabled for this equipment module (CIP equipment modules only). Valid values: TRUE, FALSE SIGNATURE TEMPLATES signature template name signature template index signature template last signoff The name of the signature template defined by the SIGNATURE TEMPLATE record. The unique integer index of the signature template defined by the SIGNATURE TEMPLATE record. The last signoff of the signature template defined by the SIGNATURE TEMPLATE record. Legal values are: None, 1, 2, 3 Default = None

461

FactoryTalk Batch System Files Reference

Data SIGNOFFS signoff name signoff index signoff meaning signoff comment SIGNOFF PERMISSIONS signoff permission name signoff permission index signoff permission domainorcomputer signoff permission userorgroup signoff permission userisgroup

Description

The name of the signoff defined by the SIGNOFF record. The unique integer index of the signoff defined by the SIGNOFF record. The short phrase attached to a signoff that describes the signoff meaning. The comment for the specific signoff defined by the SIGNOFF record. Comments are required or optional.

The name of the signoff permission defined by the SIGNOFF PERMISSON record. The unique integer index of the signoff permission defined by the SIGNOFF PERMISSON record. The name of the domain or computer defined by the SIGNOFF PERMISSON record. The name of the user or group defined by the SIGNOFF PERMISSON record. Boolean value that identifies whether the signoff permission defined by the SIGNOFF PERMISSON record is a single user or a user group. TRUE = The Signoff Permission is defined for a user group. FALSE = The Signoff Permission is defined for a single user.

COMMANDS command verification policy The ABORT Command Verification Policy defined by the abort COMMAND record. command verification policy The ACK Command Verification Policy defined by the ack COMMAND record. command verification policy The AUTO Command Verification Policy defined by the auto COMMAND record. command verification policy The BIND Command Verification Policy defined by the bind COMMAND record. command verification policy The BIND ACK Command Verification Policy defined by the bind ac COMMAND record. command verification policy The CLEAR FAIL Command Verification Policy defined by the clear fail COMMAND record.

462

2 Working with Area Model Files

Data

Description

command verification policy The COMMENT Command Verification Policy defined by the comment COMMAND record. command verification policy The DISCONNECT Command Verification Policy defined by the disconnect COMMAND record. command verification policy The HOLD Command Verification Policy defined by the hold COMMAND record. command verification policy The MANUAL Command Verification Policy defined by the manual COMMAND record. command verification policy The PARAM CHANGE Command Verification Policy defined by param change the COMMAND record. command verification policy The PAUSE Command Verification Policy defined by the pause COMMAND record. command verification policy The REMOVE Command Verification Policy defined by the remove COMMAND record. command verification policy The REACTIVATE Command Verification Policy defined by the reactivate step COMMAND record. command verification policy The RESET Command Verification Policy defined by the reset COMMAND record. command verification policy The RESTART Command Verification Policy defined by the restart COMMAND record. command verification policy The RESUME Command Verification Policy defined by the resume COMMAND record. command verification policy The SEMI AUTO Command Verification Policy defined by the semi auto COMMAND record. command verification policy The SET LABELS Command Verification Policy defined by the set labels COMMAND record. command verification policy The SET LOTS Command Verification Policy defined by the set lots COMMAND record. command verification policy The START Command Verification Policy defined by the start COMMAND record. command verification policy The STEP Command Verification Policy defined by the step COMMAND record. command verification policy The STOP Command Verification Policy defined by the stop COMMAND record. command verification policy The TIMER COMPLETE Command Verification Policy defined by timer complete the COMMAND record. command verification policy The TIMER RESET Command Verification Policy defined by the timer reset COMMAND record.

463

FactoryTalk Batch System Files Reference

Data

Description

GLOBAL UNIT BINDING REQUIREMENTS expression MESSAGES message name message phase The name of the message defined by the MESSAGE record. The name of the phase with which the message defined by the MESSAGE record is associated. The named phase must be located among the phases defined in the PHASE records. This string represents an integer value that is the ID of the message defined by the MESSAGE record. This field is always populated with the string FALSE. The global unit binding requirements created by the user.

message ID message archive flag PARAMETERS parameter name parameter phase

The name of the parameter defined by the PARAMETER record. The name of the phase with which the parameter defined by the PARAMETER record is associated. The named phase must be located among the phases defined in the PHASE records. This string represents an integer value that is the ID of the parameter defined by the PARAMETER record. The data type of the parameter defined by the PARAMETER record. Legal values are: REAL, INTEGER, STRING, or ENUMERATION

parameter ID parameter type

parameter engineering units The engineering units of the parameter defined by the PARAMETER record. parameter default value parameter minimum value parameter maximum value parameter scalable flag The default value of the parameter defined by the PARAMETER record. The minimum value of the parameter defined by the PARAMETER record. The maximum value of the parameter defined by the PARAMETER record. This string represents a Boolean value that indicates whether the parameter defined by the PARAMETER record is scalable. A value of TRUE indicates that the value is scalable, while a value of FALSE indicates that the value is not scalable. The name of the enumeration set associated with the parameter defined by the PARAMETER record. This field is only necessary when the parameter type field has a value of ENUMERATION. When this field is required, the named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records.

parameter enumeration set name

464

2 Working with Area Model Files

Data parameter download flags parameter verification method

Description This bitmask value defines the auto download flag for the parameter. The type of verification method used for the specified parameter. The values for the verification methods are: 0 = No_Limits (Default) 1 = High/Low Limits 2 = High-High/Low-Low Limits 3 = High-High-High/Low-Low-Low Limits This flag determines whether or not the absolute limits will scale with the batch scale for the specified parameter. The default value is set to OFF. The enumerated value indicates the normal action type for the parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed

parameter scale limit flag

parameter normal action

parameter normal_signature This string indicates the Windows User Group allowed to sign. parameter hl_action The enumerated value indicates the high-low action type for the parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high limit of the parameter on the specified recipe phase. The low limit of the parameter on the specified recipe phase. The enumerated value indicates the high high-low low action type for the parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high-high limit of the parameter on the specified recipe phase. The low-low limit of the parameter on the specified recipe phase. The enumerated value indicates the high high high-low low low action type for the parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed The signature template assigned to the hhhlll verification method of the parameter. The highest limit value in the hhhlll range set for the parameter. The lowest limit value in the hhhlll range set for the parameter.

parameter hl_signature parameter high value parameter low value parameter hhll_action

parameter hhll_signature parameter high_high value parameter low_low value parameter hhhlll_action

parameter hhhlll_signature template parameter hhhlll_high parameter hhhlll_low

465

FactoryTalk Batch System Files Reference

Data REPORTS report parameter name report parameter phase

Description

The name of the report parameter defined by the REPORT record. The name of the phase with which the report parameter defined by the REPORT record is associated. The named phase must be located among the phases defined in the PHASE records. This string always holds the value FALSE. This string always holds the value FALSE. This string represents an integer value that is the ID of the report parameter defined by the REPORT structure. The data type of the report parameter defined by the REPORT record. Legal values are: REAL, INTEGER, STRING, or ENUMERATION The engineering units of the report parameter defined by the REPORT structure. The name of the enumeration set associated with the report parameter defined by the REPORT record. This field is only necessary when the report parameter type field has a value of ENUMERATION. When this field is required, the named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records. This bitmask value defines the auto upload flag for the report parameter.

report parameter archive flag report parameter operator flag report parameter ID report parameter type

report parameter engineering units report parameter enumeration set

report parameter upload flags

report parameter verification The type of verification method used for the specified report method parameter. The values for the verification methods are: 0 = No_Limits (Default) 1 = High/Low Limits 2 = High-High/Low-Low Limits 3 = High-High-High/Low-Low-Low Limits report parameter limit calculation The limit calculation defines how the verification method will be calculated for the specified report parameter. Three types are supported for reports: 0 = Absolute 1 = Percent 2 = Relative The recipe report parameters name that is to be used in the Percent or Relative limit calculation. Recipe parameter must be Real or Integer.

report parameter target parameter

466

2 Working with Area Model Files

Data

Description

report parameter scale limit This flag determines whether or not the absolute limits will scale flag with the batch scale for the specified report parameter. The default value is set to OFF. report parameter normal action report parameter normal signature report parameter hl_action The enumerated value indicates the normal action type for the report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The enumerated value indicates the high-low action type for the report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign.

report parameter hl_signature

report parameter high value The high limit of the report on the specified recipe phase. report parameter low value report parameter hhll_ action report parameter hhll_signature report parameter high high value report parameter low low value report parameter hhhlll_ action report parameter hhhlll_signature template The low limit of the report on the specified recipe phase. The enumerated value indicates the high high-low low action type for the report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high-high limit of the report on the specified recipe phase. The low-low limit of the report on the specified recipe phase. The enumerated value indicates the high high high-low low low action type for the report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed The signature template assigned to the hhhlll verification method of the report parameter.

report parameter hhhlll_high The highest limit value in the hhhlll range set for the report parameter. report parameter hhhlll_low The lowest limit value in the hhhlll range set for the report parameter. report parameter erp alias CONTROL STRATEGIES control strategy name The name of the control strategy defined by the CONTROL STRATEGY record. The ERP alias string associated with the REPORT record.

467

FactoryTalk Batch System Files Reference

Data control strategy phase

Description The name of the phase with which the control strategy defined by the CONTROL STRATEGY record is associated. The named phase must be located among the phases defined in the PHASE records. The name of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. The name of the control strategy with which the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record is associated. The named control strategy must be located among the control strategies defined in the CONTROL STRATEGY records. The name of the phase with which the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record is associated. The named phase must be located among the phases defined in the PHASE records. This string represents an integer value that is the ID of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. The data type of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. Legal values are: REAL, INTEGER, STRING, or ENUMERATION The engineering units of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. The default value of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. The minimum value of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. The maximum value of the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. This string represents a Boolean value that indicates whether the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record is scalable. A value of TRUE indicates that the value is scalable, while a value of FALSE indicates that the value is not scalable. The name of the enumeration set associated with the control strategy parameter defined by the CONTROL STRATEGY PARAMETERS record. This field is only necessary when the control strategy parameter type field has a value of ENUMERATION. When this field is required, the named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records. This bitmask value defines the auto download flag for the control strategy parameter.

control strategy parameter name control strategy parameter strategy

control strategy parameter phase

control strategy parameter ID control strategy parameter type control strategy parameter engineering units control strategy parameter default value control strategy parameter minimum value control strategy parameter maximum value control strategy parameter scale flag

control strategy parameter enumeration set

control strategy parameter download flags

468

2 Working with Area Model Files

Data control strategy parameter verification method

Description The type of verification method used for the specified control strategy parameter. The values for the verification methods are: 0 = No_Limits (Default) 1 = High/Low Limits 2 = High-High/Low-Low Limits 3 = High-High-High/Low-Low-Low Limits This flag determines whether or not the absolute limits will scale with the batch scale for the specified control strategy parameter. The default value is set to OFF. The enumerated value indicates the normal action type for the report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The enumerated value indicates the high-low action type for the control strategy parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high limit of the control strategy parameter on the specified recipe phase. The low limit of the control strategy parameter on the specified recipe phase. The enumerated value indicates the high high-low low action type for the control strategy parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high-high limit of the control strategy parameter on the specified recipe phase. The low-low limit of the control strategy parameter on the specified recipe phase. The enumerated value indicates the high high high-low low low action type for the control strategy parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed The signature template assigned to the hhhlll verification method of the control strategy parameter. The highest limit value in the hhhlll range set for the control strategy parameter.

control strategy parameter scale limit flag control strategy parameter normal action control strategy parameter normal_signature control strategy parameter hl_action control strategy parameter hl_signature control strategy parameter high value control strategy parameter low value control strategy parameter hhll_action control strategy parameter hhll_signature control strategy parameter high_high value control strategy parameter low_low value control strategy parameter hhhlll_action control strategy parameter hhhlll_signature template control strategy parameter hhhlll_high

469

FactoryTalk Batch System Files Reference

Data control strategy parameter hhhlll_low

Description The lowest limit value in the hhhlll range set for the control strategy parameter.

CONTROL STRATEGY REPORTS control strategy report name The name of the report parameter defined by the CONTROL STRATEGY REPORTS record. control strategy report strategy The name of the control strategy with which the control strategy report parameter defined by the CONTROL STRATEGY PARAMETERS record is associated. The named phase must be located among the phases defined in the CONTROL STRATEGY records.

control strategy report phase The name of the phase with which the control strategy report parameter defined by the CONTROL STRATEGY PARAMETERS record is associated. The named phase must be located among the phases defined in the PHASE records. control strategy report archive flag control strategy report operator flag control strategy report ID This string always holds the value FALSE. This string always holds the value FALSE. This string represents an integer value that is the ID of the control strategy report parameter defined by the CONTROL STRATEGY REPORTS structure. The data type of the control strategy report parameter defined by the CONTROL STRATEGY REPORTS record. Legal values are: REAL, INTEGER, STRING, or ENUMERATION control strategy report engineering units control strategy report enumeration set The engineering units of the control strategy report parameter defined by the CONTROL STRATEGY REPORTS structure. The name of the enumeration set associated with the control strategy report parameter defined by the CONTROL STRATEGY REPORTS record. This field is only necessary when the control strategy report type field has a value of ENUMERATION. When this field is required, the named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records. This bitmask value defines the auto upload flag for the control strategy report parameter.

control strategy report type

control strategy report upload flags

470

2 Working with Area Model Files

Data control strategy report parameter verification method

Description The type of verification method used for the specified control strategy report parameter. The values for the verification methods are: 0 = No_Limits (Default) 1 = High/Low Limits 2 = High-High/Low-Low Limits 3 = High-High-High/Low-Low-Low Limits The limit calculation defines how the verification method will be calculated for the specified control strategy report parameter. Three types are supported for reports: 0 = Absolute 1 = Percent 2 = Relative The recipe control strategy report parameters name that is to be used in the Percent or Relative limit calculation. This flag determines whether or not the absolute limits will scale with the batch scale for the specified control strategy report parameter. Default= OFF. The enumerated value indicates the normal action type for the control strategy report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed

control strategy report parameter limit calculation

control strategy report parameter target parameter control strategy report parameter scale limit flag

control strategy report parameter normal action

control strategy report This string indicates the Windows User Group allowed to sign. parameter normal signature control strategy report parameter hl_action control strategy report parameter hl_signature control strategy report parameter high value control strategy report parameter low value control strategy report parameter hhll_ action control strategy report parameter hhll_signature control strategy report parameter high high value The enumerated value indicates the high-low action type for the control strategy report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high limit of the report on the specified control strategy recipe phase. The low limit of the report on the specified control strategy recipe phase. The enumerated value indicates the high high-low low action type for the control strategy report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed This string indicates the Windows User Group allowed to sign. The high-high limit of the control strategy report on the specified recipe phase.

471

FactoryTalk Batch System Files Reference

Data control strategy report parameter low low value control strategy report parameter hhhlll_ action

Description The low-low limit of the control strategy report on the specified recipe phase. The enumerated value indicates the high high high-low low low action type for the control strategy report parameter. Legal values are: 0:None, 1:Signature Template, 2:Not Allowed The signature template assigned to the hhhlll verification method of the control strategy report parameter. The highest limit value in the hhhlll range set for the control strategy report parameter. The lowest limit value in the hhhlll range set for the control strategy report parameter.

control strategy report parameter hhhlll_signature template control strategy report parameter hhhlll_high control strategy report parameter hhhlll_low TAGS tag name tag class

The name of the tag defined by the TAG record. The name of the tag class to which the tag defined by the TAG record belongs. The named tag class must be located among the tag classes defined in the TAG CLASS records. The data type of the tag defined by the TAG record. Legal values are: REAL, INTEGER, STRING, or ENUMERATION The name of the enumeration set associated with the tag defined by the TAG record. This field is only necessary when the tag data type field has a value of ENUMERATION. When this field is required, the named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records. This string is the name of the server with which the tag defined by the TAG record is associated. The named server must be located among the servers defined in the SERVER records. The item name of the tag defined by the TAG record.

tag data type

tag enumeration set

tag server name

tag item name

472

2 Working with Area Model Files

Data tag equipment module/unit

Description The name of the equipment module or unit with which the tag defined by the TAG record is associated. When the tag class value of the tag is UNIT, COMMAND, STATUS, REQUEST, OWNER, PAUSE, PAUSED, SINGLESTEP, STEP INDEX, FAILURE, or one of the numbered equipment module classes, PARMTR##, REPORT##, or REQUST##, then this value must be the name of an equipment module. The named enumeration set must be located among the enumeration sets defined in the ENUMERATION SET records. If the tag class value of the tag is anything else, then this field must contain the name of a unit.The named unit must be located among the units defined in the UNIT records. The access path to be used for subscriptions and asynchronous reads when using the OPC communication protocol. The item name to be used for subscriptions and asynchronous reads when using the OPC communication protocol. The access path to be used for asynchronous writes when using the OPC communication protocol. The item name to be used for asynchronous writes when using the OPC communication protocol. The static value for the tag. The engineering units for the tag.

read access path read item name write item path write item name tag static value tag engineering units UNIT FLOWPATHS flowpath source unit

The name of the unit from which the flowpath defined in the FLOWPATH record begins. The named unit must be located among the units defined in the UNIT records. The name of the destination unit of the flowpath defined in the FLOWPATH structure. The named unit must be located among the units defined in the UNIT records.

flowpath destination unit

PROCESS CELL UNITS process cell unit list process The name of the process cell for which an assigned unit is being cell name defined by this PROCESS CELL UNIT record. The named process cell must be located among the process cells defined in the PROCESS CELL records. process cell unit list unit name The name of a unit being assigned to a process cell by this PROCESS CELL UNIT record. The named unit must be located among the units defined in the UNIT records.

473

FactoryTalk Batch System Files Reference

Data UNIT EQUIPMENT NEEDED unit equipment needed unit name unit equipment needed equipment name

Description

The name of a unit for which required equipment is being defined by this UNIT EQUIPMENT NEEDED record. The named unit must be located among the units defined in the UNIT records. The name of a resource being assigned to a unit by this UNIT EQUIPMENT NEEDED record. The named resource must be located among the resources defined in the RESOURCE records.

RESOURCE EQUIPMENT NEEDED resource equipment needed resource name The name of a resource for which required equipment is being defined by this RESOURCE EQUIPMENT NEEDED record. The named resource must be located among the resources defined in the RESOURCE records. The name of a resource being assigned to a resource by this RESOURCE EQUIPMENT NEEDED record. The named resource must be located among the resources defined in the RESOURCE records.

resource equipment needed equipment name

PROCESS CELL NEEDED EQUIPMENT process cell equipment needed process cell name The name of a process cell for which required equipment is being defined by this PROCESS CELL EQUIPMENT NEEDED record. The named process cell must be located among the process cells defined in the PROCESS CELL records. The name of a resource being assigned to a process cell by this PROCESS CELL EQUIPMENT NEEDED record. The named resource must be located among the resources defined in the RESOURCE records.

process cell equipment needed equipment name

EQUIPMENT MODULE EQUIPMENT NEEDED equipment module equipment needed equipment module name The name of an equipment module for which required equipment is being defined by this EQUIPMENT MODULE EQUIPMENT NEEDED record. The named equipment module must be located among the equipment modules defined in the EQUIPMENT MODULE records. The name of a resource being assigned to an equipment module by this EQUIPMENT MODULE EQUIPMENT NEEDED record. The named resource must be located among the resources defined in the RESOURCE records.

equipment module equipment needed equipment name

474

2 Working with Area Model Files

Data

Description

UNIT EQUIPMENT MODULES unit equipment module list unit name The name of a unit for which an associated equipment module is being defined by this UNIT EQUIPMENT MODULE record. The named unit must be located among the units defined in the UNIT records. The name of a phase that is being assigned to a unit by this UNIT EQUIPMENT MODULE record. The name of the resource that is being assigned to a unit by this UNIT EQUIPMENT MODULE record.

unit equipment module list phase name unit equipment module list resource name

CONTAINER ASSOCIATIONS container name equipment module name container resource container feed type supported container feed type The name of the container. The equipment module associated with the container. The resource for the container. The feed type for the container. The containers supported feed type(s).

475

FactoryTalk Batch System Files Reference

476

CHAPTER 3

Working with RDB Recipe Files


Information necessary to generate a FactoryTalk Batch recipe (when combined with information in the area model) is contained in a series of tables in a relational database named masterrecipes. This database must be located on the node specified in the FactoryTalk Batch Equipment Editors Server Options dialog box. Both the FactoryTalk Batch Server and the FactoryTalk Batch Recipe Editor require that recipes stored in database format be stored in a Microsoft SQL Server database. Table entries are associated with a specific recipe through the use of a unique recipe ID. The Batch RDB recipe format is comprised of twelve different tables:

bindpreferencespecifiers bindrequirementspecifiers formula header link materialrequirements

recparam reportlimits step transfer transition unitreq

For a given recipe, there is one row in the header table for each batch procedure, unit procedure, or operation used in the recipe. For all other tables, there are as many rows as needed to provide complete information about the recipe. The configuration is shown for each table. This should maximize access speed and minimize entry of erroneous or conflicting data. All table names and their respective column names must match the examples in this chapter exactly, including case. Additionally, the following characters are not allowed in any of the string columns:

(apostrophe; or single tick) TAB Spaces

(quotation; or double tick) CRLF (carriage return/line feed)

Header Table Configuration


FactoryTalk Batch supports the conditions of transition elements in either Language Neutral Format (LNF) or Language Specific Format (LSF). The languagetype column in the header table is used to determine the format of the condition statement. When the languagetype column is empty, the condition statement is checked for left bracket

477

FactoryTalk Batch System Files Reference

characters [. If any are found, it is assumed that the condition is stored in LNF format. LSF conditions are converted to LNF format for internal use and vice versa. The following assumptions are made when reading recipes from an RDB:

All columns marked optional are read as is. All time stamps are read as is. author is read as is. Missing released is assumed as FALSE (zero). Missing or invalid recipetype aborts the read request. Missing or invalid schema is assumed as the current schema. areamodel is read as is. Missing classbased is assumed as FALSE (zero). Missing resource is set to NULL.

The following is the table configuration used for the header table. Dimensioning is indicated in the table header. The recipeid column should be configured as the primary key and as a unique index.
Field Name recipeid (unique) author (Nulls) productid (Nulls) productcode (Nulls) minsize (Nulls) defaultsize (Nulls) maxsize (Nulls) approvedby (Nulls) description (Nulls) abstract (Nulls) released (Nulls) produnits (Nulls) DataType Description

nvarchar(128) Name of the procedure (bpc/pxml), unit procedure (upc/ uxml), or operation (uop/oxml). nvarchar(255) Author of the recipe. This entry is required during recipe verification. nvarchar(255) The name (ID) of the product. nvarchar(255) Some unique identification code for the given recipe. float(8) float(8) float(8) Minimum size of batch allowed. Default size of batch. Maximum size of batch.

nvarchar(255) Name of person who approved the recipe. nvarchar(255) A description of the given recipe. nvarchar(255) An abstract (background) of the recipe. int(4) nvarchar(50) Released for production? (TRUE < > 0; FALSE = 0) Unit of measurement for the batch output.

478

3 Working with RDB Recipe Files

Field Name localeid (Nulls)

DataType int(4)

Description The locale ID associated with this recipe. The numerical values are based on the Windows internal locale ID.

Language-Neutral-Format (LNF) = -1 US English = 1033 German (Germany) = 1031 Spanish (Modern Sort)= 3082

recipetype

int(4)

The level associated with this recipe: (41 = batch procedure; 42 = unit procedure; 43 = operation) Estimated length of time to make the batch, in minutes. The schema associated with the FactoryTalk Batch release (version) used to build the recipe. Release 5.0 schema = 3515. Version number (assigned by recipe author) associated with the recipe. Date (and time) the recipe was generated.

duration (Nulls) dbschema (Nulls) version versiondate (Nulls) areamodel (Nulls) areamodeldate resource (Nulls) classbased verificationdate (Nulls)

nvarchar(50) int(4)

nvarchar(50) datetime(8)

nvarchar(255) Area Model for verification. Must include full path and file name. datetime(8) Time stamp of Area Model file used for verification.

nvarchar(128) The resource or equipment name associated with the given recipe. Used only with unit procedures and operations. int(4) datetime(8) Is the recipe class-based (TRUE) or an instance (FALSE)? Used only with unit procedures and operations. Date the recipe was verified (validated) against the Area Model. (verificationdate = 4/19/50 when recipe has not been verified.)

beingeditedby (Nulls)

nvarchar(255) Reserved for future use.

Recparam Table Configuration


The recparam table is used to describe all parameters that are global with respect to the given recipe. The following assumptions are made when reading recipes from an RDB:

Missing type defaults to REAL. Missing scale is assumed as FALSE. engunits is read as is. Missing or erroneous values default as follows: Type real and integer: low = 0; default = 0; high = 100 Type string: default = IDS_DEFLT_STR_VALUE (string when using U.S. English) Type enumeration: if missing causes the recipe parameter to be ignored.
479

FactoryTalk Batch System Files Reference

The following is the table configuration used for the recparam table. Dimensioning is indicated in the table header. The recipeid column must be configured as a non-unique index. The paramid and recipeid columns must be combined as primary keys.
Field Name recipeid paramid Data Type Description

nvarchar(128) The name (ID) of the recipe to which this parameter belongs. nvarchar(128) The name (ID) of the parameter. paramid is used as the paramvalue input for all deferred formula parameters using a given recipe parameter. engunits also contains the name of the enumeration set when type is equal to enumeration. int(4) int(4) Data type; By definition: 1 = real; 2 = long integer; 3 = string; 5 = enumeration Can the parameter value be scaled? (for real and integer values only) (TRUE < > 0; FALSE = 0)

type scale (Nulls) engunits (Nulls) defaultvalue (Nulls) highvalue (Nulls) lowvalue (Nulls) number (Nulls) erpalias

nvarchar(128) Engineering units associated with this parameter. Not used for strings and enumeration sets. nvarchar(128) Default value displayed. nvarchar(128) Maximum value allowed when using numeric data. nvarchar(128) Minimum value allowed when using numeric data. int(4) PLC reference number

nvarchar(128) ERP Alias

Step Table Configuration


The step table is used to describe all steps, including beginning and ending, within a recipe. The following assumptions are made when reading recipes from an RDB:

Ensure that there are only one INIT and TERM steps, respectively. If more than one of either is found, the first one found is used. Missing steprecipeid aborts the read of the given step. Erroneous type aborts the read of the given step. Missing or erroneous resource (unit requirement) aborts the read of the step. Ensure xpos/ypos are >= 0.

480

3 Working with RDB Recipe Files

The following is the table configuration used for the step table. The recipeid column must be configured as a non-unique index. The stepid and recipeid columns must be combined as primary keys.
Field Name recipeid stepid Data Type Description

nvarchar(128) The name (ID) of the recipe to which this step belongs. nvarchar(132) The name (ID) of the element. Must be unique within the recipe. The step must be named following the examples shown in the table above: the characters to the left of the colon : represent the phase on which the step is based; the number to the right of the colon represents the instance of the step. nvarchar(132) The name (ID) of the recipe that is used to execute this step.

steprecipeid (Nulls)

phases require this field to be the class on which the step is based. UOPs and UPCs require the name of the corresponding recipe (not used for init/term steps).

unitalias (Nulls) type

nvarchar(132) Name of unit class or instance required by this step. This entry corresponds to the resource column in the Unit Requirements table. (Not used by init/term steps.) int(4) Step type. By definition: (11 = step [BPC; UPC; UOP]; 12 = start of recipe; 13 = end of recipe) The X coordinate position as the step will be drawn in the SFC. (>= 0) The Y coordinate position as the step will be drawn in the SFC. (>= 0) Acquire unit resource when procedure is started. Only applies to unit procedure steps within batch procedures. (Yes < > 0; No = 0) Reservedstep type: 0 = Not a system step 1 = Null step 2 = Timer step

xpos (Nulls) ypos (Nulls) acquireunit (Nulls) systemstep

int(4) int(4) int(4)

int(4)

481

FactoryTalk Batch System Files Reference

Transition Table Configuration


The transition table is used to describe all of the transitions within a recipe. The following assumptions are made when reading recipes from an RDB:

Ensure xpos/ypos are >= 0.

The following is the table configuration used for the transition table. The recipeid column must be configured as a non-unique index. The transitionid and recipeid columns must be combined as primary keys.
Field Name recipeid transitionid xpos (Nulls) ypos (Nulls) condition Data Type nvarchar(128) nvarchar(132) int(4) int(4) Description The name (ID) of the recipe to which this transition belongs. The name (ID) of the transition. The transitionid must be unique within a recipe. The X coordinate position of the transition as it is drawn in the SFC. (>= 0) The Y coordinate position of the transition as it is drawn in the SFC. (>= 0)

nvarchar(1023) The condition to satisfy transition state. Condition can be stored in either language neutral format (LNF; default) or language specific format (LSF). The use of LNF or LSF must be consistent throughout a recipe.

Link Table Configuration


The link table is used to describe all of the links within a recipe. The following assumptions are made when reading recipes from an RDB:

linkid is read as is. Missing any other entries abort the read of the given link. If the from element or to element is not found in the transition or step tables, the link record is ignored.

The following is the table configuration used for the link table. Dimensioning is indicated in the table header. The recipeid column must be configured as a non-unique index. The linkid, recipeid, fromelementid, and toelementid columns must be combined as primary keys.
Field Name recipeid linkid fromelementid toelementid Data Type Description

nvarchar(128) The name (ID) of the recipe to which this parameter belongs. nvarchar(50) The name (ID) of the link. Must be unique within the recipe.

nvarchar(132) The beginning (upstream) element name (ID) of this link. nvarchar(132) The ending (downstream) element name (ID) of this link.

482

3 Working with RDB Recipe Files

Field Name fromtype totype

Data Type int(4) int(4)

Description Element type of the fromelementid. By definition: (21 = step; 22 = transition;) Element type of the toelementid. By definition: (21 = step; 22 = transition;)

Formula Table Configuration


The formula table is used to describe all of the formula parameters within a recipe. The following assumptions are made when reading recipes from an RDB:

Invalid origin defaults to Operator. stepid not found in the map of recipe elements aborts the read of the given parameter. Missing type defaults to REAL. Missing paramvalue defaults as follows: Type real and integer: = 0; Type enumeration: causes the formula parameter to be ignored. For origin of type operator, the paramvalue column is used as the default, and the operator is prompted for acknowledgment of this value, or entry of a new value. When formulatype is enumeration, the paramvalue column contains the enumeration, and the paramengunits column contains the enumeration set. For origin of type defer, the parameter is deferred to the recipe parameter indicated in the paramvalue column (paramvalue contains the paramid from the RecParam table). Engineering units, low value, and high value are obtained from the area model during the verification process.

The table is processed according to the following guidelines:


The following is the table configuration used for the formula table. Dimensioning is indicated in the table header. The recipeid column must be configured as a non-unique index. The recipeid, stepid and paramid columns must be combined as primary keys.
Field Name recipeid stepid paramid Data Type Description

nvarchar(128) The name (ID) of the recipe to which the associated stepid belongs. nvarchar(132) The ID of the step, almost always a phase. nvarchar(128) The name (ID) of the parameter. This is the name of the parameter as assigned in the Area Model (when editing the phase, for example). int(4) Origin of the formula. By definition: (31 = operator; 32 = defer; 33 = value; 34 = equation).

origin

483

FactoryTalk Batch System Files Reference

Field Name formulatype

Data Type int(4)

Description The data type of the parameter. This parameter is ignored (set = 0) when the origin is deferred to a recipe parameter. By definition: (1 = real; 2 = long integer; 3 = string; 5 = enumeration).

paramvalue (Nulls) paramengunits (Nulls) display (Nulls)

nvarchar(128) The value associated with the parameter, if appropriate. nvarchar(128) The engineering units associated with the parameter if it will be displayed in the SFC. paramengunits will contain the enumeration set when formulatype is equal to enumeration. int(4) Display the formula parameter in the SFC. Only one parameter per step can be displayed. If more than one parameter for a given step is set to TRUE, the last one read will be the one set for display. (TRUE < > 0; FALSE = 0) The Low-Low-Low Limit value of the specified parameter. The Low-Low Limit value of the specified parameter. The Low Limit value of the specified parameter. The High Limit value of the specified parameter. The High-High Limit value of the specified parameter. The High-High-High Limit value of the specified parameter. Verification method. 0 = No_Limits 1 = High_Low 2 = HighHigh_LowLow 3 = HighHighHigh_LowLowLow

lowlowlow (Nulls) lowlow (Nulls) low (Nulls) high (Nulls) highhigh (Nulls) highhighhigh (Nulls) verification (Nulls)

float float float float float float int(4)

Transfer Table Configuration


The transfer table is used to describe all of the phases that communicate and work together within a recipe. The unitproc stepid column is blank if the transfer group is located at the unit procedure level. Both the unitproc stepid and unitop stepid columns are blank if the transfer group is located at the operation level. As a result, a recipeid column is included to ensure that the group can easily be associated with its recipe.

484

3 Working with RDB Recipe Files

The following assumptions are made when reading recipes from an RDB:

Invalid groupid aborts the read of the group. All others are read as is.

The following is the table configuration used for the transfer table.
Field Name recipeid Data Type Description

nvarchar(128) The name (ID) of the recipe (either batch procedure, unit procedure, or operation) that contains this group. The recipeid used in the header table must be used here. (int)4 nvarchar(64) The 32-bit unsigned integer unique number that identifies the specific instance of a batch. The name (ID) of the group. This column is used to match all phases that are part of the transfer or link group.

uniqueid groupid phase_stepid

nvarchar(132) The phase step associated with the link group. The stepid used to describe the step (phase) in the Step table must be used here. nvarchar(132) The name (ID) of the operation that contains the phase. If the group resides at the batch or unit procedure level, this column contains the name of the step used in the unit procedure recipe. nvarchar(132) The name (ID) of the unit procedure associated with this group. This column will be blank if the group resides at the unit procedure or operation level. If the group resides at the batch procedure level, this column contains the name of the step used in the batch procedure recipe.

unitop_stepid (Nulls)

unitproc_stepid (Nulls)

Unitreq Table Configuration


The unitreq table is used to describe all of the unit requirements as they pertain to the allocation of units to a recipe. There is one record for every downstream unit referenced by a given unit requirement. A step always references a unit requirement by use of a resource column. The following assumptions are made when reading recipes from an RDB:

Missing resource aborts the read of the given unit requirement record. Missing or unknown bindingmethod default to batch creation. Invalid unitalias aborts the read of the unit requirement record.

485

FactoryTalk Batch System Files Reference

The following is the table configuration used for the unitreq table.
Field Name unitreqid recipeid resource Data Type int(4) Description Unique number.

nvarchar(128) The name (ID) of the recipe to which this unit requirement belongs. nvarchar(128) The unit class or instance which identifies this unit requirement (from the Area Model). This column is used to tie unit procedures and operations to a given unit requirement. nvarchar(132) Alias name for the unit requirement. int(4) Type of binding method used by this unit requirement. (51 = static; 52 = first available; 53 = prompt; 54 = batch creation; 55 = operator choice) Is the recipe class based? TRUE (<> 0)= yes; FALSE (= 0) = no [instance-based])

unitalias bindingmethod

classbased

int(4)

downstreamresource nvarchar(132) The list of unit aliases downstream from the unit referenced (Nulls) as the resource. The name used in this column must have been used as the resource of another unit requirement record.

Materialrequirements Table Configuration


The materialrequirements table records information on material-based phases. There is one record for every step that represents a phase that uses material. The following assumptions are made when reading recipes from an RDB:

Invalid stepid aborts the reading of the recipe. Invalid PhaseBindType defaults to Standard.

The following is the table configuration used for the materialrequirements table. The recipeid and stepid columns must be combined as primary keys.
Field Name recipeid stepid materialname lot (Nulls) label (Nulls) Data Type Description

nvarchar(128) The name (ID) of the recipe that is used to execute this step. nvarchar(132) The step associated with the material requirement. nvarchar(100) Name of the material as defined in the material database. nvarchar(255) Material Lot nvarchar(255) Material Label

486

3 Working with RDB Recipe Files

Field Name AddOrDump (Nulls) PhaseBindType (Nulls) PhaseClassName (Nulls)

Data Type float(8)

Description Indicates if the material is an addition or distribution. Additions are positive (>=0), Distributions are negative(<=0) The binding method for this material requirement. 0 = Standard; 1 = Automatic; 2 = Prompt

int(4)

nvarchar(128) The name of the phase class on the step to be bound.

Reportlimits Table Configuration


The reportlimits table specifies the means of verification required by eProcedure for each report parameter on an instruction based phase. The following is the table configuration used for the reportlimits table. The recipeid, stepid, and reportname fields must be combined as primary keys
Field Name recipeid stepid reportname high low highhigh lowlow verification Data Type Description

nvarchar(128) The name (ID) of the recipe that is used to execute this step. nvarchar(132) The step associated with the link group. nvarchar(128) Name of the report parameter. nvarchar(128) The High Limit value in the LowLow to Low to High to HighHigh range. nvarchar(128) The Low Limit value in the LowLow to Low to High to HighHigh range. nvarchar(128) The HighHigh Limit value in the LowLow to Low to High to HighHigh range. nvarchar(128) The LowLow Limit value in the LowLow to Low to High to HighHigh range. int(4) Verification method. 0 = No_Limits 1 = High_Low 2 = HighHigh_LowLow 3 = HighHighHigh_LowLowLow

highhighhigh lowlowlow

nvarchar(128) The HighHighHigh Limit value in the LowLowLow to LowLow to HighHigh to HighHighHigh range. nvarchar(128) The LowLowLow Limit value in the LowLowLow to LowLow to HighHigh to HighHighHigh range.

487

FactoryTalk Batch System Files Reference

Field Name targetparameter

Data Type

Description

nvarchar(128) Name of the specified report parameter to be used in the Percent or Relative limit calculation. An empty string when the Limit Calculation is Absolute. int The data type of the specified report parameter. By definition: (1 = real; 2 = long integer; 3 = string; 5 = enumeration)

verificationtype

Bindpreferencespecifiers Table Configuration


The bindpreferencespecifiers table is used to describe all of the binding preferences within a recipe. The following is the table configuration used for the bindpreferencespecifiers table. The recipeid column must be configured as a non-unique index. The recipeid and unitreqid columns must be combined as primary keys.
Field Name recipeid unitreqid specifiertype orderid affinityspecifier attributename phasename expressiontype LNFexpression Data Type nvarchar(128) nvarchar(128) int(4) int(4) int(4) nvarchar(128) nvarchar(128) int(4) Description The name of the procedure, unit procedure, or operation that contains the bind preference. The unit requirement name that owns the bind preference. The bind preference type: 0 = Expression, 1 = Attribute, 2 = Phase The order of the preferences. Affinity specifier: 0 = Require / Prefer , 1 = Reject / Avoid The unit attribute name. The phase name. Expression type: 0 = Boolean, 1 = Minimize, 2 = Maximize.

nvarchar(1023) Expession in language neutral format.

488

3 Working with RDB Recipe Files

Bindrequirementspecifiers Table Configuration


The bindrequirementspecifiers table is used to describe all of the binding preferences within a recipe. The following is the table configuration used for the bindrequirementspecifiers table. The recipeid column must be configured as a non-unique index. The recipeid and unitreqid columns must be combined as primary keys.
Field Name recipeid unitreqid specifiertype orderid affinityspecifier attributename phasename expressiontype LNFexpression Data Type nvarchar(128) nvarchar(128) int(4) int(4) int(4) nvarchar(128) nvarchar(128) int(4) Description The name of the procedure, unit procedure, or operation that contains the bind requirement. The unit requirement name that owns the bind requirement. The bind requirement type: 0 = Expression, 1 = Attribute, 2 = Phase The order of the requirements. Affinity specifier: 0 = Require / Prefer , 1 = Reject / Avoid The unit attribute name. The phase name. Expression type: 0 = Boolean, 1 = Minimize, 2 = Maximize.

nvarchar(1023) Expession in language neutral format.

LNF: Language Neutral Format


LNF allows a recipe designer (designing a recipe stored in a database) to write a recipe in one language that can be read in another language without translating the recipes reserved words. The LNF representation is an internal representation of the reserved words (listed below) in a transitions condition expression. The FactoryTalk Batch Recipe Editor and FactoryTalk Batch Server read this internal representation and translate it to the language specified by the locale of the system. The Recipe Editor automatically stores the recipes transition conditions in the LNF representation. For example, the expression MIX:1.STATE = COMPLETE is saved as MIX:1.[21] = [14].
Reserved Word UNKNOWN NOT OR LNF Representation Description [0] [1] [2] Logical NOT operator Logical OR operator

489

FactoryTalk Batch System Files Reference

Reserved Word AND TRUE FALSE EXTERNAL PROGRAM ABORTING HOLDING STOPPING

LNF Representation Description [3] [4] [5] [6] [7] [8] [9] [10] Logical AND operator Symbolic constant for Boolean TRUE value Symbolic constant for Boolean FALSE value Value for step attribute OWNERID when the step is not under Batch control Value for step attribute OWNERID when the step is under Batch control Value for step attribute STATE when the step is in the ABORTING state Value for step attribute STATE when the step is in the HOLDING state Value for step attribute STATE when the step is in the STOPPING state Value for step attribute STATE when the step is in the RESTARTING state Value for step attribute STATE when the step is in the RUNNING state Value for step attribute STATE when the step is in the HELD state Value for step attribute STATE when the step is in the COMPLETE state Value for step attribute STATE when the step is in the STOPPED state Value for step attribute STATE when the step is in the ABORTED state Value for step attribute STATE when the step is in the IDLE state Value for step attribute STATE when the step is in the STARTING state Value for step attribute STATE when the step is in the READY state Step attribute: who is controlling the step? Step attribute: indicates the value of the steps STATE tag Step attribute: indicates the value of the steps FAILURE tag

RESTARTING [11] RUNNING HELD COMPLETE STOPPED ABORTED IDLE STARTING READY OWNERID STATE FAILURE [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]

490

3 Working with RDB Recipe Files

Reserved Word

LNF Representation Description Step attribute: indicates the value of the steps SINGLESTEP tag Step attribute: indicates the value of the steps ERROR tag Step attribute: indicates the value of the steps PAUSE tag Step attribute: indicates the value of the steps PAUSED tag Step attribute: indicates the value of the steps ACTIVE tag Step attribute: indicates the value of the steps STEPINDEX tag Decimal point Name of CONTROL STRATEGY parameter Name of MATERIAL parameter Name of AMOUNT parameter Name of ACTUAL_AMOUNT parameter Name of FEED_COMPLETE parameter Name of CONTAINER parameter Name of LOT parameter Name of LABEL parameter Name of a step whose attached procedure is a Null Procedure. Name of MATERIAL CLASS parameter

SINGLESTEP [23] ERROR PAUSE PAUSED ACTIVE STEPINDEX DECIMAL CONTROL STRATEGY MATERIAL AMOUNT ACTUAL AMOUNT FEED COMPLETE [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34]

CONTAINER [35] LOT LABEL NULL STEP MATERIALCLASS [36] [37] [38] [39]

491

FactoryTalk Batch System Files Reference

492

CHAPTER 4

Working with Electronic Batch Records


An electronic batch record is a record of the creation of a batch of material. Among other uses, this record can be used for regulatory and reporting purposes. The ISA S88.01 standard defines batch history as: A collection of data describing or related to a batch. For every batch executed, FactoryTalk Batch creates and maintains an electronic batch record during the execution of the batch procedure. Entries are appended to the electronic batch record as events occur. The electronic batch record is accessible from the FactoryTalk Batch View. FactoryTalk Batch stores the electronic batch data in a simple ASCII format file (.evt) that may be viewed with a word processor or spreadsheet application.

Electronic Batch Record Fields


Each electronic batch record entry contains the following fields (all data is in ASCII format but may represent a time, integer, real number, string, or enumeration):
If you are using a version of Batch older than 6.02, please read carefully as the contents of .evt files have changed. Schema Name LclTime BatchID Recipe Description The time and date of the event that triggered the electronic batch record entry. The format is YYYY.MM.DD HH:MM:SS and cannot be modified. The batch identification (an alphanumeric string) entered by the operator when the batch is created. The recipe element that was executing at the time of the electronic batch record entry. The field in the event journal appears as follows:
<UniqueID>:[<Procedure>\][<Unit Procedure>:Instance\]<Operation>:Instance-LoopCounter

The data in the brackets is optional, depending on the level of the recipe. Descript Event PValue EU Area ProcCell A description of the entry; e.g., mode change, step activation, bound unit. The type of event defined in Descript (system generated). A value appropriate for the event type. May be integer, real, string, or enumeration. The engineering units, if any, appropriate for the value. The name of the Area associated with the batch. The process cell associated with the event.

493

FactoryTalk Batch System Files Reference

Schema Name Unit Phase PhaseDesc UserID UniqueID MaterialName

Description The unit, if any, associated with the event. The phase, if any, associated with the event. A description of the type of Phase entered by the user (from FactoryTalk Batch Equipment Editor); e.g., MAT ADD. Login name of user commanding FactoryTalk Batch, in the following format: Windows Computer Name/Windows User Name. The 32-bit unsigned integer unique number that identifies the specific instance of a batch. The common name of the material.

MaterialClassNam The name assigned to a class of materials. e MaterialID LotName Label Container PromiseID The inventory control system material ID used to track the material. The name assigned to a lot of material. The ID assigned to a distributed portion of a lot. The name of the container to which the material and lot were distributed. A unique ID used as a key to allow grouping of separate event entries all resulting from a single material addition or the unique ID of a bind event used to link this event with associated bind event records.

ReactivationNumb The reactivation number of an eProcedure instruction step. Used with events er related to a specific step. InstructionHTML HTML of a completed eProcedure instruction step. This data is not displayed in the Event Viewer but is used in BatchSIG calculations when checking the signature field. A unique ID assigned to a Signature request. A unique ID assigned to a queued Execute request that is awaiting completion of one or more signature requests. Used for Event Journal Signatures. Information stored here will be in hexadecimal or a single space character.

SignatureID ActionID Signature

Electronic Batch Record Entries


An electronic batch record can contain a variety of entries, based on event types. The following table describes each type of event. Text that is not literal is indicated in < >. Information that is defined in the area model is indicated by a . Data that is used in the recipe is indicated by a .

494

4 Working with Electronic Batch Records

Value of Event Field Active Step Change Commencing Arbitration Arbitration Arbitration Arbitration Attribute Change Automatic Removal Batch Deletion Bind Comment

Value of Descript Field Active Step Change Command Attempted Equipment Module Acquired Equipment Module Released Unit Acquired Unit Released Attribute Change Setting Changed Removal Requested <unit class name> Operator Comment

PValue Description Records the beginning of an active step change Name of the acquired equipment module Name of the released equipment module Name of the acquired unit Name of the released unit Description of how an objects PAUSED attribute has changed TRUE or FALSE Removal of batch requested, or request to remove batch repeated Name of unit instance Comment entered by the operator regarding the batch (can be created through the FactoryTalk Batch View or an HMI) Step number Used for FactoryTalk eProcedure only. Step number Used for FactoryTalk eProcedure only. Name of the unit class Path and file name of the electronic batch record Step Number Used for FactoryTalk eProcedure only. Name of the acquired phase

ControlStep START ControlStep STOP Creation Bind Event File Name Instruction Complete Loss of Material Server Loss of Material Server Loss of Material Server Loss of Material Server Loss of Material Server Loss of Material Server

Control Step Activity Control Step Activity <unit class alias name> <null> Instruction Completed Arbitration - Equipment Module Acquired

Arbitration - Unit Acquired Name of the acquired unit Bind Creation Bind Material Bound Material Reporting Name of unit instance Name of the unit class Name of equipment module bound Material Feed Report Number Incremented

495

FactoryTalk Batch System Files Reference

Value of Event Field Loss of Material Server Loss of Material Server Loss of Material Server Loss of Material Tracking Loss of Material Tracking Loss of Material Tracking Material Bound Material Reporting Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Tracking Material Unbound Message Mode Change

Value of Descript Field Material Unbound

PValue Description Name of equipment module unbound

Promise Event - Promise ID 0 Completed UnBind Material Tracking Material Addition Material Tracking Material Addition Promised Material Tracking Material Distribution <phase name> Material Tracking report number incremented Containers Specified by Operator Material Addition Actual amount of material used Name of equipment module bound Prompt Bind

Material Addition Promised Amount of material promised Material Distribution Material Distribution Promised Material Promise unable to be established Phase Binding Selected by Operator Unable to mark container as default for use Unable to update actual amount fed Unit Binding Selected by Operator <phase name> Actual message string Mode Changed: Name of equipment module unbound This is the message configured in the phase class that is sent to the operator A procedural element mode change; e.g., O-AUTO, MANUAL Actual amount of material distributed Amount of material promised

496

4 Working with Electronic Batch Records

Value of Event Field Mode Command

Value of Descript Field Mode Commanded:

PValue Description A request to a procedural element to change mode sent by the operator or the recipe; e.g., MAN-MODE A request to a step to change the owner; e.g., EXTERNAL, OPERATOR Enters value of actual parameter after successful download A failure on a download of a parameter is recorded here Records when a Send Message Without Wait request is canceled Records when a Send Message Without Wait request is received Records when a Send Message Without Wait is sent Records when a phase acquires or releases resources Records when a promise event has been completed A request from a phase to the operator to provide information for the completion of the phase logic Operator response to a prompt Not currently used Name and path of the Area Model this recipe was written against Time and Date stamp for the last saved time of the Area Model Name of the author of the recipe Indicates whether the recipe is a classbased or instance-based recipe Path and name of the recipe User defined product code entered in the Recipe Header section of a recipe

Owner Change

Owner Changed:

Param Download Verified Param Download Verify Fail Phase Link Permissive Canceled Phase Link Permissive Received

<parameter tag name> <parameter tag name> Phase Link message canceled Phase Link message canceled

Phase Link Permissive Sent Numbers representing the data Phase Logic Arbitration Promise Event Prompt Resource Acquired / Resource Released Promise ID completed Name of parameter

Prompt Response Recipe Description Recipe Header Recipe Header Recipe Header Recipe Header Recipe Header Recipe Header

<parameter name> <null> Area Model File Name Area Model Validated Against Author Class or Instance File Name Product Code

497

FactoryTalk Batch System Files Reference

Value of Event Field Recipe Header

Value of Descript Field Product Description

PValue Description Text entered into Description field of recipe header data during recipe creation Indicates if the recipe is an Operation (OP), Unit Procedure (UP), or Procedure (BP) Time and date stamp for when the recipe was last validated against the Area Model Version of the recipe as entered during recipe creation Date this version of the recipe was last saved Stores all the deviation information. Deviated Value = Value Limit Violated = LimitDescriptor Limit Value = Value

Recipe Header

Recipe Type

Recipe Header

Validation Time

Recipe Header Recipe Header

Version Version Date

Recipe Parameter Deviation Parameter Name

Report Parameter Deviation Report Parameter Name

Stores all the deviation information. Deviated Value = Value Limit Violated = LimitDescriptor Limit Value = Value Limit Calculation = CalculationDescriptor Target Value = Value

Recipe Value

<parameter name>

Value of the recipe parameter Material parameters will store the material name

Recipe Value Change Report Report Comment

Change Recipe Data:

Any change in the recipe value

<report parameter name> A single data value collected by the phase logic <report parameter name>

498

4 Working with Electronic Batch Records

Value of Event Field Scale Factor

Value of Descript Field Scale

PValue Description Scale entered by operator during batch creation. Scale is a percentage of the original default values of the equipment phase parameters and recipe formula parameters. Only those parameters that were marked as scalable during the creation of the equipment phases and recipe are proportionally adjusted when the batch is run. Parameters that were not designated as scalable always retain their original value no matter what the scale factor of the batch is. Cancelled

Signature Request Canceled Signature Request Completed Signature Request Created Signature Request Created Signature Request Created Command General Usage

The command value received in the Command execute. The Step Index to be reactivated in the Recipe Phase.

Recipe Parameter Deviation The parameter name targeted by the SetParm execute, the value that will be stored in parameter if signature completes, the current value of parameter, the type of deviation, the high deviation limit, the high high deviation limit, the high high high deviation limit, the low deviation limit, the low low deviation limit, the low low low deviation limit. Parameter Value Ack The name of the parameter targeted by the SetParm execute, the value that will be stored in parameter if signature completes, the default value of the parameter.

Signature Request Created

499

FactoryTalk Batch System Files Reference

Value of Event Field Signature Request Created

Value of Descript Field

PValue Description

Report Parameter Deviation The name of the report parameter being reported, the reported value, the name of the parameter from which the report deviation limits are calculated, the value of the parameter from which the report deviation limits are calculated, the type of deviation, the high deviation limit, the high high deviation limit, the high high high deviation limit, the low deviation limit, the low low deviation limit, the low low low deviation limit. Unit Bind Unit Bind Ack Phase Bind The ID of a Unit to be used for the bind function, Step Identifier. The ID of a Unit to be used for the bind function, Step Identifier. The ID of the equipment phase for the bind, container, material, the Lot value to be used in the Recipe Phase Bind, the Label value to be used in the Recipe Phase Bind. The ID of the equipment phase for the bind, container, material, the Lot value to be used in the Recipe Phase Bind, the Label value to be used in the Recipe Phase Bind. <Null list> Null or Step Identifier. The Type argument, the Description argument and the Value passed in the AddEvent execute. The name of the parameter targeted by the SetParm execute, the Value that is stored in the parameter if the signature completes, current Value of the parameter. The Value that will be stored in the parameter if the signature completes. The Value that will be stored in the parameter if the signature completes. The Step Index to be reactivated in the Recipe Phase, the reactivation number.

Signature Request Created Signature Request Created Signature Request Created

Signature Request Created

Phase Bind Ack

Signature Request Created Signature Request Created Signature Request Created

Batch Removal Active Step Change Add Event

Signature Request Created

Set Parameter

Signature Request Created Signature Request Created Signature Request Created

SetAllLabel SetAllLot Reactivate Step

500

4 Working with Electronic Batch Records

Value of Event Field Signature Request Created

Value of Descript Field eReport Parameter Deviation

PValue Description The name of the report parameter being reported, the reported value, the name of the parameter from which the report deviation limits are calculated, the value of the parameter from which the report deviation limits are calculated, the type of deviation, the high deviation limit, the high high deviation limit, the high high high deviation limit, the low deviation limit, the low low deviation limit, the low low low deviation limit. The Step Index to be reactivated in the Recipe Phase and the reactivation number. The command value received in the Command execute and a human readable localized string representing the command value. The command value received in the Command execute and a human readable localized string representing the command value. Illegal State for Command Action Aborted by Signature Cancellation UnacknowledgedEvent Terminated Illegal Bind Target Illegal Remove Target Illegal ReactivateStep Target Request Cancelled Warm Restart

Signature Request Created

Step Verification

Signature Request Created

Phase Disconnect

Signature Request Created

Phase Reset

Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Signature Request System Canceled Successful Signoff The comment argument passed in the Signoff execute.

A structure recording the signoff number, full user name, and the userID <SignoffSuccessContext>.

501

FactoryTalk Batch System Files Reference

Value of Event Field Unsuccessful Signoff

Value of Descript Field The comment argument passed in the Signoff execute. State Changed: State Commanded: Step Activated Step Deactivated Step Reactivated Step Reactivation Requested <Procedure description> <Procedure description> <Procedure description> <Procedure description> <Procedure description>

PValue Description A structure recording the signoff number, full user name, and the userID <SignoffFailureContext>. A procedure element state change A request to a procedure element to change its state Records whenever a procedure step is activated Records whenever a procedure step is deactivated Step number Used for FactoryTalk eProcedure only. Step number Used for FactoryTalk eProcedure only. Contains the version number of server this is running against An indicator of the beginning of the batch An indicator of the end of the batch Batch terminated by COLD boot of FactoryTalk Batch Server Batch terminated due to error attempting to restore batch during WARM restart Batch terminated due to error attempting to restore batch during WARM-ALL restart Contains any step errors or failures Indicates an operation was completed Indicates an operation was started

State Change State Command Step Activity Step Activity Step Reactivation Step Reactivation Request System Message System Message System Message System Message System Message

System Message

<Procedure description>

System Message System Message System Message System Message

Failure indicator Operation Finished Operation Started

Procedure Failure Detected: Error message Error text will be displayed if it is available

System Message System Message

Procedure Finished Procedure Started

Indicates a procedure was completed Indicates a procedure was started

502

4 Working with Electronic Batch Records

Value of Event Field System Message System Message Unbind Unit Bind Candidate Legality

Value of Descript Field Unit Procedure Finished Unit Procedure Started <unit class name> <unit requirement name>

PValue Description Indicates a unit procedure was completed Indicates a unit procedure was started Prompt Bind Indicates the legality of the Unit instance for binding against the Unit Requirement specified in the Descript field. Possible values are: LEGAL, Excluded by Material requirements, Excluded by Flowpath Requirements, Excluded by Static Binding Requirement of Downstream Flowpath Requirements, and Excluded by Binding Requirement. Indicates the reason for the Bind of the Unit Requirement. Possible reasons are: Batch Creation Bind Manual Bind Recipe Execution - Prompt Bind Recipe Execution - First Available Bind

Unit Bind Reason

<unit requirement name>

Unit Bind Candidate Preference

<unit requirement name>

Indicates the preferential value of the Unit for binding to the Unit Requirement specified in the Descript field. 1 = most preferred. Name of unit tag Equipment ID Users can define their own events to be saved in the electronic batch record by using the Server API execute ADDEVENT

Unit Verified User

<unit tag name> User Defined

503

FactoryTalk Batch System Files Reference

End of Batch Entries


The electronic batch record contains entries if the batch is terminated by a cold boot of the FactoryTalk Batch Server, or if the batch is terminated due to an error when attempting to restore the batch from a warm restart or warm-all restart of the Server. Example Termination of Batch During Warm Restart
Descript Event Event File Name PValue \\ComputerName\PROGRAM FILES\ ROCKWELLSOFTWARE\BATCH\YourProject\ JOURNALS\4125.evt Batch terminated due to error attempting to restore batch during WARM restart. End Of BATCH

YourBatchDescription YourBatchDescription

System Message System Message

Termination of Batch During Warm-All Restart


Descript Event Event File Name PValue \\ComputerName\PROGRAM FILES\ ROCKWELLSOFTWARE\BATCH\YourProject\ JOURNALS\4125.evt Batch terminated due to error attempting to restore batch during WARM-ALL restart. End Of BATCH

YourBatchDescription YourBatchDescription

System Message System Message

Termination of Batch Due to Cold Boot


Descript Event Event File Name PValue \\ComputerName\PROGRAM FILES\ ROCKWELLSOFTWARE\BATCH\YourProject\ JOURNALS\4123.evt Batch terminated by COLD boot of Batch Server. End Of BATCH

YourBatchDescription YourBatchDescription

System Message System Message

Electronic Signatures
Electronic Signatures are used to secure control over runtime FactoryTalk Batch processes by configuring signature requirements. These signature events are then recorded in an electronic batch record which includes the name of the signer, the date and time the signature was executed and the meaning associated with the signature. The types of signatures may include report parameter verification for automated and manual phases, recipe parameter change verification, eProcedure step verification, batch and phase
504

4 Working with Electronic Batch Records

command verification, and a general usage signature that will allow a phase to request a signature whenever needed. The FactoryTalk Batch Equipment Editor is used to configure signature templates which consist of signoffs, meanings, security permissions, and comment requirements. Once configured signature templates can be associated with command verification policies to control specific batch processes. An example would be assigning a signature template to the HOLD command verification policy to require signoffs when a HOLD command is issued during batch execution. In this scenario, the HOLD command would not be executed until the signoffs were complete. Electronic signatures can also be used to require signature signoffs when a parameter value is too low or too high. For more information (see Understanding Batch Electronic Signatures in the FactoryTalk Batch Administrators Guide).

Event Journal Signatures


Event Journal Signatures detects any unauthorized changes (changes not made by the FactoryTalk Batch Server) to electronic batch records (.evt files). Each record in the electronic batch record file contains a signature field that is used for verification. When a batch is removed from the Batch List, either by an operator or automatically by the Sever API AUTOREMOVE execute, an event record is written to the journal with an additional signature for the entire batch. This final record prevents the insertion or deletion of event records at the end of an event journal. The final signature record will not be present in batches currently executing (on the Batch List), batches not restored to the Batch List after warm booting the Server with errors, or batches not restored to the Batch List after a warm-all restart attempt (for example, if the area model name had been changed since the Server was started).

Enabling Event Journal Signatures


Event Journal Signatures must be enabled through the Server Options in the FactoryTalk Batch Equipment Editor. 1. From the Equipment Editor, go to the Options menu and select Server Options. The Server Options dialog box opens. 2. Click the Batch Server tab.

3. Select the Enable Event Journal Signatures check box and click OK.
505

FactoryTalk Batch System Files Reference

Using Event Journal Signatures


A command line tool, Batchsig.exe, is used to verify event journal files based on the signature. The event journal only verifies correctly if it has not been modified in any way after being written by the FactoryTalk Batch Server.
If a batch is removed from the batch list due to any abnormal termination of the FactoryTalk Batch Server, the EVT cannot be verified using BatchSig. Verification does not depend on the network environment in which the event journal was created. You can back up the event journal files and verify them on another network. The Batchsig.exe file can be moved to another computer to verify the event journal files.

The Batchsig.exe file takes one or more file names, including wildcards, as arguments. If a file path is not specified for a given file, the tool searches the working directory and searches the configured event journal directory if the verification is done on the same computer as the Server. For each file specified, including all files specified by wildcards, the tool prints a message to the console. Console output can be redirected to a text file for permanent storage or printing. The message generated is determined by the following:

If the file passes verification, the message indicates success for that file. If the file fails verification, the message indicates failure for that file. The message includes a list of the line numbers of the first 32 records failing verification. If the file does not contain a final journal signature record, the message includes a warning.

Verifying the Event Journal 1. From Start, point to Programs, then to Accessories and select Command Prompt. The Command Prompt window opens. 2. Navigate to the Batch\bin directory. If you installed to the default directory, type cd C:\Program Files\RockwellSoftware\batch\bin and press ENTER. 3. Then type batchsig.exe C:\Program Files\Rockwell
Software\batch\YourProjectName\journals\yourfilename.evt and press ENTER.

OR 4. Add the following command to redirect the output to a text file: >filename.txt The path to the .evt file can contain wildcards. To verify all event journal files in the specified journal directory use *.evt instead of the name of a single event journal file. Example:
batchsig.exe C:\Program Files\Rockwell Software\Batch\SampleDemo1\journals\*.evt>C:\batchsig.txt

verifies all of the event journals for the SampleDemo1 project and prints the results to the batchsig.txt file.

506

Index

Numerics
1601 11601 325

area model fields 442 file format example 441 attribute ID 354 AutoBatchID_Info 192 AutoRemove 193

A
abort 284 complete 413 abort request 341 aborted 280, 419 aborting 279, 392, 413 logic 396 phase logic requests 301 ABORT_REQUEST 408 Ack 185 Acquire 186 acquire multiple resources 333 resources 332 single resource 333 indirect 333 acquire requests types 332 active states 278 ADDEVENT 503 AddEvent 187 AddEvent_CI 188 AddEvent_Instruction 189 AddEvent_Phase 190 all phase parameter values 320 all report parameter limits 325 all report parameters 327 allocating phase memory tags 385 AND structure 421 API components 318 arbitration masks 262 Archiver 191

B
BadTagCount 14 basic control 273 Batch commands 284 Equipment Editor 270 expectations of the phase 276 Recipe Editor 270 Server 270 View 270 Batch (execute) 194 batch parameters download 341 BatchControl.BatchServer 3 BatchList 14 BatchListCt 16 BatchOverrides 17 BatchRemote object 3 BatchRemote.RemoteSupport 3, 249251 BatchServer Object 3 Bind 196 BindPhase 197 BLBatchID_x 18 BLCMDMask_x 19 BLCreateID_x 20 BLDesc_x 21 BLFailure_x 22 BLMode_x 23 BLRecipe_x 24

507

FactoryTalk Batch Technical Reference Vol. 1

BLStartTime_x 25 BLState_x 26 BLType_x 27 boolean communication with the phase 288 boolean variables 424 BS_COMMAND 405 BS_REQUEST 406

interface 402 protocol states 281 communication failure with Server 354 communications interface 272, 399 complete 280, 418 completion of messages 336 ConnectTimeout property 250 container attributes downloading 370 uploading 375 container custom attribute 350 container heel 348 container priority assignments downloading 371 uploading 377 container standard attributes 347 control module 380 controller ID 345 ControlStrategy 201 conversation status 140 CPRVersion 28 CreateIDBatchStepDataList 29 CreateIDBatchStepDataList2 33 CreateIDEventData 38 CreateIDEventDataFile 39 CreateIDScale 40 custom attribute container 350 lot 349 material 348 custom attributes 345

C
CallTimeout property 249 cancel message indirect 340 message requests 339 message types 339 messages to other phases 339 canceling a message 340 indirect 340 all messages 340 CancelSignature 199 clear message 332 clear_failure 285 CLEAR_REQUEST 408 COM interface 2 COM protocol using 2 COMClientCount 28 COMMAND 405 Command (execute) 200 command handshake protocol 289 command masks 255, 256 command prompt using with BatchServer methods 252 command values 256 commands Batch 284 communication from the Batch Server 401 from the phase 402

D
data transfer 336 DataServersList 41 DataServerStatistics 44 DCOM 2 DDEClientCount 45 DecimalSeparator 45 define resources 380

508

Index

define tags 380 Domains 46 DOWNLOAD 407 download batch parameters 341 on start 323 on TOC 323, 324 phase parameter types 320 phase parameter value requests 320 phase parameter values 318 download on start 323

Execute method 248 executes ADDEVENT 503 expectations of the Batch phase 276 Expression 203 ExpressionIDParamExprValues 50 ExpressionIDReportExprValue 51 ExpressionID_UnitID_Values 49 EXT COMMAND 405 external command tag 401 external request tag 402 EXT_REQUEST 406

E
electronic batch record entries 327 electronic batch records description 493 entries 494 electronic signatures 504 enhanced phase logic requests 353 enhanced watchdog protocol 312 Enum 202 EnumSetEnumSet 46 equipment module 380 EquipmentModel 47 EquipmentModelDate 47 ErrorMessage 47 event journal 493 entries 494 fields 493 event journal signatures 505 enabling 505 EventDataFiles 48 events customizing 503 overview 2 example phase phase logic modules 393 Execute 3 API component 1

F
FactoryTalk Live Data protocol 43, 45 FAILURE 409 failure detection 392 failure number tag 403 failure tag 400 file types 437 final step 421 follow the phase logic request protocol 295 ForceTransition 204 FTD 43, 45 function of the phase logic 276 function of the PLI 276

G
general signature request indirect 343 GetContainerData 205 GetFeedTypeAndMaterials 207 GetItem method 247 GetLegalEqModules 208 GetLegalUnits 210

H
heel container 348 held 280, 417 high byte 290

509

FactoryTalk Batch Technical Reference Vol. 1

HMI 273 hold 284 hold complete 414 HOLD_ACTIVE 409 HOLDING 278 holding 392, 413 holding logic 395 HOLD_ON_WATCHDOG 410 HOLD_REQUEST 408 Human-Machine Interface 273 HyperlinkLabels 52

locality 25, 140 localization of data 13, 183 logic aborting 396 lot attributes downloading 368 uploading 374 lot custom attribute 349 lot standard attributes 346

M
MANUAL 263 material attributes uploading 372 material custom attribute 348 material database 345 material database classifications 345 material parameter 498 material phase 350 diagram 351 Material Server requests 353 material standard attributes 346 MatSvrControl 222 MatSvrStatus 55 message cancel 340 indirect 340 cancel all 340 cancel to other phases 339 clear 332 send to other phase 336 indirect 337 send to other phase and wait 337 indirect 338 send to other phase and wait for one receiver 338 indirect 339 send to other phases 335 wait for message from another phase 341 indirect 341

I
identifying the phases in the selected process 382 idle 279, 419 IDLE_INIT 409 IncompleteSignaturesCt 53 Info 213 Info2 215 InfoMessage 53 InfoTrimmed 217 initial step 421 INITIAL_STEP 409 interface design 275 international settings 13, 183 internationalization 25, 140 Item API component 1 ItemCount 54

J
JournalDir 54

L
Language Neutral Format (LNF) 489 linked phase receive message from 340 list separator 183 ListSeparator item 54 live data 43 Locale 55

510

Index

messages cancel 339 cancel all 340 to other phases, types 336 Messages (execute) 223 method definition 3 methods Execute 3, 248 GetItem 3, 247 overview 2 modes valid 263 modularization criteria 381 modules of code in phase logic 390 Mtrl_Info 224 multiple resources acquiring 333

OWNER 405 owner tag 400, 402, 404 OwnerIDInfo. See ResourceIDInfo OwnerIDOwned. See ResourceIDOwned OwnerIDRequested. See ResourceIDRequested

P
P & ID drawing 383 parameter material 498 ParamExpClear 226 ParamExpOverride 227 Parms 228 Parms2 229 PAUSE 406 pause tag 400, 403 PAUSED 406 paused tag 403 P_AUTO 263 permissive 336 Phase 230 phase receive message from 340 phase API components 318 phase API tags 283 phase communication data transfer 336 permissive 336 synchronization 335 phase components 271 phase logic aborting 392, 396 failure detection 392 holding 392, 395 project specific 272 purpose 276 restarting 392 restarting logic 397 running 392, 393 stopping 392, 396

N
new_parameters 285 NEW_PARAMETERS command 306 Node property 251

O
O_AUTO 263 obey the state transition diagram 288 object BatchRemote 3 BatchRemote.RemoteSupport 3 BatchServer 3 classes BatchControl.BatchServer 3 BatchRemote.RemoteSupport 3 definition 2 event 3 method 3 property 3 OPCClientCount 56 OR structure 421 Order 225

511

FactoryTalk Batch Technical Reference Vol. 1

phase logic interface 399 phase logic modules 393 phase logic request protocol 297 phase logic requests aborting 301 phase logic variables 407 phase logic, programming 385 phase memory tags 386 phase parameter download parameter types 320 download value requests 320 phase parameter tags array 319 phase parameter values download 318 phase parameter values tag 401 phase parameters request/range 320 indirect 321 request/single 321 indirect 322 phase tags 283 phase tags, required 400 Phase2 231 Phase3 232 PHASE_AC tag 408 PHASEBXn tag 407 PHASE_CD tag 405 PHASE_CR tag 408 PhaseDataList 56 PHASE_DL tag 407 PHASE_EC 401 PHASE_EC tag 405 PHASE_ER 402 PHASE_ER tag 406 PhaseErrs 58 PhaseErrsCt 59 PHASE_F 310, 400, 403 PHASE_F tag 409 PHASE_HA 409

PHASE_HC tag 408 PHASE_HI tag 406 PhaseIDBatchID 59 PhaseIDFailure 60 PhaseIDInfo 60 PhaseIDMessage 61 PhaseIDOwnerFlag 61 PhaseIDParms 62 PhaseIDParms2 63 PhaseIDPause 64 PhaseIDPausing 64 PhaseIDPhaseData 65 PhaseIDRequests 66 PhaseIDSS 67 PhaseIDState 67 PhaseIDStepIndex 68 PhaseIDUnit 68 PHASE_II 409 PHASE_IS 409 PHASE_OC 288, 295, 303, 305, 307, 310, 400, 401 PHASE_OC tag 405 PHASE_OR tag 406 PHASE_P 305, 400, 403 PHASE_P tag 406 PHASE_PD 305, 400, 403 PHASE_PD tag 406 PHASEPNN 401 PHASEQ## 302, 307 PHASEQXn tag 408 PHASE_RB tag 407 PHASE_RC tag 409 PHASE_RE 409 PHASERNN 404 PHASE_RQ 302, 307, 400, 402 PHASE_RQ tag 408 PHASE_RR tag 408 PHASE_SB tag 406 PHASE_SC tag 408 PHASE_SI 401, 402

512

Index

PHASE_SI tag 407 PhasesList 69 PhasesList2 70 PhasesList3 71 PHASE_SS 305, 401, 404 PHASE_SS tag 405 PHASE_ST 288, 401, 402 PHASE_ST tag 405 PHASE_TC tag 408 PHASE_UN 401, 402 PHASE_UN tag 405 PHASE_W 308, 400, 402, 404 PHASE_W tag 405 PHASE_WC 410 PKID 363 PLI 271, 399 multiple instances 271 purpose 276 single instance 272 PLI communications protocols 287 follow the phase logic request protocol 295 obey the state transition diagram 288 support program/external attribute 307 support semi-auto functionality 303 support the command handshake protocol 289 support the failure protocol 308 support the new parameters command 305 support the watchdog protocol 310 PLI phase state processing 413 PLI response to CLEAR_FAILURE command 411 to NEW_PARAMETER command 413 to REQ_ABORTACK command 411 to REQ_ABORTFAIL command 411 to REQ_COMPLETE command 411 to REQ_FAILED command 412 to REQ_RESET command 412 to RESUME command 412

to SEMI_AUTO command 412 to watchdog event 410 PLI variables 405 priority for selecting containers 345 ProcedureIDData 72 ProcedureIDData2 78 ProcedureIDData3 85 ProcedureIDDevLimits 92 ProcedureIDStatus 94 ProcedureIDStatus2 99 ProcedureIDUnitRequirements 105 process modules 379 control module 380 equipment module 380 unit 380 ProcessCellBitMaps 106 ProcessCellIDUnits 107 ProcessCellsList 108 ProcessCellsList2 109 processing non-state commands and events for a phase 410 processing send and receive messages 336 program/external attribute 307 programming the PLI 410 project-specific phase logic 272, 391 properties CallTimeout 249 ConnectTimeout 250 Node 251 overview 2 TimeoutPeriod 252 property definition 3 protocol states communication 281 PXRQ receive message from linked phase 340

Q
quiescent states 279

513

FactoryTalk Batch Technical Reference Vol. 1

R
range of report parameters 327 indirect 328 RDB tables 477 bindpreferencespecifiers table configuration 488 bindrequirementspecifiers table configuration 489 formula table configuration 483 header table configuration 477 link table configuration 482 RecParam table configuration 479 step table configuration 480 transfer table configuration 484 transition table configuration 482 UnitReq table configuration 485 ReactivateStep 234 receive message from linked phase 340 RecipeDir 110 RecipeList 110, 235 REEXECUTE_HOLD 409 Release 236 release requests, types 334 release resources 334 releasing a single resource 334 indirect 334 releasing all acquired resources 335 releasing multiple resources 335 Remove 237 report parameter array 326 report parameter requests, types 327 req_abortack 286 req_abortfail 286 req_complete 285 REQDATA_# 403 req_reset 286 REQUEST 403, 408 request 1000 320 1100 321 11000 320

11100 321 111NN 320 11200 322 112NN 321 11300 323 113NN 322 11500 323 11501 323 11502 324 11NN 320 1200 322 12000 327 12100 328 121NN 328 12200 329 122NN 328 12300 330 123NN 329 12500 330 12501 330, 331 12502 331 12NN 321 1300 323 13000 332 130NN 332 13100 332 13NN 322 14000 333 140NN 333 141NN 333 14200 334 142NN 334 143NN 335 14400 335 1500 323 15000 337 1501 323 1502 324 150NN 337

514

Index

15100 338 151NN 338 15200 339 152NN 339 15300 340 153NN 340 15400 340 15500 341 155NN 341 16000 341 171NN 342 172NN 342 173NN 342 174NN 342 175NN 342 17600 342 17700 342 17801 355 17802 356 17803 358 17811 360 17812 361 17813 363 17821 364 17822 365 17900 343 179NN 343 181NN 368 183NN 370 184NN 371 185NN 372 186NN 374 187NN 375 189NN 377 2000 327 2100 328 21NN 328 2200 329 22NN 328

2300 330 23NN 329 2500 330 2501 330, 331 2502 331 3000 332 30NN 332 3100 332 4000 333 40NN 333 41NN 333 4200 334 42NN 334 43NN 335 4400 335 5000 337 50NN 337 5100 338 51NN 338 5200 339 52NN 339 5300 340 53NN 340 5400 340 5500 341 55NN 341 6000 341 71NN 342 72NN 342 73NN 342 74NN 342 75NN 342 7600 342 7700 342 7801 355 7802 356 7803 358 7811 360 7812 361

515

FactoryTalk Batch Technical Reference Vol. 1

7813 363 7821 364 7822 365 7900 343 79NN 343 81NN 368 83NN 370 84NN 371 85NN 372 86NN 374 87NN 375 89NN 377 request data buffer 403 request register reset to zero 318 request tag 403 REQUEST_BUFFER 407 requesting a range of phase parameters 320 indirect 321 requesting a single phase parameter 321, 322 indirect 322 requesting a single phase parameter value 322 requesting all phase parameter values 320 requesting report parameters/all 327 requesting report parameters/range 327 indirect 328 requesting report parameters/single 328 indirect 329 indirect/specify location 329 specify location 329 requesting subset of parameter values 323 download on start 323 download on TOC 324 requesting subset of report values 330 upload on terminal state 330 upload on TOC 331 requests abort request 341 acquire resources 332

acquiring resources/multiple 333 acquiring resources/single 333 indirect 333 cancel messages to other phases 339 canceling a message 340 indirect 340 canceling all messages 340 clear message 332 download batch parameters 341 enhanced phase logic 353 parameter subsets 323 download on start 323 download on TOC 324 phase parameters/all 320 phase parameters/range 320 indirect 321 phase parameters/single 321 indirect 322 release resources 334 releasing resources/all acquired 335 releasing resources/multiple 335 releasing resources/single 334 indirect 334 report parameters/all 327 report parameters/range 327 indirect 328 report parameters/single 328 indirect 329 indirect/specify location 329 specify location 329 report value subsets 330 upload on terminal state 330 upload on TOC 331 send message 331 indirect 332 send message to other phases 335 sending a message 336 indirect 337

516

Index

sending a message and wait 337 indirect 338 sending a message and wait for one receiver 338 indirect 339 single phase parameter/indirect and specify 322 single phase parameter/specify location 322 upload report values 325 wait for message from another phase 341 indirect 341 RESET 284 ResourceIDEqData 113 ResourceIDHyperlinks 124 ResourceIDInfo 124 ResourceIDOwned 125 ResourceIDOwners 126 ResourceIDRequested 127 ResourceIDRequesters 128 ResourceIDStrings 128 resources acquire 332 ResourcesList 129 restart 285 restart complete 416 restarting 279, 392, 415 restarting logic 397 RESTART_REQUEST 408 RESTORE_REQUEST 408 resume 285 rules for building an SFC 421 run complete 417 RunMode 130 running 278, 416 running logic 393 RUN_REQUEST 409 RunWithoutMatSvr 130

semi_auto 284 semi-auto functionality 304 send message 331 indirect 332 send message wait and receive message wait request pair 336 send messages to other phases 335 sending a message 336 indirect 337 sending a message and wait 337 indirect 338 sending a message and wait for one receiver 338 indirect 339 SetAllLabel 237 SetAllLot 239 SetParm 240 SFC execution 422 SFC graphical structures 421 Signatures 136 SignoffSignature 241 single report parameter 328 indirect 329 indirect/specify location 329 specify location 329 single report parameter limits 325 single step tag 401, 404 SINGLE_STEP 405 single_step 284 standard attributes 345 container 347 definition 345 lot 346 material 346 standard watchdog protocol 310 START 285 start download on 323 StartTime 137 state transition logic 272 state transitions 277
517

S
sample code 413 S_AUTO 263 Selection Priority 371

FactoryTalk Batch Technical Reference Vol. 1

states valid 263 STATUS 405 status tag 402 Step 242 step 421 step index tag 402 STEP_BUFFER 406 STEP_INDEX 407 StepsList 137 stop 284 stop complete 415 stopped 280, 418 stopping 279, 392, 414 stopping logic 396 STOP_REQUEST 408 StringLabels 138 structured text full PLI example 429 subset of parameter values 323 download on start 323 download on TOC 324 subset of report values 330 upload on terminal state 330 upload on TOC 331 support program/external attribute 307 support semi-auto functionality 303 support the command handshake protocol 289 support the failure protocol 308 support the new parameters command 305 support the watchdog protocol 310 synchronization 335

Time 140 Time2 141 TimeoutPeriod property 252 TimerIDTimerData 143 TimerIDTimerStatus 147 TimerSteps 142 TOC download on 323, 324 upload on 330, 331 TotalTagCount 148 transfer of control 285, 305, 306, 326, 336, 407, 433 download on 323, 324 transition 421 transition logic 272

U
UEArea_x 149 UEBatchID_x 150 UEDefault_x 151 UEDesc_x 152 UEEU_x 153 UEEventID_x 155 UEEvent_x 154 UEHigh_x 156 UELow_x 157 UEPhase_x 158 UEProcCell_x 159 UERecipe_x 160 UERespType_x 161 UETime_x 162 UEUnit_x 163 UEValue_x 164 unable to communicate with Material Server 354 UnAcknowledgedEvents 165 UnacknowledgedEventsCt 167 UNIT 405 unit 380 unit tag 401, 402 UnitBitMaps 168 UnitIDBatchID 168

T
tag naming conventions 423 Tag_Verify 244 TagVerStatus 139 TagVerStatusOrd 139 terminal state upload on 330 ThousandsSeparator 140

518

Index

UnitIDPhaseBitmaps 169 UnitIDPhases 170 UnitIDPhases2 171 UnitIDUnitTagData 172 UnitReqIDBindingPreferences 177 UnitReqIDBindingRequirements 178 UnitsList 179 upload on terminal state 330 upload on TOC 330, 331 upload report values 325 uploading data constraints 352 User_Verify 245 using enhanced phase logic requests 353

variables, PLI 405 VerificationInfo 245 VerifiedTagCount 179 Version 180

W
wait for a message from another phase 341 indirect 341 Warning Message 181 WATCHDOG 316 watchdog communication 404 watchdog protocol 314 enhanced 312 standard 310 WATCHDOG tag 404 writing a material phase 350

V
valid modes 263 valid states 263

519

S-ar putea să vă placă și