MP2___Spring_2024__v2_
pdf
keyboard_arrow_up
School
Georgia Institute Of Technology *
*We aren’t endorsed by this school
Course
6263
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
18
Uploaded by kdolph
Mini Project #2: PLC Programming with
Ladder Logic
CS 6263/ECE 8813: Cyber Physical System Security (Spring 2024)
Assigned: February 7
Due: February 21 11:59 PM EST
Ladder Diagram (LD)
In the second mini project, we will write PLC programs to control different real-world
systems. The programs will be written in the Ladder Diagram (LD) format which is the
most popular language for writing PLC programs. Other formats for PLC programming
are: Structured Text (ST), Function Block Diagram (FBD), Instruction List (IL), and
Sequential Function Chart (SFC). Many early PLCs did not have accompanying program-
ming terminals that were capable of graphical representation of the logic, and so the logic
was instead represented as a series of logic expressions in some version of Boolean format,
similar to Boolean algebra. As programming terminals evolved, it became more common
for ladder logic to be used, for the aforementioned reasons and because it was a familiar
format used for electro-mechanical control panels. Newer formats such as state logic and
Function Block (which is similar to the way logic is depicted when using digital integrated
logic circuits) exist, but they are still not as popular as ladder logic. A primary reason for
this is that PLCs solve the logic in a predictable and repeating sequence, and ladder logic
allows the programmer (the person writing the logic) to see any issues with the timing of
the logic sequence more easily than would be possible in other formats.
OpenPLC
Instead of using a real PLC, we will use an open source PLC emulator called OpenPLC
to do the programming. The performance of the programs will be evaluated in simulated
environments representing the behavior of real-world processes. The OpenPLC is the first
fully functional standardized open source PLC, both in software and in hardware. In fact,
OpenPLC is an alternative program which simulates the behaviours and capabilities of
real PLCs with the help of simple and low-cost hardware such as Arduino or Raspberry
Pi. The focus of this software is to provide a low cost industrial solution for automation
and research. OpenPLC has also been used in many research papers as a framework for
industrial cybersecurity research, given that it is the only controller to provide the entire
source code. Once you learn how to work with OpenPLC, you can easily pick up how to
program real PLCs of different vendors.
1
Mini Project #2
PLC Programming with Ladder Logic
Ladder Logic, though is different from mainstream coding languages, is very easy to pick
up. Here are a few tutorials on ladder logic to get you started:
Tutorial 1
and
Tutorial 2
.
You can also find a lot of tutorials in YouTube and Google. Note that there is no limitation
on the methods you can use in the following sections unless it is explicitly mentioned in
the write-up. For example, you can use any number of ladders and rungs you need in your
program. It should be also noted that since we will use an autograder for this project, you
must use the predetermined memory addresses of the inputs and outputs in your program
(please see Appendix for more detailed information).
This is highly important because
even if your logic is 100% correct and you don’t use the predetermined memory addresses
for the inputs and outputs, the autograder will return full/partial points deduction. Failure
to follow this instruction will lead to significant points loss (ZERO) in your final grade.
We will
NOT
accept any excuses for naming mistakes. You MUST triple check the names
before submission!
OpenPLC Setup – Writing and Testing Programs
In this section, we will explain how you can set up the project environment, write the
required programs, and test them in the provided simulators.
As the first step, please
follow the below instructions to download and set up the environment containing all of
the tools required to complete this project. A video has been made
here
to demonstrate
how to use the PLC interface in the VM environment. In addition, written instructions
have been included below to help you complete this project:
1. We have provided a Virtual Machine completely tailored for this mini project. All
of the required libraries have already been installed on it and every tool has been
tested to perform as best as possible. To begin, first download the VM and project
files depending on your CPU architecture and move them to your desired location
on your personal machine.
•
AMD64 (Windows/Linux/Mac Intel silicon):
VM Link
/
Project Link
•
ARM64 (Mac Apple silicon):
VM Link
/
Project Link
Use VirtualBox or VMware to open the downloaded VM. We highly recommend the
use of VMware Workstation Player for AMD64 CPUs and VMware Fusion Player
for ARM64 CPUs as it provides an overall better experience particularly with the
autograder. You can open the VM in by clicking on the .vbox file or importing the
.ova file directly in your hypervisor. Next, drag and drop the project files into the
VM. Please note that we recommend the following VM specs (you can change them
in the setting of the VM) as they returned the best results during our tests:
•
CPU allocation: 4 physical performance cores or more
•
RAM allocation: 8192 MB or more
Do not forget that these files are your actual virtual machine and delet-
ing them from your personal computer will result in losing all of your
Georgia Institute of Technology
2
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
work.
We strongly recommend saving your written programs in cloud
environments such as Google Drive so that in the case of failure in the
VM, you can resume your work with minimum issues on a fresh VM.
2. A user (username:
cs6263
and password:
student
) has been created for you. Please
refer to this credential in case you need it or if you need to use the “sudo” command.
Open a terminal and navigate into the “OpenPLC
v3” folder. Run the OpenPLC
server by typing the following command
sudo ./start_openplc.sh
If the server did not run and returned an error explaining that another process is
running on port 8080, you should first kill all the processes running on this port
using the following command (execute this command for many times (e.g., 20) to
make sure no other process is running on port 8080), and then, try to rerun the
OpenPLC server.
sudo fuser -k 8080/tcp
The OpenPLC server should be running now and you can open Firefox and visit
http://localhost:8080
to access it. A user (username:
openplc
and password:
openplc
)
has been created for you. This platform provides you with a PLC simulated environ-
ment in which you can upload and run your PLC program like a real PLC. In fact,
the server will act as the hardware for the PLC program that will run your written
program and communicate with a physical process (simulator in this project). Once
you verified that the OpenPLC works fine on the VM, you can kill the process and
start writing the PLC program as explained in the following steps. Note that you
will later use this OpenPLC server for testing the written programs in parts 2, 3, 4,
and 5.
3. Now it is the time to write your PLC programs. Open a new terminal window and
navigate to the “/Desktop/OpenPLC
Editor” directory and run
sudo ./openplc_editor.sh
to write logic for the OpenPLC program.
To start, you should create an empty
folder for each part separately and choose that directory for that part.
This
link
can help you to learn how to start programing in the IDE. Please do not touch the
.Config settings (i.e., task0, Cyclic, T#20ms, Priority 0, instance0).
For a list of
input/output pin definition, see the Appendix.
Note:
If the OpenPLC Editor
runs slowly in the VM, you can install it on your host machine and then
move the written programs to the VM for evaluation purposes.
Please
see
here
for more information.
4. You can easily test the performance of the written program using the run button
within the IDE. You can choose the items to be shown in the Debugger tab by
Georgia Institute of Technology
3
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Mini Project #2
PLC Programming with Ladder Logic
selecting them with the glasses icon in the left side of the screen. By right clicking
and enforcing the values of inputs, you can see the effect of different inputs on
outputs in the Debugger tab.
5. After running and testing your program, the XML and .ST versions of the program
can be found in the relevant directory (XML is named plc.xml in the main directory
and .st is in the build directory with the name of generated
plc.st). Note that you
need to create separate folders for each part and subpart. For testing parts 1, 2, 3,
and 4 you should upload the relevant .ST file into the server as described in
here
.
Verify that the page says “compiled without errors”. Please remember that you need
to follow the naming instructions in
Deliverables and Submission Instructions
section. A schematic diagram of the relationship between
.st
file and the server has
been shown in Fig.
1
.
Figure 1: The overall overview of the program design and test in the OpenPLC platform.
6. For Part 1 of this Mini Project, you need to test the logic of your program using
the editor, but for the Parts 2-4, very useful HMIs have been developed and are
provided in the VM. For parts 2 & 3, you can use the directories ˜/Desktop/Pro-
cessSimulator/RobotPath and ˜/Desktop/ProcessSimulator/TrafficLight directories
and run
python ProcessSimulator.py
Georgia Institute of Technology
4
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
to start the simulators associated with these parts of the project. Please note that
the simulator needs to be launched after the OpenPLC server is running using the
.st
file you generate from the OpenPLC GUI. If you need to restart the server by
uploading a new PLC program, please close the simulator before uploading, and
relaunch it after the server is running again.
7. To see the effect of the process simulator on the written programs, you can run the
HMIs with the following command (parts 2 through 4)
python hmi.py
Georgia Institute of Technology
5
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
1
Part 1 (0/25 Points - Solutions Provided)
Construct three different Ladder Logic programs, each building on the previous one:
1.1
Part 1A (0/5 Points)
Construct a program that will simulate a switch-activated LED. The program should
satisfy the following requirements:
1. When
Input
0 is activated,
Output
1 should activate;
2. When
Input
0 is deactivated,
Output
1 should deactivate;
3. Inversely, when
Input
1 is activated,
Output
0 should deactivate;
4. When
Input
1 is deactivated,
Output
0 should activate.
Note:
Input0
and
Input1
are not push buttons. For example,
Output1
should
be active as long as the
Input0
is active. To be more clear,
Input0
and
Input1
are like light switches (you should use simple contacts for them).
1.2
Part 1B (0/10 Points)
Construct a program that simulates an LED powered by an On-Off loop.
Program re-
quirements:
1. When
Input
0 is activated,
Output
0 should activate for 6 seconds, then deactivate
for 6 seconds;
2. The on/off process should repeat infinitely until the input is deactivated;
3.
Output
0 should immediately turn on after the activation of
Input
0;
4.
Output
0 should immediately turn off after the deactivation of
Input
0.
Note: Similar to the previous part 1A,
Input0
is not a push button.
1.3
Part 1C (0/10 Points)
Many times in industrial control systems, devices such as Programmable Logic Controllers
(PLCs) are commonly used to directly interact with sensors and actuators, and perform
local automatic control. PLCs are often placed at relatively exposed locations in the field
and are thus vulnerable to tampering by a nearby attacker.
In particular, the attacker
could attempt to manipulate firmware or logic to change the behavior of the PLC.
Ladder logic bombs (LLB), i.e.
malware written in ladder logic, can be inserted by an
attacker into existing control logic on a PLC, and either persistently change the behavior,
or wait for specific trigger signals to activate malicious behavior. For example, the LLB
could lay dormant until a certain sequence of control actions is performed, or a certain
Georgia Institute of Technology
6
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Mini Project #2
PLC Programming with Ladder Logic
point of time is reached. Then, the LLB could replace legitimate sensor readings that are
being reported by the PLC to the ICS with manipulated values.
Building on Part 1B, construct a Ladder Logic Bomb that activates
Output
0 and leave it
on regardless of any previous conditions and changes to the input. The LLB will initiate
when one of the following conditions occurs in the program:
1.
Output
0 activates 6 times;
2. 30 seconds passed from the activation of
Input
0.
After the initiation of the LLB,
Output
0 should remain active, and ignore the timers
and changes to the input.
Think of it as turning on the light and leaving it on.
Make
sure to modify the timer preset values to ensure your designed LLB works in both of the
aforementioned cases. We will test your submitted program to see how accurate it works
under each of the aforementioned conditions.
Hint:
You will probably need to use the counter module.
Note: There are some cases where condition 1 becomes true before condition
2 and vice versa. Think deeply about it and test it thoroughly!
If
Input0
deactivates before the (30-second) timer operation (e.g., after 5
seconds), the (30-second) timer must be reset.
The counter that is used for modeling condition 1 (6 time operation of
Out-
put0
) should not be reset under any circumstances.
2
Robot Path (20 Points)
The first process models a robot (shown as a black solid circle in Fig.
2
) looking for its path
on an 10
×
10 grid. The robot can only travel along the wires and stop at the intersections.
It starts at the lowest and leftmost position in the grid, denoted as (0,0). The horizontal
direction is the x axis, and the vertical direction is the y axis. The maximum coordinates
in this grid is (9,9). The hollow circle is the target position.
Your task is to write a program that takes the current position of the robot (pos
x,
pos
y) and the target position (target
x, target
y), and control the direction of the robot
so that it will
arrive at the target
. Once it arrives, the robot should stay at the target
until a new target has been assigned. Note that the robot can take only one direction at
a time. If more than one direction output (%QX0.0 through %QX0.3) is activated, the
robot will not move. This should
never
happen for your program. You may freely choose
any of the viable paths, as long as it always gets closer to the target after each move.
The position and target coordinates are encoded in the binary form. They are mapped
to the sensor in the
little endian
format. For example, (6,1) will be represented in binary
as (0110, 0001). The 6 bits are mapped to the inputs as shown in Table
1
.
The HMI can be conveniently used to test and debug the program. It shows the current
position, target, direction control output and actual direction of the robot. You can also
click anywhere on the grid to set a new target.
Hint
: You may use the
BOOL
to
UINT
type conversion before processing the coor-
dinates in your program.
Georgia Institute of Technology
7
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
Figure 2: The robot can travel either up/down/left/right at a speed of 1 unit/cycle, and
it can only travel in one direction at a time
Table 1: Binary Map of the PLC
Axis
X
Y
Address
%IX0.0
%IX0.1
%IX0.2
%IX0.3
%IX0.4
%IX0.5
%IX0.6
%IX0.7
Value
0
1
1
0
1
0
0
0
Weight
2
0
2
1
2
2
2
3
2
0
2
1
2
2
2
3
Note
: We will test your submitted program with 10 random target points and each
target point will have 2 pts.
Georgia Institute of Technology
8
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
3
Traffic Light (20 Points)
The second process models a traffic light system at a pedestrian crossing.
There are
vehicles traveling easterly and westerly on the road, and pedestrians who wish to cross
the road. A red/yellow/green traffic light is used for the vehicles. A red/green traffic light
is used for the pedestrians. Normally, red light is displayed to the pedestrians and green
light is displayed to the vehicles. This scenario (red for pedestrians, green for vehicles) is
how the program should begin.
A vehicle congestion sensor is used to detect the amount of traffic.
If the traffic
becomes congested, the sensor will activate, and vice versa.
A button is available for
the pedestrian to indicate that they request to cross the road (“Pedestrian XING” in the
HMI Fig.
3
). Once pushed, the button will stay active for 1 second, before the process
simulator deactivates it automatically. The request shall be granted immediately if the
vehicle congestion sensor is not active (i.e., no traffic jam). The following sequence shall
be used:
1. Switch off the vehicle green light and switch on the vehicle yellow light for 3 seconds.
2. After the yellow light is on for 3 seconds:
•
switch vehicle yellow light
−
>
off
•
vehicle red light
−
>
on
•
pedestrian red light
−
>
off
•
pedestrian green light
−
>
on
3. The pedestrian green light will stay on for 15 seconds, then:
•
switch pedestrian green light
−
>
off
•
pedestrian red light
−
>
on
4. After 1 second:
•
pedestrian red light
−
>
on
•
vehicle green light
−
>
on
If there is a traffic jam (vehicle sensor activated) while the Pedestrian XING button is
pressed, the above sequence shall not be executed until the traffic jam is cleared. If the
button is pressed again before the above sequence finishes, it should be ignored.
Write a program that controls the traffic lights and test with the HMI. Your final
program will be tested in the following three scenarios.
•
Scenario 1: When the pedestrian sees red light and traffic is not congested, the XING
button is pressed once. The lights’ behavior should follow the sequence described in
the problem.
•
Scenario 2: Everything is the same as in scenario 1
except
the XING button is
pressed when the traffic is congested. The lights should not change until the traffic
becomes uncongested.
Georgia Institute of Technology
9
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Mini Project #2
PLC Programming with Ladder Logic
•
Scenario 3: Everything is the same as in scenario 1
except
the XING button is
pressed multiple times during the sequence. These button presses should not cause
any change in the lights behavior
Note
: We will test your submitted program with 16 tests 1.25 pts each.
Figure 3: The HMI of the traffic light control
Georgia Institute of Technology
10
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
4
Car Parking (20 Points)
Model the entry and exit of an underground parking lot. The parking lot has only one
lane where a single car can enter/exit at a time. It is necessary to control the traffic via
the traffic lights in order to avoid card accidents and congestion.
Figure 4: HMI of Car Parking Control
4.1
Part 4A (15/20 Points)
To control traffic, we have red lights to stop cars and green lights to initiate entry/exit.
If a car is in the lane, then the red lights turn ON. If no cars are in the lane, then the
green lights turn ON. Upon turning ON the main switch button, the main switch indicator
should turn ON and the system should start with green lights ON and red lights OFF.
4.2
Part 4B (5/20 Points)
Create a logic bomb when the parking lot has 4 cars or more by making all traffic lights
turn red.
Georgia Institute of Technology
11
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
Deliverables and Submission Instructions
Create a zip file called
<
First Name
>
<
Last Name
>
mp2.zip (Example:
George
Burdell
mp
2
.zip
), that includes all your files and submit it on Canvas.
Your
zip file should be generated in such a way that when it is extracted, we get a folder
with the name
programs
.
Note:
Failure to follow the submission and naming
instructions will cause 20% points loss.
Important Recommendation:
All of the submitted .st programs (from part 2
to part 6) MUST be compiled in the OpenPLC server (i.e., localhost:8080)
without any errors.
Compilation error in the OpenPLC server for any part
means ZERO for that part. All of the program names should be lower case.
<First Name>_<Last Name>_mp2.zip
|-- programs
|-- part2.xml
|-- part3.xml
|-- part4a.xml
|-- part4b.xml
|-- part2.st
|-- part3.st
|-- part4a.st
|-- part4b.st
Please check your submission multiple times as we will not accept any submissions after
the deadline for any reasons (e.g., wrong file submission). You will get ZERO points if
your program cannot be compiled without errors.
Georgia Institute of Technology
12
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Mini Project #2
PLC Programming with Ladder Logic
Autograder
Disclaimer: The autograder has been provided out of courtesy and we will not
answer any questions about that. The autograder has been made available as
a verification tool, it is indicative of what the grade on the project will be.
The instructors reserve the right to award a final grade that differs from what
you see in the autograder. If your programs satisfy the write-up requirements,
you will receive the full credit.
An autograder has been provided as a means for you to check your work before its final
submission. It is highly recommended that you use it to verify your submitted programs
before the final Canvas submission.
Please follow the below instructions to check your submissions in the autograder.
•
Close all the terminals, web windows and the folders in your VM.
•
Open a fresh terminal and start the OpenPLC Flask app
cd
~/Desktop/OpenPLC_v3
sudo ./start_openplc.sh
•
In a new terminal, change directory to the autograder
cd
~/Desktop/autograder
•
Copy/paste your written .st files into the relevant folders within the “Submission”
directory in the VM desktop.
•
Run the autograder with the given commands in the “readme.txt” file within the
“autograder” directory. For example:
python grader_p4a.pyc -o part4a.csv <file_directory>
<process_simulator_directory>
Each part of your submission will be run through the autograder. If there are compilation
errors or formatting errors, go back and check your work / what you have written in
the original xml file. When the autograder has completed, your final score for each part
and comments (for any deductions) is located in the output csv file in the “autograder”
directory. To re-run the autograder, delete the csv files and follow the steps above
Georgia Institute of Technology
13
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
Appendix for OpenPLC Programs
Please use the following addressing conventions for each of the OpenPLC programs.
Table 2: Part 1A
Address
Note
Address
Note
%IX1.0
Input0
%QX1.0
Output0
%IX1.1
Input1
%QX1.1
Output1
Table 3: Part 1B and 1C
Address
Note
Address
Note
%IX1.0
Input0
%QX1.0
Output0
Table 4: Part 2 Robot Path
Address
Note
Address
Note
%IX0.0
Position x bit 0
%IX0.1
Position x bit 1
%IX0.2
Position x bit 2
%IX0.3
Position x bit 3
%IX0.4
Position y bit 0
%IX0.5
Position y bit 1
%IX0.6
Position y bit 2
%IX0.7
Position y bit 3
%IX1.0
Target x bit 0
%IX1.1
Target x bit 1
%IX1.2
Target x bit 2
%IX1.3
Target x bit 3
%IX1.4
Target y bit 0
%IX1.5
Target y bit 1
%IX1.6
Target y bit 2
%IX1.7
Target y bit 3
%QX0.0
Direction Up
%QX0.1
Direction Down
%QX0.2
Direction Left
%QX0.3
Direction Right
Georgia Institute of Technology
14
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
Table 5: Part 3 Traffic Light
Address
Note
Address
Note
%IX0.0
Vehicle sensor
%IX0.1
Pedestrian crossing button
%QX0.0
Vehicle red light
%QX0.1
Vehicle yellow light
%QX0.2
Vehicle green light
%QX0.3
Pedestrian red light
%QX0.4
Pedestrian green light
Table 6: Part 4 Car Parking
Address
Note
Address
Note
%IX0.0
Main Switch Button
%QX0.1
Green Parking Light
%IX0.1
Vehicle Sensor 1
%QX0.2
Red Entrance Light
%IX0.2
Vehicle Sensor 2
%QX0.3
Red Parking Light
%QX0.0
Green Entrance Light
%QX0.4
Main Switch Indicator
Georgia Institute of Technology
15
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Mini Project #2
PLC Programming with Ladder Logic
Frequently Asked Questions (FAQ)
1. Q — Why do I see a long download estimation time when I try to download the files?
A — Sometimes because of network issues, downloading from a network outside
the campus results a better download speed. If you encounter this, please try to
download the files one by one and not in a group, because the cloud service first
tries to zip the files which could make it take a while.
2. Q — Why am I not seeing the ”Running Man” in OpenPLC?
A — Save the program first and it will appear.
3.
Q — How do I change the values of the variables in OpenPLC when running the
program?
A — Painfully. When running the program, on the left of the screen you will see
your variables with an eyeglass icon to the right.
Click on the each eyeglass to
add that variable to the Debugger on the far right of the screen. you will see your
variables followed by the state of each (True/False). Move your cursor over the
value and a ”Lock” icon will appear on the right. Left click on the lock icon and
a popup will appear the allows you to toggle the T/F value. Click ”Toggle Value”
and then OK and it will change the value.
4. Q — Is there an easy way to change the layout of the OpenPLC editor window?
A — Yes, function key F12 cycles through some layouts, one of which had the
editor window full size.
5. Q — I am seeing “Modbus Server: error binding socket =
>
Permission denied” what
do I do?
A — You need to run the openplc server as root, e.g.
sudo start
openplc.sh
6. Q — What will happen if I delete the VM?
A — You will lose all of your data you had on that machine. Please be prepared
to move the files between the guest and host frequently. It is recommended to set
up your personal or school’s cloud drive on the VM to back up every file you have.
7. Q — My OpenPLC does not start running the server.
A — Please make sure to use sudo in every stage. Most of the commands used for
this Mini Project require root privileges.
Georgia Institute of Technology
16
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
8. Q — Can we define additional variables in our LD programs? I would like to add some
that are not named in the write-up.
A — Yes, you can define some additional internal variables, but our test vectors
will only change the mentioned variables. In other words, the test vectors will not
interact with your variables directly.
9. Q — Do you have any good resources for learning ladder logic?
A —
https://ladderlogicworld.com/ladder-logic-basics/
https://www.plcacademy.com/ladder-logic-tutorial/
10. Q — I heard the locations are case sensitive, is that true?
A —
YES!
Make sure you type the location as %IX0.0 and not %ix0.0
11. Q — Do you have any tutorials or helpful videos?
A — Search youtube for ”TwidoSuite tutorial” - We used this in Fall 2018 and
the class seemed to find it helpful.
12. Q — OpenPLC Editor is acting buggy or crashing. What can I do?
A — Try using OpenPLC Editor for Windows instead of using it in the VM. Run-
ning the OpenPLC Editor program natively on Windows gives better performance
then running it in a VM. Keep in mind sometimes crashing occurs due to running
more than one instance of OpenPLC Editor in Windows. Open the task manager
to confirm that only one process of OpenPLC Editor is functioning at a time.
Its name is ”pythonw.exe”. Also, try restarting your computer next time it acts
buggy and not just restarting the program to avoid this buggy behavior.
13. Q — I am unable to get the autograder to run and receive the following error ”OSError:
[Errno 13] Permission Denied”
A — The permission on ProcessSimulator.py is wrong. Run chmod 777 * under
RobotPath/ for example or whatever part you’re testing in the autograder to make
it work for you. If that doesn’t work then backup your work outside the VM, delete
the VM, and reinstall the VM again.
14. Q — I’ve been having trouble figuring out how to trigger on and off without the speci-
fied time delay. Does anyone have any recommendations or articles for how to immediately
toggle output when input value is changed and there are assigned time delays?
Georgia Institute of Technology
17
Introduction to CPS Security (CS 6263)
Mini Project #2
PLC Programming with Ladder Logic
A — There are function blocks that do timing - pulse timer (PT), TON (ON delay
timer), TOF (OFF delay timer).
https://www.pro-face.com/otasuke/files/manual/gpproex/new/refer/mergedProjects/
logiccommand/logiccommand_mm_tontofinstr.htm
15. Q — What does function X mean or do?
A — Here are a few URLs to resources about function programming in LD:
1.
https://www.pro-face.com/otasuke/files/manual/gpproex/new/refer/mergedProjects/
logiccommand/logiccommand_mm_tontofinstr.htm
2.
https://thecontrolblog.com/2015/08/10/why-you-need-no-timers-other-than-on-delay/
3.
https://www.plcacademy.com/function-block-diagram-programming/
4.
https://github.com/thiagoralves/OpenPLC-Ladder-Editor/blob/master/ldmicro-rel2.
2/ldmicro/manual.txt
5.
https://openplc.discussion.community/post/how-to-make-a-clock-signal-8154345?
pid=1292648809&highlight=timer
6.
https://openplc.discussion.community/post/simple-circuit-help-9665652
Georgia Institute of Technology
18
Introduction to CPS Security (CS 6263)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Recommended textbooks for you

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage

Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengagePrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage

Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning