cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Function problem

ptc-5729299
1-Newbie

Function problem

Hello

I made a function which should be able to produce 25% a value of 1, 25% a value of -1 and totally 50 % the value of 0. Something like the signum function but with defined intervalls.

the first 25% of the periodic time it should be 1

from 25% till 50% it should be 0

from 50% till 75% it should be -1

from 75% till 100% it should be 0

and then again from the beginning. Totally for 10 minutes.

Unfortunataly the function doesn't work and I don't know why.

Thanks for your help

Adrian

1 ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:ptc-5729299)

You can't use range variables the way you are using them. This does what you want.

View solution in original post

2 REPLIES 2
RichardJ
19-Tanzanite
(To:ptc-5729299)

You can't use range variables the way you are using them. This does what you want.

thank you very much!

It's exactly what I intended to do.

Top Tags