Sign in to follow this  
Followers 0
andreik

Scaling Problem, help!

6 posts in this topic

Good day, I've used scaling countless of times before but up to only +4000. Now, I'll have to scale from +0 to +46900. Is there any scaling instructions to handle this? Thanks, Andrei K.

Share this post


Link to post
Share on other sites
SCL convert 16 bits unsigned (0 to 65535) to 16 bits BCD

Share this post


Link to post
Share on other sites
I think you use 12bits BCD unsigned, you need use 16bits unsiged . Edited by kunshan

Share this post


Link to post
Share on other sites
One of our moderators, PMCR, helped me with this. Hope it helps Float scaling.cxp Edited by bluebyu

Share this post


Link to post
Share on other sites
I like to do this kind of thing using a Structured text Function block. It looks like you have some great working code, here is another way you might do it: Real Conversion and Scale FB.cxp This is not exactly your example, I wrote this a while back as an example for someone else, but it might give you some ideas of other ways to do this in the future. It scales an analog signal (ranging either from 0-4000 or 0-8000) to a range that is entered as an input into the function block. Good luck!

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
Sign in to follow this  
Followers 0