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
  • Thanks Henrik,
     
    Perhaps I'm doing something wrong.
     
    The sensor event evaluation = run-time expression = time
    Then I have a state variable: sv=senval(id) where id=sensor id
     
    When I plot the variable sv, its y values are all zero yet the sensor was triggered and stopped the simulation.
     
    Ideally I'd like to have a variable that only contains one value of the end time...is this possible?
Reply
  • Thanks Henrik,
     
    Perhaps I'm doing something wrong.
     
    The sensor event evaluation = run-time expression = time
    Then I have a state variable: sv=senval(id) where id=sensor id
     
    When I plot the variable sv, its y values are all zero yet the sensor was triggered and stopped the simulation.
     
    Ideally I'd like to have a variable that only contains one value of the end time...is this possible?
Children
No Data