Announcement

Collapse
No announcement yet.

Rate Counter

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Rate Counter

    Hi,
    I have been asked to edit a program to include a rate counter. The Machine in question cuts and counts wipes, so i want to count wipes per minute. I used SP4 as a counter to simulate the product being counted. I wanted to send the result to V2000 but it doesn't register. I would appreciate any help.
    Attached Files


  • #2
    Can you see the values of V2000, V1003, and V3 in data view?
    Do they look correct as the program runs and would the math operation work out?
    No divide by zero and the result is within the range of the V number?


    Comment



    • #3
      Do you want a counter that just updates to the current counts per minute once a minute for every minute the machine is on?
      Rolling average counts per minute?
      Or do you want a daily average rate for the total time the machine has been on?
      Counts per hour?

      The simplest is the first one. just make a counter and have your product counter input go to the counter up. Then have an SP3 go out to a C bit. Make a new rung where when the leading edge of the C bit goes on, load the current counter value and output it to V2000, and then do a "pd" of another C bit, which is configured to reset the product counter. This will take only 3 rungs of code and once every minute the machine is on will simply tell you how many product copunts went by in the last minute. If you want you can also add some stuff that copies the current V2000 value every time it is updated to a poiniter location and store a whole history of counts per minute. That way you could keep a log of sorts for when the machine was doing well and when it was slow or down.
      Last edited by MikeN; 07-13-2018, 09:16 AM.

      Comment

      Working...
      X