PLC state machine programming Article 5-state machine automatic generation PLC program, plc Article 5

Source: Internet
Author: User

PLC state machine programming Article 5-state machine automatic generation PLC program, plc Article 5

This article is relatively simple, so I am just getting started, and there is not much nonsense.

1. When selecting the solver, You must select a fixed step.

2. Right-click the Chart state machine and the menu on the Chart appears.

3. Select the red check box on the left, select the menu on the right, and click Generate Code. This button is overwritten by the menu.

4. The optimize. scl file will appear in the red directory.

5. Double-click [add external file] In the TIA Portal. See the figure. In the displayed dialog box, select the file above.

6. Right-click the optimize. scl file you just added and select [generate block from source 〕

7. Select the generated Chart block and drag it to the program segment.

The program generated here has an additional pin (ssMethodType), which is used for initialization. It is set to 0 first to complete initialization, and then set to 1. Then it can be used normally.

How about it, isn't it very simple, from Matlab experts to PLC control experts. Next we will discuss stateflow program optimization and How to Make Matlab generate the optimal program.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.