Jump to content

Recommended Posts

Posted

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

_____________


Posted

In the encoder?

Posted
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

________

Posted

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

Posted

Thankyou IO_Rack and Bob.

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

 

Thank You

Best Regards

_____________

Posted

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.

 

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
×
×
  • Create New...