How does plc stop subroutine call _ specific operation parsing

**PLC Subroutine Calling Method** 1. To enter a subroutine, use the CALL instruction, which is also known as FUN67. Within the subroutine, use the LBL instruction (FUN65) to define a label. Once the subroutine is complete, use the RTS instruction (FUN68) to return to the main program. 2. For interrupt-based subroutine calls, you need to specify an interrupt name with an "I" suffix. For example, if you're using a rising edge interrupt on X1, the interrupt number is "X1+", and the corresponding interrupt tag would be "X1I". In the subroutine, use the LBL instruction (FUN65) to start the subroutine with the tag "LBL X1I". At the end of the interrupt routine, use the RTI instruction (FUN69) to return from the interrupt. The CALL instruction is numbered FNC01 and uses operands P0 to P127. It occupies 3 steps in the program. The SRET instruction (FNC02) is used to return from a subroutine and requires no operands, taking only 1 program step. As shown in Figure 1, when X0 is activated, the program jumps to label P10 and executes the subroutine. After the SRET instruction is executed, the program returns to the next line after the CALL instruction. ![How does PLC stop subroutine call – specific operation parsing](http://i.bosscdn.com/blog/27/55/78/3-1G11611353549.png) **Figure 1: Subprogram call and return instructions** **Important Notes When Using Subroutine Call and Return Instructions:** 1. The transfer label must be unique and cannot overlap with jump labels. 2. Subroutines can be nested up to 5 levels deep. **Note:** FEND marks the end of the main program, while END ends the entire program. Subroutines and interrupt routines are executed after FEND, provided they are called or triggered. **PLC Subroutine Stop Function** If you want the PLC 200 to pause the running program until the pause signal is removed, then continue execution, there's a simple trick you can use. You can write your program into a subroutine and add a pause condition when calling the main program. If you need to pause, simply stop the subroutine call. When you want to resume, restart the call. To implement this, you can use an unused bit address, such as a V register, to maintain the power-down state. If you don't want to use forced values through a computer, you can use an external input point, like I5.2, to control the pause externally—similar to an emergency stop button. Another approach is to divide your program into multiple stages using flags (e.g., M0.0 to M0.7 for 8 different stages). These flags can be reset every time the PLC is powered on. By checking the flag status, you can restore the program to its previous state before the power was cut. When a subroutine is not being called, its contents do not affect the main program. The data inside the subroutine is preserved until it’s called again or the PLC is restarted. This allows for efficient and controlled program execution.

MDF Patch Panel

A Main Distribution Frame (MDF) is a signal distribution frame or cable rack used in telephony to interconnect and manage telecommunication wiring between itself and any number of intermediate distribution frames and cabling from the telephony network it supports.

What's more,we can also offer you the MDF Termination Block with good quality and low price.

MDF Patch Panel, Patch Panel Rack, Network Patch Panel

NINGBO YULIANG TELECOM MUNICATIONS EQUIPMENT CO.,LTD. , https://www.yltelecom.com