Sign in to follow this  
Followers 0
waterboy

Indirect Square root? Help?

31 posts in this topic

There is no need for a curve fit. We already discussed the formula. Use a SQR instruction. use floating point because the values will be from 0 to 1. SQR F8:0 F8:1 (substitute in your own floating point addresses) Don't forget to scale the input to be a Float point that ranges 0-1 (0-100%) DIV input inrange (substitute in your own addresses) and when you get the Square root result F8:1, scale(multiply) it by the flow range. MUL F8:1 outrange (substitute in your own addresses) **one other option is to set up the transmitter to squareroot it's output. Then you would not need any math in the PLC except to scale it.

Share this post


Link to post
Share on other sites
That is what my boss told me too, set the transmitter to squareroot its output. And he also just showed me an old signal isolator which apparently does a similar function "back in the day". I'm just not getting my mind around it, All I have ever had to do prior to this discovery is to take the 0-4096 counts from the analog module,multiply by a scaling factor and then display it. Works fine for a level transmitter. But this has taken an interesting turn. I'll do some experiments with your instructions and the tranmitter and start another thread if I have more intelligent questions. I am getting the "You should have this figured out by now" vibe. It's probably justified. Thanks again Edited by waterboy

Share this post


Link to post
Share on other sites
fitting curves takes into account scaling as well (or can be used for scaling alone for that matter). nice thing about it is that you get alternatives. most PLCs do have more than basic math instructions but this is not always the case and PLC is not the only controler ever used either. i don't want to do your work, i'm just trying to point you in the right direction (universal solution). i was tryng to show you this so you can get through any situation, not just your current project which is extremly simple, formulas are known etc. sometimes one function is represented or approximated by different function (this can be very handy if your controller does not have some particular instruction built in). not all devices will have output that follow simple mathematical function (linar or square root). consider this. so far you struggled with basics (just a linear conversion and root function). i'm not sure you will be able to find coefficients for inverse function to do your application. curveexpert does it for you (yes it has square and square root functions as well, it has bunch of others and it can make recommendations which fit to use) so you will not have to come up with difficult answers if your boss or customer start asking quastions. it's just a tool, not more not less. you can laugh at if you can do better job by hand or praise it if it saves you time and headacke... good luck

Share this post


Link to post
Share on other sites
I get what you are saying ; Teach me to fish and feed myself. I appreciate all the help and I will be looking at it till I get it.

Share this post


Link to post
Share on other sites
The easiest solution is to configure the transmitter for square root output and then all you have to do is scale the analog input. The value will be linear to flow (not pressure)

Share this post


Link to post
Share on other sites
That would indeed solve it, and is what will happen, but I still will have to feed the neurons on this subject. Can't have the machine do all the work!

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