In this step of the example, the FunctionalEntity sub-model is created. See Figure F.7.
Figure F.7 – FunctionalEntity sub-model of Filling Machine example
The following steps are needed to define the FunctionalEntities:
- Creation of the FunctionalEntityType instances (The OPC UA FX AML Core Libraries provide the FunctionalEntityType SUC for defining a FunctionalEntity).
- Within each FunctionalEntity, define variables for the input, output and configuration variables and link the variables to the FunctionalEntity using Organizes references.
- Set or restrict the values in the PublisherCapabilities and SubscriberCapabilities structure. The PublisherCapabilities and SubscriberCapabilities structure exists in the FunctionalEntity sub-model at three levels: AutomationComponent, FunctionalEntity and InputData and OutputData levels.
In Figure F.8, a FunctionalEntity “FillControl” is created that represents an application for controlling a valve based on input data from a level measurement. The “FillControl” FunctionalEntity is hosted by the CPU module “R04CPU_PLC”.
Figure F.8 – FunctionalEntity FillControl hosted by Asset R04CPU_PLC
“FillControl” uses an analog “FillLevel” input and a digital “ValveOpenClose” output variable. Both Variables are organized as InputData and OutputData of the FunctionalEntity “FillControl”.The “FillLevel” signal is coming from a FunctionalEntity “LevelMeasurement” that is hosted by the analogue input module “R60AD4_AnalogInput”, while the “ValveOpenClose” signal is sent to a FunctionalEntity “ValveControl” hosted by the digital output module “RY0R2_DigitalOutput”.
This is shown in Figure F.9.
Figure F.9 – FunctionalEntity FillControl organizing input and output variables
After setting up InputData and OutputData, the capabilities of the communication are defined. For example, the SubscriberCapabilities Variables for the “FillLevel” input signals are defined as in Figure F.10:
Figure F.10 – SubscriberCapabilities Variables of the LevelMeasurement FunctionalEntity
Table F.1 shows the values of the Variables used in the example:
NOTE The DataSets referenced in the table are defined in F.2.5.
Table F.1 – SubscriberCapabilities Variables and values for the LevelMeasurement FunctionalEntity
Variable |
Value |
PreConfiguredDataSetOnly |
True |
PreConfiguredSubscribedDataSets |
[“FillLevelDataSet”] |
SupportedMessageReceiveTimeouts |
min:200,max:20000,increment:50,multiplier:1;unit:milliseconds |
SupportedPublishingIntervals |
min:50, max:5000,increment:50,multiplier:1;unit:milliseconds |
SupportedQoS |
QosCategory: opc.qos.cat://priority,DatagrammQos: opc.qos.lbl://green |