Logic Help

rander13

Member
Join Date
Nov 2018
Location
Strasburg VA
Posts
7
All,

I am trying to write the logic to record the diameter of a part as it passes through a line. I have a laser with an analog input to my plc. At the peak measurement that will be my diameter. How can I write the logic to record this value as the part passes through the laser? I was thinking some type of comparison where each new value is compared to the next reading until it starts to go back down. When it is no longer greater than the previous value it moves the previous greatest value as the recorded value. I will be doing this in Siemens S7. I have a lot of experience in Control Logix, but very little Siemens experience. Any tips are greatly appreciated.

KAA
 
Your logic is correct, and would be the same for any PLC, load the input to a Memory word and then compare the input to that word to get the peak value.

For it to actually work you will have to take into account false readings etc. but if you can make it work in AB then it will work in Siemens or any other PLC
 
...
For it to actually work you will have to take into account false readings...PLC

Having done this kind of application, one approach to filtering out false readings (aka "fliers") is to use the median value from small sets of input values. For example, put five consecutive readings in a buffer, sort, take the third one as your process value going into the peak picker. Repeat with the next five, and so on.

You will want to make sure that the buffer is only loaded when a new input arrives from the analog module. The number of buffered values would depend on your analog sample period and the measurement's expected rate of change, among other considerations.
 
I would try to also have a discrete sensor that will pick up the presence of the part being measured. As the part is seen, take the measurement.
This could be offset with a shift register.

Regards,
 

Similar Topics

Working on project will update after it is completed.
Replies
2
Views
352
Can someone help me piece this problem together. I have a lot of it down I think but cannot seem to get it right. Probably an easy one for most on...
Replies
1
Views
301
Hi everyone, I'm working on a project that involves using a Keyence LR-X100 sensor in Studio 5000 V35 ladder logic to determine the object's...
Replies
4
Views
674
Hey. I am new to PLCs and LogixPro. A friend and I have been trying to build this diagram and instructions using LogixPro500. Could anyone help us...
Replies
15
Views
1,272
Hey All, I have a newbie question I'm hoping to get help with. I am developing a controls system for a Loss-in-weight feeding system. The...
Replies
20
Views
3,640
Back
Top Bottom