Visual Components' Community

New Thinking for Factory Simulation
Welcome to Visual Components' Community Sign in | Help
in Search

OnSignal() and OnStart() functions

Last post ke, loka 8 2008 12:35 by Janne. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • pe, loka 3 2008 12:43

    OnSignal() and OnStart() functions

    vCSript has some predefined events

    Method Parameters Description
    OnFinalize   Called after all components are loaded or copied
    OnRebuild   Called when a component's geometry is rebuilt (initially after loading)
    OnStart   First event to be triggered when simulation is started
    OnRun   This is the main loop. Called when simulation is started.
    OnStop   Called when the simulation is halted
    OnContinue   Called when the simulation continues after being halted
    OnReset   Called when the simulation is reset
    OnSignal vcSignal signal Signal handler. Called when a signal connected to the script is received.
    OnSimulationUpdate real time Called simulation updated
    OnDestroy   Called when script is destroying

     

    OnSignal() and Onstart() functions are a special functions because they cannot contain any commands that spend time in the simulation such us delay().

    OnStart() is the first method called when a simulation is started and should be used to initialize simulation data. It must be run immediately so there can be no time spent on that method.

    OnSignal() method listens for all the signals that are connected to that python script all the time during the simulation. For that it would no longer work as intended if it consumes any time and is busy.


    Ricardo Velez
    Research and Development Manager
    Filed under: , ,
  • ke, loka 8 2008 12:35 In reply to

    • Janne
    • Top 10 Contributor
    • Joined on pe, helmi 22 2008
    • Visual Components HQ
    • Posts 21

    Re: OnSignal() and OnStart() functions

    Slight carification because someone asked this form me on the phone. OnRun is special since only onRun is allowed to use up time. So no delaying in any of the predefined functions except OnRun.

Page 1 of 1 (2 items)