User interfaces (API)
7.6 API IInstances
7.6.3
Operating state
GetOperatingState() / OperatingState { get; }
Returns the operating state of the virtual controller. When the operating state changes, the
OnOperatingStateChanged() (Page 243) event is triggered. For details about the operating
state, see Data types (Page 330).
Table 7- 122 GetOperatingState() - Native C++
Syntax
Parameters
Return values
144
EOperatingState GetOperatingState();
None
•
SROS_INVALID_OPERATING_STATE:
If the function fails.
•
SROS_OFF:
If the Simulation Runtime instance is not running.
•
SROS_BOOTING:
If
was called while in this state and the virtual controller is not yet
PowerOn()
ready to start the user program.
•
SROS_STOP:
If the virtual controller is in STOP state.
•
SROS_STARTUP:
If the user program is currently changing from STOP to RUN.
•
SROS_RUN:
If the user program is running.
•
SROS_FREEZE:
If the user program is being stopped (Freeze status).
•
SROS_HOLD:
If the user program is set to HOLD when the breakpoint is reached.
:
•
SROS_SHUTTING_DOWN
If
was called but the virtual controller is still in the Shutdown
PowerOff()
phase.
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
Need help?
Do you have a question about the Simatic S7-1500 and is the answer not in the manual?
Questions and answers