Jump to content

Recommended Posts



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

  • 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.


Link to comment
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?


Link to comment
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!



Link to comment
Share on other sites

  • 3 weeks later...

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...