beginner question - 3 sensors

eXistenZ

Member
Join Date
Feb 2016
Location
Flensburg
Posts
3
I have 3 optical sensors, placed vertically.
My conveyor transports a "box" past these 3 sensors, to measure height, depending on how many of the sensors that see the box (1, 2 or 3)
My question is, how do I limit my program to only trigger once when measurering?
I expect sensor 1 going high, would trigger my program to think the box had a certain height, before sensor 2 could go high, hence give me a wrong height.
 
Apparently the timing of the sensors is not always the same? I would suggest that you add a short time delay from the lowest sensor before you decide what height you actually have and interlock the three sizes so that only the highest sensor seen can be true. (example: lowest size = sensor1 AND NOT sensor2 AND NOT sensor3)
 
It sounds like you’re triggering a process to look at all three sensors by sensor 1 going high. If so then what’s happening is that when sensor 1 goes high the process starts by looking at the status of all of the sensors but 2 and 3 haven’t triggered yet (I’m a little surprised but I’ve seen weirder stuff). I’d look at two ways to deal with it, one, you could add a timer that delays the start of the process a few milliseconds giving the other two sensors time to react or if you can stagger the sensors so that sensors 2 and 3 are in front of sensor 1. Then when sensor 1 triggers the process 2 and 3 are already tripped (assuming the box is that high).
 
When any sensor is triggered set a latch for that sensor. When all sensors are clear for X time use a one-shot (timer done?) to selectively move a unique value for each latch set to a single integer. Arrange these move rungs in scan order low-to-high. Don't forget to reset the latches for the next cycle.
 

Similar Topics

Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
248
So I work for a company that doesn’t allow code change without going through a lot of people. Anyway my question is I have a sensor and when it...
Replies
12
Views
1,793
How do you code it to when you push a button attached to X001, it turns on Y001. Then, the next time you push the button attached to X001 it...
Replies
4
Views
1,611
Hi all, this is my first thread on here, completely new to plc. Have been given a 1769 L24ER QB1B to play with. I have a PA2 power supply and a...
Replies
3
Views
1,795
Hi all, I'm just starting out in the plc world. For school we had some introduction into codesys v3.5, basically we get given visualizations and...
Replies
9
Views
2,395
Back
Top Bottom