Recommended Posts

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?

Share on other sites

• MVP 2023

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.

Share on other sites

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.

Share on other sites

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?

Share on other sites

• MVP 2023

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.

Share on other sites

• MVP 2023

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

Share on other sites

• 3 weeks later...

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.

Create an account

Register a new account

×