PLC Sample Code

Sign in to follow this  
Followers 0

RS Logix 500, 5000 etc...

86 files

  1. 3 Phase Motor Startup Logic

    Zip file contains RSS file and PDF file for those that do not have RS Logix 4.x version. Ever have a bunch of 3 phase motors and wanted to start them up one at a time so you don't dim the lights in the building? Check this sample out. Also shows some

    20048 downloads

    Updated

  2. HOME CONTROL BY PLC

    THIS PROGRAM IS RUNING IN MY HOME. I HAVE SLC5/04 24K Mem OS400 AND TOUCH SCREEN TOTAL CONTROL 10 1/2" COLOR. IT CONTROLS SPRINKLERS POOL PUMP LIGHTS WINDOWS BLINDS DOOR LOCKS......

    13493 downloads

    Updated

  3. RsLogix 500 SQC SQO Basic Sequencer

    Here is the basic sequencer I use for RsLogix500 products. Let me know if any of it is not clear. I simplified an existing program just to show the sequencer parts

    8335 downloads

    Updated

  4. Dialing a Cell Phone with a Micrologix 1500 using a Modem Attached

    This wasn’t a normal “job” per say but more like helping our machinist staff from babysitting the Japax Wire EDM machine. For those of you that don’t know a wire EDM can take a long time to make cuts in a part sometimes. There was a part that we made t

    4410 downloads

    Updated

  5. Micrologix 1000 DDE Demo

    This is a demo of a simple temperature sensing demo that utilizes a Micrologix 1000 PLC and an Analog Devices Inc. AD590 temperature transducer. This demo should help with the understanding of analog inputs on the Micrologix PLC.

    8306 downloads

    Updated

  6. RAMP Function Example Logic

    This is a sample clipped from a bigger program. This example uses a RAMP function to control an analog card 0-5V signal to a MicroMo DC controller. What the RAMP function does in this example is very useful to control an ACCEL or DEACCEL value to your an

    5698 downloads

    Updated

  7. Generic Sequencer

    This program is used to construct a sequencer with both input and output sequencing. The excel file is used to design the sequencer and includes features to update the user selectable files in a PLC using DDE. The PLC program sequences the inputs meaning that the input pattern for each step determines when the sequencer advances. A mask file is used for the inputs so that those that are irrelevant for a particular step can be ignored. This program does not use the classic sequencer instructions but uses MEQ and MOV instructions with indirect addressing instead. This leaves the end user more flexibility for controlling the step number.
    Update r002: Added CLR instruction to the diagnostic word so that it does not hold "old data" as the sequencer advances.
    EDIT: Added a beefed up version* for a real world machine (OK International 220 Servo bag inserter.) This program is not fully polished, I think the version here was after a few hours of refinement, and then stripping it down for speed. Today, I hit a full 17.5 bags per minute replacing logic that was running at 14.5 bags per minute. I ended up removing another input conditon for the seal bar timer, finding that it doesn't need to inhibit the opener from opening. I need to put in a discharge timer to keep the belt running long enough to send the last box out when finished even when the downstream is blocked, but continue to hold back the input clamps. it would be handy to cycle stop and have the machine empty itself too.
    My main next goal on this particular machine, is to find out why the Ultra drive is not ready and homing quickly enough. I think my reset times are worse than the old logic! It seems I have to wait 5.5 seconds after the drive is ready before I can send it a successful home trigger. Today, I tried keeping logic power applied, and it did well until someone had to physically move this linear device and caused regeneration which triggered a non-recoverable (must power cycle)... E41...So, I can't cheat with two black wires unless I add a shunt or an output contactor to dodge this hard fault. The extra effort will be an amazing improvement in recovery times when they have to open the doors. Now it take almost en seconds sometimes to reset and then reset. I must be sequencing the output logic to the Ultra drive incorrectly,.but I have altered it several times with little improvement. There will be more trial and error with the wiring and perhaps a DB to get this right.
    *The 2nd file includes a rate calculation (boxes per minute in this case) as well as a programmable minimum and fault timeout for each step, multiple modes (auto, manual, single step, bag only).
    Known limitations: I have realized the need to add a macro button to the xls sheet which would read back the PLC sequencer data and populate the bit fields in the sheets. I also still need to lock the references so you can move the raw data without hosing up the references on other sheets. For use as-is, just don't drag the raw bit data or insert data, copying and pasting is fine to move steps forward and backward.
    I also need to add to the excel sheet some columns for minimum time in step, and fault times so they can be edited from the workbook too.

    4499 downloads

    Updated

  8. Conveyor FIFO (first in first out) w/Reject

    Classic example of a FIFO (First in First Out) Load and Unload.
    Application was bottles coming down a conveyor system at a "variable" rate and sporadic. Sometime 10 bottles would be grouped together all in single file others they would be spaced out oneisy twoisy.
    A photoeye was used in a vision cell up stream this photo triggered the vision system and loaded the FIFO at the same time.
    A photoeye was placed downstream next to an air blow off nozzle. This created a "zone" at which you could load and unload the FIFO and keep track of bad bottle in-between your zone. Bottle QTY could vary between the vision photoeye and reject photoeye.
    The vision system was triggered and part status was loaded into N7:0. A 1 means good part a 2 means bad part. The 1 or a 2 was loaded into a FIFO and placed into N7:1 at the reject air station. If the FIFO status equals 1 at reject it was allowed to pass if equal to 2 the air nozzle was turned on under a timed blow off.
    This was a field installed retrofit project that involved a 10 point Micrologix 1000 that cost $72.00 4 Keyence Vision systems and 2 Banner EZ-Beam photoeyes. Cake work.

    5794 downloads

    Updated

  9. Complete Index Table - PDF Version

    Same as "Complete Index Table" Only this is the PDF version for those people that do not have RS LOGIX 4.10 or any RS Logix version at all. "The PLC shows examples of bit shift to track parts on the index table."

    8847 downloads

    Updated

  10. Basic One Button Toggle 1.0

    Zip file contains RSS file and PDF file for those that do not have RS Logix 4.x version. This shows a simple example of how to use one button or one input from a panel view to toggle an output "on" maintained and then press the button again to

    6807 downloads

    Updated

  11. Allen Bradley Count and Move Example

    Example of how to use the counters and the
    move instruction to control outputs.

    6448 downloads

    Updated

  12. Anti-Tie Down

    This is a simple anti tie down rung.
    Both hands must be on the opto buttons at the same time. If one hand or the other is not on the buttons at the same time this anti tie down timer will go "done" and not allow the index enable bit to go

    5451 downloads

    Updated

  13. Micrologix 1200 HSC Configuration

    For a user of another forum

    4411 downloads

    Updated

  14. Tank program

    Homework completed...

    5222 downloads

    Updated

  15. Complete Index Table

    This zip files contains a complete index table Allen Bradley PLC and Panel View application. The PLC shows examples of bit shift to track parts on the index table.

    7276 downloads

    Updated

  16. Simple 48 Step Sequencer

    I've seen several Sequencers but not one quite like this. The Integer Bits trigger the step and the Boolean Bitrs end the step. You add the code to make that happen.

    5897 downloads

    Updated

  17. Bit Shift Example

    This is example is RS Logix Version 4.10 which shows how to use a bit shift to track parts on an index table or dial.

    5810 downloads

    Updated

  18. ML1000 Washing Machine Program using a step counter as a sequencer

    APPLICATION OVERVIEW
    THIS PROGRAM WAS WRITTEN BY KEN MOORE; ON 23 JAN 2005 IT MAY BE USED FOR ANY NON-COMMERCIAL PURPOSE. IT MAY ALSO BE ALTERED IN ANYWAY AS LONG AS THE CHANGES
    ARE NOTED.
    IT WAS WRITTEN TO CONTROL A SIMPLE WASHING MACHINE USI

    4890 downloads

    Updated

  19. SLC500 Measure Resistance

    This was one of my early projects. I had to measure resistance in pretty
    wide range on a delicate circuit (subject was changing value and in range
    from few ohms to more than 1MOhm).
    Normally I would have used something like RTD transducer but I just couldn't
    find anything suitable for that range (every transducer I could find was
    stopping at some 8 or 10k i needed at least 100x more).
    The time was running out so I had to put something together and fast.
    This is it. Initially this circuit was using dedicated regulated
    low voltage power supply but since I had spare analog input(s)
    I replaced that power supply with voltage divider (Panel had existing
    24VDC power supply) and simply had to monitor that voltage because
    it was not regulated any more (the 24VDC was regulated but the output
    of divider was changing depending on test conditions).
    Although we like to avoid custom designs this turned out to be so simple
    cheap easy to use and worked extremly well. It is so small that there
    was no need for PCB two resistors ware connected directly to terminals.
    Accuracy off course could not match the 8-digits of precission benchtop
    multimeter but it was on pair with my multimeters which is more
    than I could ask for. I didn't test it for significant ambient changes
    (temperature and humitity).
    There are several ways to do the math for this and in fact used aproach is
    not the simplest or most efficient. But it is good example on how simple
    DC circuits knowledge and very basic match can be used in practice.
    R1 and R2 are not critical and don't need to be accurate either (just need to
    produce voltage that fits selected range for used input card.
    It is robust enough. In fact I was surprised to see results when R1/R2 ratio
    was adjusted to produce only 1 Volt (what kind of ADC they have in their cards?).
    ----- EDIT ----
    Download Link currently doesn't work so just click on
    "Click here for to join forum discussion"

    18803 downloads

    Updated

  20. MicroLogix 1500 ASCII Input example

    The ASCII instructions in the SLC/MicroLogix can be hard to use even if you are accustomed to other complex A-B instructions. They operate asynchronously to the CPU and work in a queue and have to be managed more carefully than message instructions.

    4087 downloads

    Updated

  21. Indirect Addressing Example

    This is actually a whole machine project but it shows an example of how I used indirect addressing. There was a golden module routine that needed to be run on the machine to verify the tooling and test equipment. There is a lookup table created that com

    5108 downloads

    Updated

  22. Small Pumping Station Example using Subroutines

    The actual application is very easy but I have posted it as a nice tidy
    example of using subroutines and organising datatables to make the best use
    of them. The benefit of this technique is that programs have a very clear
    structure and it becom

    7295 downloads

    Updated

  23. Pick-n-Place Sequencer

    This sample program will operate a pick and place machine in manual or auto and includes forward and reverse stepping. Feel free to coment as Feedback=Learning

    6126 downloads

    Updated

  24. MicroLogix 1100 Ethernet to Cognex Message

    Example of a couple of message instructions from the ML1100 to a Cognex 3400. I am not triggering the camera via ethernet. I started using the hardware trigger but then the customer wanted to add a "crack" inspection around a 360 degree object so I had to change my camera over to "continuous" trigger to be able to spin the part 360 degrees with a robot looking for a surface crack defect. So then I just message the crap out of the camera during this process.

    3568 downloads

    Updated

  25. Indirect Addressing - Pallet Tracking Brick Yard 500

    UPDATED! This is a classic example of how to use indirect addressing to your advantage. (Instead of bar code readers). I used Baumer Electric 6 prox pack (see part number in BOM) to read metal studs on a pallet that are spec\'d in such a way

    5349 downloads

    Updated

Sign in to follow this  
Followers 0