Greengen Posted December 12, 2018 Report Share Posted December 12, 2018 Hi I am fairly new to programming but have a reasonable understanding but am really struggling to scale an analog output. I have an input coming in from a pressure sensor into my 10 bit unit so range from 204 to 1023 and I am wanting to feed this signal out of an existing analog output to input into another analog input card that is 16 bit. Is there a straightforward calculation that can transfer the scale? Any help much appreciated Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted December 12, 2018 MVP 2023 Report Share Posted December 12, 2018 Hi Green, I think what you are wanting is under Math/Linearization. If you want to see how it works, have a look at my calculator here: Be aware, though, that you are sort of working backwards going from 10 bit to 16. You are always going to have number jumps, that is the only way the maths can work. cheers, Aus Link to comment Share on other sites More sharing options...
Greengen Posted December 14, 2018 Author Report Share Posted December 14, 2018 Thanks Aus I will have a look and see if I can work it out 👍 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted December 14, 2018 MVP 2023 Report Share Posted December 14, 2018 Ausman has provided a general purpose solution, but this is really extremely simple. A linearization FB with the 10-bit range going to the 16-bit range is all you need here, unless I'm misunderstanding something. But, as Ausman says, the output will be quite jumpy. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted December 14, 2018 MVP 2023 Report Share Posted December 14, 2018 Flex has shown the actual numbers involved in the Linz as suggested. There is also another approach to your issue that would give you better resolution at the 16 bit side, depending on whether the pressure sensor is true analogue. Change the way you are hooking things up and use a "4-20ma/0-10V/whatever it is working with" splitter to effectively turn your output from the sensor into 2 outputs that can go directly into both plcs' inputs. Any net search will bring up myriad devices available to do this. cheers, Aus Link to comment Share on other sites More sharing options...
Greengen Posted December 15, 2018 Author Report Share Posted December 15, 2018 Thanks everyone I think I like the idea of the splitter so will look for one. Thanks a million Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now