AP (Customer) asked a question.

Encoder with negative values

Hello Everyone,

 

I'm using the following components:

 

Productivity PLC

PS-AMC4

Encoder: TRD-SHR2000VW0D

 

I'm currently getting negative values when reading the values from the encoder. The values are correct, but negative.

 

Also, for some reason I cannot get float numbers from my encoder, just integers. Is there any way to get float number on my encoder?

 

Any help will be appreciated.

 

Thanks


  • OkiePC (Customer)

    That is a quadrature encoder that the PLC will determine the direction based on the phasing between channels A and B. Swap those pairs to get the direction to match your expectation. There might be a programmatic way of doing it too, but in general, swap A with B and A- with B- to reverse the count direction of any quadrature encoder.

     

    EDIT: Now that I look at your picture, ignore this next paragraph. I will have to defer to the folks on here with P-Suite motion experience.

     

    All incremental encoders deliver counts which will always be whole numbers. It is up to the programmer to scale those values into engineering units as required by the application. I have no experience using encoders with that PLC so I will stop with this general answer.

     

    Expand Post
    • AP (Customer)

      Thank you for your help! Lets see if anyone can help me with the Float number matter.

  • PouchesInc (Customer)

    Floats should work fine. I know I never had issues with using them on an HSO or AMC module. Everything looks set up correct, so I would check your tag for the position value as it is likely set to integer and not floating point.

  • OkiePC (Customer)

    Could it simply be the data type chosen for Axis_X_EncoderPosition ? If you picked the (default) 32 bit Integer, that could explain it.

  • AP (Customer)

    Looks like i already had Axis_X_EncoderPosition as a Float. Still, I'm getting whole numbers.

    • Capture4
    • AP (Customer)

      posted a file.
      • Capture5
      • PouchesInc (Customer)

        Encoder Feedback I think is always an integer value. The tag is always in total pulse values, not a scaled user value. So you cant have a part of a pulse, which is why the value is always a whole number. Honestly the feedback feature is nearly useless because of this and because of the work to convert it into scaled units in ladder to match other axis values. It also has no ability to correct for have any sort of closed-loop system. The value is nothing more than a reference.

         

        Your actual axis position tag is correct and saying the floating point value though.

        Expand Post