Having an problem with a Mathcad WHILE loop (using Mathcad 15). I'm reading data in from a file, the data is from an accelerometer. I want to set up an IF statement to set a variable to 1 when the rising edge of the signal is greater than 5 g's but I don't want to reset the variable back to 0 until the signal drops to below 2 g's. If I do just the IF statement it work fine but switches the variable to 1 on the rising edge of the pulse at 5 g's and sets it back to 0 on the falling edge at 5 g's. I want the variable to be reset back to 0 at 2 g's on the falling edge. Attached is my attempt of a WHILE loop inside a IF statement, I'm having issues trying to determine how to structure the WHILE loop. Any help with this would be appreciated. Attached is a PDF of the waveform and my attempt at the Mathcad programming.
Red Flag Submitted
Thank you for helping keep Eng-Tips Forums free from inappropriate posts. The Eng-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Eng-Tips forums is a member-only feature.
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Metal 3D printing has rapidly emerged as a key technology in modern design and manufacturing, so itâ€™s critical educational institutions include it in their curricula to avoid leaving students at a disadvantage as they enter the workforce. Download Now
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now