Analog input program

sprintsrule

Member
Join Date
Dec 2012
Location
Sparta, MI
Posts
5
Help with a program setup. I am using a micrologix 1400 and inputting a 0-10VDC analog signal. My application is a part width measurement. The rectangular part is anywhere's from 10" to 24" long which passes thru width measuring sensors. The upper and lower limits set for the part width are 1.90 and 1.60. The part can float within these ranges and still pass inspection. However, the part can not exceed .060 differential from the highest to lowest measurement from end to end. This is where I get lost on setting up a program to reject the part even though its within the set limits and perhaps outside the .060 tolerance.

Thanks
 
You didn't say so I'll have to assume the analog signal represents the width.

At the start of a part set two registers. Set 'Widest' to zero. Set 'Narrowest' to the largest possible number (eg 32767.)

At each measurement:
If measurement < 'Narrowest' set 'Narrowest' = measurement
If measurement > 'Widest' set 'Widest' = measurement.

At the end of the item:

If 'Widest' > 1.90 then fail
If 'Narrowest' < 1.60 then fail
Compute 'Delta' = 'Widest' - 'Narrowest'
If 'Delta' > .060 then fail
 
Last edited:
Can we assume you are also using the analog width sensor to detect the presence of the part?

I would add a little more to Bernie's method. You want a slight delay before you really start reading values. What I mean by this is when your sensor first detects the part your going to transition from practically 0 to whatever the width is. You might see a number in that transition that is anamolous because the edge won't be square (both physically and also the analog signal will have a slope to it during the transition). This will also happen at the off transition as well.

So make a separate comparator that has to see both a minimum width signal and only enables the code Bernie outlines after a short time (say 20ms or so).

The off transition will be a little more tricky. I would be tempted to also have a "look ahead" and "delay" where the code registering the max and min is looking at data from a few scans ago. That way once you detect you have "fallen off the cliff" in real time you can blind out the Min/Max detection immediately prior to it seeing the values that occurred at the transition.
 

Similar Topics

Hi, guys How to make program for analog input S7 300 for sonar bero application? Thanks a lot in advance
Replies
1
Views
5,074
Hi there, I am in the process of converting Nais PLC to AB Micrologic 1500 by writing a new ladder from old program (Nais PLC)using SLC500 ladder...
Replies
5
Views
7,570
I am new in PLC Programming. We have AB SLC 5/03 and RSLogix500 program. We have a new analog equipment that would be connected to Input Analog...
Replies
2
Views
4,937
If any body could help me. 1) I have a load cell with 2mv/v output and 10-15vdc as power supply. How do I calibrate for 0-1000kgs.(for both...
Replies
7
Views
14,021
If any body could help me. 1) I have a load cell with 2mv/v output and 10-15vdc as power supply. How do I calibrate for 0-1000kgs.(for both...
Replies
1
Views
8,561
E-OSULL
E
Back
Top Bottom