No announcement yet.

12 bit resolution

  • Filter
  • Time
  • Show
Clear All
new posts

  • 12 bit resolution

    Hello all,

    Say I have a 12 bit analog output from a scale and I want to place in PLC memory the calculated value of the scale and output to a display; but only in 5 lb increments. I want to reduce flashing at the display. Anyone have and idea?


  • #2
    you can use an ANSCL(B) I-Box to scale the value coming into the PLC

    you can filter the value to reduce 'flashing'

    you can use comparative contacts to increment the display by 5's


    • #3
      For completeness, lets keep the TrueWeight around in V2000 and put RoundedWeight in V2010. V2010 will be this 5 pound resolution value.

      I am going to assume BCD, and do rounding (so 2 pounds shows up as 0, 3 pounds show up as 5).

      LD TrueWeight
      MUL K10 // x10 for rounding
      ADDD K25 // add 2.5
      DIV K50
      MUL K5
      OUT RoundedWeight

      If you did not want to round 3 up to 5, but just truncate (0-4 is 0), that would be

      LD TrueWeight
      DIV K5
      MUL K5
      OUT RoundedWeight

      If it's binary, your constants need to be in HEXADECIMAL (KA for K10, K19 for K25, K32 for K50; K5 is still K5), then use MULB, ADDB, DIVB
      There are 10 kinds of people in this world, those who know binary, and those who do not.