HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

【Prized Discussion】Which is harder, writing code or modifying code?

2024-06-17View Original

Thread Content

This post was last edited by Xiao Fu fu on 2024-6-17 at 13:37. Many people who learn *PLC programming initially hold the misconception that modifying someone else’s program is relatively simple, but this is not the case in reality. Every PLC programmer has their own unique programming style and approach. When we want to modify a program, we need to spend a lot of time and effort understanding the logic and approach of the original program. Another problem is that many PLC programs lack sufficient comments and documentation; such programs are often filled with redundant code and logic, making it difficult for us to know where to start when making modifications. Or some PLC programs can be cumbersome and chaotic when dealing with problems. This is due to the unclear thinking of the original programmers, or because they lacked sufficient planning and design when writing the program. Faced with such a program, we need to spend more time and effort analyzing its logic, identifying the problems within it, and making corrections. After making a set of changes, we might find that rewriting a completely new program is more efficient and quicker than modifying an existing one. Therefore, when programming PLCs, we should pay more attention to the readability and maintainability of the code, so as to avoid making subsequent modifications too complex and difficult. In PLC programming, both \"changing the program\" and \"writing the program\" present their own unique challenges, and it is difficult to determine outright which one is more difficult. It depends on various factors, such as the programmer’s level of experience, familiarity with PLC systems and related equipment, as well as the complexity and specific requirements of the programming task. Let’s take a look at some of the complaints from netizens: Netizen A: Everyone has their own way of programming; this is especially true in small companies. Larger companies use standardized templates, but small companies handle a variety of different projects, making it difficult to standardize anything. Larger companies usually deal with projects related to a specific industry; unless the client requests customizations, these projects can generally be replicated on a large scale. It ultimately depends on the company’s project management system and its philosophy. Netizen B: It depends on what kind of work is involved. I’m used to doing routine tasks like fixing things all the time. It’s really easy to get stuck when starting from scratch. Netizen C: I hate modifying other people’s programs the most. Netizen D: Modifying others’ programs is extremely frustrating – there are thousands of lines of code, and since it’s not within any framework, one has to write it however they want, which is very annoying. In general, people curse every time they encounter this situation. In daily programming, do you think writing code is harder or modifying existing code is harder? Which bizarre programs have been fixed? Feel free to reply and complain! Participation reward: Users who participate in the discussion will receive 10 wealth points, with the top 20 responders eligible for this reward!
Reply #22024-06-17
The difficulty of programming and modifying programs varies from person to person, depending mainly on an individual’s programming experience, understanding ability, and familiarity with a particular PLC system. Generally speaking, a completely new programming task may require higher creativity and problem-solving skills, whereas modifying existing programs demands a thorough understanding of the logic and structure of the original code, which may necessitate more patience and careful consideration. On the other hand, programs lacking sufficient comments and documentation do indeed pose greater difficulties in making modifications. In daily programming, we should focus on the readability and maintainability of code to make subsequent modifications smoother. .
Reply #32024-06-18
It’s the simplest and most efficient way to start programming again based on your own ideas!
Reply #42024-08-27
Our company is a chemical plant with over ten thousand employees; the department responsible for instrument control is the Metrology Section, but there are very few people who can write programs from scratch. Basically one hand, at most two hands. In the Metrology Department, it’s possible to create a simple ladder diagram for a single control circuit; such diagrams account for only 50% of the cases. Those who can write programs using ST probably make up only about 5% of the staff in the Metrology Department. Asking them to develop a program from scratch shows a limited level of skill. The programs I wrote, asking them to interpret them, is a real headache.
Reply #52024-08-27
The entire programming task involves a large amount of work, with varying levels of difficulty; modifying the program depends on its content
Reply #62024-09-24
The logic of many PLCs is not in source files and lacks comments; it takes time to understand the way in which the PLCs are configured. Some manufacturers even lock certain subroutines, preventing access to them. Making minor changes to the original program is relatively simple, but major changes require caution.
Reply #72024-09-26
To be honest, in a factory, it’s really not necessary to be an expert in programming; it’s sufficient to be able to understand it roughly and make adjustments to the parameters.

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.