1
\$\begingroup\$

I'm working on a BRX PLC connected to a C-More HMI. I'm using Do-More Designer to write ladder code. I'm looking for ladder logic that will give me the runtime of a circulating pump in the last 24 hours. I want something that updates every minute and displays as HH:MM on the HMI. I've included a visual representation of what I'm looking for. Runtime Visual Example

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

One way to do this is with a FIFO (First-In-First-Out) structure. On the Do-More PLC, the relevant instructions are FIFOLOAD and FIFOUNLOAD. Because you want the display to update each minute, you need to keep track of runtime during the current minute, perhaps with an accumulating timer (TMRA). At the end of the minute, you unload the data for the minute that happened 24 hours ago (the oldest minute in the structure), load the data for the minute that just passed, and then add up the data for all of the minutes in the structure so you can update the display. There are 1440 minutes in a 24-hour period, so that is how big your data block will need to be.

As an alternative to adding up 1440 values every minute, you can keep the running total in a separate variable, and then each minute you can subtract the value you unload and add the value that you load.

\$\endgroup\$
1
  • \$\begingroup\$ I'll try that, seems like it should work. Would it be possible to get a rough example, given I've never worked with FIFO structures before. \$\endgroup\$
    – Geo
    Commented Dec 21, 2023 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.