Program that takes the current position of the robot

Assignment Help Electrical Engineering
Reference no: EM132381176

PLC Programming with Ladder Logic

1 Part 1
Construct three different Ladder Logic programs, each building on the previous one:

Part 1A
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.

Part 1B
Construct a program that simulates an LED powered by an On-Off loop. Program re- quirements:
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.

Part 1C
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

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 Out- put0 ) should not be reset under any circumstances.

2 Robot Path

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 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.

3 Traffic Light
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.

4 Tank Balancer

Part 4A

The tank balancer process in the OpenPLC is a system consisting of four tanks, as shown in the attached 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 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.

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

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 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.

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.

Attachment:- PLC Programming with Ladder Logic.rar

Reference no: EM132381176

Questions Cloud

Discuss your voting choice and research : Discuss your voting choice and research using the concepts from the book and video. Provide an argument justifying your voting choice utilizing at least.
Journalize the entry to record the payment of the note : A business issued a 45-day note for $80,000 to a creditor on account. The note was discounted at 5%. Assume a 360-day year.
Enterprise-wide information governance program : The knowledge needed to make informed decisions on an enterprise-wide Information Governance program for the company.
Discuss difference between cash and accrual basis accounting : Discuss the difference between cash and accrual basis of accounting. Apply this to a company that you have worked for and discuss how the needs and size of the.
Program that takes the current position of the robot : PLC Programming with Ladder Logic - Construct different Ladder Logic programs - Construct a program that will simulate a push button activated LED.
Describe the purpose of accounting : Prepare a 800 to 1,100 word brief that discusses (1) the purpose of accounting, (2) identify the four basic financial statements, and (3) explain how they.
Individual or component costs of? capital : You have just been hired to compute the cost of capital for? debt, preferred? stock, and common stock for the Mindflex Corporation.
Find the required annual payments : Construct an amortization schedule for a $1,000, 3.5% annual rate loan with 3 equal payments. The first payment will be made at the end of the1st year.
Exploratory modelling and analysis : Perhaps the most doubtless way to implement a policy is through informed decision making. Smart cities are being developed even as we speak.

Reviews

len2381176

10/3/2019 3:23:28 AM

If the expert agrees that he can do all the parts, then I will share .ova file and .vbox file which is custom made for the project. Please approve only if the expert has read all the parts and will be able to do them with guarantee.

Write a Review

Electrical Engineering Questions & Answers

  What is the total capacitance of the circuit

Assume that three capacitors with values of 5 µF, 12 µF, and 22 µF are connected in parallel. What is the total capacitance of the circuit?

  Indirect method of expression

Although the use of p.u.valuefirst sight seem a rather indirect method of expression there are, in fact, great advantages. Give these advantages

  Find corresponding current and find interval

The charge entering a certain circuit element is found to be q=5te-10tc. - find corresponding current and find interval t less then 0 at which current is minimum?

  Find total charge qt stored by parallel connected capacitor

Three series-connected capacitors, C1, C2 and C3, with capacitances 10uF, 15uF and 27uF respectively, are connected in parallel with a 15uF capacitor and a 150V DC source. Calculate: a) Equivalent capacitance of the circuit

  Design a noninverting amplifier

Lay out the design of the plate and include on the drawing the production and specification data that you would submit with your design.

  What does the shift register contain after three clock pulse

A byte containing 01100011 is right shifted (right-most bit first) into an 8-bit shift register with an initial state of 00110110 (01100011=>00110110) What does the shift register contain after three clock pulses

  How to construct a simple solar cell

How To Construct A Simple Solar Cell? (Step by Step explanation) wiht Basic Operating Principle Of Photovoltaic Cell

  Solve the model to find an expression for the output voltage

A certain boost converter is implemented with a MOSFET and a p-n diode. The MOSFET can be modeled as ideal, but the diode exhibits a substantial reverse-recovery process, with reverse recovery time tr and recovered charge Qr .

  What is the converter output for a temperature of 25 f

A temperature sensor measures from -44 f to 212 F with an output of 0-5 v. If an 8 bit ADC is used, what is the converter output for a temperature of 25 F

  What is steady state response of system due to an input

assuming k>0 what is steady state the response of the above system due to an input of the form , x(t) = 2sigma(t)+u(t). where sigma(t) denotes unit impulse function and u(t) denotes unit step function

  Compute the maximum and minimum values of the amplifier

A JFET has the following ratings: gm0 = 4000µs at VGS off ( ) = 6 Volts and gm0 = 2000µs at VGS off ( ) = 2Volts. The component is used in a common source amplifier with values of RD = 3.3 Kohm, RL = 4.7 K ohm,and VGS = 750

  Determine the final temperature of nitrogen

A piston-cylinder device initially contains 1 m of nitrogen gas at 400kpa and 27 c. A resistance heater is turned on inside the cylinder which passes 70 kj of electricity to the nitrogen gas.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd