The OPT2011 is an awesome mid-ranged full featured Laser Distance Sensor from AutomationDirect.com.
The display has a bar graph giving you some idea where the target is in the range that
you setup, an actual measured distance in mm and a bubble for each of the I O pins.
These bubbles show you at a glance how the pins are configured. An A1 or an A2 tells
you both output pins are switching outputs. AN means the pin is setup as an analog output
– only pin A2 can do that on this sensor. An F is an error or Fault output which tells
you if the sensor is receiving enough of the laser energy back to make a measurement. V
is a contamination output. LA means the pin is configured as an external Laser enable
input and T1 or T2 means the pin is configured as a Teach input – that means the pin can
be used to update or re-calibrate the sensor while it is running. That’s cool.
This sensor has a ton of options you can configure which are shown in this menu map from the
user manual. Hit any button to get into the menus, then use the arrows to navigate this
chart and enter key to select the option you want.
To configure an I/O pin, you drop into this Pin Function menu first and tell the pin what
you want it to do. Then you drop into that pin’s configuration menu – A1 or A2 to
configure it. If you set A1 to be a switching output back in this menu, then you will be
presented with the switching output options in the A1 configuration menu. If you set it
to be an error output back here, then you’ll get these options. If you set it to be one
of these inputs, then you will get these input options and if you set A2 to be an analog
output then you’ll get a menu to set the analog parameters.
In this video we will quickly walk through the options shown in Bold in this chart - these
guys. These are the ones that are active out of the box. The rest of the options can be
accessed by simply enabling expert mode in this menu item here – we’ll cover those
in Part II of this video. We’ll use pin A2 for this walkthrough because
it can do everything A1 can do, BUT it also can be set as an analog output. Let’s start
at the top of this chart and work our way down – again – just the non-expert mode
menus will be covered in this video. Here we go …
To set A2 to be a switching output. Press any button, scroll down to the pin function
menu, select pin A2 and select switching. To exit to the top level menu, scroll down
to BACK and hit enter, then do it again. Now we scroll down to the configuration menu for
pin A2. Note that it is telling me pin A2 is setup to be a switching output. Perfect.
Hit enter to get into the switching output sub-menu. Let’s start with the Teach Foreground
mode. In this mode we put the object we want to detect in front of the sensor and hit T
for Teach. The sensor calibrates on that object, so now whenever an object passes by the sensor
that is at that range or closer to the sensor, pin A2 will go active. Sure enough, A2 lights
up when I bring an object close enough to the sensor. This is great for detecting all
objects at this range or closer to the sensor. Teach Background is the exact same thing,
except this time you calibrate with no object present. In this mode the sensor detects any
object that is closer than the background, so it doesn’t discriminate like the Teach
Foreground mode – it detects ALL objects that pass by that are a little closer than
the background. This is great for looking down on a conveyor, for example.To set it
up, you just drop into that menu, make sure no objects are in front of the laser and hit
T for Teach. Teach Window is used for detecting all objects
within a certain range or window. Objects outside of that range won’t be detected.
You set it up just like the other two, except for one thing. You want to teach on the midpoint,
so make sure your object is at the center of the detection range when you calibrate
it. You then work your way down to this menu to set the width of the window. That’s the
total width, so half of that is on either side of the detection range we just calibrated.
That window can be up to 1 meter wide. This Potentiometer menu lets you tweak the
detection threshold. That way if you teach on an object and it sets this level, you can
move that level around without having to re-teach. You could also use this to create a larger
gap from the background when in teach background mode, and you can use it to move the center
of the window in Teach Window mode. The Hysteresis menu option allows you to set
the width of the hysteresis. When an object is detected, the signal won’t go away until
the object has moved beyond the original detection level PLUS an added amount. This is called
the Hysteresis and it prevents the sensor from giving you false detections on small
changes. You can set it to anything you want, but the minimum hysteresis depends on the
filtering you have setup in this menu down here. I have filtering setup to average just
1 sample – which is no filtering - so the min hysteresis I can set is 20mm. The more
filtering you use – or the more samples you average – the smaller you can set the
hysteresis to. For example, here I’ve set the filtering to 500 samples. Now I can set
the hysteresis as low as 3mm if I want to. So again, the more averaging you have, the
smaller you can set the hysteresis. Let’s see, we already did Window Size, so
we’ll skip down to this menu which allows you to switch the output between three options:
PNP, NPN and Push/Pull. Note that pin A2 doesn’t have to be the same as Pin A1.
This menu allows you to change the output behavior between Normally Open and Normally
Closed. The last switching mode option - of the non-expert
mode - is Teach External. This is a cool option that allows you to trigger a teach using an
external signal. You could use it to simply re-calibrate the sensor manually – maybe
you run different product sizes along the conveyor on different days and just want to
walk up and hit a button to re-teach the sensor instead of navigating all of these menus.
This is perfect for that. Or if you want to get fancy, you could have a sensor detect
the temperature of the environment and when it has changed enough, re-calibrate this sensor
to account for expansion of the metal frame that this sensor is mounted to. Lots of uses
for this one. To use it, you have to tell one pin – we’ll
use pin A2 – that it is going to be an external teach input for the other pin – A1 in this
case. Of course pin A1 has to be setup as a switching output. Then down in A2’a menu
– which look it reminds you it is the teach input for A1 now - you tell it that you want
it to trigger the A1 teach on a high or low voltage input.
Under A1’s menu you tell it you want it to be taught from an external signal and what
kind of teach you want. That’s it. A1 will now recalibrate – or be re-teached, if that’s
a word - every time A2 is activated. The Analog menu is only visible if you set
pin A2 to be an analog output back here in the Pin Function Menu. Remember A1 can’t
be an analog output. Once you set A2 to be an analog output, drop
into Pin A2’s menu and scroll down to analog. Here you can set the output type: Current
or Voltage. We’ll use Voltage – that’s 0 to 10 Volts. You can set the start and end
of the range. Suppose you are only using the middle meter of the 3 meter range of this
sensor. You COULD use the sensor as is, but your voltage swing will only be this. Using
this menu item you can set this range to zero volts, or 4ma if you are using current, and
this range to 10 volts or 20ma if you are using current. Now your PLC will get the full
dynamic range of the sensor over just this limited disatnce. That makes your PLC programming
a lot easier because now your min range is at min voltage or current and your max range
is at max voltage or current. To do that you just put an object at the min
range and teach that and then move the object to the max range you want and teach that.
Now you will get the full voltage swing between those two settings and the even bar graph
on the display will also give you full range over that limited distance.
This at 0V and at 10V allows you to tweak the start and end of the analog output range.
You simply increment or decrement them to what ever you want. Of course this would say
4ma and 20ma if we had chosen the Current mode …
Finally, the last option in the non-expert mode is the display. We’ve been using the
Switching mode display, but there is also an analog display. In this mode you see the
actual voltage or current being output by the sensor, instead of the I/O pin bubbles.
That’s especially handy when you are trying to program your PLC and do system test.
You can also rotate the display which is helpful if you have to mount the sensors upside down
in your application and you can change the intensity of the display and set a couple
different screen saver modes. Power Save turns the display off after a minute. Screen saver
inverts the display periodically to get equal wear on the pixels.
In the next video we’ll enable this EXPERT mode and walk through those options.
And don’t forget – 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.