Also, back in the day it was all ladder logic. I'm reading up on structured text programming and think it fits better with my group's experience since we've been doing all control with C-like languages for so long. Is there any reason to choose ladder logic over structured text?
Ladder logic is the preferred choice when the PLC programmer has no knowledge or experience in using a higher level language or understanding of structured programming. Ladder logic is suitable for "small" projects where there is no interest in writing reusable code. It is also the preferred choice by managers who have no experience writing code. It is a very time consuming and error prone method for larger projects and in my experience it requires a dedicated field service/software repairmen to keep the code running once the automation project is installed. These features are not considered disadvantages at many companies. A bug filled automation project can become a profit center under the right conditions.
The choice of a PLC vendor is determined by the location of your customer. If you are selling machines in Asia a Mitsubishi controller may be a requirement. In Europe it will be a Siemens controller. In the US it will be a Siemens or AB controller. The vendors were offering 30 to 50 percent discounts on list prices. So price can be a factor in the decision. Another factor to consider is the use of one of the device net systems for connecting remote I/O to the PLC The Siemens equipment may have more to offer.
It is also possible to install PLC simulation software that will run on a inexpensive office computer and provide the same capability as the PLC.
The cost of the PLC CPU may be small in comparison to the cost of the I/O devices. The decision to use a PC based system will be driven by factors other than cost. PLCs have very long product lifetimes. In most cases the automation project will become obsolete before replacement PLC components become unavailable.
Another consideration is the speed of the PLC CPU and its memory size. The CPU speed is important if there are a large number of sensor signals that need to be processed to determine the system state while running a "fast" process. A interlock signal is of little value if it cannot stop a failed motion command from damaging the machine or a in process part.
The memory becomes a concern if there are multiple process stations. For example if there are twelve process stations which are controlled by a single process subroutine that is called twelve times, there will need to be twelve data sets in memory. Each station data set contains timers, set points, sensor inputs, command outputs, and internal logic states.The memory needs to be allocated in advance when the software is being written even if the automation product will initially only be offered with six process stations.
If your automation project has multiple process stations the statement list type coding becomes essential. It will allow you to write subroutines with a structured data base. The subroutines can have multiple entry points for code initialization at startup, machine operation, machine diagnostics, machine repair, and machine shut down. The repair entry point may be needed when you need to remove damaged product from a conveyor type system but do not have physical access to the line. The unclogging of the conveyor in this instance needs to be done using the software.
PLCs do not do floating point arithmetic. This can be a problem if you need to control set points as a function of time or some other variable. The solution involves dividing the set point range and control variables into 256 increments and ramping the set point in small steps. This simple calculation will take a full page of code. The alternative is to do the ramping calculation in the user interface program and transfer the set point to the PLC.
The use of a single vendor can threaten the success of a automation project. Twenty years ago, Siemens sold its PLCs and PLC based motion control boards through one set of vendors. Their industrial automation motion control equipment was sold through a second set of vendors. The problem with this system was that the two sets of vendors were in competition. The PLC vendors at that time were selling motion control products that were considered defective by Siemens management. The vendor did not care as long as the product sold.
If you are primarily doing motion control it may be better to work with the industrial automation group and their specialized PLC rather than work with the PLC group and their specialized motion control.
For inexpensive motion control you will end up using another vendor's stepper motors and control boxes and interfacing with the PLC for start/stop and interlock signals.
One of the goals in automation is to avoid making a mess. Your control system will need to include sufficient sensors and interlock logic to insure that the process can be stopped quickly when a fault is detected. It should not rely on a operator tripping over a stack of bad parts that have fallen off the conveyor.
A well planned design will include a careful examination of the process by people from the mechanical. electrical, and software groups. This can be easily achieved if the planing is all being done by one person. It can sometimes be achieved if there is a competent manager directing the groups.
Planning includes detailed timing diagrams for all commanded motions. Once the timing diagrams are completed and the machine through put is known it will be possible to size the motors to meet the acceleration/ deceleration requirements for each motion. If this is a servo system, the mechanical design group will then make some quick guesses on mechanism settling time and maybe the first vibration frequency. This information is then used to adjust the acceleration profile of the motion command and to select the location of the command notch filter. Position sensors may be used either to detect a fault or to trigger a subsequent motion. The triggers are needed when the machine timing is variable and cannot be controlled by a system clock. Once the speed of each of the motions is known it will be possible to select sensors based on response time and eventually determine the minimum CPU cycle time needed to allow the machine to run.
There is also a need to determine machine reliability. If the machine has a required system reliability of 99 percent and the machine uses a sequence of twenty motions each with a reliability of 99.9 percent it will be best to abandon the project before anymore time or money is wasted. The system reliability in this case is 99.9% **20 = 98%
The planning needs to be completed before any software, mechanical, or electrical work is considered.
A project that relies on patches by one group to fix the omissions or mistakes of another group will be a project that is overdue, over budget, and does not meet the performance requirements of the customer.