The TCMP instruction is commonly used in time-based control programs. For example, if you need to control three outputs—Y0, Y1, and Y2—each should be activated and deactivated at different times. Suppose Y0 needs to turn on when the current time exceeds the set time, and turn off when it equals the set time. Y1 should activate when the current time matches the set time, while Y2 turns on when the current time is less than the set time but stops once it surpasses it. To implement this, the MOV command is used. When X0 is ON, the time data from D3 is split into D4, D5, and sent to D10, D11, and D12 respectively. Then, the TCMP instruction compares the current time with the set values K8, K20, and K25 (which represent 8, 20, and 25 seconds). Based on the comparison result, the status bits M10, M11, and M12 are set accordingly. If the current time is less than the set time, M10 becomes active, which turns on Y0 and turns off Y2. When the current time equals the set time, M11 is triggered, activating Y1 and deactivating Y0. Finally, if the current time is greater than the set time, M12 is set, turning on Y2 and deactivating Y1. This type of program is widely used in applications that require precise timing control, such as industrial automation, process control, or any system where output actions depend on specific time intervals.
Ring Common Mode Inductor,UU Common Mode Inductor,Vertical Plug-in Common Mode Inductor,Power Line Common Mode Choke
Xuzhou Jiuli Electronics Co., Ltd , https://www.xzjiulielectronic.com