The StartProgram Method is used when a Client application wants to start running a program based on a ProgramTemplate of a FunctionalUnit. The Properties Argument can be used to provide an optional list of property values when initiating a program run. The listed items represent key-value pairs that conform to the OPC UA KeyValuePair core datatype. The qualified name provided via the key field must match the BrowseName of a Property member in the FunctionalUnit’s SupportedPropertySet.
In contrast to the Start Method, additional fixed properties must also be set.
The signature of this Method is specified below. Table 44 and Table 45 specify the Arguments and AddressSpace representation, respectively.
The Start Method should not be called by a Client with anonymous authentication.
Note: Results must be created between the start (calling the Start/StartProgram method or a manual start) and the end of a program. So, the result must be complete before the ActiveProgram state machine transitions to the Complete state.
Signature
StartProgram (
[in]0:StringProgramTemplateId
[in]KeyValueType[]Properties
[in]0:StringSupervisoryJobId
[in]0:StringSupervisoryTaskId
[in]SampleInfoType[]Samples
[out]0:StringDeviceProgramRunId)
Table 44 – StartProgram Method Arguments
Argument |
Description |
ProgramTemplateId |
The unique identifier of the program template used for the program-run. The template must be a member of the ProgramTemplateSet. |
Properties |
A Key/Value set for parameterization of the function. |
SupervisoryJobId |
The SupervisoryJobId assigned to this program. |
SupervisoryTaskId |
The Id of the SupervisoryTask. |
Samples |
An array of the SampleInfoType that describes the samples processed in this program-run. |
DeviceProgramRunId |
The Id of the created program run. |
Table 45 – StartProgram Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
StartProgram |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
0:HasProperty |
Variable |
0:InputArguments |
Argument[5] |
0:PropertyType |
M |
0:HasProperty |
Variable |
0:OutputArguments |
Argument[1] |
0:PropertyType |
M |
DeviceProgramRunId is the internal program identifier assigned by the Device to the program run to generate this result. It is used to identify a Result object and is returned to the Client when the StartProgram Method is called.
SupervisoryJobId is the identifier for the execution of a specific workflow, consisting of one or multiple tasks. It is provided as an Argument of the StartProgram() Method which initiates the program run.
SupervisoryTaskId is the unique identifier of the specific task in the supervisory system to which the result belongs. It is provided as an Argument of the StartProgram() Method which initiates the program run.