NewtoUni Posted August 17, 2017 Report Share Posted August 17, 2017 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 More sharing options...
MVP 2023 Ausman Posted August 17, 2017 MVP 2023 Report Share Posted August 17, 2017 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 More sharing options...
NewtoUni Posted August 21, 2017 Author Report Share Posted August 21, 2017 Thanks Aus. The module I am using is the UIS-WCB1. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted August 22, 2017 MVP 2023 Report Share Posted August 22, 2017 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 More sharing options...
NewtoUni Posted August 22, 2017 Author Report Share Posted August 22, 2017 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 More sharing options...
MVP 2023 Joe Tauser Posted August 23, 2017 MVP 2023 Report Share Posted August 23, 2017 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. Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted September 20, 2017 MVP 2014 Report Share Posted September 20, 2017 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). Link to comment Share on other sites More sharing options...
NewtoUni Posted September 28, 2017 Author Report Share Posted September 28, 2017 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. 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