Difference between revisions of "MC-Basic:event.STATE"
Line 45: | Line 45: | ||
* [[MC-Basic:event.STATUS|event.STATUS]] | * [[MC-Basic:event.STATUS|event.STATUS]] | ||
− | [[Category | + | [[Category:MC-Basic:Event Control|event.STATE]] |
}} | }} |
Latest revision as of 09:15, 22 May 2014
This query returns a Long value, indicating the state of the event task.
1: Running (TASK_RUNNING)
2: Stopped due to IDLETASK or after a STEPIN instruction (TASK_STOPPED)
4. Stopped due to runtime error (TASK_ERROR)
Syntax
?<event>.State
Availability
All versions
Type
Long
Range
Returned value: 1, 2, 4
Scope
Task or Terminal
Limitations
Event must be loaded in memory(after the execution of the OnEvent statement and while calling task is running).
Examples
?Event1.State
If Event1.State = TASK_ERROR Then
‘Check if event is stopped due to run-time error