Programming manual for the Mitsubishi FX series PLC Level 3 National Diploma Level 4 Higher National Diploma Mark Crane – Engineering dept, Coleg Llandrillo 2016 1 When you have completed this manual and read the supporting notes for you module of study you will be able to: Know how to connect up an application system to the PLC. Know how to navigate your way around the programming software GX Developer. Know how to write programs using a structured approach. Know how to write, enter, edit and document programs in ladder logic form. Know how to download programs to the PLC. Know how to run a program. Know how to test the application system functions correctly using the monitor mode. Produce professional industry standard documentation. Previous knowledge required – none Equipment needed Mitsubishi FX0 or FX1 type PLC (preferably E+L trainers) +24V power supply Download cable PC or laptop GX developer software Application systems (traffic lights, bead sorter, component assembler) 2 Programming language – the language you will be using is Ladder logic. It’s based on electrical wiring diagrams, is very graphic and intuitive to use. The program consists of constructing rungs. On each rung is an output. Symbol You now need inputs coming into the PLC. These are represented by switches. The switches can be either normally open, NO or normally closed, NC. Symbols Normally open Normally closed For an output to come on a path must exist between the output and the left side of the ladder with all switches closed. This is really important! Make sure you understand this. All the rungs together make the complete ladder or program. So, the only way to really understand it all is to DO IT ! Go to the next page 3 Go to your computer application launcher, select Technology then double click on the GX developer icon. You should get the screen shot below. Go to the next page. 4 To start with you need to set up a Project. Click on project then from the drop down menu New project. You should see the box below Select -> FXCPU Select -> PLC type. You will find this written on the PLC you are using Select -> Ladder Now press -> ok Your screen should now look like this. Click on this cross to get rid of the box underneath and you will then get the full screen below 5 What you should notice is that a lot of icons have become active and that you have a rung of the ladder program. This is the last rung in the ladder program and must always go at the end of your program. Ok so let’s write your first program. Exercise 1 – writing a simple program Program specification Output Y0 must come ON (logic 1) when input X0 is driven ON (logic 1). First put a NO input switch on the left of the rung. Note -Where ever you put the blue square is where the icon will be placed. Select -> Normally Open (NO) switch and in the blue box type X0. Select -> OK You should get the screen below. 6 The end line has moved automatically down and a new rung has been inserted with your X0 input placed to the left. Now put an output on the rung. You do not have to move the blue square right as the software will automatically put the icon hard right. Select -> Output and in the box type Y0. Select -> OK You should get the screen below. Ok so now the program is complete. Now you need to convert the program from the above ladder logic graphic into a binary code that the PLC can understand when downloading the program to the PLC. 7 Select -> Convert and from the dropdown menu select -> convert You should now get a screen that looks like the one below. Notice that the grey has gone. When you add to a program it will always be grey. You must convert it before you can download the program to the PLC. Last thing to do is to save the program. Select -> Project -> Save as Select -> Project drive (for you it will be H and/or your pen drive) Select- > Drive path (folder, I suggest PLC) Select -> Project name (make it meaningful) Select -> Save Rules about saving Always save on a regular basis. If you are going to make big changes to your program then save the program before you make the changes and then rename the program to something different. If it all goes horribly wrong you can go back to the original. 8 Getting a program in the PLC Ok so now we are going to download the program to the PLC. Before you do this you need to set up the PLC system. The photo below shows the set up. Note – your PLC may not look quite like this as they differ slightly from unit to unit. To D-sub to back of computer Lift flap and plug in, be very careful the pins are easily bent PLC RUN switch +24V power supply Input switches on/off switch Make sure al input switches are UP in the off position (logic 0) Make sure the PLC run switch is in the OFF position Put power switch to ON The power light above the switch should be ON The power light on the PLC should be ON Go to the next page 9 Now go to GX developer Select -> online -> write to PLC You should get the window below. If you get the window below it confirms that the PLC and GX developer are communicating correctly. Click on Main and a tick will appear. Click on execute. It will ask you if you want to execute, click yes. Click OK when completed. That’s it. The Program is in the PLC. Go to next page 10 Now go to the PLC and flick the RUN switch to RUN. The RUN light on the PLC should come on. Your program is now running. Now look at the input and output LED’s on the PLC. They should al be OFF. Change input switch 1 which is connected to X0 to ON (logic 1). The input X0 LED should come ON. The output Y0 LED should come ON. This is exactly what you have told it to do in the original program specification. Go to next page 11 Monitor mode The monitor mode is an extremely powerful tool. It is useful for, amongst other things: Knowing exactly what the inputs and outputs of the PLC are doing at any time. Knowing exactly what features such as timers, counters and memory within the PLC are doing at any time. Checking that the program is functioning correctly according to the program specification. Fault finding To activate Select Online->monitor -> monitor mode You should see that any input that are activated and any outputs that are activated are highlighted in dark blue. Also any counters and timers will show the exact values they are at in the process. When you want to hop back into edit mode so that you can alter the program then: Select Edit -> write mode 12 Ok so now you know how to do the basics. What now follows is a set of exercises that give you all the basic building blocks that you will need to allow you to complete the assignment work. All the exercises have some explanation to varying degrees where necessary. Once you have completed the training then you need to use the building blocks to write complete programs. Examples of complete programs will be given at the end of this training. For each exercise you need to: enter the ladder logic given download it to the PLC test it by operating the switches on the trainer module and ensure it functions correctly using the monitor and observation of PLC input and output LED’s most importantly understand it – do not move on till you understand it. Ask if in doubt. For each example ensure you start a new project each time. Do not save your old program unless you want to save it for future reference. 13 Exercise 1 AND function – both switches X0 AND X1 need to be closed for the output Y0 to come on. Exercise 2 AND function – switch X0 needs to be closed AND X1 needs to be left closed for Y0 to come on. Look carefully at the condition of switch 1 when testing. Exercise 3 OR function – either switches X0 OR X1 need to be closed for the output Y0 to come on. You first need to construct a branch as shown below. Use the F10 icon when you have placed the blue square where you want the branch to go. Then drag the blue square. F10 Now finish it off by putting in the X1 contact as normal. 14 Exercise 4 AND/OR function – either switch X0 OR X1 must be closed AND X2 must be closed for output Y0 to come on. Exercise 5 You can use inputs as many times as you like in a program but and output must only appear on one rung. The next example shows the same inputs being used on different rungs driving different outputs. Test it to see what conditions bring on each output. Try work it out before you test it. Exercise 6 15 Latching – In many applications such as turning a machine on and off we just want to press a switch, let go, and the machine stays on. If we want to turn it off then we just do likewise to the stop button ie just dab it. The diagram below shows the situation. We are not using a motor but just looking at what Y0 does on the output LED. 24V X6 PLC Y0 Motor X7 Create and download the following program to the PLC and run it. You are now using the push button switches on the trainer. Switch 6 to start, switch 7 to stop. What you should notice when testing it is that when you press the switch, Y0 comes on but when you release the switch, Y0 turns off. This is correct as that’s how the PLC program works. What we want though is for the output Y0 to stay on when we release the switch. Ok so let’s move on a bit. Now add the following to the program and download it to the PLC. What you should now see is that when you dab X6 the Y0 LED stays on. Why? Because we have used a virtual switch to represent the state of Y0. When output Y0 is switched on by the momentary closing of X6 it also closes the NO Y0 switch. This now locks on or “latches” Y0. 16 However, we still need to be able to turn output Y0 off. Now add the following to the program and download it to the PLC. So if you operate X6 the Y0 LED comes on as before but now when you press X7 the Y0 LED goes off. When X6 is pressed you still are able to latch on Y0 as X7 is normally closed so there is a path between the left and right hand side of the rung. When X7 is pressed switch X7 open, the path is broken, so Y0 drops out and then one scan later the NO Y0 switch drops out. It is absolutely vital you understand the above technique as it crops up frequently. Another approach to latching Create and download the program below and test it. Notice that you are using square brackets for the output as the SET (on) and RST (off) are instructions. In the dialogue box type in SET (or RST) followed by a space and then the output Y0 (or whatever output you want. When X6 is dabbed the SET instruction turns on Y0. When X7 is dabbed the RST instruction turns OFF Y0. Which of the techniques, above, you use is entirely up to you. However some situations lend themselves to the first technique and other situations to the second technique. 17 Exercise 7 Counters – Counters are extensively used in PLC programming. Whenever an event occurs, such as items on a conveyor belt passing a certain point, then we will need a counter. When the count has reached a certain value then we can use the counter to initiate some other event. Counters start at C0 upwards. To set up a counter use a standard output and in the dialogue box state which counter you are using, a space, and the count limit with a K in front of it. Note the reset needs a square bracket. Create and download the following program to the PLC and run it. It is important that you use the monitor to show the state of the counter. Each time X6 is pressed the counter should go up by 1. When the counter reaches 10, which is the limit stated in the program, the C0 switch on line 4 will close and turn on Y0. The C0 switch will stay closed until a counter reset is carried out by pressing X7. Once the counter has reached its limit further pressing of X6 will have no effect until the counter is reset. How does the PLC know that the count has reached 10? The PLC uses RAM memory to carry out the counting. When the count has reached the pre-set limit (in the above case, 10) it uses another bit of RAM memory as an indicator to say so. 18 Eaxample 8 Memory is very important when dealing with PLC’s. One of the memory types in a PLC is very simple and allows you to store a single bit of information, ie - a logic 1 or a logic 0. This is very useful when you want to save the fact that some event has happened and then use that information later on in the program to make some event happen or not. The memory is some times called a flag. For the Mitsubishi the flags are given the letter M. They start at M0, M1, M2 ………and on Below is a simple latching circuit that turns on flag M0 when X6 is pressed and turns it off when X7 is pressed. Create and download the following program to the PLC and run it. Example 9 Timers – Just like counters timers are absolutely essential to PLC programming. Most programs involve some sort of timing element and many programs are riddled with timers carrying out all sorts of functions. A timer works by counting up from zero until it reaches a pre-set value (which you specify). It is very accurate. There are 2 types of timers you can use. Standard – counts up at a rate of 0.1s (T0 to T62) High speed – counts up at a rate of 0.01s (T32 to T62 – need to set M8082 to enable counters as high speed. ) Create and download the following program to the PLC and run it. K100 means 100 x 0.1s = 10s of time. 19 It is important that you use the monitor to show the state of the timer. When X6 is pressed the timer starts to count up to 100. If you keep X6 pressed the timer will get to 100 and time out. Once it has reached 100 it stops. The monitor shows the timer in blue to indicate it has timed out. When X6 is released the timer is reset ready to go again. Important – all switches to the left of the timer must be closed for the timer to time out. Now repeat the exercise, but this time open the switch X6 before it times out. What happened? ……………………………………………………………. Important bit – so how does the PLC know whether the timer has timed out or not? There is a bit (single memory element) in RAM that is dedicated to each individual timer. If the timer has not timed out the bit will be logic 0. If the timer has timed out the bit will be set to logic 1. 20 Exercise 10 Latched timers – the problem with the above program is that the timer input has to stay closed for the full duration of the timer duration. What if we just want a pulse to set the timer going and keep it going? We can do this but we need to use a virtual switch. In the RAM you have another special area where these virtual memory elements exist. Each element is a single bit of memory. They are given the letter M They start at M0, M1, M2, ………and so on. We treat then as an output. Create and download the following program to the PLC and run it. Line 0 – This you should recognise as a standard latch. When X6 is pressed M0 will stay on. Line 4 – When M0 closes the timer will start and continue until it times out. When it times out the NC switch of T0 on line 0 will open. This will cause M0 to switch off and timer 0 will automatically reset due to M0 opening on line 4. 21 We represent this using a timing diagram below. X6 M0 T0 time 10 sec The pulse from the timer is short (1 scan time), but this is ok as we can use it elsewhere in a program to make something else happen. Challenge – try making a latched timer using the SET and RST instructions. Exercise 11 Ok so now let’s look at pulse generation. Let’s say we want a light connected to Y3 to flash on and off. What we need is 2 timers each driving the other. Create and download the following program to the PLC and run it. Line 0 – As T1 has not timed out the NC T1 switch will be closed so T0 will start to time out. Line 4 – After 1s T0 will time out. This will close the T1 NO switch and start T1. Line 8 – After 1s T1 will time out. This will cause the NC switch of T1 to open on line 0 resetting T0. When T0 resets the NO switch of T0 on line 4 will open resetting T1. The whole thing then starts again and repeats for ever. Y3 will do exactly the same as T0. 22 T0 T1 Y3 time 1 sec 1 sec Looking at the above diagram you can see the relationship between the two timers in time. Note that T0 resets before T1. Can you think why? When you have checked the program is working try changing the values in the timers. Which timer is responsible for the on time and which the off time? How would you cure the problem? Commenting a program You will need to put helpful documentation on your programs to help you understand it, but also to help others who may follow you. Comments are used to label individual input and output icons. Statements are used to describe whole rungs. To enable the above go to:Edit -> Documentation -> then either statement or comment. Where ever you put the blue square is where the action will take place. 23 Student exercise 1 Ok so let’s have a go at some programming on your own. Here is a fairly do-able problem for you to solve. It’s a car seat belt warning system. Specification Driver’s seat belt sensor gives a logic 1 if fastened. Passenger’s seat belt sensor gives a logic 1 if fastened. Ignition gives a logic 1 if on. Buzzer turns on with a logic 1. If the ignition is on and either the driver or passengers seat belt is undone turn on the buzzer. Draw a block diagram showing the PLC with its inputs and outputs. You need to choose which inputs and outputs you are going to use. Write the program and test it. Demonstrate to your tutor. Modified specification The buzzer needs to come on for 0.5s and off for 0.5s. Edit the program and test it. Demonstrate to your tutor. Modified specification The passenger seat has a pressure sensor which gives a logic 1 if a passenger is present. Edit the program and test it. Demonstrate to your tutor. 24 Software Design Process This design process is the one you must use for all your assignment work. I will not accept a program without it. 1. Write a program specification. (This says exactly what the program must do). It is usually carried out in consultation with the customer. 2. Draw up the Input/output allocation diagram relative to the control system. 3. Write the software. 4. Comment the software. 5. Download the software to the PLC and run it. 6. Test the software using the monitor and observation of the system performance. Record results. 7. Evaluate the software by reflecting back on the results and design specification. 8. If the design specification is met you have completed the design process and you can go to 9. If not then go back and redo points 3 to 7. 9. Save the software to at least 2 different mediums (hard drive, pen drive, Cloud etc, etc. In real life you would then hand over the documentation and the software to the customer. This will include the original file and at least one backup. You would also keep the original file and at least one backup. 25 Student exercise 2 Write a PLC program for a 2 person quiz buzzer/light controller to the following specification using the above design process. Hint – initially just get it going so that you have the relevant light coming on when the correct switch is pressed. Then bring into play the reset. Then bring into play the locking out part. You need to use a latching technique to make it all work! 1 Program specification Each team (A and B) has a push button which gives a logic 1 when pressed. The first team to press their push button brings on their light (logic 1 is on). The first team to press locks out the other team. The buzzer will come on (logic 1 is on) whichever team presses their push button first. The buzzer will only come on for 0.5 seconds. The lights are turned off when the reset is pressed. 2 Input/Output allocation diagram Team A push button PLC X6 Y0 Light A Team B push button X7 Y1 Light B X0 Y2 Buzzer Reset 3 Write the software. 4 Comment the software. 5 Download to the PLC 26 6 Test the software. Record results. Test results 1 Test results 2 Test results 3 7 Evaluate the software by reflecting back on the design specification. Evaluation 1 Evaluation 2 Evaluation 3 8 If the design specification is met you have completed the design process. If not then go back and redo points 3 to 7. 9 Save your software to two different mediums. 27 Student exercise 3 Sequencers –There are lots of applications where a sequence of events that are time related need to happen repetitively. The classic example is a set of traffic lights. The program to achieve this involves the use of several timers configured as in Example 10. How many timers we need depends on the number of events in the sequence. Ok so let’s go through the design process in detail. 1. Program specification. Three hydraulic rams need to sequence as shown below in the table for the times shown. The cycle needs to repeat. time 2s RAM1 (Y0) ON RAM2 (Y1) ON RAM3 (Y2) OFF 3s ON OFF ON 4s OFF ON ON Draw up a timing diagram T0 T1 T2 2s 3s 4s time RAM1 RAM2 RAM2 RAM3 28 Derive the logic for each ram. By inspection of the timing diagram we can see that:RAM1 needs to be activated when T1 is LOW RAM1 = NOT T1 --- therefore we need a NC switch derived from T1 RAM2 needs to be activated when T0 is low OR T1 is HIGH RAM2 = NOT T0 OR T1 --- therefore we need a NC switch derived from T0 OR’d with a NO switch derived from T1 RAM3 needs to be activated when T0 is HIGH RAM3 = T0 --- therefore we need a NO switch derived from TO 2. Draw Input/output allocation PLC Y0 RAM1 Y1 RAM2 Y2 RAM3 3. Write the software program. The PLC program Example11 has been done for you and is available on MOODLE. You need to access the ZIP file and save it to your H drive. Unzip it using 7Zip in accessories and then run it in GX developer. 4. Comment the software. This has already been done for you. 29 5. Download to the PLC 6. Test the software To test the software you need to carry out the following. Make sure you have the monitor running. Check that the timers are working correctly. You should see each timer time out in order and then all the timers reset. Check that each output LED Y0, Y1,and Y2 come on at the correct time and for the correct duration, and that the whole sequence repeats. Test results 1 Test results 2 Test results 3 7. Evaluate the software by reflecting back on the design specification. Evaluation 1 Evaluation 2 Evaluation 3 8. If the design specification is met you have completed the design process. If not then go back and redo points 3 to 7. 9. Save to at least two different mediums. 30 Student exercise 4 Write a PLC program to the following specification. time Y0 Y1 Y2 5s OFF ON ON 3s ON ON OFF 4s OFF OFF ON Three outputs need to sequence as shown below in the table for the times shown. The cycle needs to repeat. You must use the design process we have already gone through. When you have managed to get the sequence running correctly modify the program as follows. 1. The sequence will only start when X6 pressed. 2. The sequence will stop when the cycle has repeated itself 5 times. It will then re-start when X6 is pressed. 31 Student exercise 5 In this exercise we will take a design problem from start to finish as with exercise 3. However, the program will be gradually developed and evolved step by step. At each step the program is loaded into the PLC and with the aid of the monitor checked to see it functions correctly against the specification brief. We will use a table to show this. Tank filling MOTOR Liquid 1 V1 V2 Liquid 2 L3 L2 V = valve open when logic 1 L = level sensor. Logic 0 when uncovered L1 Motor on when logic 1 V3 Mixed liquid 32 The above diagram shows a tank used in a liquid mixing process. The specification is as follows. Program Specification The tank is initially empty with V1, V2 and V3 all closed. The motor is off The process starts automatically The tank is filled to L2 when V1 is opened When L2 is triggered V1 is turned off The motor comes on when L2 is triggered V2 is opened when L2 is triggered The tank is filled to L3 when V2 is opened When L3 is triggered V2 is turned off The motor stays on for 20 seconds after L3 is triggered After 20 seconds has elapsed V3 is opened and the motor stays on When all the liquid has drained out of the tank V3 is closed and the motor is turned off The cycle repeats Next, we need to allocate the PLC inputs and outputs we are going to use PLC L1 X0 Y0 V1 L2 X1 Y1 V2 L3 X2 Y2 V3 Start X6 Y3 Motor 33 So let’s develop the program This must be done in a methodical and systematic way using design techniques. Guessing and trial and error may eventually work but the program may be longer and more complex than it needs to be. In addition, there may be glitches in the program that may cause operational problems under certain circumstances. The program needs to be clean, tight and logical so that others can understand it. A) Let’s just get the tank to fill from empty to level L2. For this to happen:L1 will NOT be triggered as no liquid is in the tank. As L1 is connected to X0 then condition is V1 = NOT L1 or Y0 = NOT X0 As soon a liquid starts to flow into the tank, L1 (X0) will be triggered so we need a latching circuit to ensure the Valve V1 (Y0) continues to stay open till L2 (X1) is reached. When L2 (X1) is reached this will unlatch V1 (Y0) The rung of software is shown below. Create a new project and enter the rung below with all the comments and labels. 34 Testing Ensure all PLC switches are in the off position. Put the PLC in RUN mode. Use monitor mode to check all inputs, outputs, timer. 1) The PLC condition lights should be as follows X0 (L1) OFF X1 (L2) OFF X2 (L3) OFF Y0 (V1) ON Y1 (V2) OFF Y2 (V3) OFF Y3 (MOT) OFF 2) Now manually trigger X0 to simulate L1 being triggered as the liquid level rises. Notice Y0 (V1) stays on as its latched. X0 (L1) ON X1 (L2) OFF X2 (L3) OFF Y0 (V1) ON Y1 (V2) OFF Y2 (V3) OFF Y3 (MOT) OFF 3) Now manually trigger X1 to simulate L2 being triggered as the liquid level rises further. Note that V1 (Y0) turns off. X0 (L1) ON X1 (L2) ON X2 (L3) OFF Y0 (V1) OFF Y1 (V2) OFF Y2 (V3) OFF Y3 (MOT) OFF Evaluate-Checking against the specification, the above is correct and no further correction is needed. 35 B) Ok, let’s move on. We now need to get V2 and the motor to come on when L2 is triggered. V2 (Y1) will be turned on when L2 (X1) is triggered and L3 (X2) is not triggered. Condition V2 = L2 AND NOT L3 or Y1 = X1 and NOT X2 The motor (Y3) will be turned on when L2 (X1) is triggered and we need it to stay on till L1 (X0) is uncovered at the end of the cycle. Latching is needed. Why? Condition Motor = X1 The rungs of software are shown below. Add this to your existing program. 36 Testing Put the PLC in RUN mode and carry out the testing as before up to the 3). 4) Now trigger L2 (X1) and the state of the inputs and outputs should be as shown below. X0 (L1) ON X1 (L2) ON X2 (L3) OFF Y0 (V1) OFF Y1 (V2) ON Y2 (V3) OFF Y3 (MOT) ON 5) Now trigger L3 (X2) and the state of the inputs and outputs should be as shown below. X0 (L1) ON X1 (L2) ON X2 (L3) ON Y0 (V1) OFF Y1 (V2) OFF Y2 (V3) OFF Y3 (MOT) ON Evaluate Checking against the specification, the above is correct and no further correction is needed. 37 C) Now we need to sort out the 20s time delay and the subsequent turning on of V3. We can use L3 (X2) to trigger the timer. L3 stays on during the whole of the time delay period so we do not need a latched timer. Condition L3 (X2) = T0 When the 20S delay is over then we use the timer to trigger V3. V3 needs to be latched as L3 will be uncovered as soon as V3 opens. Condition T0 = V3 (Y2) (latched) The rungs of software are shown below. Add this to your existing program. 38 Testing Put the PLC in RUN mode and carry out the testing as before up to the 5). 6) After 20S you should see the following:X0 (L1) ON X1 (L2) ON X2 (L3) ON Y0 (V1) OFF Y1 (V2) OFF Y2 (V3) ON Y3 (MOT) ON 7) Let’s start to simulate the drain down. Now put L3 (X2) to 0. You should see the following. X0 (L1) ON X1 (L2) ON X2 (L3) OFF Y0 (V1) OFF Y1 (V2) ON Y2 (V3) ON Y3 (MOT) ON 8) Now put L2 (X1) to 0. You should see the following. X0 (L1) ON X1 (L2) OFF X2 (L3) OFF Y0 (V1) OFF Y1 (V2) OFF Y2 (V3) ON Y3 (MOT) ON 9) Now put X0 (L1) to 0. You should see the following. X0 (L1) OFF X1 (L2) OFF X2 (L3) OFF Y0 (V1) ON Y1 (V2) OFF Y2 (V3) OFF Y3 (MOT) OFF Evaluate Point 6) is correct in that V3 opens and the motor stays on. Point 7) has a problem. V2 has opened when it should not. Point 8) is correct. Motor is still on and V3 stays open whilst V1 and V2 are closed. Point 9) is correct. The sequence repeats. 39 So how to sort out the problem with V2. The problem arises because we are using L3 (X2) to turn off V2. As soon as we drain down and L3 is uncovered then the condition for the valve to come on again is created. So how to cure the problem? We use a technique called BLOCKING. We need to pick up on an output that occurs during the period we are interested in (could be output, counter or timer) and insert that into the rung controlling V2. We know that V3 is on only when we drain down. So let’s use that. We need to use a normally closed switch as this will be closed when V3 is closed thus allowing V2 to operate when filling, but open and so blocking V2 when V3 is open. So modify rung 5 as shown below. Now retest the program and ensure it works correctly. 40 Program so far Now modify your program to the following specification The cycle will only start when X6 is pressed The cycle must repeat 3 times X6 needs to be pressed before the cycle restarts 41 Student exercise 6 To complete your training choose one of the 2 options below. When completed and documented have your tutor check it. 1. Digital lock Design a digital lock that will activate an output when the correct sequence of inputs is pressed. The number of inputs must be at least 4. The specification is as follows. The code must be at least 4 inputs. No input is to be repeated when entered The code must be entered in the correct sequence If the code is entered out of sequence the whole sequence will reset An output will indicate the correct sequence has been entered A reset needs to be provided You need to assign appropriate PLC inputs and outputs. 2. Reaction tester Design a reaction tester that will indicate how fast someone can react. The specification is as follows. The reaction time must be accurate to 0.1 seconds The test will initiate after a input is pressed The test will start 2 seconds after the input has been pressed A single light will come on after 2 seconds. Subsequent lights will come on 0.1 seconds after that until all 6 lights have come on The lights will stop coming on when a second input button is pressed or all 6 lights have come on The lights will freeze indicating the reaction time until the first input is pressed again to repeat the test. You need to assign appropriate PLC inputs and outputs. 42 Special purpose internal M relays There are many internal relays that are available to you, that do weird and wonderful things. They are there to make your life easy under certain circumstances. M8000 – always closed when PLC is in RUN mode. M8002 – Gives a single pulse when PLC switched on. Pulse duration is 1 scan time. M8011 - 0.01 second continuous pulses (0.005 Sec on, 0.005 Sec off). M8012 - 0.1 second continuous pulses (0.05 Sec on, 0.05 Sec off). M8013 - 1 second continuous pulses (0.5 Sec on, 0.5 Sec off). There are more but they are not in the remit of this module. M8002 is particularly useful for when a control system needs to initialise when switched on, for example a robot arm where all the axes need to go to datum. Well, that’s it really. You now need to go away and find some projects to do to get your skill level up to the level you want. That’s when the fun starts and you really start to understand. Best of luck! 43
© Copyright 2026 Paperzz