muckingfuddle Posted June 18, 2019 Report Share Posted June 18, 2019 Hoping someone can help me out here, i need to record the maximum value of an analog input during a given time frame. i was hoping to use GET MAX like this> but the MAX only stores the value when MB4 is not active Any one have an example of how i can take an analog input and store the peak value that is seen in a 20 second period, or maybe there is a way i can take the peak value from a trend. I also need to to figure a way to record the value every second so i can work out an average. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted June 18, 2019 MVP 2023 Report Share Posted June 18, 2019 You're looking for what's known as a "peak picker"- If you want to keep a record of the max values, set up a data table and bump down all the records when the new one comes in. There are other posts about averaging. Here's one, but search the forum for "averaging". http://forum.unitronics.com/topic/1242-movingrolling-average/?tab=comments#comment-4293 Joe T. Link to comment Share on other sites More sharing options...
muckingfuddle Posted June 18, 2019 Author Report Share Posted June 18, 2019 17 minutes ago, Joe Tauser said: You're looking for what's known as a "peak picker"- If you want to keep a record of the max values, set up a data table and bump down all the records when the new one comes in. There are other posts about averaging. Here's one, but search the forum for "averaging". http://forum.unitronics.com/topic/1242-movingrolling-average/?tab=comments#comment-4293 Joe T. Thanks Joe i just tried that but i might not have explained myself correctly. i need to record the highest value seen during a test . So for example an average test is 20 seconds long but can vary depending on the operator so the time is a variable, when the test is running MB1 is active and is telling a trend to run, the test is looking at a Torque sensor and as the torque increases i need to see the peak value and record it on the HMI until a new test is run. The test can look something like this, the current method of testing requires an operator to manually watch a torque display an remember the highest reading. I very much appreciate any assistance you offer Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted June 18, 2019 MVP 2023 Report Share Posted June 18, 2019 The compare and store logic is the same. Instead of using the timer to reset the max value, you'll reset it manually at the beginning of the test. Have you started a program that you can post? Joe T. Link to comment Share on other sites More sharing options...
muckingfuddle Posted June 18, 2019 Author Report Share Posted June 18, 2019 4 minutes ago, Joe Tauser said: The compare and store logic is the same. Instead of using the timer to reset the max value, you'll reset it manually at the beginning of the test. Have you started a program that you can post? Joe T. I had already put my start test bit in place of the timer but like a dumb ass i didnt put it as a positive transition, it works now LOL i have spent to long staring at this goddam tester and i am getting fuddled LOL. I thank you sir you are awesome. I have spent to long commissioning other peoples work and not long enough doing my own programming Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now