1. When a PLC and a host computer (or touchscreen) form a monitoring system, the screen often needs to display control modes such as "manual" and "automatic" (usually multiple modes can only be used at a time). The "MOV" instruction can be used in the program. For example, when "manual" is selected, the constant 1 is MOVed into register VB10; when "automatic" is selected, 2 is MOVed into the same register VB10. By simply checking the data in the register, the system's control mode can be determined. The advantage of this approach is its ease of understanding and avoids the need for complex interlocking procedures.
2. When the program involves analog signal control, if the read analog signal has virtually no error, time filtering can be used to delay the data for a certain period. If the read data has a large error, other filtering methods are needed, such as calculating the average value. Please consult relevant materials for more information.
3. During program debugging (especially when modifying equipment and adding your program to the existing equipment's program), if a condition is met but the output coil is not connected, check if this part of your program is within such statements, such as JUMP go to statements. Another possibility is that after the program is interrupted, the condition is met but there is no output and the coil is not connected; this usually means that this part of the program is not being scanned.
4. In sequential control programs, where one action is completed before moving to the next, or similar sequential control, the +10+10 control mode is used, which I find very convenient. The idea is: a register is preset to 0 during initialization. After system startup, it is incremented by 10, bringing the register to 10. With the register at 10, the first action can be performed. After the first action, the register is incremented by 10 again, bringing the register to 20, allowing the second action to be performed. After the second action, it is incremented again, bringing the register to 30. This way, by checking the value in the register, the desired action can be determined. When a jump action is needed, the increment can be changed to +20, +30, etc., depending on the actual requirements.
Why add 10 instead of 1? Because after adding 10, if you want to insert a segment, you can simply choose any one of the 10 empty spaces.
5. When designing a program, if a process failure (not controlled by the control system) occurs, it's best to preserve the fault symptoms and provide visual and audible alarms. This should continue until the operator resets the system, informing them of the malfunction. Otherwise, if the machine stops, others might assume it's a program error. These points are generally important to consider when designing a new system.
6. For frequently called subroutines, they can be made into submodules for frequent calls.
7. Since each step in the work cycle of production machinery requires a certain amount of time to execute, and these times have certain limits, a timer can be started simultaneously with the start of the step to be monitored. The timer's time setting value is 20% to 30% longer than the normal duration of the action. The timer's output signal can be used for alarms or automatic shutdown devices. When the time of a certain step in the production machinery exceeds the specified time, reaching the corresponding timer preset time, and before the next step has begun, the timer issues a fault signal. This signal stops the normal working cycle program and initiates 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.) use normally closed (NC) inputs.
9. For safety and energy saving considerations, the output should be designed to only operate when needed and stop once the desired action is achieved, rather than being designed to output continuously and only disconnect when necessary.
10. The operating principle of actuators should be: better to remain still than to move erratically!
11. Single device control: Each device must have the function of switching between manual and automatic operation and the ability to start/stop when operating manually. When switching from automatic to manual operation, the device cannot stop; when switching from manual to automatic, the start/stop of the device depends on the automatic program.
12. Each piece of equipment (pump, fan and other large equipment) must be rotated after 24 hours of operation, and the operating time must be accumulated, unless the start/stop sequence is set by the host computer, in which case the operator shall set it himself.