00:03
Sensing the position of an object
without touching it is the job of a
00:08
proximity sensor. This machine's job is
the test new parts. Each time the air
00:13
cylinder goes down and back up again
that's one complete cycle. If we could
00:18
sense that operation then we could put
that data into some software and we
00:23
could start to monitor and analyze the
machines effectiveness. We could start to
00:27
calculate its OEE or overall equipment
effectiveness. In this video workshop
00:33
we'll show you how to wire this
proximity sensor and get its data into a
00:38
digital input and then put that into a
software application to calculate that
00:42
OEE. I could watch this stuff all
day but let's head back to the workshop and get started.
00:53
Now Before we jump right
in let's start with the big picture.
00:57
What's the signal path look like from a
high level? This block diagram shows how
01:01
we'll take a proximity sensor and
convert its electrical signal to digital
01:06
data suitable for use in any number of
software and cloud applications. For this
01:12
workshop I'll be using a SNAP PAC
Learning Center. It's basically a SNAP
01:17
PAC system with a controller, a rack,
several i/o modules that we use for
01:23
training here at opto 22. And this panel
simulates some typical i/o signals like
01:28
a meter, potentiometer, LEDs, and switches.
The controller is running a control
01:36
strategy that's loaded into its memory.
I'll be using PAC control on this
01:40
Windows laptop to configure the strategy
and then download it to the controller.
01:45
Now you can get your own Learning Center
and free PAC Control software at
01:49
workshop.opto22.com There's got to be
more than a dozen different types of
01:56
proximity or prox sensors; radar, lidar,
inductive, optical, and Hall effect are
02:02
just a small handful. For this workshop
we're going to be using a Hall effect
02:07
sensor which senses a magnetic field.
This is a pneumatic ram like the
02:13
one we saw on the machine. Air ports at
either end push the shaft backwards and
02:18
forwards. There's a magnet mounted on the
end of the shaft inside the cylinder. We
02:24
can see that by putting this paperclip
on top as we move the shaft we can see
02:28
the paper clip track the magnet inside
up-and-down. We can sense that same
02:34
magnetic field with this Hall effect
prox sensor.
02:37
Let's first power up the prox sensor on
the bench and get the LED working in the
02:43
end of it. Looking at the data sheet for
the prox sensor we can see that it
02:49
requires a voltage from 6 to 24 volts
and it's DC at just a couple of
02:56
milliamps. So let's use this 12 volt DC
power supply here. First let's connect
03:05
the ground wire and then the positive
wire.
03:24
Now let's actually attach the prox
sensor to the air cylinder. Okay
03:44
we've attached the sensor at the top of
the cylinder so that we know whenever
03:48
the machine cycle is complete and the
shaft is at the top of the cylinder. We
03:53
can see the LED is working. Every time
the shaft hits the top of the cylinder
03:57
the LED comes on. So we know our prox
sensor is wired correctly. Now when it
04:02
comes to wiring the digital input module
we need to take a look at the prox
04:07
sensor instructions. We need to know if
we're wiring the sensor to the positive
04:12
or negative rail of the power supply
through the digital input module. If we
04:16
take a look at the spec sheet for the
sensor we can see that the circuit
04:20
diagram shows that the load in, our case
the digital input module, is wired into
04:25
the negative or ground rail of the power
supply. So let's grab a digital input
04:30
module. Now these come available in 4 16 and 32 channels per module. I'll use this
04:37
four channel version the SNAP-IDC5.
Notice how the wiring diagram is on the
04:44
back of the module it's also available
on the datasheet on our website. So let's
04:49
first wire the power supply common to
the first channel input on the module.
04:55
Screw that down tight.
05:03
Now we're going to wire the prox sensor
to terminal 2 which is the hot wire of the
05:09
module.Let's screw that down tight. Now
let's connect that wire from the digital
05:18
input to the prox sensor. First of all
I'm going to crimp the prox sensor side.
05:23
Squeeze that down nice and tight. Now
let's push the wire in from the digital
05:30
input module and let's crimp that side
down. Okay that's the wiring done. Okay
05:43
next we snap the module into position 7
at the end of the rack. Now let's make
05:51
sure that both the prox sensor LED and
the module LED are both working as
05:59
Yep beautiful every time the shaft gets
to the end of the cylinder both the prox
06:05
sensor and the module LED both work as
expected. Okay so that's the wiring end
06:11
the module installation done. Let's move
on to the laptop now and configure the
06:15
sensor in the software. Here we are in
PAC Control we've already got our I/O
06:21
rack configured so now let's double click
on the empty slot in position 7 to add
06:26
our digital input module, a SNAP-IDC5.
06:32
Double click on the first point of the
module and open the point configuration
06:38
dialog. Now we can give the prox sensor a tag name like 'test_cycle_complete'. This
06:46
is where the prox sensor is given a
meaningful name for all of your software
06:50
applications or cloud services so make
sure you choose your name accordingly.
06:57
Now click on the debug button to
download this configuration to your
07:02
controller.
Click 'yes' to save and 'yes' that you've
07:09
made a change and the download process will start. Once it's done click 'run' to
07:18
execute the new strategy. Now
double-click the point name in this
07:25
debug window and we can confirm that
we've configured our prox sensor correctly by
07:30
viewing the digital state in real time.
See how the state changes every time I
07:36
move the shaft back and forth. So at this
point you can use PAC Control to monitor
07:44
the time it takes the machine to test
each part and perhaps sound an alarm if
07:48
it goes outside of any limits. Or we
could log the number of test cycles per
07:53
minute to the controller. Using a tool
like NODE-Red you can write the test
07:58
cycles to a database either locally or
in the cloud or we could send it to any
08:03
number of cloud services like Microsoft
Azure or IBM Watson where it could be
08:08
monitored and analyzed for overall
equipment effectiveness. For more
08:13
information about OEE and to see the
parts that we used in this workshop
08:17
visit workshops.opto22.com. So there you
go the electrical signal from the prox
08:24
sensor has been converted to digital
data and analyzed for any anomalies.