Copyright  Goodheart-Willcox  Co.,  Inc.  102  Programmable  Logic  Controllers:  Hardware  and  Programming  •  Bit  (B3  and  B10)—Bit  files  B3  and  B10  are  used  for  internal  control  relay  contacts.  Each  file  holds  256  words  (B3:0  to  B3:255  and  B10:0  to  B10:255).  These  registers  are  used  by  advanced  PLC  instructions  such  as  bit  shift  and  sequencer  instructions.  All  Allen-Bradley  SLC  500  series  PLCs  have  16-bit  registers.  For  example,  B3:0  has  the  bits  B3:0/0  to  B3:0/15.  B3:0  represents  a  16-bit  word,  while  B3:0/0  or  B3/0  represents  the  least  significant  bit  in  the  B3:0  word.  These  bits  can  be  used  as  internal  coils  or  contacts  in  a  PLC  ladder  logic  diagram.  The  SLC  500  series  PLCs  have  256  bits  addressed  as  B3/0  through  B3/255.  These  bits  are  used  for  internal  PLC  coil  or  contact  addresses.  A  programmer  can  also  use  bits  addressed  as  B10:0  through  B10:255.  Therefore,  512  bit  addresses  labeled  B3:0  through  B3:255  and  B10:0  through  B10:255  are  available  in  the  SLC  500  series  PLC  systems.  Note  that  the  B3  data  file  has  separate  data  file  icons.  6.6  Programming  Ladder  Logic  Diagrams  with  Latch  and  Unlatch  Instructions  Frequently,  industrial  control  systems  dictate  that  an  output  device  must  turn  on  when  a  pushbutton  is  pressed.  The  same  output  device  must  turn  off  when  another  pushbutton  is  pressed.  This  is  possible  if  PLC  latch  and  unlatch  instructions  are  used.  Figure  6-23  displays  a  relay  logic  diagram  with  two  latch  and  unlatch  instructions.  Switch  one  and  pushbutton  one  control  the  green  light.  Switch  two  and  pushbutton  two  control  the  red  light.  Figure  6-24  displays  the  input/output  connections  of  an  Allen-Bradley  fixed  SLC  500  PLC  device  for  the  relay  logic  diagram  in  Figure  6-23.  Table  6-4  illustrates  the  I/O  port  assignments.  Latch  #1  Latch  #2  Pushbutton  #1  Unlatch  #1  L1  L2  Latch  1  G  Switch  #2  Switch  #1  Pushbutton  #2  Unlatch  #2  Green  light  Latch  2  R  Red  light  Goodheart-Willcox  Publisher  Figure  6-23.  Latch  and  unlatch  instructions.  
