GetLegalUnits
The
GETLEGALUNITS
execute retrieves the legal binding options for a non-statically bound unit procedure or operation.The format and return for this execute includes:
Execute Format | A FactoryTalk Batch Server supports an execute with this format:[GETLEGALUNITS( Item,UserID,CreateID \t UnitProcName )] | ||
where: | Item | Item name as specified by the client. | |
UserID | User identification associated with this event. | ||
CreateID | Procedure’s unique ID, as assigned by the system, which contains the step that requires binding. | ||
UnitProcName | Path to a step representing a Unit Procedure inside of a Batch Procedure.
<Path> | ||
where: | |||
<Path> | is | <CreateID> /t <StepIdentifier> | |
where: | |||
Field | Format | Description | |
<CreateID> | ASCII - Integer | Unique batch ID assigned by the FactoryTalk Batch Server. | |
<StepIdentifier> | ASCII – String | Step identifier (for example, 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 populates with this data: SUCCESS:[ <Units> ] | FAIL:<message> | FAILED | ||
<Units> | is | <UnitAlias>,<UnitList> | |
<UnitList> | is | <Unit> | <Unit>,<UnitList> | |
<Unit> | is | <UnitName>,<UnitID> | |
where: | |||
Field Name | Format | Description | |
<UnitAlias> | ASCII - String | Alias associated with the specified unit procedure. | |
<UnitName> | ASCII - String | Unit name to which the procedure may be bound, or a legal binding option (Prompt or First Available). | |
<UnitID> | ASCII - String | Unit ID associated with the unit name. The legal binding options have this associated Unit ID:
Prompt = -1
First Available = -2 |
The following table shows an example of the return on this execute.
Example: | An execute string consisting of: GETLEGALUNITS(LegalUnits,UserID,36 \t MCLS_SWEETCREAM_UP:1) Could place this data in the item LegalUnits for the client: SUCCESS:MIXER,NP_MIXER1,55,NP_MIXER2,84,PROMPT,-1,FIRST AVAILABLE,-2, |
Provide Feedback