Jump to content

Help with anaolog inputs and linearization


Recommended Posts

Hello,

 

I'm new to programming PLCs. I am working on a project involving the programming of PLCs. There is an existing program which I have to understand. I don't understand the use of the linearization function using the system integers SI 80-84. I have an input with input range of 0-10V. I'm using a M91- 2- UA2 PLC which has a 14 bit ADC. So any input I suppose, would be converted to an internal register value of 0-16383. But the linearisation function uses the following:

 

SI 80= 0 (x1)

SI 81= 7344 (x2)

SI 82= 0 (y1)

SI 83= 4800 (y2)

SI 84= x

SI 85= y

 

I want to know what will happen when this linearization function will be activated. 

Link to comment
Share on other sites

Hello Pani.

Basically linearization is using the following formula: Y=(Y2-Y1)/(X2-X1)*(X-X1)+Y1

The values Y1,Y2 - define the engineering units limits of the specific device (for example, a temperature sensor measuring 0-100 deg C).

The values X1,X2 - define the limits of the measured signal (0-1023 in 10 bit resolution, 0-16383 in 14 bit resolution).

 

the specific values you mentioned doesn't correspond to the normal ADC resolutions, however mathematically they should still work. For your application you should assign 0 to X1 and 16383 to X2

Link to comment
Share on other sites

Hello Eyal,

 

Thank you for the information. So if I set the limits as I have specified earlier, and the reading is a value beyond the range(higher than 7344 in this case), then what happens?

Also this means that the 10V input would correspond to 7344 in the input range and 4800 in the output range is it?

Link to comment
Share on other sites

Hello Eyal,

 

Thank you for the information. So if I set the limits as I have specified earlier, and the reading is a value beyond the range(higher than 7344 in this case), then what happens?

Also this means that the 10V input would correspond to 7344 in the input range and 4800 in the output range is it?

10V input will always correspond to the value the is defined in the device's ADC - hence 16383 in 14 bit resolution. The linearization function only "translates" this value to engineering units.

And as Joe said - the value you mentioned (7344) is wrong . The only thing you will get is a meaningless equation.

Link to comment
Share on other sites

So if I linearize the input to a range say 0-5000 and store it in a register and then link the register to a display screen, what value will be displayed on the PLC screen?
Another doubt I had was: If I enter a value through a keypad entry and store it in a register, what integer will the register store?

I am also attaching the program which I have to study. In this you can see that it takes in voltage and current feedback and linearizes them to different ranges. Further mathematical calculations and comparisons are performed using the converted(or linearized) feedback and the set voltages(keypad entered). I don't understand how both can be compared directly. Please help me.

 

 

4455FINAL.U90

Link to comment
Share on other sites

So if I linearize the input to a range say 0-5000 and store it in a register and then link the register to a display screen, what value will be displayed on the PLC screen?

The value presented will be according to the linearization function (the equation i posted in the beginning of this thread).

Another doubt I had was: If I enter a value through a keypad entry and store it in a register, what integer will the register store?

The value entered via keypad entry will be the one stored to the register.

I am also attaching the program which I have to study. In this you can see that it takes in voltage and current feedback and linearizes them to different ranges. Further mathematical calculations and comparisons are performed using the converted(or linearized) feedback and the set voltages(keypad entered). I don't understand how both can be compared directly. Please help me.

The application attached does not make sense in terms of signal linearization. Contacting the programmer or getting an instructions manual will be the most effective solution.

 

 

attachicon.gif4455FINAL.U90

Link to comment
Share on other sites

You are saying the value entered in the keypad will be the one stored to the register. What if I enter a decimal value?

And about the display on the screen, if there is a number in the range I mentioned say 3467, and I attach it to a display where I need to display voltage, the voltage shown will be 3467 with xxxxx number formatting and 34.67 with xxx.xx number formatting. Am I correct?

Link to comment
Share on other sites

You are saying the value entered in the keypad will be the one stored to the register. What if I enter a decimal value?

And about the display on the screen, if there is a number in the range I mentioned say 3467, and I attach it to a display where I need to display voltage, the voltage shown will be 3467 with xxxxx number formatting and 34.67 with xxx.xx number formatting. Am I correct?

The actual value in the registers will always be integer. Jazz and M90/91 PLC's does not support floating point operands. When you are selecting a different formatting you only change how the register values are being presented on screen.

Link to comment
Share on other sites

Thank you for the information. 
I have another analog input (A0 in the program) which says 'Analog Input mV'. What is the range of this input?What integer will be stored in a register if the input is say 40mV or 60mV?

Is the actual range of the PLC  (-8192)-(8191) with 1 bit used for sign?

When an analog output is to be given, say I move 2400 into a MI and link it to Analog Output 0-10V, what output in voltage will I get? 

Link to comment
Share on other sites

Thank you for the information. 

I have another analog input (A0 in the program) which says 'Analog Input mV'. What is the range of this input?What integer will be stored in a register if the input is say 40mV or 60mV?

Analog Input mV is a feature that measure voltage between -5 to 56 mV. This functionality is model depended. As for the other inputs, this also is 0-16383.

Is the actual range of the PLC  (-8192)-(8191) with 1 bit used for sign?

No

When an analog output is to be given, say I move 2400 into a MI and link it to Analog Output 0-10V, what output in voltage will I get? 

If the resolution is 14 bit, then the calculation for 0-10 V will be 2400/16383*10=1.465V

Link to comment
Share on other sites

If I give an input range like I mentioned earlier(0-7344), and give an input voltage of 7V (analog value 11468 which obviously is beyond the input range), then what happens?

And if the range for every input is fixed to 0-16383 then why am I able to give negative values in the range as well(check in attached program input values for current linearisation)?

Link to comment
Share on other sites

The linearization function is a pure mathematical function that has nothing to do with the ADC. That means that no matter what value you input to it, you will get a result according to the equation from my first reply in this thread, and without any limitations (except for infinite values, or values that the operands cannot handle). 

Regarding the input - If you assigned an MI to the analog input, but did not connect it to a real device, you will still have the ability to change its value.

Link to comment
Share on other sites

For the analog input- Analog Input mV, you mentioned the range to be -5 to 56 mV. Suppose I want to give a negative input which is say -25 or -30 mV, then how do read the correct input in the PLC? What value will be stored in the linked MI for such an input?

Link to comment
Share on other sites

  • MVP 2023

If your input is below -5mV the PLC raw counts will read 0.  The A/D converter on the PLC is not capable of inducing an offset.  You will need some kind of circuit to add voltage to your signal to get it to what the PLC can recognize.  I would run the mV signal into a converter capable of handling it and boost it up to 0-10V or 4/20 mA.

 

Joe T.

Link to comment
Share on other sites

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