mathcad programming for threshold and duration
mathcad programming for threshold and duration
(OP)
Need some help, pulling my hair out trying to figure out how to program this in Mathcad. I'm reading data from a data file and plotting that on a graph. From the data I want to determine when the amplitude of the incoming data goes above a threshold for a certain duration. If both the amplitude above the threshold and duration are met, I then want to plot a pulse on another graph. Pulse would just be a "0" or a "1". See attached JPG file. Any help would be appreciated.
RE: mathcad programming for threshold and duration
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: mathcad programming for threshold and duration
My only modification to Greg's solution would be to treat the intermediate train as an incrementer, i.e., starting at ground state, when the threshold is exceeded, you start incrementing a counter. If the count exceeds the duration in counts, you generate the output signal. The counter is reset only if the input drops below the threshold.
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: mathcad programming for threshold and duration
Didn't think of that but your right that would be a round about way to get the results I'm looking for.
Larry
RE: mathcad programming for threshold and duration
I understand how to do this in conventional programming the problem I'm having is putting together the proper programming steps in Mathcad. I'm new to programming to Mathcad and trying to determine the right sequence/program structure to get the results I'm looking for.
RE: mathcad programming for threshold and duration
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: mathcad programming for threshold and duration
I'll post a jpg tonight.
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: mathcad programming for threshold and duration
I haven't checked it for errors.
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: mathcad programming for threshold and duration
RE: mathcad programming for threshold and duration
Thanks for the PNG file, however when typing it in exactly as you have it I get an error. Can you post the actual Mathcad file, and what version of Mathchad are you using
Larry
RE: mathcad programming for threshold and duration