How is the PLC automation control program written?

I guess there will be some people whispering in their hearts to engage in PLC automation control programming and debugging. When I open Mitsubishi's programming software, Omron's programming software, or Siemens's programming software, the ladder diagram that everyone uses the most is the ladder diagram. Also know that the ladder diagram is composed of instructions one by one.

However, I was just whispering in my heart, and I didn't know one thing. After all: put a few instructions in one line, how many lines do I need to do, 10 lines, 20 lines, or 1000 lines?

Alas, it is really hard to answer this question thoroughly. I can only try to help you understand from this perspective:

  1. The control program reflects what you think in your mind, right? You don’t deny this sentence. Originally, computers, computers, and computers are used to replace the human brain. So when you write a program, you tell the thoughts in your mind. PLC, right, understand?
  2. Generally speaking, when you talk to others about your ideas, you will definitely speak like this:
    1. If so, then so, so, then so
    2. When so, so, then so, so, and then
    3. If so, and so, then so so
    4. If so or so, then so so

Right, think about it, you have a problem, you talk to others about your ideas, is it likely that you are talking to them like this?

Well, if you admit that this is the way to explain the idea, then it is relatively easy to handle. When you say the above words in your mouth, write a line of ladder program. For example, if you say 20 ifs, then basically It should be a 20-line ladder program.

As for how many instructions to put in each line, I can’t say this, it depends on what you want to do and how many steps you need to do.

Therefore, the above is a process of translating the ideas in the mind into PLC programs. So how do you start to cultivate this kind of thinking? There is nothing special, just two:

  1. Do-it-yourself practice
  2. See how others do it, then practice on your own

Let's learn about PLC electrical automation programming and debugging at Jiatu Automation Academy. Siemens, Mitsubishi, and Omron have them. Academy website: https://edu.jiatuxueyuan.com

WeChat of the teaching assistant teacher of the college:

Guess you like

Origin blog.csdn.net/cuiwenjun/article/details/110231492