Monday, June 20, 2016

How to Programming Counter and Timer using LG Master K120 PLC




A. Basic Counter and Timer

LG PLC Programming Counter and Timer

1. Counter ( C)

The counter counts the rising edges of pulses driving its input signal and counts once only when the input signal is switched from off to on. MASTER-K series have 4 counter instructions such as CTU and CTD. The maximum counter setting value is hFFFF ( = 65535) and available program in C00~C255. The followings shows brief information for counter operation.

LG PLC Programming Counter


Drawing illustration programming Counter in PLC

LG PLC Programming Counter CTU CTD


2. Timer Relay : T

MASTER-K series have 100msec (T000~T191), 10msec (T192~T250), and 1msec timer (T251~T255). The timing method is various according to the timer instructions (TON, TOFF, TMR, TMON, TRTG). The maximum timer setting value is hFFFF by hexadecimal or 65535 by decimal. The following figure shows the types and timing methods of each timer instruction.

LG PLC Programming Timer


Drawing illustration programming Timer in PLC

LG PLC Programming Timer TON TOFF



B. How to Programming Counter in LG Master K PLC

1. Counter Up (CTU)

The Counter is counting up if input has pulse signal and its count from zero until number of set value. If the number set value is achieved, counter output become ON. When the reset has signal ON, the counter reset from value number to be zero.

Command for input counter in PLC
Step 1 : Click Icon or press F10 and click on work sheet

LG PLC Programming Counter Up (CTU)


Step 2 : In ladder edit : Input CTU C0 10 and then press OK button

LG PLC Programming Counter Up (CTU) Ladder Edit

LG PLC Ladder Programming Counter Up (CTU)

Explanation :
  • CTU = Counter UP (Counting from 0~10)
  • C00 = Counter Contact Number
  • 10 = Setting Value (number of counting)
  • P0  = Input Pulse Signal
  • P1  = Reset Signal
  • P44  = Output PLC Contact


2. Counter Down (CTD)

The Counter is counting down if input has pulse signal and its count from number of set value until zero. If the zero number is achieved, counter output become ON. When the reset has signal ON, the counter reset from zero to be value number.

Command for input counter in PLC
Step 1 : Click Icon or press F10 and click on work sheet

LG PLC Programming Counter Down (CTD)


Step 2: In ladder edit : Input CTD C001 00010 and then press OK button

LG PLC Programming Counter Down (CTD) Ladder Edit

LG PLC Ladder Programming Counter Down (CTD)

Explanation :
  • CTD = Counter Down (Counting from 10~0)
  • C01 = Counter Contact Number
  • 10 = Setting Value (number of counting)
  • P0 = Input Pulse Signal
  • P1 = Reset Signal
  • P45 = Output PLC Contact


C. How to Programming Timer in LG Master K PLC

1. TON (Timer ON Delay)

Functions :
  1. A timer consists of timer contact, current value, and setting value.
  2. The current value will start to increase when the input condition turns on. It will increase by 1 at every 0.1 or 0.01 sec until it reaches to the setting value or input condition turns off.
  3. The timer contact will be switched on when the current value reaches to the setting value.
  4. The timer contact and current value is cleared when the input condition turns off or RST instruction is executed.

LG PLC Programming Timer ON Delay (TON)



Command for input Timer in PLC
Step 1 : Click Icon or press F10 and click on work sheet

LG PLC Programming Timer ON Delay (TON) Function


Step 2 : In ladder edit : Input TON T000 00020 and then press OK button

LG PLC Programming Timer ON Delay (TON) Ladder Edit

LG PLC Ladder Programming Timer ON Delay (TON)

Explanation :
  • TON = Timer ON Delay
  • T00 = Timer Contact Number
  • 20 = Setting Value 2 sec (Time of ON delay)
  • P0 = Switch ON-OFF Timer
  • P46 = Output PLC Contact


2. TOFF (Timer OFF Delay)

Functions :
  1. A timer consists of timer contact, current value, and setting value.
  2. When the input condition turns on, the current value will be set as the setting value and the timer contact will turn on.
  3. When the input condition turns off, the current value will decrease by 1 at every 0.1 or 0.01 sec until it reaches to 0 or input condition turns off.
  4. The timer contact will be switched off when the current value reaches to 0.
  5. When the input condition turns off or RST instruction is executed, the timer contact will turn off and the current value will be cleared as 0.

LG PLC Programming Timer OFF Delay (TOFF)




Command for input Timer in PLC
Step 1 : Click Icon or press F10 and click on work sheet

LG PLC Programming Timer OFF Delay (TOFF) Function


Step 2 : In ladder edit : Input TOFF T1 50 and then press OK button

LG PLC Programming Timer OFF Delay (TOFF) Ladder Edit

LG PLC Ladder Programming Timer OFF Delay (TOFF)

Explanation :
  • TOFF = Timer OFF Delay
  • T01 = Timer Contact Number
  • 50 = Setting Value 5 sec (Time of OFF delay)
  • P0 = Switch ON-OFF Timer
  • P47 = Output PLC Contact


Labels:




Newer Post Older Post Home

You may also like these ebook:

Get Free PLC eBook directly sent to your email,
and email subscription to program-plc.blogspot.com




We hate SPAM. Your information is never sold or shared with anyone.

Your Email Will Be 100% Secured !

Your email is stored safely on Google FeedBurner