Sign in to follow this  
Followers 0
BobB

Struggling with SCL2 function

6 posts in this topic

I am struggling with the SCL2 function at the moment. I have an analogue input coming in from a chemical controller (swimming pool) to a CJ1M and 4-20ma supposedly represents Ph between 4.00 and 9.00. SCL2 looks to me to be the right function to use. This is what I have done - the readings on the chemical controller are 7.something but I am getting 2/3.something. Is there something obvious that I have fouled up?

Share this post


Link to post
Share on other sites
Usually i use SCL instruction for this. But i think that with SCL2 it is the same as with SCL for this: You should write the number in BCD for your "y" value. (You convert from binary to BCD) So, if i understand well your screenshot, you should MOV#900 instead of #384 in D504 Edited by pfort

Share this post


Link to post
Share on other sites
Why not use APR, or even a FB, that way you can do everything in Floating Point?

Share this post


Link to post
Share on other sites
APR is one of my favourite functions but not for this. I use APR regularly on fuel tanks - round tank lying on its side, belled ends, just get ma value = litres from the manufacturer in 1ma increments, make up a table and approximate!! Wonderful. Most PLCs do not have the function (I have not used all PLCs of course but have only found it in Omron). By the way, I tried BCD, HEX, BIN all with unexpected results. Thank you for your help. Here is what I will try Edited by BobB

Share this post


Link to post
Share on other sites
Yes i agree, APR is very usefull when you want to replace something like y=ax²+bx+c equation with multi-segments approximation, but keep thing simple with SCL or SCL2 for a "y=mx+b" single segment. Edited by pfort

Share this post


Link to post
Share on other sites
And to think Bob all you had to do was to use my Scale with Paramters function block, you can download it from the download section, heaps simple. Let me know if you need a hand with it.

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