kikitron Posted November 21, 2017 Report Share Posted November 21, 2017 Hi to all, I have one question. I made simple program linearization for analog input 4-20mA to read pressure sensor 0-250bar. I can read pressure from display without a problem. Now I would like to add if pressure is 180bar or higher it has to activate digital output O 0. I add this function but its not working. Did I use wrong function? Analog_input_test_4-20mA.U90 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted November 21, 2017 MVP 2021 Report Share Posted November 21, 2017 You used the compare function correctly. But this is not your program. There is no linearization in it. Joe T. Quote Link to comment Share on other sites More sharing options...
Kikis Posted November 21, 2017 Report Share Posted November 21, 2017 Hi kikitron, You used linearization for display. The linearized value created in this way is used only for display purposes and cannot be used for ladder operations. You have to use SI 80 - 85 to set the (x,y) range and energize SB 80 to activate the linearization function in ladder. Or simply leave it as it is and use non-linearized value for the compare function (#794 instead of #180). Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted November 21, 2017 MVP 2021 Report Share Posted November 21, 2017 4 hours ago, Kikis said: You used linearization for display. I didn't even look at the display - I can't remember the last time I used that feature. I find it's not very useful for this very reason. Good catch. Joe T. Quote Link to comment Share on other sites More sharing options...
kikitron Posted November 22, 2017 Author Report Share Posted November 22, 2017 Thanke you for your answers. Yes I used linearization only for display. #794 is perfect, so I just calculate pressure bettwen 205 and 1023, perfect But I didnt remember to write linearization with program and I will try to write it to. Quote Link to comment Share on other sites More sharing options...
kikitron Posted November 22, 2017 Author Report Share Posted November 22, 2017 Now I wrote linearization with program and its working perfect Now I have second question: What happens if I use 2 or more analog inputs (sensors) and I can write linearizaion program only for the one. Because if I use for first sensor SI 80 - 85 to set the (x,y), what SI xx can I use for secon one or third ... ? Analog_input_test_4-20mA_ladder.U90 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted November 22, 2017 MVP 2021 Report Share Posted November 22, 2017 Move the scaled temperature out of the system integers and then repeat your logic for the next input. The system integers can be called as often as you like during a scan. Your application will use them as buffers, not final results. Joe T. Quote Link to comment Share on other sites More sharing options...
MVP 2021 Ausman Posted November 22, 2017 MVP 2021 Report Share Posted November 22, 2017 Joe's answer is correct, but I well remember the first time I encountered this quirk of the program. It is initially confusing that you are using the same things repeatedly for a different result, all in the same scan....but that's the way it works. cheers, Aus Quote Link to comment Share on other sites More sharing options...
Kikis Posted November 23, 2017 Report Share Posted November 23, 2017 Hi kikitron, There is also an example for linearization of 2 inputs in sample projects included within U90 ladder. Quote Link to comment Share on other sites More sharing options...
Robert Mramor s.p. Posted April 13, 2018 Report Share Posted April 13, 2018 I have simple solution for your problem. Look atachment Modificiran analog.U90 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.