ABLADLOG.TXT 94200-17233 REV.2525 <850530.1557> %Getting Started with PCIF/1000 - Allen-Bradley example ladder logic program %Programmer : B.M.  &**************************************************************************** &              LADDER LOGIC FOR SARSAPARILLA SODA PCIF NETWORK      &This ladder logic diagram program simulates a bottling line.  It uses timers & $and counters to simulate 15 bottles going by a check point every minute. $ %Two of the 15 bottles are defective bottles.  Every time a minute elapses, % #the programmable controller interrupts the computer on the network and #&sends it an unsolicited request.  This unsolicited request tells the computer & %that it is time to compute the production data for the last minute to pass % $the total number of bottles that have gone through the checkpoint on the $ bottling line.      %The first four rungs in the program are the Communication Zone rungs.  The %#Memory Access rung (the second rung) indicates that station 11 (octal), # $which is the computer, can write to word addresses 040 - 056 in the data $#table.  The third rung, the Command Rung, specifies that when the start #$bit 032/10 is ON (the minute timer has timed out), an unsolicited request $ %will be sent to station 11 (octal).  The message will contain the contents % of the word addresses 050 - 052.      #The Display Rung allows the contents of the word addresses of the GETs # #to be viewed at the same time (when looking at the Industrial Terminal #display).     $The Minute Timer rung keeps timing a minute.  When it times out, the next $#rung latches the start bit long enough for the command rung to execute. # %The following rung unlatches the start bit when the done bit in ON and the % timed bit is OFF, or when one of the two fault bits is ON.     #The two TON timers simulate the bottles.  The timer with the address of # #042 causes the CTU counter 050 to increment and count a bottle every 2 # %seconds.  Then TON timer 044 causes the CTU counter 054 to increment every %$15 seconds.  This simulates that 2 out of every 15 bottles are defective. $ These timers are reset automatically every time they time out.      %The last six rungs keep count of the total number of bottles and the total %#number of defective bottles.  Counters 050 and 052 are cascaded so that # #the number of bottles counted can be greater than 999.  It will enable # "up to 999,000 bottles to counted.  The CTR counter reset instruction "#resets the 050 counter after it overflows.  The rungs which control the # 054 and 056 CTU counters behave exactly the same as above.     The ladder logic program:         013     077     034                     02707  ---[G]-----[G]-----[G]----------------------(L)---         011     040     056                     02707  |--[G]-----[G]-----[G]---|------------------( )---        03210   01100    011     050     052     02707  ---] [-----] [-----[G]-----[G]-----[G]------( )---                                             02707  --------------------------------------------(U)---                          Display Rung      040   042   050   052   044   054   056  01300   ---[G]---[G]---[G]---[G]---[G]---[G]---[G]---( )---        04015             Minute Timer             040   ---]/[--------------------------------------(TON)--                                               1.0                                              PR 060                                              AC 000     04015                                     03210   ---] [---------------------------------------(L)---         03200   04015                             03210   ---] [-----]/[---|---------------------------(U)--- 	     03300        | 		 -----] [---------| 		     03310        | 		 -----] [---------| 	       04215   Simulates every bottle on line     042   ---]\[--------------------------------------(TON)--                                               1.0                                              PR 002                                              AC 000    04415 Simulates defective bottle on line   044   ---]/[--------------------------------------(TON)--                                               1.0                                              PR 015                                              AC 000    04215     Counts every bottle (0-999)      050   ---] [--------------------------------------(CTU)--                                              PR 999                                              AC 000    05014          (1,000-999,000)             052   ---] [--------------------------------------(CTU)--                                              PR 999                                              AC 000    05014   04215                              052   ---] [-----]/[------------------------------(CTR)--                                              PR 999                                              AC 000    04415  Counts defective bottles (0-999)    054   ---] [--------------------------------------(CTU)--                                              PR 999                                              AC 000    05414          (1,000-999,000)             056   ---] [--------------------------------------(CTU)--                                              PR 999                                              AC 000    05414   04415                              054   ---] [-----]/[------------------------------(CTR)--                                              PR 999                                              AC 000 