Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delay a function

Status
Not open for further replies.

Aange

Mechanical
May 14, 2020
2
Hello,

I'm trying to figure out how to delay a function "IF(MODE-5:varval(launch_force),varval(static_force),varval(launch_force)" this function is used to propulse a marble thanks to a spring.
But at the moment the spring launch at the begining of the simulation and not when the marbles arrive.
I need your help !
PS : You can find a screen shot of my project, I don't know if it help
Thanks
 
 https://files.engineering.com/getfile.aspx?folder=bf28cd7b-1d37-405a-94f4-80fc8530f79b&file=Marble.png
Replies continue below

Recommended for you

One way to implement a delayed action is to use a STEP function based on time.

STEP

The STEP function approximates the Heaviside step function with a cubic polynomial. It has continuous first derivatives. Its second derivatives are discontinuous at x=x0 and x=x1.

Format

STEP (x, x0, h0, x1, h1)

Arguments





x

The independent variable. It can be a function expression.


x0

A real variable that specifies the x value at which the STEP function begins.


x1

A real variable that specifies the x value at which the STEP function ends.


h0

The initial value of the step.


h1




Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Hello,

Thanks for your answer.
I tried with the function step with this "STEP(varval(launch_force),varval(static_force),varval(launch_force), 1.45 , 0 , 1.50 , 1 )" as I want the spring to lunch the marble at 1.45 and be ready for the second one at 1.50.
However my model still doesn't work, the spring is still activeted at the begining of the simulation.
what did I do wrong ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor