Share your PLC programming, PLC manual, PLC Application and Guidance. Here I will provide some of my experience on the PLC programming skill and sample of ladder diagram.

Sunday, January 10, 2010

Basic Instructions-OR CIRCUIT (Keyence)

OR CIRCUIT




1. Either one of the N.O. input relay 00000 and 00001 turns ON, the N.O. output relay 01000 will turns ON simultaneously.






2. When both input relay 00000 and 00001 turns OFF, the output relay 01000 will turns OFF simultaneously.


Basic Instructions-AND CIRCUIT (Keyence)

AND CIRCUIT





1. When the N.O. input relay 00000 turns ON while input relay 00001 turns OFF, the N.O. output relay 01000 will remaining OFF status.



2. Until both input relay 00000 and 00001 are turns ON, the output relay 01000 will turns ON simultaneously.



3. Either one or both of the input relay turns OFF, the output relay 01000 will turns OFF simultaneously.


Basic Instructions (Keyence)

INPUT INSTRUCTIONS

Contact instructions are using as ladder diagram input. It can be external inputs or internal relay inputs or internal timer inputs or other internal inputs. Basically the contact instructions are divide into two types which are normally open contact (N.O.) and normally close contact (N.C.).
1. Normally open contact (N.O.)
A normally open contact is a contact that turns ON when a switch or other input device turns ON.






2. Normally close contact (N.C.)
A normally close contact is a contact that turns OFF when a switch or other input device turns ON.




OUTPUT INSTRUCTIONS

Output instructions are using as ladder diagram output. It can be external outputs or internal relay outputs. The output instructions are divide into two types which are normally open output and normally close output.
1. Normally open output
A normally open output is a output that turns ON when the circuit is switch ON.



2. Normally close output
A normally close output is a output that turns OFF when the circuit is switch ON.



EXAMPLE
NORMALLY OPEN CIRCUIT




1. When the N.O. input relay 00000 turns ON, the N.O. output relay 01000 will turns ON simultaneously.



2. When the N.O. input relay 00000 turns OFF, the output relay 01000 will turns OFF simultaneously.




NORMALLY CLOSE CIRCUIT
 



1. When the N.C. input relay 00000 turns ON, the N.O. output relay 01000 will turns OFF simultaneously.



2. When the N.C. input relay 00000 turns OFF, the output relay 01000 will turns ON simultaneously.


Friday, January 8, 2010

Basic Ladder Programming Instruction Categories

Most of the PLC brands have these four categories of instructions which are basic instructions, applied instructions, operation instructions and extended instructions. On this training, I will use the KEYENCE PLC instructions type for the explanation.
1. Basic instructions
These are the basic instructions used in making ladder programs. These instructions achieve control equivalent to general relay sequence circuits.
 Contact instructions
 Output instructions
 Timer instructions
 Counter instructions

2. Applied instructions
These instructions are used to control execution of ladder programs, modules, macros, etc. These instructions enable ladders to be programmed structurally.
 Index register instructions
 Shift register instructions
 Memory switch instructions
 Step instructions
 Flow instructions

3. Operation instructions
These instructions perform various compare, arithmetic and logic operations, and move/convert data. These instructions allow complex operation circuits to be programmed using few instructions.
 Data move instructions
 Arithmetic/compare instructions
 Logic operation instructions
 Data shift instructions
 Data convert instructions
 Text processing instructions

4. Extended instructions
These instructions use CPU internal functions and perform other complex processing simply.
 Data processing instructions
 Clock processing instructions
 Alarm instructions
 High-speed processing instructions

Type of sequence control

Basic sequence control is divided mainly into three types that are sequence control, condition control and time limit control. Design the target control circuit by a combination of these control types.
1. Sequence control
Sequence control is the most basic of control types. With sequence control, the following operation is started in a predetermined order when the previous fixed operation ends.



2. Condition control
With condition control, an operation is performed when specific conditions are satisfied by combining various information and signals.



3. Time limit control
With time limit control, timers or similar counting devices are used, and the next operation is performed when a fixed time has elapsed.

What is the sequence control?

Successively proceeding with various operations in accordance with a predetermined order is called sequence control. With sequence control, the various operations when machines and devices are used, and their order of operation and execution conditions are stored in advance to the control device (controller). By doing this, the series of target operations such as “start” and “stop” or “open” and “close” can be performed according to the state or condition of the machine or device to be controlled.
Let’s take a look at an actual example of sequence control of how a fully automatic washing machine works.



In this condition, after putting the cloths and you just need to press start button on the washing machine. The washing machine will automatically operate according to a predetermined order. The PLC is used as the controller for performing sequence control. We just need to preprogram the sequence control into the PLC so that it can operate automatically.

What is the scan time in PLC?

The time required to perform a single scan (execution of the string of processes from input processing through to output processing) is called the “scan time”.



Through the scan time changes according to the size of the program and type of instructions used in the program, you should bear in mind that the longer (more complex) a ladder program is, the longer the scan time will become.
Ladder programs process input processing at the beginning of a scan and output processing at the end of a scan. For this reason, when the scan time becomes longer, it takes more time to process the data (ON/OFF states of sensors and switches, numerical values such as pressure, encoder or temperature) obtained by input processing and output the result. The shorter the scan time becomes, the more accurate processing becomes possible as the PLC’s response (processing time from input through to output) improves.
For examples, when the PLC scan time is 100ms per scan, it only manages to take 100 times measurement in 10 seconds. While for the PLC scan time is 10ms per scan, it can manage to take 1000 times measurement in 10 seconds. Conclusion is that with the shorter scan time allows data to be measured closer to real time.


To shorten the scan time
•Set so that only the required programs are executed at all times by a program using modules/macros.
•Try to use only exclusive commands to make the entire program compact.
•Try not to use instructions such as FOR to NEXT that are processed countless times in a scan.

How The PLC Work?

The PLC is a highly functional that can control external devices (indicator lamp, solenoid, motor, and others) according to the signals received from external input devices (pushbutton switches, limit switches, sensors, and others). Also, desired program can be written into the internal memory of the PLC using the handheld programmer or PC software program. Below is the illustration of the PLC construction.


PLC comprises a microcomputer (CPU : Central Processing Unit) and a memory (storage element).

Firstly the PLC will read the status ON/OFF of all input terminals before the program is executed. Then the PLC CPU will do various processing and calculations that performed according to the details written to the program. Lastly the results of program execution are output from the output terminals.
The flow of operations from input processing through to output processing is called a “scan”. This scan is repeatedly executed on ladder programs.

What is the programmable logic controller (PLC)

For the conventional type of sequence programs, it comprises of the control circuits by combining relays, counters, timers and other parts. When the sequence programs are very complicated, the number of required parts increases, and a large amount of space is required.
Programmable controllers have a built-in microcomputer that runs at high-speed in place of numerous relays and timers, and are devices dedicated to sequence control that have been developed for the purpose of reducing the space occupied by control devices.