Jump to content

Linearizing Analog Input


NewtoUni

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

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

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

https://myzone-kza3sadj.netdna-ssl.com/wp-content/uploads/2015/12/UIS-WCB1-SPEC-9-151.pdf

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.

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

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

image.png

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

 

Link to comment
Share on other sites

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

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