How to call Mitsubishi PLC subroutine?

Updated on Car 2024-04-29
11 answers
  1. Anonymous users2024-02-08

    1) After performing a return, it is not called.

    2) The PLC output is unified after all the programs have been completed, so it will not.

    Added: 1) The subroutine will run to section 5.

    2) The order control of the subroutine may not serve its intended purpose, because the output of the subroutine will no longer perform the scan in the next cycle (the call condition disappears). The results of each step can be output in a timely manner.

    This example of lz is a typical conditional call. However, it is important to pay attention to the validity of the condition. It's best to write it in the subroutine, not in the subroutine's call condition. Not long ago, there was such a problem with the water purification system in my workshop.

    The subroutine of the distribution system is called by preparing the signal of the system OK + soft logic (touch screen).

    My operator operates on the touch screen to start the operation of the distribution system, and the circulation pump of the distribution system is running, and in about 5 minutes, the pH value of the preparation system is alarmed, and the subroutine call condition disappears. At this time, the circulating pump of the distribution system is always output. Can't stop.

    Later, Party B was told of the problems in the program, and the signal of the preparation system OK was put into the subroutine of the distribution system, instead of being used as a call condition. Run OK.

    With regard to subroutine calls, such conditional calls are forbidden. Unforeseen consequences can occur.

  2. Anonymous users2024-02-07

    Call p10 before the main program is completed, and the main program ends with fend; In the next place, the subroutine designator p10 can be set in the left empty position of the left bus, as the entrance of the subroutine, and sret is used at the end of the subroutine;

  3. Anonymous users2024-02-06

    After disconnecting, the subprogram continues to run and will not be called in the next cycle.

    The result output of a subroutine is based on where you call it: below the subroutine, there is a change in this cycle.

    Above the subroutine, there will be changes in the next cycle.

    Not necessarily in the main program, it can be called anywhere.

  4. Anonymous users2024-02-05

    Question 1 is wrong, how is the subroutine related to the interrupt, guess what you want to know is: will the subroutine stop executing immediately or return after execution. The answer is to return immediately.

    2 is that the result is output immediately, and if it is the actual output point, then it is output at the next scan cycle.

    Contact me to make friends.

  5. Anonymous users2024-02-04

    <> "As shown in the figure, 4 figures, as shown in Figure 1, for example, if I want to insert an X2 normally open contact between the X0 NO contact and the X1 NO contact, I need to use column insertion. Mouse click x1 and then right-click ——— column insertion, as shown in Figure 2. Then there is an extra column of blank space between x0 and x1, as shown in Figure 3.

    In fact, this function is not as convenient as the insert key.

    Hope...

  6. Anonymous users2024-02-03

    Although it is confirmed that the demand curve arises naturally from the theory of consumer choice, the derivation of the demand curve itself is not a theory that proposes consumer behavior. Simply determining how people react to change doesn't require a rigorous analytical framework. However, consumer choice theory is extremely useful.

    As we will illustrate in the next section, we can use this theory to more deeply determine the factors that determine family behavior.

    Instant Answer Draw budget constraint lines and indifference curves for Pepsi and pizza. Illustrate what happens to the budget constraint line and consumer optimum when pizza** rises. Use your graph to divide this change into income effects and substitution effects.

    Four applications. Now that we've established the basic theory of consumer choice, we can now use it to illustrate four questions about how the economy works. However, since each problem involves family decision-making, we can address these issues with the consumer behavior model we just proposed.

    Are all demand curves sloping to the bottom right?

    In general, when an item** goes up, people buy less. Chapter 4 refers to this normal behavior as the law of demand. This pattern manifests itself in the demand curve sloping to the lower right.

    However, as far as economic theory is concerned, the demand curve also sometimes slopes to the upper right. In other words, consumers sometimes defy the law of demand and buy more when one item rises. To illustrate how this can happen, look at Figure 21-12.

    In this example, the consumer buys two items – meat and potatoes. Initially, the consumer budget constraint line was a straight line from A to B. The best advantage is c.

    When the potato ** rises, the budget constraint line moves inward and is now a straight line from A to D. Now the best thing is e. It is important to note that the rise in potatoes has led consumers to buy more potatoes.

  7. Anonymous users2024-02-02

    Mitsubishi PLC programming program how to write PLC Hello, 1, after the program is written, you need to transform the program first, there are three ways to transform: the first is to press the F4 key of the keyboard directly, the second is to click the "transform" menu bar, and then click the first item "transform", the third is to click the "program transform" button of the toolbar, we choose the appropriate transformation method according to their own habits 2, after the program is transformed, you need to check whether there are syntax errors in the program, This check only self-diagnoses the syntax, not the design content. To check the program, click "Program Check" in the menu bar of the tool.

    3. Under normal circumstances, the program can only be passed into the PLC when it prompts "no error", but except for some special cases, such as prompting that there is a double-coil output, because some "manual and automatic" double-coil output is also normal. 4. After checking that it is correct, you can write the program to PLC: there are two most commonly used ways to write PLC, one is to click ** - Write in the menu bar.

    5. Another writing method is relatively simple, you can directly click the write button in the toolbar. 6. After clicking Write, the content will be prompted, you can choose to only write the program without writing comments, or you can select all. If the PLC memory allows, it is recommended to write all the programs, parameters, and comments, which will help for future debugging.

    7. After clicking "Execute", multiple prompt windows will appear, generally select "Yes" after viewing the prompt content, until the program is written. I hope I can help you! If my answer is helpful to you, please give a thumbs up (comment in the lower left corner), look forward to your like, your efforts are very important to me, your support is also the motivation for my progress, and finally I wish you good health and a happy mood!

  8. Anonymous users2024-02-01

    Use calls when connected. After calling P1, skip the main program, execute the P1 subroutine first, and return to the main program after the call. p1 exists as a pointer.

    If the call is not connected, the call is not executed and the main program is executed directly. Invokers can be nested, as shown in the image below. A subroutine can call another subroutine.

  9. Anonymous users2024-01-31

    Mitsubishi call call, but also fend cooperation. This fend instruction marks the end of the main program, add a statement after fend, precede the statement with the label p1, which represents the start statement of the call call, and add ret as the call return statement after the statement, and a simple subroutine is completed.

  10. Anonymous users2024-01-30

    Call functions when it is connected, skipping the main program behind call p1, executing the p1 subroutine first, and then returning to execute the main program after call. p1 exists as a pointer. If the call is not connected, the call will not be executed, but the main program will be executed.

  11. Anonymous users2024-01-29

    Summary. The PLC is connected to the power supply, the data cable is connected to the programming computer, and the program in the PLC can be copied out by the -PLC-transmit-read command of the programming software.

    Mitsubishi PLC source ** how to get out.

    The PLC is connected to the power supply, the data cable is connected to the programming computer, and the program in the PLC can be copied out by the -PLC-transmit-read command of the programming software.

    How to generate a Mitsubishi PLC source**.

    How to generate a Mitsubishi PLC source**.

    Programming we should use appropriate design methods to design Mitsubishi PLC programs according to the control requirements of the system when doing program design. The program should be based on meeting the requirements of system control, and the program should be written one by one to realize each control function or task, and the functions specified by the system should be gradually improved. In addition to this, the program should generally include the following:

    1) Initialize the program. After the Mitsubishi PLC is powered on, it is generally necessary to do some initialization operations to make necessary preparations for the start and avoid malfunction of the system. The main contents of the initializer are:

    Zeroing out some data areas and counters, recovering the data required by some data areas, setting or resetting some relays, displaying some initial states, and so on. 2) Detection, fault diagnosis and display procedures. These programs are relatively independent and are generally added when the program design is almost complete.

    3) Protection and interlocking procedures. Protection and interlocking are indispensable parts of the process and must be carefully considered. It avoids confusion in the control logic caused by illegal operations.

    2.Program simulation debugging program simulation debugging is to simulate the actual state of the site in a convenient form and create the necessary environmental conditions for the operation of the program. There are two forms of simulation and debugging: hardware simulation method and software simulation method.

    1) The hardware simulation method is to use some hardware equipment to simulate the signals generated on the spot, and connect these signals to the input end of the PLC system in the form of hard wiring, which has strong timeliness. 2) The software simulation method is to write another set of simulation programs in Mitsubishi PLC, which simulate and provide on-site signals, which is simple and easy, but the timeliness is not easy to guarantee. In the process of simulation and debugging, the method of segmented debugging can be adopted, and the monitoring function of the programmer can be used.

    The above is the relevant knowledge of Mitsubishi PLC program design and debugging, is it helpful for everyone's work? Welcome to communicate with the experts of the Instrumentation World Network**. Jointly promote the improvement and development of the PLC system.

Related questions
15 answers2024-04-29

Mitsubishi PLC programming program how to write PLC Hello, 1, after the program is written, you need to transform the program first, there are three ways to transform: the first is to press the F4 key of the keyboard directly, the second is to click the "transform" menu bar, and then click the first item "transform", the third is to click the "program transform" button of the toolbar, we choose the appropriate transformation method according to their own habits 2, after the program is transformed, you need to check whether there are syntax errors in the program, This check only self-diagnoses the syntax, not the design content. To check the program, click "Program Check" in the menu bar of the tool. >>>More

4 answers2024-04-29

The power light of the plc is on, but the run light is not on, that is, there is no running program. >>>More

9 answers2024-04-29

Example of PLC control of stepper motor (diagram and program). >>>More

10 answers2024-04-29

Programmable Controller (PLC): Mitsubishi A Q FX Series, FX1NC, FX1S, FX1N, FX2NC, FX2N >>>More

10 answers2024-04-29

These two are mainstream PLCs, one made in Japan, one made in Germany, I have used both, both are very representative, it is recommended to learn both, you can learn Mitsubishi's first, because most of the programming methods of other brands of PLC are imitation of Mitsubishi, especially domestic brands, just like the Delta I use now, and Xinjie, which is almost exactly the same as Mitsubishi. Mitsubishi is what a traditional ladder looks like. And Siemens is also unique, although he also said that it is a ladder diagram, but his is a modular ladder diagram, which looks more intuitive than Mitsubishi's, and the step7 software is also very easy to use. >>>More