Share this

The most common basic mistakes in PLC programming

2026-04-06 04:47:51 · · #1

When programming PLCs , both beginners and experienced programmers can make this kind of basic mistake. Because this error is not syntactic, it cannot be detected by programming software. Once this error occurs, it is sometimes difficult to discover until the controlled device fails to operate or stops at a certain point during debugging. Only then do you realize there is a problem, and then you have to search and analyze the PLC program line by line, or execute the program line by line, which is time-consuming and laborious.

So what exactly is the problem that makes us prone to making such basic mistakes? The inherent mindset of relay electrical control is that when programming, if one or more input points use physical normally closed contacts (such as stop switches or travel limit switches), the program will still continue to use the relay electrical control method, that is, it will still use normally closed contacts as the conduction condition.

The following example uses a simple start/stop and self-locking circuit to illustrate this.

The following is an error-prone PLC program that cannot run, based on the diagram above:

After the PLC is powered on, the normally closed contacts X000 and X002 will open, meaning the logic value will be "0".

Y0 = (Y0 + X001) × X000 × X002

As can be seen from the digital logic expression above, after pressing the start button SB1, the logic value of X001 is "1", while the logic value of Y0 will never change and will always be "0". This is related to the PLC's internal input circuit. The following is the equivalent circuit of the PLC's internal input:

The correct PLC program is as follows:

After the PLC is powered on, the normally open contacts X000 and X002 will close, resulting in a logic value of "1".

Y0 = (Y0 + X001) × X000 × X002

When the start button SB1 is pressed, the logic value of X001 is "1", and the logic value of Y0 is also "1". Releasing the start button SB1 changes the logic value of X001 to "0" but the logic value of Y0 to "1". Y0 and X001 are ORed, ensuring that the logic value of Y0 remains "1", i.e., it is self-locking. The logic value of Y0 only becomes "0" when the stop button is pressed or an overload occurs (FR0 action).

The simple example above illustrates that beginners may not yet understand that when an external input is normally closed, the logic value changes to "NOT" after passing through the PLC's internal input circuit. This is also influenced by ingrained thinking about relay-based electrical control, while experienced users may overlook this error. Although it's a basic mistake, it's also prone to occur during programming.

Read next

CATDOLL 136CM Sasha (TPE Body with Hard Silicone Head)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22