In this video we’ll review the 2011’s Expert Mode options - these guys in this menu
chart from the user manual.
To enable these, simply drop down into the Expert Mode menu and check ON.
Normally when the sensor detects an object, the output responds immediately.
This On Delay feature allows you delay that response – that way you could use the detection
of the object to trigger an operation that needs to occur after the leading edge of the
object is detected – like marking, adhesive application, stuff like that.
You just dial in how much you want to delay the response – anything from 0 to 10 seconds
– and you’re done!
How about that?
The off delay is the same thing except on the other end – it allows you to trigger
another process long after the current object is gone - just dial in whatever value you
need.
The Off Delay is disabled if you are using a pulse output, of course.
Speaking of Pulse output – if you select this option, you can specify the duration
of the output signal.
You can even use this pulse out feature with the On Delay feature.
This gives you a nice clean trigger for other operations.
The filtering option gives you complete control over exactly how the output signal will be
averaged.
Its under expert mode is because you need to fundamentally understand what is going
on to take full advantage of it and to avoid messing up the integrity of your measurements.
Let’s take a look.
In this example I have a half disc rotating in front of the sensor.
So half the time the laser is bouncing off this surface, and the other half it is bouncing
off of this wall down here.
The output of the sensor is set to voltage mode and I have the range calibrated so it
only operates over this distance and not the full 3 meters – that just makes the output
signal bigger.
When the disc rotates, we see this kind of output at the A2 pin.
This is when the disc is blocking the sensor, this is when it is not.
The disc is rotating 5 times per second.
The sensor is taking measurements 500 times per second, so that means each one of these
is covered by 100 measurements, right?
So over here, this one cycle is measured – 100 times.
If we zoom in, we can actually see each measurement takes 2ms.
With filtering you can tell the sensor to average 1 to 500 measurements.
Selecting 1 tells the sensor to take one measurement and output the result every 2ms.
If I change filtering to 2, then that says take this sample plus the previous one and
average those and output that result.
If filtering is set to 10, take the previous 10 samples and average those.
etc.
You get the idea.
Filtering is just how many measurements do you want to average.
There’s a problem with that though, right?
Let’s keep increasing the filter size and see what happens here.
We know this signal is 100 measurements wide, what happens if I say I want the filtering
to be 20 samples wide?
Well, same thing as before.
The sensor averages the previous 20 samples and sends that out.
So that means this guy that would normally be here is now the average of all of these
previous samples, so this value is going to drop somewhere down here – right?
We don’t actually get the full value until way over here when we are averaging these
20 samples.
What that does is it creates a slope like this and if I change filtering to 20, sure
enough that’s exactly what happens.
If we use filtering of 50 samples, then in this example there is only one time when we
get a true low – that’s when we average these 50 measurements.
And there is only one time when we get a true maximum value.
That’s when we average these 50 measurements.
The rest of the time we get something in between, so now our output looks like this triangular
waveform when a square object passes by.
All because we averaged so many samples.
If we take that to 100 samples, what happens now?
Well, there is never a time when you don’t have 50 large samples and 50 low samples – right?
So you always get the same result – somewhere in the middle.
And of course 200 and 500 samples does the same thing.
You just get an average of the whole waveform which is something in the middle.
Note that this also happens if we leave filtering at 50, but increase the speed of the disk
to 10 rpm.
Let’s try that one.
Well, look.
I left filtering at 50, and all I did was double the speed of the disk, and we just
completely filtered out the entire object we were trying to detect!
So the key is when your filter size becomes longer than the time the object spends in
front of the laser, you can actually completely filter out the object you wanted in the first
place!
So be careful with that.
The good news is, when used correctly this can be a real asset.
For example, if you look at this disc it has a hole in it.
I’m going to line the laser up so that it passes right over that hole.
And sure enough, if I look at the output with an O-Scope I can actually see that glitch
as the laser passes over that hole.
So all I have to do is setup my filter to average enough samples to span that hole,
and I can make that hole go away – right?
Let’s try it.
Let’s bump the filtering up to 5 – still see the glitch.
I’m gonna bump the filtering up to 10.
Ah, now the hole is gone.
Perfect.
The only down side to that is it increases the slope of this edge by 10 samples, but
I can live with that.
That’s fine.
So the bottom line is, filtering is very powerful for getting good reliable repeatable measurements,
and getting rid of little glitches, just make sure you understand what is going on before
trying to use it and don’t just randomly say “I’ll just use the max amount to get
the best possible signal,” it may not work for your application – especially if you
are measuring small fast moving objects.
You can enable or disable the laser from this menu.
One thing to keep in mind – if you setup one of the I/O pins as a laser enable so you
can control the laser beam from an external switch and you set that switch to turn the
laser ON, but then use this menu to turn the laser off, who wins?
The key thing to remember is if either one of these guys turns the laser off, it will
turn off.
So in this example, the menu wins.
This test menu is awesome.
You can force individual output pins high or low, force an analog output to any value
you want, either current or voltage depending on how you set the pin up of course, and you
can test any pins you have setup as inputs.
What you see here depends on how you have your pin setup back in this menu, of course.
Right now my sensor is setup with A1 as an input and A2 as an analog output, so those
are the options I get.
To test the input pin, I just drop into that menu, apply a voltage to the input and sure
enough the little pin bubble lights up.
Cool.
This is a great way to setup, calibrate and test your system.
I love that feature.
This menu lets you setup the language used in all the sensors menus.
This menu tells you the information about the sensor including the part number, software
version, and serial number.
This menu lets you reset the sensor to factory default.
The default settings are shown in this chart in the user manual.
And finally, you can set a password.
Keep in mind, the password only prevents someone from gaining access after a power cycle.
The password can be any 4 digit number from 0 to 9999.
Oh, By the way, if you forget your password, just e-mail Wenglor at support@Wenglor.com.
They will give you a master reset password so you can reset the sensor.
Automation Directs tech support is FREE and you’ll talk to a real live person here in
the US within minutes.
Got a question?
You can call, e-mail, or even do on-line chat during regular business hours.
AutomationDirect.com offers Wenglor distance measuring sensors from 80 micro meters all
the way out to 100 meters to cover all of your distance measuring needs.