Hi everyone. Today we'll be looking at the Arduino Opta PLC function block diagram FBD
The Arduino Opta Iot PLC offers a convenient way to program it using the Arduino PLC in function block diagram FBD format
This is a simple intuitive method and is one of the industrial PLC languages
In addition to FBD, you can program the OPTA PLC using any of the five official languages specified in the IE standard and sketches written
in C++ the function block diagram FPD is a graphical language used to design par logic controllers
It allows you to describe the function between the input and output variables using a set of elementary blocks
These blocks can be connected to input and output variables using connection lines
When wiring the inputs and outputs of a block, you can use single lines to connect two logical points in a diagram
This includes connecting an input variable to an input of a block
connecting an output of a block to an input of another block or connecting an output of a block to an output variable
The connection lines are orientated, carrying associated data from the left to the right
It is important to note that the left and right ends of the connection line must be the same type
In addition, you can use multiple right connections, also known as divergence to broadcast information from the left end of the connection line to each
of its right ends. However, it's essential to ensure that all ends of the connections are the same type
Now that we have a basic understanding of the function block diagram. Let's dive into starting a new project and mapping the physical IO in
the op the PLC detailed information contained in this video can be found at AC C Automation dot CAA link has been put in the
description below. If you have not watched the other videos yet, there'll be links to the description below that will start you with video
One, there'll be links to the rest of the videos in the series as well. Start a new project
Our project will create a start stop circuit with two lighted push button switches using function block diagram FBD programming
When the green led push button is selected, the green led light will turn on
This will remain on until the red led push button is selected when the green led light is on
the red led is off and vice versa. The CPU green led will be on if the op the PLC is executing its program
open your computer or Duo's LC integrated development environment or ID software
start a new project by selecting new project on the main software screen
A second method of starting a new project is to select the new project from the main menu file
The third method is to choose the icon for the new project. The new project window will now be displayed
enter the name of the project in the dialog box. This will be the name of the program stored on your drive
We will leave the default directory as it is ensure that the opta 1.0 PLC is selected for the target select
OK. This now will create and save your program file for the Opta PLC mapping
physical IO in the A the PLC, the OPTA has physical inputs and outputs
We must map before using them in our project in the workspace window
select the resource tab at the bottom under local IOM mae you can see all the physical inputs and outputs on this controller
select parallel inputs, ramble inputs, mapping will be displayed. We can assign a variable to each of the inputs we intend
to use in our function block diagram under IO type. We can select digital which is a default or og
The og resolution can also be selected for the inputs, select relay outputs that display the relay output mapping
We can once again assign a variable to the relays that we will use in our function block diagram
Stuck to led outputs would display the led output mapping. These are the status lights on the opt up CPU unit
We will make these represent the relays in our program assigned a variable name to the led outputs that we will use
The Opta PLC also has a front led that can be different colors
We will assign the green output to indicate the Opta PLC code is scanning now that all of our mapping is complete
We can save the program using the icon on the main menu. You can also save the program using the main menu file
save program wiring of the inputs and outputs. We
can now physically wire the two lighted push button switches to the inputs and the led s of these switches to the outputs
Here is the wiring diagram of the Arduino op. The PLC, the positive 24 volt DC signal is wired to one side of the green
Normally open switch contact, it is also wired to one side of the red
normally closed switch contact. The
other side of the switches are wired to input one and two respectively. The
positive 24 volt DC signal is wired to each side of the switch lamps
Relay outputs are provided on the Arduino op. The PLC, the other side of the switch led lamps are wired to one side of the
relay. For each switch, green
will be the output one and red will be output two. The
other side of the relay output contact of the PLC. We wire to the zero volt DC signal
This completes the wiring of the PLC task in the op the PLC
to access the task in your project. Navigate to the project tab and locate the task folder
You will see the list of IOS we have just mapped for this project. Expand the folder by clicking on the plus sign next to
it. The tasks are categorized into fast, slow background and in it to configure the task right
click on any of the four tasks and select task configuration. Your programs will be executed within the designated task folders
The fast task folder will execute your program cyclically every 10 milliseconds or 100 times per second
This can be changed by clicking the control period. Yes, you can then enter a value in the period column in milliseconds
The majority of programs will be placed in this folder. The slow and background task folders will also scan cyclically
They are both set at a fixed period of 105 100 milliseconds which is 10 times per second or two times per second
These tasks are ideal for functions like math equations, et cetera. The init or initialized task folder sets
variables or conditions in the PLC. After it powers up, it will run for a single scan
select OK, to close the task configuration window, starting a new function block diagram program
select project new object, new program from the main menu to start a new program
You can also do this by right, clicking on the project name and selecting a new program under the ad heading
the new program window will be displayed. We will use a function block diagram or FBD
In our example, select FBD name the new function block diagram program and assign it to the fast task folder
The program name cannot have spaces SL OK. Our new function block program will now be displayed
in the work area. This program also appears on the fast task folder and in the projects as a function block diagram symbol
an FBD toolbar can be displayed by selecting it from the main menu view
toolbars F DB bar. In the help menu, you will find all the operators and their parameters that can be used for the function block
diagram programming. Save the op the PLC program programming
Our function block diagram FBD, the first block of code will turn on the CPU led light
to do this. We will add two constants and ensure they are equal to turn on the led
select the K icon on the FPD toolbar or in the first block workspace
right? Click and select new object constant. You can also use shift plus K to enter a constant
We will add two constants, the value of the constant defaults to zero
double click on the constant to change the value. We will change both these values to one
Select new block shift B on the F DB toolbar. You can also do this by right clicking and selecting new object under
the object filters. Select just the operators select the equal EQ operator and select OK
Clicking on the workspace will place the operator on the first block
You can move this around by clicking and holding leftmost button on the EQ operator
Select the variable shift plus V from the F DB toolbar or right click and select new object variable
The new properties window will now be displayed, select the three dots next to the input selection
select the led green variable from the object browser and select OK
The object properties window will now show the variable select, OK. A variable now can be seen on block one but it is facing the
wrong way. Right, click on the variable and select switch direction. Select the connection icon on
the F DB toolbar or right, click on the workspace and select the connection mode
You will also notice that when this workspace is selected, you can hit the space bar. The mode will alternate between insert
move and connection modes. Select the starting point. The objects in the works page will show a green box
Left click on the box, select the end point. A dotted line will be displayed
A green box will appear on the different objects. The cross mouse will turn into a cross hair that indicates that a connection can be
made. Left click to complete the connection, right, click on the network number and select new network after we
can now enter our circuit's function block diagram F DB based on the information previously
if we have input one green push button or output one led green and input two red pushbutton normally closed
then output one and led will turn on. If
output one is zero, output two and led two will turn on
Save the program by using the icon on the main menu or selecting save project from the main menu file
Download the function block diagram program to the the PLC select set up communication from the main menu online in
the device link manager window, select mod boss TCP and then select activate select properties
We can now enter the IP address we established in the following post programming
The Arduino op the PLC Ethernet port, our communication method with the off the PLC is now set
select the connect button. You will now see that a computer is connected to the OP the PLC controller
select the download icon on the main menu since we didn't compile the project first
the PC ID prompts us before downloading, select yes, the output window will display the status of the download operation
When this is finished. The bottom right side of the software will show you that the PLC ID E and the controller programs are the
same monitoring. The function block diagram logic and variables select
the live debug mode on the main screen. This will show you the status of the inputs and outputs of the F DB function block
diagram. Select the watch window on the main menu. This will display the watch window
We can enter and select the variable or tags we want to monitor. If
you enjoyed this video, please hit the like button below. If you have any questions about the video
please leave a comment below and I'll do my best to answer it if you want more information about us or you want our free
E books on numbering systems, robust data logging. Please click on the link in the description below to get it
A new video is put every Monday. So make sure you hit the subscribe button. So you get more videos like this in the future
Remember to click the bell beside your subscription to actually receive those notifications
Thanks so much for watching. I'll see you next time. Stay safe