News:

  • September 27, 2026, 09:26:48 AM

Login with username, password and session length

Author Topic: fifoload  (Read 9652 times)

unsyndicated

  • Full Member
  • ***
  • Posts: 21
fifoload
« on: November 12, 2021, 09:56:14 AM »
Hello

I have a 4-20ma particle counter that pulls a sample for 1 minute(on its own internal timer), then resets.  I'm looking to take the result from each on minute pull and put it into a rolling 36 minutes cumulative quantity.  The Fifoload instruction looks to be a good start, just unsure of how to get it to sync with the high count of the particle monitor.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: fifoload
« Reply #1 on: November 16, 2021, 01:07:41 PM »
Are you talking about how to scale the number on your particle counter display with the analog input?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: fifoload
« Reply #2 on: November 16, 2021, 05:12:13 PM »
Are you seeing the rising count or just each final one minute total? If you see the rising count then copy the reading into another register. When a new reading drops below the previous - may need to set a minimum amount of drop to prevent noise from triggering - the use the previous count for your FIFO load source.
« Last Edit: November 16, 2021, 06:45:19 PM by b_carlton »
An output is a PLC's way of getting its inputs to change.

unsyndicated

  • Full Member
  • ***
  • Posts: 21
Re: fifoload
« Reply #3 on: November 30, 2021, 09:08:05 AM »
I can see the rising count, I figured how to pull the the high count with the MAXR function. (FIFO_0)
And I'm able to move that value into another FIFOload (FIFO_1) and get the sum of those values with the SUMR function.

The situation I'm running into now is at the very beginning when my FIFO_1 isn't full it wont complete the SUMR function until FIFO_1 reads full.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: fifoload
« Reply #4 on: November 30, 2021, 11:41:59 AM »
Use the FIFO control structure's .DEPTH parameter to determine the number of items. Edit - this doesn't really do anything. Since non-filled entries are zeroed the sum should be correct. Just sum the entire FIFO.

My setup using the Simulator provides a proper SUMR even though the FIFO is partially filled
« Last Edit: November 30, 2021, 12:12:22 PM by b_carlton »
An output is a PLC's way of getting its inputs to change.

unsyndicated

  • Full Member
  • ***
  • Posts: 21
Re: fifoload
« Reply #5 on: December 01, 2021, 10:21:32 AM »
Thank you very much, I was able to find the error of my ways.