Bar (Customer) asked a question.

FREQTMR Instruction using $HsCtrTmr Input. Scaled or Raw impulse seen?

Hello, I have a High Speed Input ($HsCtrTmr) under X4 input, and that $HsCtrTmr under "Setup BRX High Speed Input Function" has enabled scaling set up. When using the instruction FREQTMR with input "X4" under ladder, does the FREQTMR see raw pulses from X4 or scaled pulses? Thanks


  • HOST_franji1 (HOST Engineering)

    FREQTMR is the software NON-high speed I/O version using normal I/O. It is NOT meant for usage with the HSIO functions in the BRX PLC High Speed Inputs.

     

    So you can use it on an input module X29 that has "slow" enough transitions to utilize a FREQTMR instruction.

     

    You should NOT use it on actual high speed inputs - that's what the High Speed Input HARDWARE Frequency Timer in BRX is for.

     

    FREQTMR is a SOFTWARE implementation for general I/O (for 205 I/O, or Terminator, or even your Simulator, along with non-high speed BRX inputs). Think 100 Hz or 20 Hz.

     

    High Speed Input Function Frequency Timer is for the 1 MHz hardware timing on BRX.

    Expand Post
    Selected as Best
  • HOST_franji1 (HOST Engineering)

    FREQTMR is the software NON-high speed I/O version using normal I/O. It is NOT meant for usage with the HSIO functions in the BRX PLC High Speed Inputs.

     

    So you can use it on an input module X29 that has "slow" enough transitions to utilize a FREQTMR instruction.

     

    You should NOT use it on actual high speed inputs - that's what the High Speed Input HARDWARE Frequency Timer in BRX is for.

     

    FREQTMR is a SOFTWARE implementation for general I/O (for 205 I/O, or Terminator, or even your Simulator, along with non-high speed BRX inputs). Think 100 Hz or 20 Hz.

     

    High Speed Input Function Frequency Timer is for the 1 MHz hardware timing on BRX.

    Expand Post
    Selected as Best
    • Bar (Customer)

      OK. I believe the pulses are slow enough. If I have High Speed Input disabled for X4, could FREQTMR be used then? FREQTMR still seems to work for me on X4 as I am seeing values when using it this way .It doesn't say in the documentation that it is limited in that way or that it will not work on high speed inputs.

       

      The reason why I wanted to use the FREQTMR function is because it could produce a Real value output for frequency (rate) when I was already using the High Speed scaled value for position. It seems to get both, two of the three high speed input functions need to be used, even though only one physical input was in play and its pulses were being measure. Is there a reason why this is limited in this way? Could you not have a $HsCtrTmr2.ScaledValue and $HsCtrTmr2.rate for example without using up an extra function. Alternatively, is there a way to get a position scaled value or a rate scaled value using from .acc in a math instruction in ladder for example. If so, could you share an image of how that is done?

      Thanks Setup BRX High Speed

      Expand Post
  • HOST_franji1 (HOST Engineering)

    If your PLC scan is faster than the rate of change of X4, you don't need to use HSIO at all. But I doubt that's the situation. You need to use HSIO functions.

     

    Without burning a 2nd resource, could you just scale your HS Counter to Rate, then in Ladder use the SCALE instruction on the $HsCtrTmr1.Acc value with REAL engineering limits to an R?

     

    The Rate ends up being the REAL member $HsCtrTmr1.ScaledValue, and your engineering unit counts is in the SCALE instruction R Output.

    Expand Post
    • Bar (Customer)

      So the Scale command, using $HsCtrTmr1, is not dependent on the scan time like the FREQTMR is? Thanks

      • HOST_franji1 (HOST Engineering)

        Most of the ladder instructions are bound by the ladder scan time. All high speed image register (memory) values are also "bound" by the ladder scan. The HARDWARE registers are updated properly, inside its OWN co-processor. That co-processor can perform various HARDWARE level I/O functions INTRA PLC scan - but image register values are always bound by "PLC scan" resolution in that image register values are only processed once per scan (the memory is NOT updated INTRA scan - only the the internal HSIO HARDWARE registers and functions are done INTRA scan).

         

        If you are looking to "integrate", the count value itself is the "integration". If you are just needing values to report, or where PLC scan latency is acceptable (1-5ms for example) the SCALE, FREQTMR, et. al. are "good enough"

         

        However, if you need to turn on a high speed discrete Y output whenever the accumulator reaches specific values (INTRA scan), this is where HSIO functions like Interrupt Triggers (fire ISR based on combinations of high speed discrete input events or fire ISR based on high speed c/t match registers) or Table Driven Outputs (based on c/t inputs or pulse output counts) to trigger high speed operations.

         

        The High Speed ladder instructions are primarily used for telling the HSIO processor what to do. The instructions themselves are not "high speed". AXVEL, AXPOS, TDOPLS etc. just are interfaces to the HSIO co-processor.

         

        What are you needing to do with your application? Rather than get bogged down in FREQTMR vs. SCALE, what does your application need to do with this high speed input tied to X4?

        Expand Post
      • Bar (Customer)

        The Input is from a flow meter sending 5V pulses. <40 Pulses per second. I have decided to implement your SCALE instruction option and configuring the High Speed Input for rate.

        Thanks for your help!

  • K Price (Customer)

    You're using the BX-HSIOx module and have (1) high-speed pulse signal input to the module, and it is configured to represent position, and you also want the rate of these pulses, correct? Is the pulse generator device a quad encoder? If so, you could connect the second encoder output (B) to another HSIO module input, and configure that input for Rate, while the 1st input is configured for Position. If not, could a quad encoder, or a second pulse generator be installed? Another possibility is to use the INTEGRAT instruction using the HSIO count for the INTEGRAT input, and adjust the INTEGRAT Sample Time to meet your accuracy/ resolution requirements. As another possibility, could you connect the pulse generator output to (2) HSIO module inputs? One input would be configured for Position, one for Rate, but the ratings must be checked as this will double the mA requirements of your pulse generator.

    Expand Post