LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fuzzy Logic and State Machines

Hi, I would like to know if I can intigrate a fuzzy Logic controller into an existing State Machine program as it's own state.

 

The program would work someting like this:

 

Get Sensor Data --> Combine and Average --> Feed Data to Fuzzy Logic --> Update outputs --> Write data to file --- 

                                                                                                                                                                                     |

^                                                          Loop Back to start of State Machine                                                                  |

|--------------------------------------------------------------------------------------------------------------------------------------------------

 

All of the examples have a simmilar chain of events happeing inside of a loop.  My gut says this should work but I dont want to spend a bunch of time integrating the code into the exising State Machine to find out that is does not!

 

Thanks,

 

Kyle

0 Kudos
Message 1 of 2
(2,452 Views)

Kyle:

 

On the surface, it sounds like that should work fine. You can create a new state, place your fuzzy logic controller inside it, and pass data to that state like you would any other (using shift registers).

 

Does the fuzzy logic controller run in its own loop? If it does, you may want to redesign it to use the state machine while loop. That would involve taking the code out of its loop, putting it in the fuzzy logic case/state, and configuring the state machine to run the fuzzy logic state as many times as necessary.

 

e.g.:

 

Code in a while loop:

while loop no state.png

 

Inserted into a state machine:

state machine.png

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 2 of 2
(2,430 Views)