12 PLC Programming Tips from Electrical Experts Worth Saving!

12 PLC Programming Tips from Electrical Experts Worth Saving!Search WeChat12 PLC Programming Tips from Electrical Experts Worth Saving!Technical Training1

When PLC and the upper computer (or touch screen) form a monitoring system, it is often necessary to have control modes like “manual” and “automatic” on the screen (generally multiple modes can only be selected one at a time). In the program, you can use the “MOV” instruction. For example: when “manual” is selected, move constant 1 to register VB10, and when “automatic” is selected, move 2 to the same register VB10. By checking the data in the register, you can determine the control mode of the system. The benefit of this approach is that it is easy to understand and does not require complicated interlocking programs.

2

If the analog control in the program has minimal error, you can use time filtering to delay for a period. If the reading data has significant error, you need to adopt other filtering methods, such as averaging. Relevant materials can be consulted.

3

During program debugging (especially when modifying equipment, where your program is added to the original device’s program), if the condition in the program is met but the output coil does not activate, check whether your segment of the program is between statements like JUMP, go to, etc. Another possibility is that after interrupting the program, the condition is met but there is no output; this usually means that this segment of the program is not being scanned.

4

In sequential control programs, where one action is completed before proceeding to the next similar action, I find it convenient to use a +10+10 control mode. The idea is to preset a register, initially set to 0. When the system starts, increment it by 10, making the register 10, allowing the first action to be executed. After the first action is completed, increment the register by 10 again, making it 20 for the second action, and so on. By checking the data in the register, you can determine which action to complete. When a jump action is needed, you can skip increments of +10 and instead use +20, +30, etc., depending on the actual needs.

Why add 10 instead of 1? Because after adding 10, if you insert an action, you can choose any position among the 10 available slots.

12 PLC Programming Tips from Electrical Experts Worth Saving!

5

When designing a program, if a process fault occurs (not controlled by the control system), it is best to maintain the fault phenomenon and trigger visual and audible alarms until the operator resets it, to inform them that a fault has occurred in the system. Otherwise, if the system stops, others may think it is a problem with your program. Generally, these considerations should be noted when designing a new system.

6

Frequently called subprograms can be made into sub-modules for frequent invocation.

7

Since the movements of various steps in the working cycle of production machinery require a certain amount of time, and these times have certain limits, you can use these times as a reference. When the action of the step to be detected begins, start a timer with a preset value that is 20%-30% longer than the normal duration of that action. The output signal of the timer can be used for alarms or automatic shutdown. If the action of a certain step exceeds the specified time and does not transition to the next step when the corresponding timer preset time is reached, the timer will issue a fault signal, stopping the normal working cycle program and initiating the alarm or shutdown program. This is what we commonly refer to as over-cycle protection.

8

Some safety detection switches (such as emergency stop buttons, safety light curtains, limit switches, etc.) should use normally closed (NC) inputs.

9

For safety and energy saving considerations, try to design outputs to activate only when needed, and stop output once the position is reached, rather than designing them to output continuously and only stop when needed.

12 PLC Programming Tips from Electrical Experts Worth Saving!

10

The action principle of executing elements should be to prefer not to move rather than to move incorrectly!

11

For single device control: a single device must have soft manual/automatic switching, and during soft manual operation, it should have start/stop functionality. When switching from automatic to soft manual, the device should not stop; when switching from soft manual to automatic, the device’s start/stop depends on the automatic program.

12

Single devices (pumps, fans, and other large equipment) must be cycled after running for 24 hours, and the running time must be accumulated, except for cases where the start/stop sequence is set by the upper computer, which is at the discretion of the operator.

12 PLC Programming Tips from Electrical Experts Worth Saving!

Disclaimer: This article is reprinted from the internet, and the copyright belongs to the original author. If there are copyright issues, please contact us for deletion, thank you!

HISTORY/Previous Recommendations

Three essential tools for electrical workers that can be opened with one click on WeChat!

[Collect] The “path” of a ten-year electrician, the secret to earning over ten thousand a month!

Which of the five major electrical drawing software (CAD, Eplan, CADe_simu…) do you pick?

The latest electrical CAD drawing software with a detailed installation tutorial!

The latest electrical drawing software EPLAN with a detailed installation tutorial!

Common issues for beginners using S7-200 SMART programming software (with download link)

A comprehensive electrical calculation EXCEL sheet that generates automatically! No more asking for electrical calculations!

Bluetooth headsets, electrical/PLC introductory books available? Come and claim your electrical gift!

PLC programming basics: ladder diagrams and control circuits (with 1164 practical cases of Mitsubishi PLC)

Still can’t understand electrical diagrams? Basic electrical diagram recognition and simulation software available, quickly get started with theory and practice!

12 free electrical worker video courses, 10GB of software/eBooks, and 30 days of free live electrical courses are available now!

Don’t forget to like and share!12 PLC Programming Tips from Electrical Experts Worth Saving!12 PLC Programming Tips from Electrical Experts Worth Saving! Click “Read the Original” to learn PLC/electrical courses for free.

Leave a Comment