Jump to content

Recommended Posts

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> image.png.d896e0f80c00004f8de3c1479eb1ef00.png

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

  • MVP 2023

You're looking for what's known as a "peak picker"-

image.png.9416dc864dd21878c2dd71f8c07ccc6e.png

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

17 minutes ago, Joe Tauser said:

You're looking for what's known as a "peak picker"-

image.png.9416dc864dd21878c2dd71f8c07ccc6e.png

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

image.png.0ee3f6032d4a0d20bd89cec0ee050b52.png

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.