plc tutorial - inside mines
TRANSCRIPT
![Page 1: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/1.jpg)
Programming PLCs Programming PLCs using LADDER using LADDER
LogicLogic
![Page 2: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/2.jpg)
Presentation OutlinePresentation Outline
Review of Ladder ProgrammingReview of Ladder ProgrammingKeyence PLC Ladder BuilderKeyence PLC Ladder BuilderExample 1: Motor ControlExample 1: Motor ControlExample 2: Drill ControlExample 2: Drill ControlExample 3: Traffic LightExample 3: Traffic Light
![Page 3: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/3.jpg)
Programming the PLCProgramming the PLC
Ladder Logic DiagramsLadder Logic DiagramsFunction Block DiagramsFunction Block DiagramsSequential Function ChartsSequential Function ChartsInstruction ListInstruction ListStructured TextStructured TextHigh-Level LanguageHigh-Level Language
![Page 4: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/4.jpg)
PLC Scan CyclePLC Scan Cycle
ReadReadInputsInputs
ExecuteExecuteProgramProgram
UpdateUpdateOutputsOutputs
![Page 5: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/5.jpg)
Ladder Logic ExecutionLadder Logic Execution Rungs of Ladder diagram are solved from Rungs 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 Branches within rungs are solved top left
to bottom rightto bottom 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
![Page 6: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/6.jpg)
Basic Ladder Basic Ladder ProgrammingProgramming
![Page 7: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/7.jpg)
Basic Ladder Basic Ladder ProgrammingProgramming
![Page 8: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/8.jpg)
Basic Ladder Basic Ladder ProgrammingProgramming
![Page 9: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/9.jpg)
Basic Ladder Basic Ladder ProgrammingProgramming
TimerTimer
OutputOutput
Input TriggeredInput Triggered
Timer SettingTimer Setting
![Page 10: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/10.jpg)
Keyence Ladder BuilderKeyence Ladder Builder http://www.keyence.com/products/plc.html
-> PLC Library Free evaluation version – up to 50 timesFree evaluation version – up to 50 times KV -> PLC Series from KeyenceKV -> PLC Series from Keyence
![Page 11: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/11.jpg)
Keyence Ladder BuilderKeyence Ladder BuilderStartStart -> -> Programs Programs -> -> Keyence Applications Keyence Applications ->->
Ladder Builder for KV Sample Ver.Ladder Builder for KV Sample Ver.
![Page 12: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/12.jpg)
Keyence Ladder BuilderKeyence Ladder Builder
Create a new file. Select the KV10 Create a new file. Select the KV10 model.model.
![Page 13: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/13.jpg)
Keyence Ladder BuilderKeyence Ladder Builder
ToolbarToolbar
Ladder Ladder EditorEditor
![Page 14: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/14.jpg)
Keyence Ladder BuilderKeyence Ladder BuilderBasic Table of I/OBasic Table of I/O
KV-10KV-10Input Input
RelaysRelaysOutput Output RelaysRelays
Internal Internal RelaysRelaysTimers/Timers/
CountersCountersData Data
MemoryMemory
0000 – 0000 – 00050005 0500 – 0500 – 05030503 1000 – 1000 – 19151915 T/C 000 – T/C 000 – 063063 DM 0 – DM 0 – 09990999
![Page 15: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/15.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
K1K1
~~
StarStartt
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
![Page 16: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/16.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
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)
![Page 17: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/17.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
ENDHENDH
ENDEND
Ladder Diagram:Ladder Diagram:
StartStart StopStop MotorMotor
MotorMotor
![Page 18: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/18.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Add a normally open contactAdd a normally open contact
Select Select relayrelay00010001
![Page 19: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/19.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Add a normally closed contactAdd a normally closed contact
Select Select relayrelay00000000
![Page 20: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/20.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Add horizontal connection linesAdd horizontal connection lines
![Page 21: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/21.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Add an output relayAdd an output relay
Select Select relayrelay05000500
![Page 22: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/22.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Connect the circuit to the right power lineConnect the circuit to the right power line
![Page 23: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/23.jpg)
Example 1 – Motor Example 1 – Motor ControlControlPlace the cursor below the contact of relay 0001Place the cursor below the contact of relay 0001
Add a Branch with a NO contact (OR Add a Branch with a NO contact (OR logic)logic)
Select Select relayrelay05000500
![Page 24: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/24.jpg)
Example 1 – Motor Example 1 – Motor ControlControlPlace the cursor below the NO contact of relay 0500.Place the cursor below the NO contact of relay 0500.
Type Type ENDEND -> for end of routine . Click -> for end of routine . Click OKOK..
![Page 25: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/25.jpg)
Example 1 – Motor Example 1 – Motor ControlControlPlace the cursor below on line 0004.Place the cursor below on line 0004.
Type Type ENDHENDH -> for end of program . Click -> for end of program . Click OKOK..
![Page 26: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/26.jpg)
Example 1 – Motor Example 1 – Motor ControlControlRun the simulatorRun the simulator
![Page 27: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/27.jpg)
Example 1 – Motor Example 1 – Motor ControlControlExecute the program for continuous scanExecute the program for continuous scan
![Page 28: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/28.jpg)
Example 1 – Motor Example 1 – Motor ControlControlStart 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 andThen press Then press Write Current ValueWrite Current Value……
……or or double double
click with click with the the
mouse mouse left left
buttonbutton
![Page 29: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/29.jpg)
Example 1 – Motor Example 1 – Motor ControlControlStop the motorStop the motor
(watch the status of the motor – relay 0500)(watch the status of the motor – relay 0500)
![Page 30: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/30.jpg)
Example 1 – Motor Example 1 – Motor ControlControlStop the simulation and return to the editorStop the simulation and return to the editor
![Page 31: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/31.jpg)
Example 1 – Motor Example 1 – Motor ControlControlUsing labelsUsing labels
![Page 32: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/32.jpg)
Example 1 – Motor Example 1 – Motor ControlControlRight click with the mouse button on the deviceRight click with the mouse button on the device
and select and select Change LabelChange Label
![Page 33: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/33.jpg)
Example 1 – Motor Example 1 – Motor ControlControl
Type the label and press OK (or Enter)Type the label and press OK (or Enter)
![Page 34: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/34.jpg)
Example 1 – Motor Example 1 – Motor ControlControlType 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)
![Page 35: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/35.jpg)
Example 2 – Drill ControlExample 2 – Drill Control
M1M1M2M2
L1L1
L2L2
UpperUpperLimit SwitchLimit Switch
LowerLowerLimit SwitchLimit Switch
Drill MotorDrill MotorVerticalVerticalMotorMotor
(up and (up and down)down)
![Page 36: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/36.jpg)
Example 2 – Drill ControlExample 2 – Drill Control
In the beginning of the drilling cycle the Upper Limit In 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 same The drill motor M1 (0500) must start. At the same
time, the vertical motor M2 must start to descend time, 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 the At 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
![Page 37: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/37.jpg)
Example 2 – Drill ControlExample 2 – Drill Control
Non-retentive contacts:Non-retentive contacts:
![Page 38: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/38.jpg)
Example 2 – Drill ControlExample 2 – Drill ControlGo to Go to Help Help -> -> Instruction WordInstruction Word -> -> Instructions in Alphabetical OrderInstructions in Alphabetical Order -> -> DIFUDIFU
![Page 39: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/39.jpg)
Example 2 – Drill ControlExample 2 – Drill Control
SET – RESET instructionsSET – RESET instructions
![Page 40: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/40.jpg)
Example 2 – Drill ControlExample 2 – Drill ControlGo to Go to Help Help -> -> Instruction WordInstruction Word -> -> Instructions in Alphabetical OrderInstructions in Alphabetical Order -> -> SET SET ((RESRES))
![Page 41: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/41.jpg)
Example 2 – Drill ControlExample 2 – Drill ControlTiming diagram:Timing diagram:
STARTSTART
LIMIT1LIMIT1
MOTORMOTOR11LIMIT2LIMIT2
M2-M2-DOWNDOWNM2-UPM2-UP
![Page 42: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/42.jpg)
Example 2 – Drill ControlExample 2 – Drill Control
![Page 43: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/43.jpg)
Example 3 – Traffic LightExample 3 – Traffic Light
Start the operation with the switch Start the operation with the switch S1 (input 0000)S1 (input 0000)
The red signal must be ON for 5 The red signal must be ON for 5 seconds (output 0500)seconds (output 0500)
The green signal must be ON for 8 The green signal must be ON for 8 seconds (output 0501)seconds (output 0501)
The yellow signal must be ON for 3 The yellow signal must be ON for 3 seconds (output 0502)seconds (output 0502)
The cycle must continues until the The cycle must continues until the switchswitch
S1 is releasedS1 is released
![Page 44: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/44.jpg)
Example 3 – Traffic LightExample 3 – Traffic LightGo to Go to Help Help -> -> Instruction WordInstruction Word -> -> Instructions in Alphabetical OrderInstructions in Alphabetical Order -> -> TMRTMR
![Page 45: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/45.jpg)
Example 3 – Traffic LightExample 3 – Traffic Light
![Page 46: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/46.jpg)
Example 3 – Traffic LightExample 3 – Traffic Light
Place the cursor at the position you want Place the cursor at the position you want to add a Timer. Then, double click with to add a Timer. Then, double click with the mouse left button and select the mouse left button and select Instruction Instruction -> TMR-> TMR
![Page 47: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/47.jpg)
Example 3 – Traffic LightExample 3 – Traffic Light
Define the Timer number and the Preset Define the Timer number and the Preset value.value.
Timer numberTimer number
Preset valuePreset value
![Page 48: PLC Tutorial - Inside Mines](https://reader033.vdocuments.site/reader033/viewer/2022051319/5889b93a1a28abd1218b5aa6/html5/thumbnails/48.jpg)
Example 3 – Traffic LightExample 3 – Traffic Light