What are PLC programming languages? (Part-2)

3WV7...6Wko
21 Jan 2024
86

In the first article of the series, I talked about LAD, ST and FBD languages used in PLC programming. These three languages are the most widely used and best known. If you haven't read it, be sure to read What are PLC programming languages (Part-1).

In this section, we will talk about more functional languages. Let's explore these languages together.

GRAPH (SFC)

As seen in the picture above, GRAPH (SFC) language has a schema structure. Each box is actually a "Step". Each step can contain LAD, FBD or STL code blocks. Steps contain outputs and function blocks. Between the steps there are lines called "Trans". These lines contain the conditions. Conditions must be met to transition from one step to another.

As seen in the picture, two different "branchs" can be created from one step and the program can direct it to two different directions. However, if a step has two different paths, the program will not continue in either path. Whichever of the two conditions at the end of the step is met first, the program proceeds through that path. For example, in the picture above, there are two paths (T2-T7) at the end of STEP31. If the condition in T2 is met first, there will be a transition from STEP31 to STEP32. However, if the T7 condition is met, the program will return to STEP30.

GRAPH language is an excellent language for "Step-By-Step" processes. It facilitates the execution of multiple processes one after the other, especially in a large production line. It can be compared to the Switch-Case structure in the ST language.

Instruction List (IL)

Instruction List (IL) commands define the operations to be performed by a PLC and are loaded into the PLC's memory unit. PLC programs usually consist of a set of instructions and conditions loaded into the memory unit of a PLC.

PLC Instruction List (IL) commands are used to define the operations to be used in a PLC program. These operations may include physical operations to be performed by a PLC or mathematical operations to be performed by a PLC. For example, in a PLC program there are instructions that involve starting a motor or multiplying a number by another number.

Some examples of PLC Instruction List (IL) commands:

  • ADD: takes the sum of two numbers
  • AND: performs AND operation of two numbers
  • CMP: compares two numbers
  • JMP: jumps to the specified tagged location
  • LD: loads the value of the specified address
  • MOV: allows copying one value to another
  • OR: performs OR operation of two numbers
  • OUT: loads the value of the specified address to the output
  • ST: assigns the value of the specified address to the specified value


These examples are just a few examples, and the complete list of PLC Instruction List (IL) commands may vary depending on the PLC model and programming language used.

PLC programming languages are languages created in line with needs and may differ from brand to brand. But basically their structure is the same in all PLCs. It contains many functions in every language. "Timers", "Counters", "Triggers" are the main examples of these functions. While applications such as Siemens' TIA PORTAL can only access these functions as much as the manufacturer provides, platforms such as Codesys are open source. By adding libraries, you can include wider functions in your programs and use ready-made code blocks.

Finally, don't forget to check out my other articles, leave a comment and interact.

What is Modbus TCP?
What is ProfiBUS/ProfiNET?
What is CanOPEN and CanBUS? (Controller Area Network)
What are PLC programming languages (Part-1)
What is PLC? What is its structure? What are its areas of use?
What is SCADA?
What is HMI Panel/Display?
What is EtherCAT?

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to Kenyali Geralt

15 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.