hexagon logo

End a Simulation with a Sensor and Then Publish the End Time to a Variable.

Hi All,
 
I have a simulation that I end using a sensor. Thus the simulation end time is determined by when the sensor gets triggered.
 
Is there a way to send the end time of this simulation to a state or design variable?
 
Or is there a variable in ADAMS which reports the end time of the simulation (not CPU time).
 
I tried using the "Event Evaluation" feature in the sensor definition but no luck so far.
 
thanks,
joe.
Parents
  • If the simulation would continue afterwards, the SENVAL output would give you the time at which the sensor triggered. But if the simulation is stopped, it seems that it does not give you anything.
     
    It all depends on where you need the value.
    If you need it during the continuation of the simulation, you can use the SENVAL.
    If you need it afterwards during postprocessing, you could instead just take the last value of the TIME output from the analysis. You can get this by using this expression:
     
    LAST( {.MODEL_1.Last_Run.TIME.values} )
     
Reply
  • If the simulation would continue afterwards, the SENVAL output would give you the time at which the sensor triggered. But if the simulation is stopped, it seems that it does not give you anything.
     
    It all depends on where you need the value.
    If you need it during the continuation of the simulation, you can use the SENVAL.
    If you need it afterwards during postprocessing, you could instead just take the last value of the TIME output from the analysis. You can get this by using this expression:
     
    LAST( {.MODEL_1.Last_Run.TIME.values} )
     
Children
No Data