ANEXO I: MERCANCIAS CON EXIGENCIA DE DESCRIPTORES ESPECIFICOS (1) (2)
5. REPRESENTANTES DE LA EMPRESA ANTE EL SERVICIO DE ADUANAS Y ASISTENTES
The last form of SI function block that is defined in the standard concerns services to load, start and initiate function block execution. The standard defines a generic
form of Management function block as shown in Figure 4.8 that can be used to initiate a range of service functions using different command definitions. The descriptions of these services and how they work is only given in outline in the standard. This is an area which is particularly difficult to model because systems will tend to have completely different mechanisms for loading and creating function block networks and starting the execution of loaded applications. In the future, it is likely that further details on these services will be included in other parts of the standard but it is a large topic that will be difficult to model in a general way.
At one extreme, to start an application, a system may require that all function blocks and supporting resource libraries be compiled to a binary format and down- loaded into separate devices. At the other extreme, devices may have large libraries of pre-loaded function blocks; for example, function block definitions could all be part of the device firmware. In this case, an application can be created by simply downloading the definitions of the connections that are required to create the application’s function block networks in the different devices. There may also be hybrid systems where some function blocks are in firmware while others are downloaded.
The services that are supported by the Management function block apply at both the resource and device level as shown in Table 4.3 and Table 4.4
The Manager function block can be used by specifying different values for the CMD input to initiate the various service functions. The response to each form of service function is given by the value returned in the Status output. The service function is further characterised by the value of input CMD_PARAMS.
Figure 4.8 Management function block
Examples: CMD = CREATE
CMD_PARAMS = fb_instance_definition PARAMS = fb instance definition data RESULT = fb instance reference
Note: In these two examples the data types for values shown in italics are not
defined in IEC 61499 and are regarded as implementation specific. However, the standard has defined a data exchange format for porting function block definitions based on XML—see chapter 7 and appendix B.
As a general comment, function blocks are very effective at modelling systems where the behaviour is concerned primarily with data and event flows. It is question- able whether management operations for loading and creating function blocks to form applications that are distributed across devices can be best described using the same model. This type of behaviour may require a different type of model, as it is mainly concerned with data management issues.
Table 4.3 Resource level management service functions
Service function Description
Create Create data type definitions, function block types and instances and connections between function blocks. This will involve downloading definitions from a source, e.g. copying across a network, copying in from a memory smart card.
Initialise Initialise data types, function block types and instances and connections. This concerns setting up function blocks and connections into a runnable state and will include resetting variables to their default initial values.
Start The Start function triggers the execution of function block networks within a resource. Typically it will start the resource scheduling function and start to run SI function blocks that generate timing events. These in turn trigger chains of events that cause function block execution. Stop The Stop service causes all execution to cease by
suspending the resource scheduling function.
Delete The Delete service can be used to delete the definition of any data type, function block or connection.
Query The Query service provides a means to access
information about the status, attributes and existence of data types, function blocks and connections.
CMD = QUERY
CMD_PARAMS = connection_start_point PARAMS = connection start point definition RESULT = connection end point definition
This shows an example of the Query management service function to find the reference to the end-connection for a given start-connection.
Table 4.4 Device level management service functions
Service function Description
Create Creates and establishes a resource within a device. This sets up the characteristics and attributes of a resource in a device.
Initialise Initialise the resource to be ready to load and execute function blocks.
Start Start the resource to allow function block execution. Stop Stop the resource execution of function blocks. Delete Delete resource from the device so that it can no longer
be accessed to load and execute function blocks. Query Query the device to obtain information regarding the
status, attributes and existence of resource(s) in the device.
Table 4.5 Main states of managed function blocks
State Meaning
THAWED The function block instance internal state information is available and the function block is ready to start execution. This state exists when the function block’s containing device is being powered-up. RETAINED A function block is considered to be in this state when its containing
device is completely powered down.
IDLE The function block is in an initialised state. The block’s execution control chart is in its initial state; input and output variables have their initial values.
RUNNING In this state, the function block is considered available for the reception of input events. Any input event will be processed by the resource scheduling function.
STOPPED All processing of algorithms and input events is terminated by the scheduling function.
KILLED Operation of all input events and algorithm processes is inhibited.