The ReadySubstateMachineType represents the condition of a program loaded into a task control (TaskControlStateMachine is in Ready State). The state machine has two states to distinguish whether the program pointer is at an initial program position (AtProgramStart) or anywhere else in the program (Suspended). It provides the information whether the program pointer is at the start or in the middle of the program. The method ResetToProgramStart can be used to set the program pointer to the start of the program. The state after entering this state machine depends on the program pointer position.
The TaskControlReadyMonitor ConformanceUnit defines monitoring of the ReadySubstateMachine. The TaskControlReadyReinitalize ConformanceUnit defines additionally the reinitialization of the program by a method.
The overview of the state machine with all transitions is shown in .
Figure 31 – ReadySubstateMachine
Figure 32 – ReadySubstateMachineType Overview
The ReadySubstateMachineType is formally defined in Table 104.
Table 104 – ReadySubstateMachineType Definition
Attribute |
Value |
||||
BrowseName |
ReadySubstateMachineType |
||||
IsAbstract |
False |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the FiniteStateMachineType defined in OPC 1000-5 |
|||||
0:HasComponent |
Variable |
LastTransitionReason |
0:Int16 |
0:MultiStateValueDiscreteType |
M |
0:HasComponent |
Object |
AtProgramStart |
|
0:StateType |
|
0:HasComponent |
Object |
Suspended |
|
0:StateType |
|
0:HasComponent |
Object |
ProgramStartToSuspended |
|
0:TransitionType |
|
0:HasComponent |
Object |
SuspendedToProgramStart |
|
0:TransitionType |
|
0:HasComponent |
Method |
ResetToProgramStart |
|
|
O |
Inherited from FiniteStateMachineType |
|||||
0:HasComponent |
Variable |
LastTransition |
0:LocalizedText |
0:FiniteTransitionVariableType |
M |
0:GeneratesEvent |
ObjectType |
TransitionEventType |
|
|
O |
ConformanceUnits |
|||||
Rob Task Control ReadySubstate |
|||||
Rob Task Control Ready Reset |
The Variable LastTransitionReason provides the reason for the LastTransition. The EnumValue and ValueAsText of this 0:MultiStateValueDiscreteType are described in .
Table 105 – ReadySubstateMachineType Attribute values for child nodes
BrowsePath |
Value Attribute |
Description Attribute |
||
|
[ {"Value":0,"DisplayName":"Unknown","Description":"Caused by an unknown reason"}, {"Value":1,"DisplayName":"External","Description":"Caused by external operation"}, {"Value":2,"DisplayName":"Direct","Description":"Caused by direct operation"}, {"Value":3,"DisplayName":"System","Description":"Caused by system specific behavior"}, {"Value":4,"DisplayName":"Error", "Description": "Caused by an error"}, {"Value":5,"DisplayName":"Application","Description":"Caused explicitly by end user program logic"} ] |
|
The states of the ReadySubstateMachineType are described in Table 106.
Table 106 – ReadySubstateMachineType State Descriptions
StateName |
Description |
AtProgramStart |
The program pointer of the program loaded in the task control is at the starting point. |
Suspended |
The program pointer of the program loaded in the task control is anywhere in the program, but not at starting point. |
The components of the ReadySubstateMachineType have additional references which are defined in Table 107.
Table 107 – ReadySubstateMachineType Additional References
SourceBrowsePath |
Reference Type |
Is Forward |
TargetBrowsePath |
ProgramStartToSuspended |
0:FromState |
True |
AtProgramStart |
0:ToState |
True |
Suspended |
0:HasEffect |
True |
TransitionEventType |
SuspendedToProgramStart |
0:FromState |
True |
Suspended |
0:ToState |
True |
AtProgramStart |
0:HasEffect |
True |
TransitionEventType |
0:HasCause |
True |
ResetToProgramStart |
The transitions are described in Table 108 – ReadySubstateMachineType Transition Descriptions.
Table 108 – ReadySubstateMachineType Transition Descriptions
TransitionName |
Description |
ProgramStartToSuspended |
Changes from AtProgramStart to Suspended. |
SuspendedToProgramStart |
Changes from Suspended to AtProgramStart because program was restarted. (Direct, External, System) |
The component Variables of the ReadySubstateMachineType have additional Attributes defined in Table 109.
Table 109 – ReadySubstateMachineType Attribute values for child Nodes
BrowsePath |
Value Attribute |
||
|
1 |
||
|
2 |
||
|
1 |
||
|
2 |
The signature of this Method is specified below.
Signature
ResetToProgramStart (
[out]0:Int32Status
);
Table 92 specifies the Arguments.
Table 92 – ResetToProgramStart Method Arguments
Argument |
Description |
Status |
0 – OK – Everything is OK 1 – E_SystemState – The system is not in correct state for this operation 2 – E_UnexpectedError – Unexpected Error during the method call 3 – E_ActiveAlarm – An Active Alarm prevents the system start 4 – E_AcknowledgeRequired – Condition needs to be acknowledged <0 – shall be used for vendor-specific errors. >0 – are reserved for errors defined by this and future standards |
The ResetToProgramStart Method is called by a Client to set the program pointer to the starting point of the program.
The possible Method result codes are formally defined in the table below.
Table 93 – Method Result Codes (defined in Call Service)
Result Code |
Description |
Good |
The operation succeeded |
Bad_InternalError |
The operation failed because of an internal error |
Bad_ResourceUnavailable |
The Method is locked by another Client/Clientgroup |
Bad_UserAccessDenied |
The caller is not allowed to call this Method. |
The ResetToProgramStart Method representation in the AddressSpace is formally defined in Table 94.
Table 94 – ResetToProgramStart Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
ResetToProgramStart |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
0:HasProperty |
Variable |
0:OutputArguments |
0:Argument[] |
0:PropertyType |
M |
ConformanceUnits |
|||||
Task Control Ready Reset |