Share this

PLC Programming and Annotation Practical Guide

2026-04-06 02:41:54 · · #1

0 1 Program Editing

0 1 Select Operation

When editing the program, you need to select the object to be edited before performing operations such as copying, pasting, deleting, and inserting. Table 3-2 shows some commonly used selection operations in STEP 7-Micro/WIN SMART software.

▲Table 3-2 Some commonly used selection operations in STEP 7-Micro/WIN SMART software

02 Deletion Operation

Table 3-3 shows some common deletion operations for STEP 7-Micro/WIN SMART software.

▲Table 3-3 Some common deletion operations in STEP 7-Micro/WIN SMART software

0 3 Insertion and Overwrite Operations

STEP 7-Micro/WIN SMART software offers two editing modes: Insert (INS) and Overwrite (OVR). The current editing mode can be viewed in the status bar of the software window, as shown in Figure 3-17. Pressing the "Insert" key on the keyboard switches the current editing mode; the default is Insert mode.

▲Figure 3-17 Status bar display in two editing modes

When the software is in Insert Mode (INS), inserting a component will insert a new component before the component where the cursor is located. As shown in Figure 3-18, "INS" appears in the status bar at the bottom of the software window, indicating that the software is currently in Insert Mode. Select the I0.0 normally open contact with the cursor, and then use the right-click shortcut menu to insert a contact. This will insert a new normally open contact before the I0.0 normally open contact.

▲Figure 3-18 Inserting a component in insert mode

When inserting a component in Overlay Mode (OVR), the new component replaces the old component at the cursor position. If the new and old components are of the same type, the address and parameters of the old component will be automatically assigned to the new component. As shown in Figure 3-19, "OVR" appears in the status bar at the bottom of the software window, indicating that it is currently in Overlay Mode. First, select the normally open contact I0.0 with the cursor, and then insert a normally closed contact using the right-click shortcut menu. The normally open contact I0.0 at the cursor position will be replaced with a normally closed contact, and its default address will remain I0.0.

▲Figure 3-19 Inserting a component in overlay mode

0 2 Program Comments

To make the program more intuitive and easier to understand, comments can be added.

0 1 Comments on the program and program segments

The comments for programs and program segments are shown in Figure 3-20. Enter the descriptive text for the entire program in the comments section for the entire program, and enter the descriptive text for the current program segment in the comments section for the current program segment. Clicking the "POU Comment" tool on the toolbar will hide or show program comments, and clicking the "Program Segment Comment" tool on the toolbar will hide or show program segment comments, as shown in Figure 3-21.

▲Figure 3-20 Comments on the program and program segments

▲Figure 3-21 Hiding/Showing Program and Program Segment Comments

0 2 Instruction Element Comments

Ladder diagram programs are composed of interconnected instruction elements. Commenting on instruction elements helps in understanding program segments and the entire program. Symbol tables can be used to comment on instruction elements.

Annotating instruction elements using a symbol table is shown in Figure 3-22. Expand "Symbol Table" in the project instruction tree area, and then double-click "I/O Symbols" to open and display the symbol table, as shown in Figure 3-22(a).

In the I/O symbol table, change the default symbols for addresses I0.0, I0.1, I0.2, Q0.0, and Q0.1 as shown in Figure 3-22(b). For example, the default symbol for address I0.0 is "CPU_Input 0", which is now changed to "Startup". Then click the "Table 1" tab below the symbol table to switch to Table 1, as shown in Figure 3-22(c).

Enter "T37" in the "Address" field and "Timer 5s" in the "Symbol" field. Note that you cannot enter "5s timer" because symbols cannot begin with a number. If the entered symbol is red text with an underline, it indicates a syntax error. After entering the symbol for the component that needs annotation in the symbol table, click the "Apply Symbol to Project" button above the symbol table, as shown in Figure 3-22(d). The symbol will immediately appear next to the component in the program.

For example, the normally open contact I0.0 displays "Start: I0.0", where "Start" is a symbol (i.e., component annotation), and "I0.0" is the absolute address of the contact (or component number). If no symbol is displayed next to the component, click "View" in the menu bar and select "Symbol: Absolute Address" in the horizontal bar menu to display both the absolute address and symbol next to the component in the program; if you select "Symbol", only the symbol will be displayed, and the absolute address will not be displayed.

▲Figure 3-22 Annotating instruction elements using a symbol table

0 3 Program monitoring and debugging

After the program is written, it needs to be checked to see if it meets the control requirements. The main methods for checking this are:

One method is to analyze the program from beginning to end to determine whether the program is correct. This method is the simplest, but it requires the programmer to have a high level of PLC theory and analytical skills.

The second method is to write the program into the PLC, then connect the PLC to the power supply and input/output devices, and observe whether the program is correct through actual operation. This method is the most intuitive and reliable, but it requires a lot of hardware devices and wiring, which is a lot of work.

Third, software can be used to simulate actual operation, and the program's operation can be observed to determine whether the program is correct. This method does not require actual wiring and can observe the program's operation, so it is suitable for most people. This section introduces this method.


Read next

CATDOLL 135CM Yana (TPE Body with Hard Silicone Head)

Height: 135cm Weight: 24.5kg Shoulder Width: 33cm Bust/Waist/Hip: 62/57/69cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22