9. Saving the Fuzzy System

In previous sections of this tutorial, you modified the linguistic variables, membership functions, and rules of the greenhouse fuzzy system. You now can save the fuzzy system to a .fs file. Complete the following steps to save the modified fuzzy system to a .fs file.

  1. Add the FL Save Fuzzy System VI to the block diagram.
  2. Wire the fuzzy system out output of the FL Set Rule VI to the fuzzy system in input of the FL Save Fuzzy System VI.
  3. Right-click the file path input of the FL Save Fuzzy System VI and select Create�Constant from the shortcut menu.
  4. Enter the absolute path to a modified greenhouse.fs file in the path constant. The FL Save Fuzzy System VI creates the .fs file when it runs.
    Note��You also can use the File I/O VIs and functions to create a relative path to wire to the file path input of the FL Save Fuzzy System VI.
  5. Save the Modified Greenhouse Fuzzy System VI.
  6. Run the VI. The VI loads the original greenhouse.fs file, modifies the linguistic variable and membership functions you specified, creates new antecedents and consequents for a rule, and saves all the changes to the modified greenhouse.fs file.

You now can use the Fuzzy System Designer to open the modified greenhouse.fs file and observe the modifications you made to the greenhouse fuzzy system.

You also can use the FL Fuzzy Controller VI to implement a fuzzy logic controller for the modified greenhouse fuzzy system. The FuzzyEx Dynamic Fuzzy Controller for a greenhouse example VI in the labview\examples\control\fuzzy\Dynamic greenhouse controller directory implements a controller for the greenhouse fuzzy system. This example VI uses the FL Load Fuzzy System VI to load the greenhouse.fs file.

Open example� Find related examples

You can load the modified greenhouse.fs file instead and then run the example VI to implement a controller for the modified greenhouse fuzzy system.

Previous
8. Combining the Antecedents and Consequents for a Rule
Home
Tutorial: Modifying a Fuzzy System with the Fuzzy Logic VIs