Announcement

Collapse
No announcement yet.

Smoothing out analog

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Smoothing out analog

    Hello,

    I am using a P1000 CPU (P1-540) with a P1-04DAL-2 and a P1-04ADL-2, trying to just do a move from the analog input (pot) to a 0-10vdc output (meter), so nothing special take the input and put it in the output.

    I tried doing a "data transfer" now I am trying to scale them and it looks better but only if I turn the pot slow... not much luck getting them to do the transfer smooth, if I turn the pot to fast or just faster than a normal speed there is like a delay and the meter will jump from a position to another, like there is some sort of delay.

    I have put a meter on the input and see a smooth input voltage but the output is jumpy

    Is there a scaling rate/hz on these? I dont see much as far as the configuration

    Thank you
    Mark


  • #2
    Sorry I don't have any analog around to check this, but you can try using the SCL (Linear Scale instruction). It may be because the resolution between the 2 modules are different. One is 0-8091 and the other is 0-4095. Try using the scale and use the analog input as the input and a min of 0 and max of 8191 and the analog output as the output with a min of 0 and a max of 4095.
    If that does not work hen use 2 SCL instructions. One to scale the input (0-8191) to 0-100 and the other to scale 0-100 to the output (0-4095). I think the first way should work.

    Comment



    • #3
      Thank you... I did try the SLC and guessing I had it set to 8000 and 4200 and its better than the data transfer but still a little choppy, I will try your 8091 and 4095 to see if it gets better

      I also think I will give the 2 SLC's a try and let you know if it gets better

      Thanks again!
      Mark

      Comment



      • #4
        Only other thing I could think to try is a RMP instruction in conjunction with the scale. So do the scale to an internal tag (same 32 bit data as the analogs) then use that tag as the input of the RMP instruction and the output would be the analog output tag.
        You can then control the acce/decel time.

        Comment



        • #5
          Thank you, I will look into that one also... have a great weekend!

          Comment



          • #6
            Thank you Techme... the ramp worked perfect! I think I will need to do a little reading and have a scale and ramp and it should be spot on!

            Thanks again!

            Comment



            • #7
              The "Average" instruction will do exactly what you are trying to do.

              Comment



              • #8
                True you can use the AVG also, but you still need to scale. Otherwise you have 10 (4095 int value) volts out with 5 (4095 int value) volts in.

                Comment



                • #9
                  Something like this should also work:

                  Click image for larger version

Name:	Analog.png
Views:	70
Size:	117.2 KB
ID:	121875



                  Play with the times in the average instructions until the desired behavior is reached. You may want to go a bit faster time on the first average instruction, and a bit more time on the second one

                  Comment

                  Working...
                  X