What is the best PLC language for data processing?

Key Takeaways

  • IEC 61131-3 languages such as Ladder Diagram (LD), Structured Text (ST), and Function Block Diagram (FBD) may be used to process data in a PLC
  • Array indexing is a critical enabler for data handling
  • Style and consistency across a panel shop’s PLCs may be just as important as language considerations

What types of data are used in a PLC?

Data fall into several different categories:

  • The local (function-level) and global (program-level) memory locations that are used to drive the PLC program. This would include the interface with the HMI as well as remotely controlled I/O, motor drives, and even a robot interface.

  • Error handling and the ability to store events for technician diagnosis.

  • Data points stored on a local flash card.

  • Off-PLC interfaces including the ability to accept and transfer remote data. This could take many different forms including SCADA, historian, edge, or database-level interfaces.


This article is part of the DigiKey Field Guide for Industrial Automation

Location: Teach It → Industry Context
Difficulty: :seedling: Student — difficulty levels explained
Author: Aaron Dahlen | MSEE | Senior Applications Engineer, DigiKey
Last update: 06 Mar 2026


A PLC data-handling example using a child’s game

Let’s explore this topic using the children’s Simon Says game as an example.

Any PLC capable of playing the game is capable of data processing.

The key distinction is a PLC with indirect (indexed) memory access. We know that Simon generates random numbers, and a Simon-capable PLC must be able to store the random sequence in memory locations. It must then iterate over the memory array to play the game; first with one step, then two, and so on to finish a classic 32-step game. If the PLC can do that, it’s a small step to implement larger arrays including strings and other error handling structures for display on the HMI. Finally, there is nothing standing in the way of sending SQL commands over Ethernet or RS232 with some helpful hardware if necessary:

INSERT INTO widgets (widget_name, quantity)
VALUES ('Gadget', 42);

Simon Says PLC program in the classroom

The PLC was not built to play games!

However, I’ve found the Simon Says program to be an excellent academic exercise for PLC programming. It forces us to use an array to store the game pattern. It also forces the use of basic program modularity such as the use of a UDFB with one UDFB to generate the new move, another to play the move (tones and lights), and yet another to monitor the human player’s button press.

The game prepares the programmer for more traditional tasks such as material handling based on a bar code reader.

LD, ST, and FBD may all be used to handle data

All of the procedural languages may be used including LD, ST, and FBD, as all of them can concatenate those SQL commands. Although I suspect ST may be the easiest and most familiar to an advanced programmer with formal training in high-level languages. At the same time, there may be good reasons to use the other languages.

Programming style and consistency are just as important as the language itself

There are shop implicit conventions along with official (documented) style guides for PLC programming. Just as a shop will attempt to keep the same PLCs across all product lines, they will also attempt to keep the same style and language across all machines. In my opinion, this is essential for efficiency across the PLC-adjacent workforce equally applicable to programmer, installer, and technician.

:books: Continue Exploring Industrial Control Systems

If this discussion was helpful, you may also want to explore:

:world_map: DigiKey Navigation

:japanese_symbol_for_beginner: Related Foundational Articles

About This Author

Aaron Dahlen, LCDR USCG (Ret.), is a Senior Applications Engineer at DigiKey in Thief River Falls. His background in electronics and industrial automation was shaped by a 27-year military career as both technician and engineer, followed by over a decade of teaching.

Dahlen holds an MSEE from Minnesota State University, Mankato. He has taught in an ABET-accredited electrical engineering program, served as coordinator of an electronic engineering technology program, and instructed military technicians in component-level repair.

Today, he has returned to his home in northern Minnesota, completing a decades-long journey that began with a search for capacitors. Read his story here.

1 Like