PeterFukt Posted December 15, 2016 Report Share Posted December 15, 2016 Hi, I'm using a temperature sensor with 0-10V input and a Samba SM35-J-TA-22. When the input rise above 18 degrees, I want the analog output to start from 0 % and at 20 degrees and above it should be 100 %. How can I make this happen? I have one linearization block to convert 0-10V to 0-50 degrees and tried with another for the function described but did not get it work. Does anyone have an idea how to do this? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted December 16, 2016 MVP 2023 Report Share Posted December 16, 2016 First, what does 0-10V represent on your sensor? 0-50 degrees? That should be part of the sensor spec, not something you arbitrarily assign. Two degrees is not much of a span for a 0-100% output, but it's your system and you can do what you want. Once you have an accurate representation of your temperature you're going to have to use some compare blocks to manually manipulate a linearization block to create your 0-100 value. Take a whack at it and post your code. Joe T. Link to comment Share on other sites More sharing options...
PeterFukt Posted December 16, 2016 Author Report Share Posted December 16, 2016 Yes, the sensor is 0-50ºC. One AO will control a cooling valve and one AO will control a heating valve. Set point is 18ºC deg. The cooling valve will be 0% below 18,1ºC and 100 % above 20ºC. Heating valve will be 0 % above 17,9ºC and 100 % below 16ºC. Link to comment Share on other sites More sharing options...
PeterFukt Posted December 16, 2016 Author Report Share Posted December 16, 2016 It works pretty good, but the output overshoot the limit. Y1 is 4095, Y2 is 0, X1 is MI91 (170) and X2 is MI87 (179). It works fine above X value 170, but when it gets lower, Y output gets above 4095 which should be equal to 10 V output. MI20 reach above 32000 before it turns to -32000. Any idea how to make the output stop at 4095 or am I thinking wrong? I thought I could use linearization blocks instead of PID for the two outputs but maybe that is a bad idea? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted December 17, 2016 MVP 2023 Report Share Posted December 17, 2016 Use two compare blocks in series or a within range block to only activate the linearization block when it is in your range. If below the range, store 0 to the analog output. If above the range, store 4095 to it. Joe T. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted December 17, 2016 MVP 2023 Report Share Posted December 17, 2016 Ahhh, the old Linz Min Max issue. I raised it a while ago and haven't seen anything yet. I also do it differently to Joe's method. I always have the Linz working, and do a compare on it's result. eg If the Linz result MI1 is lower than MI2, store MI2 into MI1. Same for the Max. This obviously goes after the Linz in the ladder. This method lets me easily change the min/max for fine tuning of controls/valves etc, in that I can change values online and then write them into the power up value once optimised. I would still love easily adjusted min/max to be part of the Linz in the first place! cheers, Aus Link to comment Share on other sites More sharing options...
PeterFukt Posted January 4, 2017 Author Report Share Posted January 4, 2017 IT would be nice if there could be a min max feature to the linz block in the future. I solved it using some compare blocks to store 0 or 100 % to the output when out of range. It seems like it works. 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