Lixoudis

Proble with Scale Function in CP1L

6 posts in this topic

I have a problem trying to scale a floating number coming from an HMI to a value to use on PID instructions.My problem is on the scaling instruction.Whenever i try to run on cx simulator it gives me an error

My setup of the scale parameters are (using SCL3(487))

D616 #0000

D617 &350

D618 #FFFF

D619 #FFFF

D620 #0000

My ladder to use the float number is:

*F(456) Value +10,0 D2120

FIX(450) D2120 D2062

SCL3(487) D2062 D616 D2072

The error that throws is 0x80F0

Thanks in advance for any help

PS Also tried all Scaling instructions.I think my problem is the setup of parameters for scaling instructions

 

Share this post


Link to post
Share on other sites

Use the APR instruction. Much easier and far more flexible to use for Floating Point scaling.

Share this post


Link to post
Share on other sites

So if I had to use the APR instruction to try to scale &0-&350 to #0- #FFFF how would I have to write down the instruction because I read the manual and I can't understand what must be the control word.

 

Edited by Lixoudis

Share this post


Link to post
Share on other sites

Thanks very much for your time the example you gave me work perfectly for my situation. Thanks again

 

Share this post


Link to post
Share on other sites
7 hours ago, Lixoudis said:

Thanks very much for your time the example you gave me work perfectly for my situation. Thanks again

 

That's why we are here. To help out. Appreciate your response, many members fail to reply when their problems are resolved.

Take care. :slydog:

1 person likes this

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