Calculate the length through a barrier sensor

marvis

Member
Join Date
Mar 2016
Location
Italy
Posts
108
Hi everyone,

I have to calculate the length in millimeters of a glass that enters a transport (I don't know the speed yet) through a barrier sensor. How can I do? Is there any specif formula? I need to use Studio 5000.

Thanks in advance.
 
Thanks for the answe, the speed of conveyor is 20m/M. How can I calculate the size of the object?
 
The speed you mentioned is nominal, what about ramp and any deviation? If you want to assume that's not going to be very accurate. It will ball park things. How accurate do you need?
 
Assuming no slippage between the object and the conveyor and constant conveyor speed, the length of the object is equal to the time it blocks the barrier sensor multiplied by the conveyor speed. Proper placement and alignment of the barrier sensor relative to the object are critical to getting an accurate measurement.
 
Last edited:
I don't need much accuracy because I have to calculate the length of a glass that the robot will pick up, so I have the possibility to use offsets. Anyway the ramp is 0.3.
Thanks again.
 
So how can you predict start and stop/ramping? The best you have is assuming full speed or stopped. It's not going to be accurate.
 
My idea is to start a timer in seconds when the sensor barrier is on and to multiple that timer (when I lost the sensor) for 0,3(20m/M to second). Probably is not very accurate but it could works?

I need to know the size in millimetres.

Sorry but it’s my first with this kind of of application
 
I would recommend setting up your system to minimize the amount of stops this conveyor will see, only release upstream if you know there will be enough room for the object to pass all the way through the barrier. Keep in mind that this will still be an estimate without an encoder or an accurate way to measure belt speed. I would also make some sort of error for an invalid measurement, and flag it anytime the conveyor is not "at speed" during the measurement.
The only time it will have a valid measurement is if the beam is only broken while the conveyor is at speed. You should also use a tachometer to measure the belt speed to get a starting point, or you could calibrate your multiplier by sending through a known length of glass.
 
What are the units of the 0,3 ramp? Does the ramp apply to both the beginning and end of the transfer i.e. both to when the sensor comes on and to when it turns off?

@Steve Bailey provided the formula, but even with the ramp that is the easy part.

60s = 1M (assuming M is minutes?)

so

60s/60s = 1M/60s = (1/60)M/s

and since

60s/60s = 1

then

(1/60)M/s = 1

So multiplying the rate, 20m/M, by 1:

20m/M * 1 = 20m/M * (1/60)M/s = (20/60)m/s = (20/60)mm/ms



The fun bit will be measuring the time between the sensor's on and off events. A retentive timer (TONR instruction, e.g. see this link) might work, because it could measure, in ms, the time between its input rung becoming true and becoming false, which is the duration that the sensor detects the glass.
 
thank you very much everyone .. i measured again and i have 19.57 as meters per minute. I thought of something like this, could it work? the ramp is accelerating, therefore at the beginning of the transport and in the second. Thanks again

image.jpg
 
This one is very easy to check, send a part through at an uninterrupted speed. You know the actual length, compare to the calculated length.

I typically use logic scan time for more accurate results. I'm not at my laptop to share code, but basically you know the PLC scan using GSV. You know the speed, converted into seconds, and ultimately scan. Then do the math.
 
I thought of something like this, could it work?


Yes, with a few caveats:

  • I would use [XIO A51_LB XIC A51_GLASS_SIZE_TON.EN] instead of [XIO A51_LB ONS CT_ONS.0] to catch the .ACC value on the scan when the piece is no longer detected by the sensor
    • Or just [XIC A51_GLASS_SIZE_TON.EN] by itself, if you don't mind the calculated value changing as the timer accumulates
    • Or use a TONR instead of a TON, but then it needs an extra step to reset
  • The calculation and length alarm check [... OTE A74_ZALL.2)]alarm could be performed only when [XIO A51_LB] i.e. when the part is not detected by the sensor.
  • The conversion from 19.57m/Minute to m/s is 18.97/60, not 19.57/59.462, unless there are some special clocks in your plant.
 

Similar Topics

Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,124
Good morning, I have a question. I don't know much about ST yet I would like to calculate the average number of products per hour. how do I do...
Replies
22
Views
3,006
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,132
I want to calculate the energy consumed from instantaneous power. Can this be done using the TOT block with timebase set to Hour?
Replies
2
Views
712
I have a pump with ON off status in PLC micrologix 1400 my question is how I can calculate working hours base on ON/off status How I can use the...
Replies
5
Views
2,455
Back
Top Bottom