Cancel
Showing results for 
Search instead for 
Did you mean: 

Time value from signal

Creator
Creator

Hi,

 

I'm using AMESim Student Edition

How can I extract a time value corresponding to a specific value of a signal?

 

thank you

13 REPLIES

Re: Time value from signal

Siemens Genius Siemens Genius
Siemens Genius

Dear @Barile91

 

When you create the plot, you can display the "cursor coordinates", then you can right click on the time variable (x) and select "Copy x value":

2017-01-23 17_12_49-AMEPlot - 1.png

 

Best regards

Re: Time value from signal

Siemens Phenom Siemens Phenom
Siemens Phenom
Hi Barile91,

First make sure you display the post-processing contextual window (View menu and Show).
Then drag the variable of interest in that post processing view.
It will create an item named A1.
Then create a new item in the post processing window (right click Add) and for the expression enter:
valueAt(A1, 1.23)
where 1.23 is the time in seconds for which you want the value.

You can then plot these post processing variables as any other variable.

Re: Time value from signal

Siemens Phenom Siemens Phenom
Siemens Phenom

... I read this too quickly, use Domi answer or try the post processing function reachTime(A,B)

Re: Time value from signal

Creator
Creator

Thank you for the quick answer,

 

I need it during the simulation, not in the post processing, because that time value will be a delay to introduce in a variable continous delay block.

 

thanks

Re: Time value from signal

Siemens Phenom Siemens Phenom
Siemens Phenom

Ah... you can try something combining the clock and other signal blocks such as the model below.

Note that Discontinuities printout in Run parameters were switched on to see the pulses.

amesim_time_measure.jpg

Re: Time value from signal

Creator
Creator

thank you emmanuel, but I need a constant value to introduce it in the continous delay block

Re: Time value from signal

Siemens Phenom Siemens Phenom
Siemens Phenom

Yes I thought you would have some constraints...

It can't be that 'constant' if you want to measure it during the simulation.

How does your delay should look like? Stairs with one or several steps?

Re: Time value from signal

Creator
Creator

I have a signal representing the velocity of a body. This is a decreasing signal. I have a brake signal. I want to brake when the velocity reaches a precise value (40km/h). I think that I need a constant delay of the brake signal,represented by the time interval between the initial velocity and 40km/h.

Sorry for my english Smiley Wink

Re: Time value from signal

Siemens Phenom Siemens Phenom
Siemens Phenom

For what you describe it will be simpler to multiply the brake command by a variable gain which will be zero or one depending on the velocity.

See this model and let me know if it's not explicit - all the logic is in the expression of the f(x) block:

amesim_variable_gain.jpg