| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Identifier of current event
evid = gcev
evid = gcev returns the identifier of the event associated with the current operation. If the current operation does not change the event calendar, evid is an empty string. A change to the event calendar can be the scheduling, execution, or cancelation of an event.
View the event associated with the current operation:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_async_stateflow_ent')Proceed in the simulation. At the sedebug>> prompt, enter:
tbreak 1 cont
The output ends with the current operation, which is the execution of the event with identifier ev6:
%==============================================================================% Executing ServiceCompletion Event (ev6) Time = 1.000000000000000 : Entity = en2 Priority = 500 : Block = Asynchronous Execution/Single Server
View information about the event associated with the current operation:
evid = gcev evdetails = evinfo(evid)
The output shows the same identifier, ev6, in the workspace variable, evid, and the ID field of the structure, evdetails:
evid =
ev6
evdetails =
ID: 'ev6'
EventType: 'ServiceCompletion'
EventTime: 1
Priority: '500'
Entity: 'en2'
Block: 'sedemo_async_stateflow_ent/Asynchronous Execution/Single Server'Proceed further in the simulation:
step
The output is:
%..........................................................................%
Scheduling EntityRequest Event (ev7)
: EventTime = 1.000000000000000 (Now)
: Priority = SYS2
: Block = Asynchronous Execution/Single ServerView information about the event associated with the current operation. This event is the entity request event the simulation is scheduling, not the service completion event whose execution causes the scheduling of the entity request event.
evid_next = gcev evdetails_next = evinfo(evid_next)
The output refers to the event identifier, ev7:
evid_next =
ev7
evdetails_next =
ID: 'ev7'
EventType: 'EntityRequest'
EventTime: 1
Priority: 'SYS2'
Entity: ''
Block: 'sedemo_async_stateflow_ent/Asynchronous Execution/Single Server'End the debugger session. At the sedebug>> prompt, enter:
sedb.quit
![]() | sedb.gcen | sedb.quit | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |