## Recommended Posts

I am new to Unitronics and have a simple question on the Linearization block.

I have a 0-10,000 psi transducer that is sending a 4-20ma signal. I assume I input the values as shown below but do not have the transducers yet to verify. If someone could verify it would be greatly appreciated.

X1=0

Y1=4

X2=10000

Y2=20

##### Share on other sites

• MVP 2023

Hi Newt,

What modules are you using for your inputs?  This is relevant as you have to relate numbers to the resolution of the device.  The same rules also apply to outputs.

In case you haven't found it, also check out my calculator at :

Pls let us know and we'll help further.

cheers,

Aus

##### Share on other sites

Thanks Aus. The module I am using is the UIS-WCB1.

##### Share on other sites

• MVP 2023

X is the raw A/D input.  Y is the scaled output.

It's not as simple as assigning 4 and 20 for the input.  The UIS-WCB1 module contains Analog to Digital converters that read the electrical signal and convert it to a number that is passed to the PLC.

The Specification guide is located here:

You'll see under Analog Inputs that the resolution is 14 bits.  This means that at 20 mA the module will return 2^14, or 16384.   4 ma represents 20% of this, or 3277.

So here are the values you need:

X1: 3277

Y1: 0

X2: 16384

Y2: 10000

Joe T.

##### Share on other sites

Thanks Joe,

So if I understand correctly a 12ma signal will be converted to a value of 9830  which would equate to  5,000PSI which would be the result(F) value.

What I am trying to achieve is to turn a motor off when a certain PSI is reached. 4250PSI in this case.

Looking at other videos it looks like I need to use the store function and store the result value(F) into a Global Int16 Tag. I can then use this value and a compare function to enable/disable a bit and in turn, control my motor.

##### Share on other sites

• MVP 2023

Don't linearize into a float unless you really need to.  Change your output to an integer type - in your case the maximum of 10,000 will fit into an INT16.  Then you don't have to do any conversion for the compare function.

Joe T.

##### Share on other sites

• 4 weeks later...
• MVP 2014

With UniStream you don't need to use the linearisation block, the analogue input configuration does it for you.  See details below, this will scale the 4...20mA input to 0...10,000 as an integer value.  There is no need to understand the min/max range of the digital input (or output) word (of course you still need to know if the hardware resolution is high enough to measure the value accurately).  Set up the analogue input hardware config as follows:

The only downside to this is that the scaling is a literal constant - you can't vary it during run-time.

You can still use the X1, X2, Y1, Y2 method and linearisation block if you need the flexibility as it will allow you to use variable tags as your linearisation points.  You might do this if you wanted to do field calibration in the PLC.

BTW, when you first open the properties box above, the "To" field shows the range based on the native resolution of the analogue input (for example 14-bit = 16383).

##### Share on other sites

• 2 weeks later...

Thanks Simon

That makes perfect sense.

I did notice the analog input configuration but left it as is when I was writing the program. I will remove the linearization blocks and set the To value to 10,000.

## Create an account

Register a new account

×