How To Write PLC Program In Keyence PLC Software?

How to write PLC Program in Keyence PLC Software? 

In the below article, we are going to see how to write and execute a PLC ladder diagram using Keyence Software. In order to gain a better understanding of the software we took “SINGLE TANK LEVEL MONITORING SYSTEM”.

Statement of the Problem

A Single Tank level is controlled by two-level sensors namely high-level and low-level sensors. When the High-level sensor detects the tank outlet the fluid exits through the valve. Similarly, when the Low-level sensor is detected, the water will be filled through the inlet valve. When both sensors are detected, it will be malfunction both valves will be closed.

Full PLC Ladder diagram of Single Tank Level Monitoring System

The circuit Schematic of Single Tank control is shown below

Input and output declarations for every PLC block

S. NoOperationInput/ 0utput/ OthersAddress of Each Block
1Start ButtonInputR000
2Stop ButtonInputR001
3Main CoilOutputR202
4Main Coil (For continue “ON”)Latch (Associated Coil, Not Operative)R202
5Inlet ValveOutputR203
6Output ValveOutputR204
7Low-Level SensorInputR002
8High-Level SensorInputR003

Various Phases of Working of Ladder Logic

The PLC Program is written in Keyence Ladder Logic software. As per the above statement, the PLC program in Three sections

  1. Start and Stop operation for Single Tank Control
  • In this section of ladder logic, we have start and stop buttons. Once the Start pushbutton is pressed “Main Coil” gets energized. The Main coil is introduced to start the PLC sequence. 
  • The Start logic is built using the latching concept (Push button).
  •  The process can be stopped entirely by pressing the stop button.
  1. Outlet Valve Operation
  • In this section the Outlet Valve will be open once the High-level Sensor is detected.
  • The Outlet valve Closed. When Low-Level Sensor detected.
  • The Inlet Valve remains Closed Until the Low Sensor is detected.

  1. Inlet Valve Operation
  • In this section the Inlet Valve will be open once the Low-level Sensor is detected.
  • The Inlet valve Closed. When High-Level Sensor detected.
  • The Outlet Valve remains Closed Until the High Sensor is detected.
  • The Start button is provided with Low-level Sensor, indicating that once the sequence is started the Inlet valve should open to fill the fluid in the tank

How to program ladder logic using Keyence Ladder Logic PLC Simulator are as follows

[Download] KVStudio V6 Keyence PLC Software

1.Once installed open the KV STUDIO by double clicking. The following window appears

2. Click the New button. The below window appears. Type the Project name(N) and Position(P) field as per the image shown below

  1. Press “OK” button. (The below image window appears. click “No(N)”).
  1. Now start constructing the PLC Ladder diagram using proper logic blocks. Give the block address and comments as per the statement. Comments are optional 
  1. The input address and output address of the block in the Keyence ladder are different. Once the Input block drag and drop double click the block and type the address. 
  1. Construct the PLC ladder diagram as per the Logic of the statement shown below
  1. Once the Ladder diagram completed. The PLC Ladder can be simulated by following method
  1. After the Simulator(L) menu Pressed the following window appear

Simulation screenshots of each phase

  1. Start and Stop the Logic of the Main coil or Process start button (Push button Logic)
  1. Once the Push Button is pressed based on the status of the Sensor, either Inlet Valve or Outlet Valve Closes (Here Inlet Valve is Closes, Outlet Valve Open)
  1. Suppose the Low-Level Sensor is detected, and the same logic repeats i.e. Inlet Valve output goes ON (Valve Opens), Outlet Valve output goes OFF (Valve Closes)
  1. Once the fluid in the tank is filled, the High-Level Sensor will be detected. Now Inlet Valve output goes OFF (Valve Closes) and Outlet Valve output goes ON (Valve Opens). (This sequence repeated automatically)
  1. Rather than any one sensor detected. If both sensors detected due to malfunction, both the valve will be closed

The exercise described above allowed us to create and test the PLC ladder logic using Keyence PLC simulation software.

Sundareswaran Iyalunaidu

With over 24 years of dedicated experience, I am a seasoned professional specializing in the commissioning, maintenance, and installation of Electrical, Instrumentation and Control systems. My expertise extends across a spectrum of industries, including Power stations, Oil and Gas, Aluminium, Utilities, Steel and Continuous process industries. Tweet me @sundareshinfohe

Related Articles

Back to top button