Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Plc tutorial

1,825 views

Published on

Published in: Business, Technology
  • Be the first to comment

Plc tutorial

  1. 1. Programming PLCsProgramming PLCs using LADDER Logicusing LADDER Logic
  2. 2. Presentation OutlinePresentation Outline Review of Ladder ProgrammingReview of Ladder Programming Keyence PLC Ladder BuilderKeyence PLC Ladder Builder Example 1: Motor ControlExample 1: Motor Control Example 2: Drill ControlExample 2: Drill Control Example 3: Traffic LightExample 3: Traffic Light
  3. 3. Programming the PLCProgramming the PLC Ladder Logic DiagramsLadder Logic Diagrams Function Block DiagramsFunction Block Diagrams Sequential Function ChartsSequential Function Charts Instruction ListInstruction List Structured TextStructured Text High-Level LanguageHigh-Level Language
  4. 4. PLC Scan CyclePLC Scan Cycle ReadRead InputsInputs ExecuteExecute ProgramProgram UpdateUpdate OutputsOutputs
  5. 5. Ladder Logic ExecutionLadder Logic Execution  Rungs of Ladder diagram are solved fromRungs of Ladder diagram are solved from Left to right and top to bottomLeft to right and top to bottom  Branches within rungs are solved top left toBranches within rungs are solved top left to bottom rightbottom right PP SS RR AA BB DD EE FF GG HH II JJ KK Left Power RailLeft Power Rail BranchBranch Right Power RailRight Power Rail Ladder RungLadder Rung
  6. 6. Basic LadderBasic Ladder ProgrammingProgramming
  7. 7. Basic LadderBasic Ladder ProgrammingProgramming
  8. 8. Basic LadderBasic Ladder ProgrammingProgramming
  9. 9. Basic LadderBasic Ladder ProgrammingProgramming TimerTimer OutputOutput Input TriggeredInput Triggered Timer SettingTimer Setting
  10. 10. Keyence Ladder BuilderKeyence Ladder Builder  http://www.keyence.com/products/plc.htmlhttp://www.keyence.com/products/plc.html -> PLC Library-> PLC Library  Free evaluation version – up to 50 timesFree evaluation version – up to 50 times  KV -> PLC Series from KeyenceKV -> PLC Series from Keyence
  11. 11. Keyence Ladder BuilderKeyence Ladder Builder StartStart ->-> ProgramsPrograms ->-> Keyence ApplicationsKeyence Applications ->-> Ladder Builder for KV Sample Ver.Ladder Builder for KV Sample Ver.
  12. 12. Keyence Ladder BuilderKeyence Ladder Builder Create a new file. Select the KV10Create a new file. Select the KV10 model.model.
  13. 13. Keyence Ladder BuilderKeyence Ladder Builder ToolbarToolbar LadderLadder EditorEditor
  14. 14. Keyence Ladder BuilderKeyence Ladder Builder Basic Table of I/OBasic Table of I/O KV-10KV-10 InputInput RelaysRelays OutputOutput RelaysRelays InternalInternal RelaysRelays Timers/Timers/ CountersCounters DataData MemoryMemory 0000 –0000 – 00050005 0500 –0500 – 050305031000 –1000 – 19151915T/C 000 –T/C 000 – 063063 DM 0 –DM 0 – 0999
  15. 15. Example 1 – Motor ControlExample 1 – Motor Control K1K1 ~~ StartStart StopStop K1K1 ~~ ~~ ~~ M1M1 K1K1 * The overload relay has been omitted in order to* The overload relay has been omitted in order to simplify the circuitsimplify the circuit
  16. 16. Example 1 – Motor ControlExample 1 – Motor Control  Stop -> Input Relay 0000 (X000)Stop -> Input Relay 0000 (X000) Normally Closed (NC)Normally Closed (NC)  Start -> Input Relay 0001 (X001)Start -> Input Relay 0001 (X001) Normally Open (NO)Normally Open (NO)  Motor -> Output Relay 0500 (Y050)Motor -> Output Relay 0500 (Y050)
  17. 17. Example 1 – Motor ControlExample 1 – Motor Control ENDHENDH ENDEND Ladder Diagram:Ladder Diagram: StartStart StopStop MotorMotor MotorMotor
  18. 18. Example 1 – Motor ControlExample 1 – Motor Control Add a normally open contactAdd a normally open contact SelectSelect relayrelay 00010001
  19. 19. Example 1 – Motor ControlExample 1 – Motor Control Add a normally closed contactAdd a normally closed contact SelectSelect relayrelay 00000000
  20. 20. Example 1 – Motor ControlExample 1 – Motor Control Add horizontal connection linesAdd horizontal connection lines
  21. 21. Example 1 – Motor ControlExample 1 – Motor Control Add an output relayAdd an output relay SelectSelect relayrelay 05000500
  22. 22. Example 1 – Motor ControlExample 1 – Motor Control Connect the circuit to the right power lineConnect the circuit to the right power line
  23. 23. Example 1 – Motor ControlExample 1 – Motor Control Place the cursor below the contact of relay 0001Place the cursor below the contact of relay 0001 Add a Branch with a NO contact (OR logic)Add a Branch with a NO contact (OR logic) SelectSelect relayrelay 05000500
  24. 24. Example 1 – Motor ControlExample 1 – Motor Control Place the cursor below the NO contact of relay 0500.Place the cursor below the NO contact of relay 0500. TypeType ENDEND -> for end of routine . Click-> for end of routine . Click OKOK..
  25. 25. Example 1 – Motor ControlExample 1 – Motor Control Place the cursor below on line 0004.Place the cursor below on line 0004. TypeType ENDHENDH -> for end of program . Click-> for end of program . Click OKOK..
  26. 26. Example 1 – Motor ControlExample 1 – Motor Control Run the simulatorRun the simulator
  27. 27. Example 1 – Motor ControlExample 1 – Motor Control Execute the program for continuous scanExecute the program for continuous scan
  28. 28. Example 1 – Motor ControlExample 1 – Motor Control Start the motorStart the motor (turn on and then off the start button)(turn on and then off the start button) Change the status here andChange the status here and Then pressThen press Write Current ValueWrite Current Value…… ……oror doubledouble click withclick with the mousethe mouse left buttonleft button
  29. 29. Example 1 – Motor ControlExample 1 – Motor Control Stop the motorStop the motor (watch the status of the motor – relay 0500)(watch the status of the motor – relay 0500)
  30. 30. Example 1 – Motor ControlExample 1 – Motor Control Stop the simulation and return to the editorStop the simulation and return to the editor
  31. 31. Example 1 – Motor ControlExample 1 – Motor Control Using labelsUsing labels
  32. 32. Example 1 – Motor ControlExample 1 – Motor Control Right click with the mouse button on the deviceRight click with the mouse button on the device and selectand select Change LabelChange Label
  33. 33. Example 1 – Motor ControlExample 1 – Motor Control Type the label and press OK (or Enter)Type the label and press OK (or Enter)
  34. 34. Example 1 – Motor ControlExample 1 – Motor Control Type all labels (save the program – optional)Type all labels (save the program – optional) If you use labels you can enter the device by its labelIf you use labels you can enter the device by its label (instead of its number)(instead of its number)
  35. 35. Example 2 – Drill ControlExample 2 – Drill Control M1M1 M2M2 L1L1 L2L2 UpperUpper Limit SwitchLimit Switch LowerLower Limit SwitchLimit Switch Drill MotorDrill MotorVerticalVertical MotorMotor (up and down)(up and down)
  36. 36. Example 2 – Drill ControlExample 2 – Drill Control  In the beginning of the drilling cycle the Upper LimitIn the beginning of the drilling cycle the Upper Limit Switch (0001) is closedSwitch (0001) is closed  The START button (0000) starts the drilling cycleThe START button (0000) starts the drilling cycle  The drill motor M1 (0500) must start. At the sameThe drill motor M1 (0500) must start. At the same time, the vertical motor M2 must start to descendtime, the vertical motor M2 must start to descend the drill (0501)the drill (0501)  The drill will stop at the Lower Limit Switch (0002).The drill will stop at the Lower Limit Switch (0002).  At this time, the vertical motor start to ascend theAt this time, the vertical motor start to ascend the drill (0502).drill (0502).  The drill motor must stop just at the upper position.The drill motor must stop just at the upper position.  Wait for a new drilling cycleWait for a new drilling cycle
  37. 37. Example 2 – Drill ControlExample 2 – Drill Control Non-retentive contacts:Non-retentive contacts:
  38. 38. Example 2 – Drill ControlExample 2 – Drill Control Go toGo to HelpHelp ->-> Instruction WordInstruction Word ->-> Instructions in Alphabetical OrderInstructions in Alphabetical Order ->-> DIFUDIFU
  39. 39. Example 2 – Drill ControlExample 2 – Drill Control SET – RESET instructionsSET – RESET instructions
  40. 40. Example 2 – Drill ControlExample 2 – Drill Control Go toGo to HelpHelp ->-> Instruction WordInstruction Word ->-> Instructions in Alphabetical OrderInstructions in Alphabetical Order ->-> SETSET ((RESRES))
  41. 41. Example 2 – Drill ControlExample 2 – Drill Control Timing diagram:Timing diagram: STARTSTART LIMIT1LIMIT1 MOTORMOTOR 11 LIMIT2LIMIT2 M2-M2- DOWNDOWN M2-UPM2-UP
  42. 42. Example 2 – Drill ControlExample 2 – Drill Control
  43. 43. Example 3 – Traffic LightExample 3 – Traffic Light  Start the operation with the switch S1Start the operation with the switch S1 (input 0000)(input 0000)  The red signal must be ON for 5The red signal must be ON for 5 seconds (output 0500)seconds (output 0500)  The green signal must be ON for 8The green signal must be ON for 8 seconds (output 0501)seconds (output 0501)  The yellow signal must be ON for 3The yellow signal must be ON for 3 seconds (output 0502)seconds (output 0502)  The cycle must continues until theThe cycle must continues until the switchswitch S1 is releasedS1 is released
  44. 44. Example 3 – Traffic LightExample 3 – Traffic Light Go toGo to HelpHelp ->-> Instruction WordInstruction Word ->-> Instructions in Alphabetical OrderInstructions in Alphabetical Order ->-> TMRTMR
  45. 45. Example 3 – Traffic LightExample 3 – Traffic Light
  46. 46. Example 3 – Traffic LightExample 3 – Traffic Light Place the cursor at the position you want toPlace the cursor at the position you want to add a Timer. Then, double click with theadd a Timer. Then, double click with the mouse left button and selectmouse left button and select InstructionInstruction ->-> TMRTMR
  47. 47. Example 3 – Traffic LightExample 3 – Traffic Light Define the Timer number and the PresetDefine the Timer number and the Preset value.value. Timer numberTimer number Preset valuePreset value
  48. 48. Example 3 – Traffic LightExample 3 – Traffic Light

×