Copyright  Goodheart-Willcox  Co.,  Inc.  Chapter  6  PLC  Programming  115  PLCs  have  the  capability  to  lock  their  outputs  in  position.  In  Figure  6-39,  pressing  pushbutton  #1  (PB-1)  turns  on  the  pilot  light  at  address  O:2/0.  Once  turned  on,  the  pilot  light  locks  itself  in  position  by  closing  its  associated  contact  (O:2/0)  in  parallel  with  PB-1.  Pressing  pushbutton  #2  (PB-2)  breaks  the  “lock-in-position”  pass  and  turns  off  the  pilot  light.  Illustrating  the  concept  of  output  sealing  or  locking  itself  in  position.  000  001  O:2/0  Pilot  Light  End  I:1/1  PB-2  I:1/0  PB-1  O:2/0  Pilot  Light  Goodheart-Willcox  Publisher  Figure  6-39.  PLC  ladder  logic  diagram  for  Example  6-2,  showing  how  an  output  can  lock  itself  in  position.  Example  6-2  Latch  and  unlatch  are  functions  that  use  two  inputs  to  control  the  state  of  a  bit  that  affects  a  single  output.  Refer  to  the  diagram  in  Figure  6-40.  Pressing  the  pushbutton  PB-1  at  address  I:1/0  latches  the  B3:0/0  bit  and  turns  on  the  green  pilot  light  at  address  O:2/0.  To  turn  off  the  pilot  light,  the  B3:0/0  bit  must  be  unlatched.  Pressing  the  pushbutton  PB-2  at  address  I:1/1  unlatches  the  B3:0/0  bit  and  turns  off  the  green  pilot  light.  Lach/Unlatch  Functions  000  001  002  003  B3:0/0  L  B3:0/0  U  O:2/0  G-PLT  End  I:1/0  PB-1  I:1/1  PB-2  B3:0/0  Goodheart-Willcox  Publisher  Figure  6-40.  PLC  ladder  logic  diagram  for  Example  6-3,  showing  how  to  use  the  latch/unlatch  functions.  Example  6-3  
