Reading a +/- 10V input from an LVDT

sheperd9

Member
Join Date
Jun 2013
Location
Ohio
Posts
13
Hello, I am using a 1769 L32E CompactLogix to basicly read the output of three LVDTs to find the diameter of a circle. I am still very new (~2 weeks) into learning about plcs so I am still pretty confused. So far I have just been reading a ton of manuals to get myself acquainted with the hard/software. What I am wondering is how I should get the reading from the LVDT. Just one measurement? Take a reading over time and average it? I'll be using Marposs LVDTs along side with this http://www.marposs.com/product.php/eng/transducer_conditioning_interface
signal conditioner.

This is also a real early mock up of the code I'll be using.
Code:
[COLOR=black][FONT=Courier New]AB := SQRT(rA**2 + rB**2 - 2*rA*rB*cos(120));[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]AC := SQRT(rA**2 + rC**2 - 2*rA*rc*cos(120));[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]BC := SQRT(rB**2 + rC**2 - 2*rB*rc*cos(120));[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]D := (2*AB*AC*BC)/SQRT(3*AB*AC*BC);[/FONT][/COLOR]
rA,rB, and rC are the readings after converting to engineering units.
Any information would be greatly appreciated,
Thanks.
 
Two suggestion for you:

1) The COS function is CPU intensive. Use a constant for COS(120) instead of wasting processing time computing it every time.

2) Exponential functions are also CPU intensive. rA*rA will execute much faster than rA**2.
 
Ha probably stick with the 866025, all the calculations only have to be accurate up to 4 decimal places anyway. And thanks, I kind of just recently got all of this plc knowledge dumped on me.
 
You would get more help if you provided more info.
From the formulas I can deduce that the sensors are space 120 degree apart. It also looks like you are attempting to compensate that the middle of the object you are trying to measure is not in the middle of the three LVDTs but it looks like rA is measuring the radius anyway. Are your LVDTs in the middle of the circle or the out side?
Do they pivot at all or are they fixed pointing at the center or away from the center?
Where did you get the formulas?
Why so complex?
 
rA/rB/rC the radius measured after the LVDT reading has been calibrated. The LVDTs are on the inside of the circle and placed 120 degrees apart (kind of like a peace sign). AB BC and AC are the sides of the triangle that is encompassed by the circle, these are found with the law of cosins, and D is the circum diameter of the triangle calculated before. Why so complex? I didn't design the machine, I just have to program it ha
 
The formula for D doesn't look right.

If two sides are almost the same length and one side is infinitely small, the denominator in your formula will be very small because all the terms are simply multiplied together. This will result in a diameter that is very big due to dividing by a small denominator when the diameter should be just a little bigger than the biggest of the two longer sides. Draw picture. I would check your formula for D.
 
I realized that the infinitely small side will make the numerator small too so the calculated diameter may not be as wildly off as I first suspected but the formula still doesn't look right. If I break the formula into a series of ratios that are multiplied by each other then you get:

Code:
 D=(2/sqrt(3))*(AB/sqrt(AB))*(BC/sqrt(BC))*(AC/sqrt(AC))
is the same as
Code:
D := (2*AB*AC*BC)/SQRT(3*AB*AC*BC);
I just rearrange the fractions a bit.

Since x/sqrt(x)=sqrt(x)
Code:
D = (2/sqrt(3))*sqrt(AB)*sqrt(BC)*sqrt(AC)
Now if AC is infinitely small then D will be infinitely small and this can't be right since the diameter must be about the same length as the larger of AB or BC.
 
I was looking back at the formulas, and yes, they weren’t right. I did some quick, bad, math on the circiumradius of a scalene triangle equation to simplify it, but I accidently screwed up the algebra. The new equations should be something like this

Code:
[COLOR=black][FONT=Courier New]AB := SQRT(rA*rA + rB*rB - 2*rA*rB* -.5);[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]AC := SQRT(rA*rA + rC*rC - 2*rA*rc* -.5);[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]BC := SQRT(rB*rB + rC*rC - 2*rB*rc* -.[/FONT][/COLOR][COLOR=black][FONT=Courier New]5[/FONT][/COLOR][COLOR=black][FONT=Courier New]);[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]D := (2*AB*AC*BC)/SQRT((AB+AC+BC)*(-AB+AC+BC)*(AB-AC+BC)*(AB+AV-BC));[/FONT][/COLOR]

And this machine isn't for measuring a bunch of different circles, just one part, so rA, rB, and rC will be very very close in length everytime.
 
Last edited:

Similar Topics

Hi all, As stated in the title, I have a 1756-IF16 module that was previously only running 4-20mA current inputs. I am now adding in 3 0-10V...
Replies
1
Views
1,423
Hey guys, first time posting here. I am having trouble reading a 0-10V input into the MAD42 module on the Omron PLC. I have already switched the...
Replies
3
Views
2,291
I have connected a sensor which gives 0 to 10V to a DVP 20EX PLC's analog input. According to the manual of the PLC, its ch0 analog input is at...
Replies
0
Views
2,916
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
205
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
147
Back
Top Bottom