본문 바로가기
카테고리 없음

The sequence for developing a PC-based automation equipment control program (18 steps)

by ictlab 2023. 9. 1.

I will explain in order the basic development process for developing PC-based equipment control software.

Although I have explained in general order, if there are multiple developers, some steps can be developed simultaneously or in advance, regardless of the order. The following contents should be considered as a rough order, and it is recommended to apply it appropriately to the development according to each project situation, developer capability, and input personnel.



※ Assumptions
It is assumed that basic IO libraries or motor libraries are already built.
It is assumed that the GUI screen used in common is already developed.




🔷 1. Understanding Equipment Structure

To understand the equipment structure, you must first review with the mechanical designer.

At this time, you need to understand the overall operation structure of the equipment. Since any equipment must process or move the target material using an actuator (motor, cylinder, etc.), it is necessary to understand how the material moves and how each motor or cylinder affects the movement to understand the control structure.

You will understand the number of motor axes, the direction and position of each motor, the position and direction of the cylinder, and the operation structure.

Also, you need to check whether each sensor detects properly in what situation, why the sensor was installed in the mechanical design, and whether there are any missing sensors needed for control.

You need to understand the types of boards mounted on the equipment control PC, the types of communication connecting with the PC, and the types of interfaces.



However, it is better for software developers to actively participate from the equipment order concept stage, not after the equipment assembly is completed and the structure is understood, and to solve the problems that may arise from the control perspective in advance.







🔷 2. Designing Control Structure & Review

Based on the understood equipment structure, you will design how to control the equipment.

Consider simultaneously driving parts, what data is needed for material information, and how to display what information on the main screen, and then review it with other developers.







🔷 3. Creating the Project

After setting the control concept, create a new project. You can create a new project in Visual Studio or clean up an existing project and leave only common matters to develop a new project.

In the individual equipment control project, only the source related to the equipment should be included, and the commonly used source should be developed as a separate dll library. It is also called a framework that collects libraries commonly used for control in a company.








🔷 4. Setting Up Basic Data



You will create basic data.

Io Map

Cylinder Data

Motor Data

You can create basic data in the format used in the structure developed by each company.

It is possible to develop using only source code without data, but if you do not save the setting data, you have to change the executable file by recompiling (building) the program source for simple parameter modification, and it is difficult to use the same executable file when the hardware is slightly changed. Let's create a framework that can set basic control objects based on data files.







🔷 5. IO, Cylinder, Motor Check

When the power of the equipment and the equipment PC is turned on, check whether the io, cylinder, and motors are operating properly.

Check whether the sensor properly detects the material, whether the cylinder operation direction and sensor are properly input,

Check the motor drive direction, sensor status, and travel distance.







🔷 6. Interlock Implementation (Develop Check Functions)

Before starting full-scale sequence development, we strictly implement interlocks to prevent collision of motor or cylinder mechanisms by mistake.

Initially, interlock work is strictly done, and later it is gradually released as needed. If you set the interlock conditions roughly at first, during the sequence work, situations such as bugs, mistakes, and jog movement mistakes can easily cause collisions of mechanisms, and in the worst case, the mechanism may be damaged or broken, causing significant losses. Most of the damage problems of the mechanism are more fatal in terms of time because the delivery date is fixed than the financial problem. Also, if there is an unexpected operation, there may be an accident in which the worker is injured, so you should put a lot of effort into the interlock work so that you can work on the sequence with confidence later.



Let's put a lot of effort into interlock work!




🔷 7. Writing Teaching Parameters

According to the understood overall operation structure, write the teaching values ​​that each motor should move.

Teaching values ​​should be set in the GUI and a screen should be created where the motor can be moved and set.

And you also need to create a data structure that can use the values ​​set in the GUI in the sequence code.


 

🔷 8. Sequence Development

Start developing and connecting the sequences in earnest.

Develop modules that operate simultaneously in the sequence, and each module should be developed to operate with one or more threads.

In the sequence code, control the motor, cylinder, IO output, etc., to move or process materials and update related data such as material information.

Typically, sequences are developed using if-else statements or switch-case structures, and a structure for error handling is created concurrently.

The structure or method of controlling the sequence can vary from company to company, and even among developers. If it is not standardized, the control code for each equipment can become complicated. In one company, a senior developer should lead well so that all developers can develop with the same structure.

For equipment companies, it is important for senior developers to establish a basic structure for sequence control and create it as a common library.

 

 


🔷 9. Basic GUI Development. Main Screen

Organize the information to be displayed on the main screen and display it. Some tasks can be performed simultaneously with sequence control development.

 


🔷 10. Vision Algorithm and Teaching Screen Development

For equipment with vision alignment or inspection functions, you must develop a vision algorithm and a vision teaching screen.

If there is a separate vision developer and the vision program is controlled by a separate PC or a separate executable file, the vision developer works and communicates with the equipment control program to receive the results for control.

 


🔷 11. Sequence Debugging

Once the basic sequence is somewhat established, run an IDLE RUN (DRY RUN) to test whether the sequence implemented in each module operates without errors, and whether the connection conditions between the sequences operate properly.

At this time, collisions of mechanisms due to mistakes or bugs occur most frequently. It is important to keep in mind that strict interlock conditions prevent damage to the mechanisms.

 


🔷 12. MES Development and Testing

If there are multiple developers involved in the development and there is a surplus of personnel, MES development can be started separately from other tasks.

First, understand the MES specifications, the basic protocol, and the data structure, and then develop according to the scenario.

Process the data that needs to be exchanged according to each scenario or event. At this time, it should be carried out together with sequence development and GUI development.

MES is done in the following order:

Spec analysis

Basic protocol development

Individual data reception and transmission test (events, etc.)

Scenario development

Local server protocol, scenario test

Mass production server test

 

 



🔷 13. Full Auto Run Test & Debugging

After the sequence development is completed, test the final operation by inputting materials.

When starting to input materials, many unexpected sensor problems, timing problems, and mechanical problems occur, and these problems are resolved in consultation with the mechanism, hardware, and CS engineers. Also, fix software bugs and address areas that can be improved with software alone.

It is most cost-effective to solve control problems with software.

(However, it can be abused)

 

 



🔷 14. Development of Manual Functions and Convenience Features

To make setting easier, it is good to create manual operation functions as quickly as possible.

Also, carefully observe the setting process or try setting it yourself as a developer to quickly develop features that can increase convenience. It is best for the developer to do the setting themselves when developing the software and setting it up for the first time.

Developers should be good at development.

 

 



🔷 15. Addition of Error, Message Data

While working on the sequence, it is good to organize the error data at the same time, but most people focus on running the sequence, so the error codes are organized later. Once the sequence debugging is somewhat completed, organize the error codes and data so that the error content can be easily understood. At this time, data in different languages should also be included according to the language.

XMachineStudio allows you to easily create ERROR data while developing the sequence.



🔷 16. Multilingual Support Data Work

Create data for multilingual support for error data, message data, etc., mentioned above.

Also, create multilingual data for the GUI screen.

 

 

 


🔷 17. Writing Software User Manual

Write a software setup and user manual, and if necessary, request translation into the language requested by the customer.

 

 



🔷 18. Mass Production Support, Bug Fixing, Maintenance

Inspect the equipment, fix bugs that occur during mass production after delivery, and support maintenance.