Ladder Logic Program For Mac
Ladder logic (also known as ladder diagram or LD) is a programming language used to program a PLC (Programmable Logic Controller). It is a graphical PLC programming language which expresses logic operations with symbolic notation. Ladder logic is made out of rungs of logic, forming what looks like a ladder – hence the name ‘Ladder Logic’. Ladder logic free download - Apple Logic Pro X, Apple Logic Studio, Apple Logic Express Update, and many more programs.
Ridiculously powerful. Seriously creative.
Live LoopsFor spontaneous composition.
Live Loops is a dynamic way to create and arrange music in real time. Kick off your composition by adding loops, samples, or your recorded performances into a grid of cells. Trigger different cells to play with your ideas without worrying about a timeline or arrangement. Once you find combinations that work well together you can create song sections, then move everything into the Tracks area to continue production and finish your song.
Remix FX
Bring DJ-style effects and transitions to an individual track or an entire mix with a collection of stutters, echoes, filters, and gating effects.
Logic Remote
Control features like Live Loops, Remix FX, and more from your iPad or iPhone using Multi-Touch gestures.
Novation Launchpad
Live Loops supports Launchpad for a tactile experience. Use an 8x8 grid of colorful and expressive pads to dynamically trigger cells, input notes, adjust mixer levels and more.
Step SequencerPure beat poetry.
Step Sequencer is inspired by classic drum machines and synthesizers. Using the Step Sequence editor, quickly build drum beats, bass lines, and melodic parts — and even automate your favorite plug-ins. Add sophisticated variations to your pattern with a wide range of creative playback behaviors. Use Note Repeat to create rolling steps, Chance to randomize step playback, and Tie Steps Together to create longer notes.
Logic RemoteTouch and flow.
Logic Remote lets you use your iPhone or iPad to control Logic Pro on your Mac. Use Multi-Touch gestures to play software instruments, mix tracks, and control features like Live Loops and Remix FX from anywhere in the room. Swipe and tap to trigger cells in Live Loops. And tilt your iPhone or iPad up and down and use its gyroscope to manipulate filters and repeaters in Remix FX.
NewSequence your beats
Program drum patterns and melodic parts from your iPad or iPhone. Create dynamic rhythmic performances, and automate your plug-ins — all with a quick tap of your finger.
Multi-Touch mixing
Control your mix from wherever you are in the room — whether that’s next to your computer or on the couch — with Multi-Touch faders.
Pair and play
Use a variety of onscreen instruments, such as keyboards, guitars, and drum pads, to play any software instrument in Logic Pro from your iPad or iPhone.
Key commands
Create at the speed of sound with key commands in Logic Remote. Choose from curated commands for popular workflows, or create your own custom set.
Sampler
We redesigned and improved our most popular plug-in — the EXS24 Sampler — and renamed it Sampler. The new single-window design makes it easier to create and edit sampler instruments while remaining backward compatible with all EXS24 files. An expanded synthesis section with sound-shaping controls brings more depth and dynamics to your instruments. The reimagined mapping editor adds powerful, time-saving features that speed the creation of complex instruments. Use the zone waveform editor to make precise edits to sample start/end, loop ranges, and crossfades. And save hours of tedious editing with new drag-and-drop hot zones.
Quick Sampler
Quick Sampler is a fast and easy way to work with a single sample. Drag and drop an audio file from the Finder, Voice Memos, or anywhere within Logic Pro. Or record audio directly into Quick Sampler using a turntable, microphone, musical instrument, or even channel strips playing in Logic Pro. In a few steps, you can transform an individual sample into a fully playable instrument. And with Slice Mode, you can split a single sample into multiple slices — perfect for chopping up vocals or breaking up and resequencing drum loops.
Drum Synth
This powerful but easy-to-use plug-in creates synthesized drum sounds. Choose from a diverse collection of drum models and shape their sound with up to eight simple controls. Drum Synth is also directly integrated into the bottom of the Drum Machine Designer interface — giving you a focused set of sound-shaping controls.
Drum Machine Designer
Redesigned to be more intuitive and integrated, Drum Machine Designer lets you effortlessly build electronic drum kits. Apply individual effects and plug-ins on each discrete drum pad to experiment with sound design and beat-making in new ways. You can also create a unique layered sound by assigning the same trigger note to two different pads. To help you quickly edit sounds, Quick Sampler and Drum Synth are directly integrated into the Drum Machine Designer interface.
DrummerCompose to the beat of a different percussionist.
Using Drummer is like hiring a session drummer or collaborating with a highly skilled beat programmer. Create organic-sounding acoustic drum tracks or electronic beats with the intelligent technology of Drummer. Choose from dozens of drummers who each play in a different musical genre, and direct their performances using simple controls.
Compositions and PerformancesYour studio is always in session.
Logic Pro turns your Mac into a professional recording studio able to handle even the most demanding projects. Capture your compositions and performances — from tracking a live band to a solo software-instrument session — and flow them into your songs.
The ultimate way to record.
Seamless punch recording. Automatic take management. Support for pristine 24-bit/192kHz audio. Logic Pro makes it all easy to do — and undo. You can create projects with up to 1000 stereo or surround audio tracks and up to 1000 software instrument tracks, and run hundreds of plug-ins. It’s all you need to complete any project.
Get the most out of MIDI.
Logic Pro goes beyond the average sequencer with an advanced set of options that let you record, edit, and manipulate MIDI performances. Transform a loose performance into one that locks tight into the groove using region-based parameters for note velocity, timing, and dynamics. Or tighten up your MIDI performances while preserving musical details like flams or chord rolls with Smart Quantize.
Industry-leading tools
As your song develops, Logic Pro helps organize all your ideas and select the best ones. Group related tracks, audition alternate versions, and consolidate multiple tracks. Lightning-fast click-and-drag comping helps you build your best performance from multiple takes.
Smart Tempo
Go off-script and stay on beat with Smart Tempo, a way to effortlessly mix and match music and beats without worrying about the original tempo. Record freely without a click track. And easily combine and edit MIDI and audio tracks — from vinyl samples to live instruments to multitrack audio stems — with constant or variable tempo.
Flex Time
Quickly manipulate the timing and tempo of your recording with Flex Time. Easily move the individual beats within a waveform to correct drum, vocal, guitar, or any other kind of track without slicing and moving regions.
Flex Pitch
Edit the level and pitch of individual notes quickly and easily with Flex Pitch. Roll over any note and all parameters are available for tweaking.
Track Alternatives
Create alternate versions of a track or multiple grouped tracks, and switch between them at any time to audition different options. Create, store, and select from different edits and arrangements of track regions to make it easier to experiment with various creative ideas.
Takes and Quick Swipe Comping
Click and drag to choose the best sections of each take to create a seamless comp, complete with transition-smoothing crossfades. Save multiple comps and switch among them to pick the one you like best.
Track Stacks
Consolidate multiple related tracks into a single track. Use a Summing Stack as a quick way to create submixes. Or create layered and split instruments.
Project Alternatives
Create as many alternate versions of a project as you’d like, each with its own name and settings but sharing the same assets — efficiently saving storage space. Load any version to make changes without compromising your original.
Track Groups and VCA Faders
Manage large mixes with Track Groups and VCA faders. Assign any selection of channels to a track group, then control the levels or other parameters of all tracks in the group from any single channel in the group.
Automation
Easily capture changes to any channel strip or plug-in parameter. Just enable automation, press Play, and make your changes.
Even more pro features in the mix.
Logic Pro is packed with incredible tools and resources to enhance your creativity and workflow as you sharpen your craft — even if you’re a seasoned pro.
Graduate from GarageBand.
Logic Remote. Touch and flow.
MainStage
Sound as great onstage as you do in the studio.
Education Bundle
Five amazing apps. One powerful collection.
/1722-windows-installer-error.html. Mini Project #2: PLC Programming with
Ladder Logic
CS 6263/ECE 8813: Cyber Physical System Security (Fall 2019)
Assigned: September 14th, 2019 Due: September 28th, 2019, 11:59pm 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 programming 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, 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 names of the inputs and outputs in your program (please
see Appendix for more detailed information). 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.
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:
1. We have provided a Virtual Machine (Ubuntu) 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. You can use VirtualBox, VMware
Workstation (for Windows users) or Parallels Desktop (for MAC users) to use this
VM. First download the VM files located here (for .vbox and .vdi format) or here
(.ova format) and move them to your desired location on your personal machine.
Use VirtualBox (version 6.0 or later) or Parallels Desktop (version 15 preferably) to
open the downloaded VM. You can open the VM in by clicking on the .vbox file or
importing the .ova file directly in your hypervisor. Do not forget that these files
are your actual virtual machine and deleting them from your personal
computer will result in losing all of your work.
2. A user cs6263:Project2 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
The OpenPLC server should be running now and you can open Firefox and visit
http://localhost:8080 to access it. This platform provides you with a PLC simulated
environment 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).
3. Now it is the time to write your PLC programs. You can navigate to the Linux
application directory or /Desktop/OpenPLC Editor v1.0-Linux” directory and run
Georgia Institute of Technology 2 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
sudo ./OpenPLC_Editor/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.
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
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). For testing parts
2, 3, 4, and 5, 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.
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-5, very useful HMIs have been developed and are provided
in the VM. item (for part 2 & 3) You can use the directories /Desktop/ProcessSimulator/RoboPath and /Desktop/ProcessSimulator/TrafficLigh directories and
run
python ProcessSimulator.py
to start the HMIs associated with these parts of the project. Please note that the
HMI 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 HMI before uploading, and relaunch it after the
server is running again.
7. (for Part 4 & 5) You can do the same as what you did for parts 2 and 3 by going
through each process’ directory (i.e., /Desktop/ProcessSimulator/TankSystem or
/Desktop/ProcessSimulator/StirringSystem) and run the process simulator with
./run.sh
and the HMI file with
python hmi.py
Georgia Institute of Technology 3 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
Figure 1: The overall overview of the program design and test in the OpenPLC platform.
You can also use the UaExpert software. In the /Desktop/UaExpert folder, double
click UaExpert-1.5.0-319-x86 64.AppImage” (in GUI) or by typing the following
command in Terminal
./UaExpert-1.5.0-319-x86_64.AppImage
to start the software. Then, open the pre-configured StirringSystem.uap” or TankSystemMonitor.uap” file to start monitoring the I/O values in real time. The values of
interest have already been added to the Data access view”. You may also leverage
this software to manually set the input and test your program. In this case, the
simulator does not need to be running.
Georgia Institute of Technology 4 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
1 Part 1 (25 Points)
Construct three different Ladder Logic programs, each building on the previous one:
1.1 Part 1A (5 Points)
Construct a program that will simulate a push button activated LED. The program should
satisfy the following requirements:
1. When Input0 is activated, Output1 should activate;
2. When Input0 is deactivated, Output1 should deactivate;
3. Inversely, when Input1 is activated, Output0 should deactivate;
4. When Input1 is deactivated, Output0 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.
1.2 Part 1B (10 Points)
Construct a program that simulates an LED powered by an On-Off loop. Program requirements:
1. When Input0 is activated, Output0 should activate for 5 seconds, then deactivate
for 5 seconds;
2. The on/off process should repeat infinitely until the input is deactivated;
3. Output0 should immediately turn on after the activation of Input0;
4. Output0 should immediately turn off after the deactivation of Input0.
Note: Similar to the previous part, Input0 is not a push button.
1.3 Part 1C (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
point of time is reached. Then, the LLB could replace legitimate sensor readings that are
Georgia Institute of Technology 5 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
Table 1: Binary Map of the PLC
Axis | X | Y | ||||
Address | %IX0.0 | %IX0.1 | %IX0.2 | %IX0.3 | %IX0.4 | %IX0.5 |
Value | 0 | 1 | 1 | 1 | 0 | 0 |
Weight | 20 | 21 | 22 | 20 | 21 | 22 |
being reported by the PLC to the ICS with manipulated values. Building on the Part
1B, construct a Ladder Logic Bomb that activates output 0 irrespective of the previous
conditions and further changes to inputs when one of the following conditions occurs in
the program:
1. Output0 activates 5 times;
2. 25 seconds passed from the activation of Input0.
Note that after the activation of LLB, Output0 remains active regardless of the timers
and inputs status. Change the timer preset values to make sure your designed LLB works
in both of the aforementioned cases.
Hint: You might need to use the counter module.
Note: There are some cases where condition 1 becomes true before condition
2 and vice versa. Think about it deeply!
If Input0 deactivates before the (25-second) timer operation (e.g., after 5
seconds), the (25-second) timer must be reset.
The counter that is used for modeling condition 1 (5 time operation of Output0) should not be reset under any circumstances.
2 Robot Path (15 Points)
The first process models a robot (shown as a black solid circle in Fig. 2) looking for its path
on an 8 × 8 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 (7,7). 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 (110, 001). The 6 bits are mapped to the inputs as shown in Table 1.
Georgia Institute of Technology 6 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/sec, and it
can only travel in one direction at a time
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 coordinates in your program.
3 Traffic Light (15 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.
Georgia Institute of Technology 7 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
Figure 3: The HMI of the traffic light control
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. Let the pedestrian green light be on for 15 seconds. Then switch pedestrian green
light – > off, pedestrian red light – > on.
4. After 1 second, switch vehicle red light – > off, vehicle green light – > on.
If there is a traffic jam (vehicle sensor activated) while the Pedestrian XING button is
Georgia Institute of Technology 8 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
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.
4 Tank Balancer (25 Points)
4.1 Part 4A
The tank balancer process in the OpenPLC is a system consisting of four tanks, as shown
in the following figure.
Problem description
Your objective in this project is to write the PLC programs for two different processes. A
modified version of the open source software-emulated PLC called OpenPLC, as well as
process simulators will be used.
Tank Balancer
The first process is a system consisted of four tanks, as shown in the following figure.
Each tank has 1 water inlet and 1 water outlet, as well as 3 water level sensors. Tank 1’s outlet
is connected to the inlet of tank 2. Similarly, tank 2’s outlet is connected to the inlet of tank 3,
and tank 3’s outlet is connected to the inlet of tank 4. Water flowing out of tank 4’s outlet is
discarded. Additionally, each tank’s inlet is also connected to an independant water source,
which provides random water flow into the corresponding tank (denoted as RandomInput). The
water source is not controlled by the PLC in this case. The 3 water level sensors on each tank
are activated when the water level in the tank is above certain thresholds (i.e., low, medium,
high).
The PLC program should take the 12 sensor readings as inputs, and output 4 control signals to
the actuators of the 4 tanks’ outlet valves. The goal is to maintain the water level in each tank
between “low” and “medium” levels by adjusting the water flow among the tanks. Under no
circumstance should any “high” water level sensor be activated.
A special case is during the start of the simulation, when all tanks are empty and water is below
the “low” level. You should try to increase the water level in each tank as fast as possible, and
make sure the goal is satisfied starting at 30s after the simulation has started.
Stirring System
The second process is a mixing and stirring system. In this case, it’s a single tank which has 3
inlets for different materials (A, B, and C, respectively), a mixing blade which can be activated,
and an outlet for exhausting the mixture. This tank also has 4 level sensors, the first being the
empty sensor, and the rest three are similar to the ones in the first process (low, medium, high).
Note that the empty sensor is activated when the level is above 0.
Figure 4: Tank Balancer system Model
Each tank has 1 water inlet and 1 water outlet, as well as 3 water level sensors. Tank
1’s outlet is connected to the inlet of tank 2. Similarly, tank 2’s outlet is connected to
the inlet of tank 3, and tank 3’s outlet is connected to the inlet of tank 4. Water flowing
out of tank 4’s outlet is discarded. Additionally, each tank’s inlet is also connected to an
independent water source, which provides random water flow into the corresponding tank
(denoted as RandomInput). The water source is NOT controlled by the PLC in this case.
Three water level sensors on each tank are activated when the water level in the tank is above certain thresholds (i.e., low, medium, high). |
The PLC program should take the 12 sensor readings as inputs, and output 4 control
signals to the actuators of the 4 tanks’ outlet valves. The goal is to maintain the water
level in each tank between low” and high” levels exclusively by adjusting the water flow
among the tanks. In other words, the low” water level sensor should always be active
and high” water level sensor should never be active.
A special case is during the start of the simulation, when all tanks are empty and water
is below the low” level. You should let the water level increases initially, and make
sure the goal is satisfied starting at 30s after the simulation has begun. Note that it is
unnecessary to use a timer for 30s”. It is merely a checkpoint that will be used during
the grading process. The RandomInput is designed to provide adequate amount of water
flow so that a well designed control program can fill each tank above the low” level fast
enough.
Georgia Institute of Technology 9 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
4.2 Part 4B
With a correctly behaving control program, you are now going to implement a malicious
version of the program. Your goal is to remain stealth during the beginning test run”
of the malicious program and only start the sabotage afterwards. To do so, you need to
modify your program for the Tank Balancer so that after X minutes, only tank 2 will
start to overflow. In other words, the high” water level sensor in tank 2 will always be
activated after X minutes. All other tanks should remain the originally benign
behavior. In a real attack, X may be chosen to be very large to evade discovery during
the test run phase. For the purpose of this project, we will use a smaller value. Your goal
is to overflow tank 2 no earlier than 60 seconds after the simulation has begun, but
no later than 90 seconds. After 90 seconds, it should remain in the overflow state.
5 Stirring System (20 Points)
5.1 Part 5A
In this part, you need to write a control program for a mixing and stirring system. In this
case, it’s a single tank with 3 inlets for different materials (A, B, and C, respectively), a
mixing blade which can be activated, and an outlet for exhausting the mixture. This tank
also has 4 level sensors, namely the empty, low, medium, and high sensors. Note that the
empty sensor is activated when the level is above 0.
The PLC program should take the 4 level sensors as inputs, and control the valves for
the 3 inlets, the mixing blade, and the valve for the outlet. It should follow these specific
sequence in order to properly mix the materials:
1. The tank starts in an empty state, i.e., empty” level sensor is deactivated. All inlet
and outlet valves are closed, and mixing blade is turned off.
2. Only open the valves for inlet 1 and 2 to add A and B into the tank at the same
time, until the low” level sensor is activated. Turn off the valve for inlet 1 only.
3. Keep adding B until the medium” level sensor is activated. Leave the valve for
inlet 2 open.
4. Open the valve for inlet 3 to add B and C at the same time until the high” level
sensor is activated. Turn off both valves for inlet 2 and inlet 3. At this point, all
3 inlet valves should be closed.
5. Turn on the mixing blade.
6. After the mixing blade has run for 5 seconds, open the outlet valve to drain the
mixture and keep the mixing blade running. No inlet valve should be open
during this process.
7. When all mixture has been drained, the empty” sensor will be deactivated. As soon
as this happens, turn off the mixing blade. Wait for 3 seconds with the outlet
Georgia Institute of Technology 10 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
e PLC program should take the 4 level sensors as inputs, and control the valves for the 3
ets, the mixing blade, and the valve for the outlet. It should follow these specific sequence in
er to properly mix the materials:
1. Start from empty tank, make sure the outlet valve is closed, and mixing blade is t
off.
2. Only open the valve for inlet 1 to add A into the tank, until the “low” level sensor i
activated. Turn off the valve.
3. As soon as A is added, add B in the similar way until the “medium” level sensor is
activated.
4. Similarly, add C until the “high” level sensor is activated.
5. Turn on the mixing blade.
6. After the mixing blade has run for 5 seconds, open the outlet valve to drain the m
No inlet valve should be open during this process!
7 When all mixture has been drained
Figure 5: Stirring System Model
valve open, mixing blade turned off, and all inlet valves closed. Then close
the outlet valve.
8. Start over from step 1.
Note that for a valve, a logical high or True” means open and vice versa.
5.2 Part 5B
With a correctly behaving control program, you are now going to implement a malicious |
version of the program, again. As usual your goal is to remain stealthy during the begin ning test run” of the malicious program and only start the sabotage afterwards. To do so, you need to modify your program for the Stirring System so that after looping through |
the process Y times, it will invert the behavior of the mixing blade. In other words,
the mixing blade needs to be turned off in step 5 and 6, and turned on during the rest of
the time. In a real attack, Y may be chosen to be very large to evade discovery during
the test run phase. For the purpose of this project, we will use a smaller one. Your goal
is to invert the behavior of only the mixing blade after looping through the steps exactly
3 times, i.e., starting from the 4th time your program runs at step 1.
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 with called <First Name> <Last Name> mp2.zip (Example: Sreeramamurthy Tripuramallu mp2.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.
<First Name>-<Last Name>-mp2
– programs
– part1a.xml
– part1b.xml
– part1c.xml
– part2.xml
– part3.xml
– part4a.xml
– part4b.xml
– part5a.xml
– part5b.xml
– part1a.st
– part1b.st
– part1c.st
– part2.st
– part3.st
– part4a.st
– part4b.st
– part5a.st
– part5b.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)
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 |
%IX0.0 | Input0 | %QX0.0 | Output0 |
%IX0.1 | Input1 | %QX0.1 | Output1 |
Table 3: Part 1B and 1C
Address | Note | Address | Note |
%IX0.0 | Input0 | %QX0.0 | Output0 |
Table 4: Part 2 Robot Path
Address | Note |
%IX0.0 | Position x bit 0 |
%IX0.1 | Position x bit 1 |
%IX0.2 | Position x bit 2 |
%IX0.3 | Position y bit 0 |
%IX0.4 | Position y bit 1 |
%IX0.5 | Position y bit 2 |
%IX0.6 | Target x bit 0 |
%IX0.7 | Target x bit 1 |
%IX1.0 | Target x bit 2 |
%IX1.1 | Target y bit 0 |
%IX1.2 | Target y bit 1 |
%IX1.3 | Target y bit 2 |
%QX0.0 | Direction Up |
%QX0.1 | Direction Down |
%QX0.2 | Direction Left |
%QX0.3 | Direction Right |
Georgia Institute of Technology 13 Introduction to CPS Security (CS 6263)
Mini Project #2 PLC Programming with Ladder Logic
Table 5: Part 3 Traffic Light
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 Tank Balancer
Address | Note | Address | Note |
%IX0.0 | Tank 1 low level sensor | %IX0.1 | Tank 1 medium level sensor |
%IX0.2 | Tank 1 high level sensor | %IX0.3 | Tank 2 low level sensor |
%IX0.4 | Tank 2 medium level sensor | %IX0.5 | Tank 2 high level sensor |
%IX0.6 | Tank 3 low level sensor | %IX0.7 | Tank 3 medium level sensor |
%IX1.0 | Tank 3 high level sensor | %IX1.1 | Tank 4 low level sensor |
%IX1.2 | Tank 4 medium level sensor | %IX1.3 | Tank 4 high level sensor |
%QX0.0 | Tank 1 outlet valve | %QX0.1 | Tank 2 outlet valve |
%QX0.2 | Tank 3 outlet valve | %QX0.3 | Tank 4 outlet valve |
Ladder Logic Program For Mac Download
Table 7: Part 5 Stirring System
Address | Note | Address | Note |
%IX0.0 | Empty level sensor | %IX0.1 | Low level sensor |
%IX0.2 | Medium level sensor | %IX0.3 | High level sensor |
%QX0.0 | Inlet valve 1 (material A) | %QX0.1 | Inlet valve 2 (material B) |
%QX0.2 | Inlet valve 3 (material C) | %QX0.3 | Stirring Blade |
%QX0.4 | Outlet valve |
Ladder Logic Program For Mac Os
Georgia Institute of Technology 14 Introduction to CPS Security (CS 6263)