SodBuster493 (Customer) asked a question.

Productivity 1000 High Speed Counting?

I am using a Productivity 1000 (P1-540 CPU) and have a P1-02HSC high speed counting card, but can't seem to figure out how to best utilize it. I am trying to use the counter to count the pulses from a turbine water flow meter to determine both flow rate and total volume.

 

Within the hardware configure, I can certainly define a tag to store the total count, and use a compare contact to evaluate this. But it seems to be missing an interrupt command? Using the compare contacts only allows me to evaluate the count once per scan. If this is true, is there really much to gain from the high speed counting?


  • SodBuster493 (Customer)

    Taking a look at the sample program, this was something very similar to what I was intending on writing. So this is reassuring that I was on the right page. But the count is only evaluated by the program once per scan (once per second in the sample program).

     

    Based on this, the HSC really is just to ensure pulses are actually counted at speeds higher than a standard input can count, with no real interrupt capability. If the target count is achieved, in my case water volume, while the CPU is calculating another task or between scans, water will continue to flow until the scan catches up to take action. Seems as though I'll just have to ensure that the amount of overshoot (admittedly likely very small) is within my tolerance limits.

    Expand Post
  • PouchesInc (Customer)

    You are correct SodBuster493, there is no interrupt instruction available on these platforms and the HSC module does not calculate velocity/flow rate for you in hardware. You have to do the velocity calculation in ladder scan compare instructions and are thus limited in speed of execution. Unfortunately, the P1k, P2k, and P3k are all missing interrupt instructions, however, the P2k and P3k do have more advanced HSI modules that are capable of using a single active "registration" instruction at a time and when configured correctly this instruction will perform an interrupt function outside of ladder scan.

    In order to use the interrupt function of the registration instruction outside of ladder scan, you must use an external input on one of the status inputs to the HSI module (typically an inductive sensor or some other physical sensor detecting a location of the part being moved), and have the instruction configured for rising edge trigger. This will perform the selected event for the registration instruction outside of ladder scan. Remember that you can only have a single registration instruction active per HSI module at a time though.

     

    The P2k is over double the price in typical configuration than a P1k, so if you can get by without absolutely

    needing an interrupt outside of ladder scan then you can save a lot of money just doing the calculation in ladder on a P1k.

    Expand Post
  • SodBuster493 (Customer)

    PouchesInc,

     

    Thanks for confirming. I was a little back and forth between the P2K and the P1K, but for my application (brewing) it was hard to justify the cost difference.

     

    At my water flow rates and the water flow sensor I have, I’ll be looking at pulse counts up to 300-600Hz range, which is why I opted for the high speed counter. From a logic standpoint, I’ll likely over shoot the count target by several hundred. In reality, this, combined with the delay of a solenoid valve, I’ll probably only over shoot my volume by a couple ounces.

     

    All of this is perfectly acceptable with my application, just wanted to make sure I wasn’t missing something.

    Expand Post