6. CONFIGURABILITY PROVISIONS

Software tools and devices conforming to this specification shall satisfy the following requirements for configurability.

6.1 Software tools

Software tools shall include documentation of the means by which they can be utilized to configure systems through the creation and management of local and remote device instances.

EXAMPLE 1 - see "Testing a System Configuration".

Providers of software tools shall specify which of the techniques for encoding of management requests and responses defined in subclause 6.4 are supported by their software tools.

EXAMPLE 2 - A software tool may utilize an instance of the RMT_PRXY Device type containing an instance of the PRXY_RES type, which utilizes an instance of one of the two following Service Interface Function Block (SIFB)types as an interface to the SystemManager object defined in Annex C of IEC 61499-1:

6.2 Management of remote device instances

Each device type that is intended to be used as a remote device instance shall contain exactly one management resource that is the functional equivalent of an instance of the RMT_RES resource type.

6.3 Management service interfaces

The device management services to be implemented are provided by the functional equivalent of Function Block instances of the types shown in Figure 6.3.

Figure 6.3 - Management service interfaces
Hover on a highlighted element to pop up its description.

6.4 XML-encoded management requests and responses

6.4.1 The FBMGT DTD

The Request and Response elements defined in the FBMGT DTD represent the XML syntax for the RQST input and RESP output, respectively, of the DEV_MGR function block type. Explanations of the elements of this DTD, and (where applicable) references to the formal syntax for their attributes, are given in Table 6.4.1.

An example of the use of these elements is given in Annex B.

Table 6.4.1 - FBMGT DTD Elements
Element
Attributes
Textual Syntax
(IEC 61499-1, Annex B)
Explanation
Request An XML-encoded management request.
ID A unique identifier for the Request/Response transaction.
Action The requested operation to be performed. See IEC 61499-1, Table 3.3.2-1.
Response An XML-encoded management response.
ID A unique identifier for the Request/Response transaction.
Reason A reason for failure to perform a requested action.
If absent, the action has been successfully performed. See Table 6.5-1.
NameList identifier {',' identifier} A list of FB type or data type names.
FBList fb_instance_reference {',' fb_instance_reference}
FBStatus See IEC 61499-1, Figure 3.3.3-1.
ByteData Implementation-dependent data, typically encoded in hexadecimal format.
VersionInfo The currently loaded or to be loaded version of a FB type or data type.
Organization The organization supplying this library element
Version The version identifier, for example, 1.2.
Date The release date of this version in YYYY-MM-DD format
FB A function block or resource instance as defined in IEC 61499-1.
Name fb_instance_reference The name of the FB or resource instance
Type fb_type_name The FB or resource type name
Connection An event connection, data connection or adapter connection.
Source See NOTE 1.
Destination See NOTE 1.
VarDeclaration A declaration of a variable.
Name input_variable_name | output_variable_name See NOTE 2.
Type data_type_name  
ArraySize See NOTE 3.
InitialValue See NOTE 4.
FBType An FBTypeDeclaration as described in IEC 61499-1-C.1.1.
Name fb_type_name
Event A declaration of an event interface.
Name event_input_name | event_output_name See NOTE 5.
Type event_type
With (input_variable_name {',' input_variable_name})
| (output_variable_name {',' output_variable_name})
See NOTE 6.
AdapterDeclaration A declaration of a plug or socket interface of a function block type.
Name plug_name | socket_name See NOTE 7.
Type adapter_type_name
AdapterType A declaration of an adapter interface type per IEC 61499-1-2.5
Name adapter_type_name
DataType See IEC 61131-3-2.3.
Name data_type_name
ASN1Tag ASN.1 tag per ISO/IEC 8824-5.8.
Class ASN.1 tag class per ISO/IEC 8824-5.8.
Number ASN.1 tag number per ISO/IEC 8824-5.8.
DirectlyDerivedType See IEC 61131-3 Tables 12 and 14, #1
BaseType elementary_type_name
InitialValue constant
EnumeratedType Same as NameList A comma-separated list of enumerated values.
InitialValue identifier If present, shall be one of the list elements.
SubrangeType See IEC 61131-3 Tables 12 and 14, #3
BaseType integer_type_name
InitialValue signed_integer
Subrange See IEC 61131-3 Tables 12 and 14, #3
LowerLimit signed_integer
UpperLimit signed_integer
ArrayType See IEC 61131-3 Tables 12 and 14, #4
BaseType non_generic_type_name
InitialValues array_initialization
StructuredType See IEC 61131-3 Tables 12, #5 and 14, #5 and #6
ArrayVarDeclaration See IEC 61131-3-2.3.3.
Name structure_element_name
Type array_type_name
InitialValues array_initialization
SubrangeVarDeclaration See IEC 61131-3-2.3.3.
Name structure_element_name
Type integer_type_name
InitialValue signed_integer
Parameter A parameter reference or value, or both. See IEC 61499-1, 2nd Edition, Table 8 and Annexes B.5 and B.3.
Reference parameter_reference The parameter reference.
Value constant | enumerated_value | array_initialization | structure_initialization The parameter value.
  • NOTE 1 - Depending on the context, the syntax of a Source or Destination element should correspond to the syntax of the respective element in one of the productions connection_end_point or accessed_data given in Annex B.5 of IEC 61499-1.
  • NOTE 2 - The productions input_variable_name and output_variable_name apply when the associated VarDeclaration element is part of an InputVars or OutputVars element, respectively.
  • NOTE 3- The syntax of this element when present shall be equivalent to the syntactic expression (subrange {',' subrange}) | integer {',' integer} , where the non-terminals subrange and integer are as defined in Annex B of IEC 61131-3. Each term of the second form is equivalent to the subrange 0..n-1 , where n is the value of the corresponding integer syntactic element. If this element is missing, the variable is not an array.
  • NOTE 4 - The syntax of this element is the syntax for initialization of the corresponding variable type as defined in Annex B.1.4.3 of IEC 61131-3.
  • NOTE 5 – The terms event_input_name and event_output_name apply when the Event element is part of an EventInputs or EventOutputs element, respectively.
  • NOTE 6 – The expressions (input_variable_name {',' input_variable_name}) and (output_variable_name {',' output_variable_name}) apply when the Event element is part of an EventInputs element or an EventOutputs element, respectively.
  • NOTE 7 - The terms plug_name and socket_name apply when the associated AdapterDeclaration element is part of a Plugs or Sockets element, respectively.
  • NOTE 8 - To provide compact messaging, the prolog and Misc* components used in the XML document production are not used in FBMGT messages since these components are implicit in the management context; thus, only the Request or Response element is transmitted as the management message.
  • NOTE 9 - Allowable combinations of elements, and constraints on their usage for various device classes, are as given in Annex B of IEC 61499-2 .

6.4.2 Request/Response semantics

The following rules shall apply to the use of the above-defined Request and Response elements in the normal_request service sequence of the DEV_MGR management SIFB type.

  1. The ID attribute of the Response element shall be identical to the ID attribute of the Request element to which the Response element refers.
  2. The absence of a Reason attribute in a Response element shall be used to indicate normal completion of the requested operation.
  3. The use of sub-elements in Request and Response elements, and the meaning of possible Reason attributes of the Response element when the requested operation fails, shall be as defined in Tables 6.4.2-1 and 6.4.2-2.
Table 6.4.2-1 -Request elements and Response Reason codes
Request Reason code
Action Sub-element
Any Any INVALID_DST: The DST input of the DEV_MGR function block does not name a valid destination for the request.
NOT_READY: The manager is not in a state that enables it to process the request.
UNSUPPORTED_CMD: The requested operation is not supported by the manager.
INVALID_OBJECT: Invalid sub-element or attribute syntax not covered by other, more specific Reason codes
INVALID_OPERATION: The specified action is not a valid operation on the specified sub-element.
OVERFLOW: A previous transaction is still pending.
NULL_POINTER: A null object pointer was encountered.
INTERRUPTED: A management thread was interrupted.
UNKNOWN: An error of unknown type was encountered.
See NOTE 6.
See NOTE 3.
CREATE FB UNSUPPORTED_TYPE: The requested FB type is not known to the manager.
INVALID_STATE or INVALID_OPERATION: The requested FB or resource cannot be created in its containing resource or device.
INVALID_STATE or DUPLICATE_OBJECT: An FB instance already exists with the specified name. See NOTE 5.
Connection NO_SUCH_OBJECT: One or both of the connection end points cannot be found.
INVALID_STATE or DUPLICATE_OBJECT: The specified connection already exists. See NOTE 5.
FBType
AdapterType
DataType
UNSUPPORTED_TYPE: A type does not exist for a variable or adapter sub-element.
INVALID_STATE or DUPLICATE_OBJECT: A library element type already exists with the specified name. See NOTE 5.
DELETE FB NO_SUCH_OBJECT: No FB instance of the specified type can be found with the specified instance name.
INVALID_STATE: The FB instance is not in the STOPPED or KILLED state.
Connection NO_SUCH_OBJECT: One or both of the connection end points cannot be found.
FBType
AdapterType
DataType
UNSUPPORTED_TYPE: A library element of the specified type does not exist with the given type name.
INVALID_STATE: At least one instance of the specified type still exists.
INVALID_OPERATION: The specified type is undeletable.
START
STOP
KILL
RESET
FB NO_SUCH_OBJECT: No FB instance of the specified type can be found with the specified instance name.
INVALID_STATE: The FB instance is not in a state from which the specified operation can be performed.
START
STOP
None INVALID_STATE: The resource is not in a state from which the specified operation can be performed (see NOTE 4).
READ Parameter NO_SUCH_OBJECT: The parameter Reference cannot be found. See NOTE 1.
WRITE Parameter
Source = <Data>
Destination = <Location>
NO_SUCH_OBJECT: The parameter Reference cannot be found.
INVALID_OBJECT:: The Value format is not correct for data to be written to the referenced parameter. See NOTE 2.
  • NOTE 1 - A normal Response to a READ Request will contain a Parameter sub-element with no Reference attribute, and with a Value attribute corresponding to the value of the referenced parameter.
  • NOTE 2 - A WRITE Request contains a Parameter sub-element with its Reference and Value attributes encoded as specified in Table 6.4-2. A normal Response to the WRITE Request is not required to contain a Parameter element.
  • NOTE 3 - Additional Reason codes may be defined by providers of management function blocks. Software tools may but are not required to recognize and process these codes.
  • NOTE 4 - In this case, all managed FBs are started or stopped as follows:
    • First, all FBs that are not instances of E_RESTART are started in the reverse order of their creation.
    • Second, instances of E_RESTART are started in the reverse order of their creation.
    This procedure is followed to ensure that later-created FBs (which are usually "downstream" in event flow from earlier-created FBs) are ready to receive events from "upstream" FBs and E_RESTART instances when the latter are started.
  • NOTE 5 - DUPLICATE_OBJECT is an extension to the list of STATUS values given in Table 7 of IEC 61499-1. This code can be used in compliant systems to provide a more easily interpreted error message.
  • NOTE 6 - These codes indicate errors in the implementation of the management FB or its underlying FBManager, and should be reported to the provider of the FB type for correction.
Table 6.4.2-2 - QUERY Request and corresponding Response elements
Request sub-element Normal Response sub-element Abnormal Response Reason codes
FB
(Name != "*"
AND
Type != "*")
FBStatus NO_SUCH_OBJECT: No FB instance of the specified type can be found with the specified instance name.
FB
(Name != "*"
AND
Type = "*")
FB NO_SUCH_OBJECT: No FB instance can be found with the specified instance name.
FB
(Name = "*"
AND
Type != "*")
FBList: A list (may be empty) of names of all managed instances of the specified type. UNSUPPORTED_TYPE: The specified FB type is not supported.
FB
(Name = "*"
AND
Type = "*")
FBList: A list (may be empty) of names of all managed FB instances. None.
Connection
(Source != "*"
AND
Destination = "*")
EndpointList: A list of the destinations of all connections originating at the specified source. INVALID_OBJECT: The source specification is not a hierarchical name.
Connection
(Source = "*"
AND
Destination != "*")
EndpointList: A list of the sources of all connections terminating at the specified destination. INVALID_OBJECT: The destination specification is not a hierarchical name.
Connection
(Source = "*"
AND
Destination = "*")
Connection* : A list (may be empty) of all event and data connections in the addressed device or resource. None.
Connection
(Source != "*"
AND
Destination != "*")
None. NO_SUCH_OBJECT: The specified connection does not exist.
FBType | DataType
| AdapterType

(No sub-elements,
Name <> "*")
FBType | DataType | AdapterType:
The declaration of the library type with the specified name.
UNSUPPORTED_TYPE: The requested library type is not known to the manager.
FBType | DataType
| AdapterType

(No sub-elements,
Name = "*")
NameList: A list of names of all library elements of the specified type. UNSUPPORTED_TYPE: There are no library elements of the specified type.

6.5 The fbmgt2 encoding scheme

Management services in remote device instances shall be provided by the functional equivalent of an instance of the DEV_MGR2 service interface FB type when the fbmgt2 encoding scheme is specified.

EXAMPLE - An instance of the DM_KRNL type contained in an instance of the RMT_RES resource type will utilize an instance of the DEV_MGR2 type when the MGR_ID input of the RMT_RES is given as fbmgt2://192.168.0.14:61499.

An example of the use of this encoding scheme is given in Annex B.

The functionality of an instance of the DEV_MGR2 management FB type is identical to that of the DEV_MGR type described above. However, the DST and RQST inputs, as well as the RESP output, utilize more efficiently encoded representations of the associated data as follows:

  1. The DST input is an instance of the efficiently encoded USTRING data type, which specifies the destination of the RQST input subject to the following semantics:
    • If the DST value is empty,the RQST is directed to the managed Device.
    • If the DST value is the name of a Resource contained in the managed Device, the RQST is directed to the Resource with the corresponding name.
    • Otherwise, the execute(RQST) primitive shown in Figure 6.3 is not performed and the RESP.Reason value is set to MGT_REASON#INVALID_DST.
  2. The RQST input is an instance of the structured data type MGT_REQ, whose components are subject to the following rules:
    1. The ID component is an instance of the IEC 61131-3 DINT (32-bit signed integer) data type, whose semantics are as defined in 6.4.2 for the ID (transaction identifier) attribute of the Request element of the FBMGT DTD.
    2. The CMD component is an instance of the enumerated MGT_CMD data type, whose values and semantics are the same as the enumerated values of the Action attribute of the Request element defined in the FBMGT DTD.
    3. The TYPE component is an instance of the enumerated MGT_TYPE data type, whose value corresponds to the name (FB, Connection, etc.) of the contained element of a Request element in the FBMGT DTD.
    4. Table 6.5-1 lists all valid combinations of the CMD and TYPE elements, along with the syntax and example of the corresponding CONTENTS element for each such combination.
  3. The RESP output is an instance of the structured data type MGT_RSP. The use of this output in the CNF+ service primitive of the normal_request service sequence shown in Figure 6.3 is subject to the following rules:
    1. The value of the RESP.ID component shall be equal to that of the RQST.ID component of the corresponding REQ+ service primitive.
    2. The RESP.Reason component is an instance of the enumerated MGT_REASON data type, whose values are subject to the following rules:
      1. Successful completion of the serviceRequest service primitive shall be indicated by a RESP.Reason value of MGT_REASON#OK.
      2. Unsuccessful completion of the serviceRequest service primitive shall be indicated by a RESP.Reason value whose semantics are as defined in Tables 6.4.2-1 and 6.4.2-2.
    3. Unless otherwise defined in the NOTES to Table 6.5-1, the value of the RESP.TYPE component shall be MGT_TYPE#EMPTY and the value of the RESP.CONTENTS component shall be "" (the empty USTRING ).
Table 6.5-1 - MGT_REQ encodings
CMD TYPE (Note) CONTENTS (1) Example (Notes)
CREATE
DELETE
START
STOP
KILL
RESET
FB (13) fb_instance_name ':' fb_type_name CLK:E_CYCLE (4, 5, 7)
Resource (13) resource_instance_name ':' resource_type_name RES1:EMB_RES (4, 5, 7)
CREATE
DELETE
Connection config_connection CLK.EO>SENSE.REQ (2)
CREATE FBType fb_type_name '=' base64string NEW_FBT=... (3)
AdapterType adapter_type_name '=' base64string CASCADE_ADP=... (3)
DataType data_type_name '=' base64string CTL_MODE=... (3)
ResourceType resource_type_name '=' base64string NEW_RES_TYPE=... (3)
DELETE FBType fb_type_name NEW_FBT
AdapterType adapter_type_name CASCADE_ADP
DataType data_type_name CTL_MODE
ResourceType resource_type_name NEW_RES_TYPE
READ Parameter parameter_reference CLK.DT
WRITE Parameter parameter_reference '=' parameter_value CLK.DT=t#50ms (6)
QUERY FB (13) fb_instance_name ':' fb_type_name CLK:E_CYCLE (7)
fb_instance_name ':*' CLK:* (8)
'*:' fb_type_name *:E_CYCLE (9)
'*:*' *:* (10)
Resource (13) resource_instance_name ':' resource_type_name RES1:EMB_RES (7)
resource_instance_name ':*' RES1:* (14)
'*:' resource_type_name *:EMB_RES (15)
'*:*' *:* (16)
Connection fb_instance_name '.' event_output_name '>*' CLK.EO>* (11)
'*>' fb_instance_name '.'event_input_name *>SENSE.REQ (12)
'*>*' *>* (2)
FBType fb_type_name NEW_FBT (18)
AdapterType adapter_type_name CASCADE_ADP (18)
DataType data_type_name CTL_MODE (18)
ResourceType resource_type_name NEW_RES_TYPE (17, 18)
NOTES
  1. Unless otherwise specified, the syntax and non-terminal symbols used in the CONTENTS column and NOTES of this table are as defined in Annex B of IEC 61499-1.
  2. The non-terminal symbol config_connection is defined by the following syntax:
    config_connection ::= config_event_conn2 | config_data_conn2 | config_adapter_conn2
    | device_input_conn
    config_event_conn2 ::= fb_instance_name '.' event_output_name
    '>' fb_instance_name '.' event_input_name
    config_data_conn2 ::= (resource_input_name | (fb_instance_name '.' output_variable_name))
    '>' fb_instance_name '.' input_variable_name
    config_adapter_conn2 ::= fb_instance_name '.' plug_name '>' fb_instance_name '.' socket_name
    device_input_conn ::= device_input_name '>' resource_instance_name '.' resource_input_name
    resource_input_name ::= identifier
    device_input_name ::= identifier
    • The alternative device_input_conn only applies when the DST input is empty, i.e., when it specifies the Device containing the DEV_MGR2 instance.
    • The other alternatives in the config_connection production rule only apply when the DST input is the name of a Resource in the Device containing the DEV_MGR2 instance.
  3. The terminal symbol base64string represents the Base64 encoded contents of a file in a supplier-defined format to be downloaded using the CREATE command.
  4. If execution of a STOP or KILL request would result in the equivalent of stopping the operation of the DEV_MGR2 FB that is executing it, execution of the request shall be inhibited, and a RESP value with a Reason value of INVALID_OPERATION shall be produced.
  5. If the RESP.Reason field is set to OK or INVALID_STATE in response to a START, STOP, KILL or RESET command, the value of the RESP.TYPE field shall be FBStatus and the value of the RESP.CONTENTS shall be "IDLE", "RUNNING", "STOPPED", or "KILLED", corresponding to the current state of the FB or Resource to which the command was addressed.
  6. The non-terminal symbol parameter_value is defined by the following syntax:
    parameter_value ::=
     constant | enumerated_value | array_initialization | structure_initialization
  7. If the operational state of the specified FB or Resource instance can be determined upon successful or unsuccessful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FBStatus and the value of the RESP.CONTENTS field shall be set to one of the Status attributes of the FBStatus element defined in Table 6.4.1.
  8. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FB and the value of the RESP.CONTENTS field shall correspond to the syntax fb_instance_name ':' fb_instance_name '.' event_input_name {.
  9. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FBList and the value of the RESP.CONTENTS field shall be a list of all FB instances of the specified type in the Resource specified by the DST input, using the syntax fb_instance_name {',' fb_instance_name}.
  10. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FBList and the value of the RESP.CONTENTS field shall be a list of all FB instances in the Resource specified by the DST input, using the syntax fb_instance_name {',' fb_instance_name}.
  11. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#EndpointList and the value of the RESP.CONTENTS field shall be a list of all FB event inputs to which the specified event output is connected, using the syntax
    fb_instance_name '.' event_input_name {',' fb_instance_name '.'event_input_name}
  12. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#EndpointList and the value of the RESP.CONTENTS field shall be a list of all FB event outputs connected to the specified event input, using the syntax
    fb_instance_name '.' event_output_name {',' fb_instance_name '.'event_output_name}
  13. It shall be an error, resulting in a RESP.Reason value of INVALID_OPERATION, if:
    • RQST.TYPE is FB and DST does not identify a Resource of the Managed Device; or
    • RQST.TYPE is Resource and DST is not empty, i.e., does not identify the Managed Device.
  14. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#Resource and the value of the RESP.CONTENTS field shall correspond to the syntax
    resource_instance_name ':' resource_instance_type.
  15. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FBList and the value of the RESP.CONTENTS field shall be a list of all Resources of the specified type in the managed Device, using the syntax specified in Note 16.
  16. Upon successful execution of this RQST, the value of the RESP.TYPE field shall be set to MGT_TYPE#FBList and the value of the RESP.CONTENTS field shall be a list of all Resources in the managed Device, using the syntax
    resource_instance_name {',' resource_instance_name}
  17. For this RQST value, it shall be an error, resulting in a RESP.Reason value of INVALID_DST, if the length of the DST input is not zero, i.e., the DST input does not identify the managed Device.
  18. For this RQST value, the RESP.Reason value shall be MGT_REASON#UNSUPPORTED_TYPE if the specified type is not supported by the Resource named by the DST input, or by the managed Device if the DST input is a zero-length USTRING.