![]() ![]() They are shown here implemented in Codesys SFC. Their next behaviors depend on previous inputs and behaviors as shown in Figure 4. (Has IN gone true? Has the target time been reached?)įigure 4: Even the common TON timer and R-Trig one-shot are state machines. In reality, even the simple TON On-Timer and R-Trig one-shot are state machines. State machines date back many years, but only more recently have been applied to industrial programming. State machines are a very powerful method for expressing a system whose behavior depends on past history, such as any logic with:ģ) Internal flags that are set by the code to affect the behavior of the code on future scans. Sequential function chart (SFC) is a graphical language great for expressing state machines, and, like LD, appeals to the graphical nature of engineers. To provide better context, this programming language discussion will be broken into two parts:Ģ) The language to implement a state machine. ![]() What is sequential function chart (SFC) programming? Evaluating the issue in text is a challenge. In CFC and FBD, the issue also can be determined by observing the progress of the blue path, but it does require mentally evaluating the ANDs and ORs. How easy is it to determine why the result is not as expected? In LD, the answer is quickly determined by observing where the path of solid blue contacts is interrupted (GantryIsRight is not TRUE). Say we are expecting “Inspect” to be TRUE. Figure 3 illustrates this point by showing the same Boolean logic in several IEC 61131-3 languages. LD remains a great language for which it was originally intended – complex Boolean logic. Staying within this realm, LD logic is simple to design and simple to debug. This led to further reluctance to move on from LD. Of all the generalizations one can say about engineers (as is often illustrated in your favorite Dilbert cartoon), it is safe to say engineers tend to be graphically oriented. (Who among us can effectively communicate without paper and pencil, or a white board?) Early on, most LD programming alternatives were text-based languages that did not resonate with engineers’ graphical nature. ![]() The strength of LD and the key to its enduring popularity is its graphical nature. Courtesy: ControlSphere Engineering Strengths of LD programming This situation was exacerbated by the slow pace at which PLC vendors provided new languages better suited to PLC and programmable automation controllers (PAC) applications. This was particularly true with controllers originating in North America, which explains the global differences in the enduring popularity of LD.įigure 3: Diagram compares languages for complex Boolean logic as implemented in Codesys. In the early days of automation, when PLCs were replacing relays and timers, it made perfect sense to create a programming language familiar to the user base and similar to the tool it was replacing. Unfortunately, as controllers became more capable and evolved past relays and timers, the original LD language was pressed into services it was never intended for and was poorly suited. Ladder diagram programming, or LD, traces its history back some 100 years to relay ladder logic (RLL), which was created to describe systems of electrical components such as relays, timers and motors. “Which IEC 61131-3 Programming Language is best? Part 2” will discuss Function Block Diagram (FBD), Continuous Function Chart (CFC), Structured Text (ST), and how they can be mixed and matched for optimal results. “Which IEC 61131-3 Programming Language is best? Part 1” (this article) discusses the strengths and best applications Ladder Diagram (LD) and Sequential Function Chart (SFC). Programming languages: LD, SFC, FBD, CFC and ST Courtesy: ControlSphere EngineeringĪs with lawn power tools, it is most efficient to use the best programming language for the application, to avoid the complexity of driving the square application peg into the round tool hole. With IEC 61131-3 programming languages, PLC programming and maintenance are enhanced when the strengths of all the languages are used. Figure 2: It’s best to use the right tool for the job. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |