In this video we get setup to start programming with the Arduino Opta PLC! This video will get us ready for the upcoming PLC programming tutorial series coming on the channel!
A PLC or Programmable Logic Controller is the staple of industrial automation and controls, and Arduino has made one of the most affordable ways to get into the industry! This micro-PLC has Relay outputs, and programmable digital or analog input and output channels as well.
It also supports Modbus OPC communications for easy integration into SCADAs or larger controls systems, RJ45 ethernet communications and wifi connectivity! Additionally there are no licensing fees to use the Arduino PLC IDE where you can program in Ladder, Structured Text, FBD, SFC or using the regular Arduino IDE/C++ based language!
Don't forget to leave a like, subscribe to the channel, and comment what you want to see next!
This is the Arduino Opta PLC.
PLCs are pretty well known for being hundreds or sometimes thousands of dollars
because of their industrial ratings and often the software and the licensing
accompanied with them is hundreds or thousands of dollars as well.
Arduino has created a compact microcontroller that has relay outputs and digital
inputs on board as well as programmable buttons and LEDs so that you can learn
the basics of controls and automation or build IOT and industrial automation
solutions for just a couple hundred dollars.
And for myself as a creator and the person who runs Lamaster Tech,
I'm really excited about this product because it gives me a way to teach the
basics of controls and automation engineering,
which is the field I work in professionally and something I feel quite
passionately about at a price point.
Finally,
that's pretty accessible for anyone who's looking to break into this field.
So in today's video,
I'm going to walk you through downloading the PLC IDE from Arduino,
getting online with it and creating your very first project.
Because in the coming videos on Lamaster Tech,
we're going to be doing progressively more advanced controls and automation
tutorials and being able to get started with the Arduino PLC is going to be very
important if you want to follow along with all of those tutorials.
So let's get right into it.
All right,
let's go ahead and just pop the Arduino PLC IDE into Google
and the Arduino software link to the PLC IDE,
the big button that says download the PLC IDE.
I'm going to download the windows version and I encourage you to contribute and
download.
Arduino is pretty awesome company.
I'm going to just download cause it's like the fifth time I've done this.
Arduino is pretty awesome and they give their stuff away for free,
their software stuff.
But let's go ahead and install the PLC IDE together.
I'm going to check yes to launch it once it's done and I'm going to hit finish.
Okay.
Alrighty.
So it looks even though I just downloaded it,
can remember that I did some programs here before,
which is fine.
I'm just going to hit new project anyways and I'm going to name it my first PLC
and make sure your target is the opta unless you're using the portenta machine
control.
But I'm going to use the opta.
I'll just put in documents is fine and I'll hit okay.
It's going to take a minute to generate the project.
All right.
Then the device shows up here.
First thing you want to do with the new Arduino PLC that you have plugged in,
you want to go to device manager on your computer.
Make sure you know what port your PLC is plugged into.
I'm almost sure mine's a USB 13,
but I'm going to go ahead and unplug it and I see 13 goes away.
Plug it back in and 13 12 and 14 come back.
Interesting.
Okay.
So this one might be in a weird state of limbo.
That's like it got half booted before.
So I'm going to double click the reset button that puts it in firmware reboot
mode.
So if your USB is,
if your PLC is brand new out of the box,
you should only have one USB serial device port here.
So com 13 we're going to come in here and select that.
And the first thing you want to do regardless of the fact that you haven't
written any code yet is just on port com port 13.
You just want to hit download.
It's for initial setup and reinitialization.
It tells you on,
on a new board file system formatting can take some minutes.
It takes some minutes.
So just get it started.
Really all you're looking for.
You want this bottom left window to keep doing stuff.
You don't want it to freeze and hang up.
But it does take a couple of minutes.
So I'll probably fast forward much of this or play games on my
phone.
Okay.
And you want file downloaded successfully.
That's good.
Um,
anything that's like,
Hey,
DFU invalid suffix,
stuff like that.
Your Arduino PLC ID might've gotten,
uh,
incorrectly downloaded.
You might want to go to the Arduino IDE and install the Opta libraries.
Uh,
you might want to try double pressing reset on the Arduino Opta to get it to go
back into bootloader mode and try again.
Double check your comp ports are correct with device manager.
Those are all the troubleshooting steps that I know of because I've gone through
very similar things.
Um,
but ideally if that works and you go to device manager
and ports,
you now have two ports because this is a dual core PLC.
So there are two USB,
ports in use to communicate with it.
Uh,
you want,
so you have 12 and 14.
You want to go into online and set up communication and go to Modbus and
properties and you want to grab the higher of those two ports.
The rest of the defaults should be fine.
The baud rate,
the frame,
all that stuff.
Hit.
Okay.
Hit.
Okay.
And now you want to connect to the target.
So I'm actually just going to unload,
uh,
unplug and plug back in the PLC for my little,
you know,
Hey,
I'm it.
This is how I do things.
Um,
I don't think you have to do that.
But go back to on unload,
uh,
online setup,
communication,
Modbus come 14.
That all looks good.
Okay.
And now,
uh,
there's nothing in main except count equals count plus one.
That's the default program Arduino gives you.
But when you are in resources on this header page,
you want to connect to the PLC even before downloading anything to it.
You're just connecting to make sure that all this setup stuff worked.
Okay.
It'll take a second.
Okay.
Now,
I've previously licensed this.
but initially yours will probably tell you that,
uh,
you need to,
um,
rip,
disconnect it and connect it back.
Um,
for the permanent license to take effect.
One really cool thing that Arduino does that most industrial PLC,
uh,
IDE providers do not do is they include a permanent license for your PLC,
um,
with the purchase of the hardware.
So for about $200,
which is not nothing,
um,
you get a micro PLC that has relay outputs,
as well as programmable inputs that can be analog or digital inputs or more
outputs.
If you need them to work that way,
it can also be clipped into expansion IO modules,
which makes it a lot more useful and flexible.
And then a permanent license because the,
even the more affordable hardware providers,
back off Wago,
a Siemens have some more affordable PLC lines.
They get you with licensing their software as well.
So really for getting into the world of industrial automation and controls,
uh,
this is a pretty crazy,
affordable,
um,
pretty crazy,
affordable option.
So,
uh,
you should have all green.
Not every Opta has wifi and ethernet.
So depending on the version you bought,
these might not all be green.
Um,
but mine does.
So let's go to main,
which is just the default program.
Okay.
Now I'm just going to go,
uh,
in the,
to talk about the two tabs that they kind of give you,
um,
by default,
they give you project and resources in resources.
You can see the Opta that we added.
And in later tutorials,
I have some IO expansion modules.
You'll see where we add those as well.
So we have even more inputs and outputs we can play around with,
but the Opta right on the body of the main PLC,
it has a channel of inputs on the top.
Uh,
it has relay outputs on the bottom,
and then it has four status lights,
uh,
for L1,
L2,
L3,
and L4 at the bottom.
And then it has a red,
green and blue led,
uh,
all,
all here.
And then it also has button inputs.
So we're going to use these in future videos for now.
The only thing I'm going to do is I'm going to go to led outputs and I'm going to
give LG,
which is the green light,
a variable name called green so that then we can go over here to projects.
Uh,
and in my first PLC project,
I'm going to add a new program.
I'm going to make it structured text and I'm just going to call it green light.
Okay.
And I messed up because you need to assign it to a task.
So I'm going to delete that real quick and show you what I mean.
Add new program.
We'll just call it green light.
We'll make it in structured text and I'm going to assign it to fast.
Okay.
So now it doesn't have a question mark over here and all I'm going to do is say
green and then colon equals sign true all caps and then a semi colon.
Okay.
And you can see right now there's nothing on my PLC.
I'm going to hit download and compile and the green light turns on.
Okay.
So this was not a PLC programming tutorial.
This was getting started with the Arduino Opta PLC tutorial because we are about
to do a whole bunch of ladder diagrams,
structured text,
hooking up inputs,
hooking up outputs,
building HMIs,
all the stuff that turns you into a controls and automation engineer.
We are going to do that and we're going to use the Arduino PLC IDE and the
Arduino PLC itself.
So super important to go through the basics together.
If you're running into problems with this do not skip this and go forward to the
next few videos.
If you're trying to truly follow along with this tutorial,
you really need to be able to get online with your PLC and at least make sure
that you can turn that green light on and off.
Otherwise you're going to be trying to follow,
follow along with tutorials in this series that will show you useful information
and useful concepts.
But if you're not online with the PLC right now,
the rest of the tutorials will mainly just be for your information,
but they won't be practical exercises together.
So let me know in the comments below if you have questions on this video.
It's very important to get this right. Again,
quick thank you to Arduino for providing the hardware in this video,
a $200 micro PLC,
just to give you a sense of where the industry is at.
That's about 50% of what a comparable micro PLC from another vendor might be,
but it includes perpetual licensing. So like I said,
hardware or licensing,
almost every other manufacturer gets you on one of those.
Some of the giant manufacturers like Rockwell and Siemens,
they honestly have pretty expensive hardware and software.
So it's pretty cool that Arduino has built a way for you to learn about this
industry with hands-on exercises for about $200 US dollars for the
international viewers. So thank you so much for watching.
The tutorials are really going to take off from here.
So I hope this basic setup was useful for you.
Let me know in the comments with any questions.
We'll see you next time and thanks for watching. Bye.