Chavak

Scale Encoder Reading to 0 to 359

7 posts in this topic

Hi,

 

I am reading from a 10 bit gray encoder using normal input card and convert it in a CJ2M PLC using GRAY_BIN

Now I need to scale the value  which reads 0 to 1023 to a range of 0 to 359. I couldn't figure out how should I go about this. Please help

 

Thank You

Best Regards

_____________

Share this post


Link to post
Share on other sites

In the encoder?

Share this post


Link to post
Share on other sites
4 hours ago, BobB said:

In the encoder?

No, I guess no option for that. I'm using an Elcis encoder.

I was trying to do it in CX-Programmer.

 

Regards

________

Share this post


Link to post
Share on other sites

MrPLC_Scale_Encoder.thumb.jpg.bdc2982881

Annotation number 2 should read, "Scale the REAL Encoder value..."

Edited by IO_Rack
1 person likes this

Share this post


Link to post
Share on other sites

OK - it is just that the last encoders I used were scaleable in the encoder - made it easy.

Share this post


Link to post
Share on other sites

Thankyou IO_Rack and Bob.

Your solution works just fine. Never thought a simple plain division can solve this.:-)

 

Thank You

Best Regards

_____________

Share this post


Link to post
Share on other sites

You're welcome. In this case it is fairly easy because the minimum value for Input and Output are both Zero. If you need to do more complex scaling then you may choose to use a custom Function Block. There are a couple of them in the Downloads section of this forum.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now