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.

 

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...