PLC | Programmable Logic Controller

How to use Mitsubishi PLC jump instruction?

the conditional jump instruction shows that the code, mnemonic, operand and program steps of the instruction are shown in Table 8-3. Operand instruction name instruction code digits mnemonic D (·) program step condition jump FNC00 (16) CJCJ (P) P0~P127 P63 is END, without jump mark CJ and CJ(P)~3 step label P~ The use of the 1-step jump instruction in the ladder diagram is shown in the figure. The jump pointers P8 and P9 in the figure correspond to two jump instructions, CJP8 and CJP9, respectively. The meaning of the execution of the jump instruction is: when the jump condition (X000=ON) is met, the PLC does not execute the program between the jump instruction and the jump pointer Pn in each scan cycle but jumps to the pointer Pn It is executed in the block of entry until the jump condition is not met, the jump stops.
046811518222529P83640P943X000X001X002FNC00CJY001M1P8X000=ON, jump to P8; X000=OFF, execute in order X003S1X004T0X005RSTX006T246X007RSTX010C0X011X000X012Y001X013RSTT20OFFK3K0FNC12000CJY001M1P8X000=ON, jump to P8; The working status table 8-4 of the influence of the input or the state of the predecessor device before and after the jump in the figure on the result of the program execution. (1) The output relay Y, auxiliary relay M, and state S in the skipped block are no longer executed. Even if the working conditions involved in the ladder diagram change, their working states remain before the jump occurs. The status remains unchanged. Table 8-4 Effect of component jump on component status Contact state X001, X after the jump

plc
plc

How to use Mitsubishi PLC jump instruction CJ P0?

P0 is just the pointer number, and the driving condition is closed to jump to the designated number to execute this part of the program.
  The conditional jump instruction CJ is used to skip a certain part of the sequence program to shorten the operation cycle and control the flow of the program. The mnemonic of the instruction is CJ, the instruction code is FNC00, and the operating elements are P0-P127, and its program steps The situation is that CJ is 3 steps, and the label P is 1 step.
  If the timer and counter are working at the beginning of the skipped step, it will stop timing and counting during the skipped step, and continue to work when the condition of the CJ instruction becomes unsatisfactory. The processing of the high-speed counter is independent of the main program, and its work is not affected by the skip. If the CJ instruction is driven by the moving and closing contacts of the M8000, the conditional jump becomes an unconditional jump.
 Extended information:
  Precautions for the use of Mitsubishi plc jump instructions:
  1. JCP instruction is expressed as pulse execution mode.
  2. A label can only appear once in a program, otherwise, an error will occur.
  3. During the execution of the jump, even if the driving conditions of the skipped program are changed, the coil (or result) remains in the state before the jump, because the program is not executed at all during the jump.
  4. If the reset (RST) instruction of the totalizer timer and counter is outside the jump area, even if the coil is jumped, the reset is still valid.

The difference between Mitsubishi plc interrupt instruction and interlocking

The difference between Mitsubishi plc interrupt instruction and interlocking
The jump instruction means that the program jumps to the marked position to continue execution, and the skipped part is not executed
To call a subroutine is to jump from the current to the subroutine segment, and return to continue executing the next program of CALL after execution.
The interrupt instruction is similar to the process of executing a subroutine. Both jump, execute and return to the breakpoint to continue execution, but it may be executed anywhere in the program (triggered by external conditions), and the subroutine call is only when the program runs to a specific location. implement.

Who has the PLC jump instruction ladder diagram?

Transfer instructions are also called transfer instructions. After using the jump instruction in the program, the system can choose to execute different program segments according to different conditions. The jump instruction is composed of the jump instruction JMP and the label instruction LBL. The JMP instruction is programmed in the form of a coil in the ladder diagram.
When the control conditions are met, the jump instruction JMP n is executed, and the program is transferred to the destination location specified by the label n. The position is determined by the label instruction LBL n. The range of n is 0-255.
Pay attention to the following issues when using jump instructions.
1) JMP and LBL instructions must be in the same block, such as the same main program, subprogram or interrupt program. That is, it is not possible to jump from one block to another block.
2) After executing the jump instruction, the counter in the program segment between JMP and LBL stops counting, and its count value and counter bit status remain unchanged.
3) After the jump instruction is executed, the state of output Q, bit memory M and sequence control relay S in the block between JMP and LBL remains unchanged.
4) After executing the jump instruction, in the program segment between JMP and LBL, the timer with a resolution of 1 ms and 10 ms keeps the original working state and function; the timer with a resolution of 100 ms stops working. The value remains unchanged at the time of the jump.
  
The working process of this example is as follows.
1) When the input terminal I0.1 is turned on, the jump instruction JMP is executed, and the program skips network 2 and transfers to the position labelled 6 for execution.
2) For the skipped network 2, its output Q0.0 state remains unchanged from the state before the jump.

How to use Plc jump instruction?

Since you did not specify which brand of PLC, I will take S7-300 as an example directly. When you use the STL language for programming, jump instructions include JU, JL, TC, TCN, JCB, JNB, etc., and JU is unconditional. Jump, JL multi-branch jump, JC is RLO=1 is jumping waiting, in fact, there is help in the programming software to directly check which is more clear, and there are examples

In Mitsubishi PLC programming, what is the difference between

Subroutines help you divide the program into blocks. The instructions used in the main program determine the execution status of the specific subroutine. When the main program calls and executes the subprogram, the subprogram executes all instructions until the end. Then, the system returns control to the main program in the calling subprogram network.
Subroutines are used to segment and divide the program into smaller, more manageable blocks. You can take advantage of this when debugging and maintenance in the program. By using smaller program blocks, these areas and the entire program can be easily debugged and trouble-shooted. Calling the program blocks only when needed, the PLC can be used more effectively, because all the program blocks may not need to perform each scan.
Finally, if the subroutine only references parameters and local memory, the subroutine can be moved. In order to move subroutines, avoid using any global variables/symbols (I, Q, M, SM, AI, AQ, V, T, C, S, absolute addresses in AC memory). If the subroutine has no call parameters (IN, OUT, or IN_OUT) or only uses local variables in the L memory, you can export the subroutine and import it into another project.
To use a subroutine in a program, you must perform the following three tasks:
Establish subroutines
Define parameters in the local variable table of the subroutine (if any)
Call the subroutine from the appropriate POU (from the main program or another subroutine)
When the subroutine is called, the entire logic stack is saved, the top of the stack is set to one, all other stack positions are set to zero, and control is transferred to the calling subroutine. When the subroutine is completed, the stack is restored to the value retained at the call point, and control returns to the calling routine.
The subroutine and the calling routine share the accumulator. Due to the use of subroutines, no save or restore operation is performed on the accumulator.
Call subroutine with parameters
The subroutine may contain parameters for handover. The parameters are defined in the local variable table of the subroutine. The parameter must have a symbolic name (up to 23 characters), a variable type, and a data type. 16 parameters can be transferred to the subprogram or 16 parameters can be transferred from the subprogram.
The variable type field in the local variable table defines whether the parameter is transferred to the subroutine (IN), transferred to or transferred out of the subroutine (IN_OUT) or transferred out of the subroutine (OUT). The following table shows the parameter types of the subroutine. To add a parameter item, place the cursor on the variable type field of the type you want to add (IN,
IN_OUT or OUT). Right-click the unipolar mouse to get the options menu. Select the “Insert” option, and then select the “Next row” option. Another parameter entry of the selected type will be displayed below the current entry.
The jump to label (JMP) instruction performs branch operations on the specified label (n) in the program. When the jump is accepted, the top value of the stack is always logic 1. The label (LBL) instruction marks the location of the jump destination (n). You can use the “jump” instruction in the main program, subroutine or interrupt routine. The “jump” and it’s corresponding “label” instructions must always be located in the same code segment (main program, subroutine or interrupt routine). You cannot jump from the main program to a label in a subprogram or interrupt routine. Similarly, you cannot jump from a subprogram or interrupt routine to a label outside the subprogram or interrupt routine. You can use the “jump” instruction in the SCR segment, but the corresponding “label” instruction must be located in the same SCR segment.
The Enable Interrupt (ENI) instruction globally enables all additional interrupt event processes. The Disable Interrupt (DISI) instruction globally prohibits all interrupt event processes. When transitioning to RUN mode, the interrupt is disabled at the beginning. Once you enter the RUN mode, you can enable all interrupt processes by executing the global interrupt enable instruction. Executing the interrupt prohibition instruction will prohibit processing interrupts, but the active interrupt event will continue to be queued for waiting

What is the difference between jump instruction and interrupt?

Jump instruction, you will not jump until it is executed. That is, it will be executed only after the scanning period has been scanned, just like your mother told you not to play games to buy food, you have to wait until the game is over.
And interruption, when an interruption occurs, stop the current scan for interruption processing, just like your girlfriend, let you come over now, even if you are in the game.

What is the function and role of the jump instruction in PLC?

This is basically the case.
Jump instruction, jump to the pointer position for execution, execute to the return instruction and then return to the next jump instruction to continue execution.
There are many types of interrupts, some of which are not scanned. Anyway, always continue to execute the next program after execution.

Leave a Comment

Your email address will not be published. Required fields are marked *