LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Saving Controller Data with the Fuzzy Controller

I have been trying to build a stand-alone Fuzzy Controller VI by following the steps described in the PID Control Toolset User Manual (November 2001 Edition) p. 9-11 to 9-12 for the pattern recognition example. Unfortunately, having followed the steps 1-5 outlined below the Fuzzy Controller vi does not seem to change. So after completing the rest of the steps (6-9), the pattern recognition application with an embedded Fuzzy Controller does not work. Can anybody help me please.
  

1. Bring the application block diagram to the front and double-click the icon of the Fuzzy Controller VI to open the VI.

2. Bring the application front panel to the front.

3. Start the application to open the input file dialog box that requests a fuzzy controller data file.

4. Select the desired fuzzy controller data file.

5. Stop the application.

6. Bring the front panel of the Fuzzy Controller VI to the front.

7. Select Operate»make current values default to make the currently valid controller data the default.

8. Choose one of two options. Save a copy of the Fuzzy Controller VI if you want it to be available under a unique name. Select No when asked to save the original Fuzzy Controller VI. Or, you can save the original Fuzzy Controller VI, which now has the current controller data as default values. Only the default values of the original Fuzzy Controller VI have been changed. You can still use the VI as a general-purpose Fuzzy Controller VI because the VI only uses the default values when you apply the controller without loading specific data into the VI.

9. Close the application.

0 Kudos
Message 1 of 12
(4,334 Views)

Hi dedy,

Could you provide me with a little more information so I can narrow down the problem?

What versions of the software do you have installed (PID controller/Fuzzy Logic) + LabVIEW

Also looking at my toolkit versions, you actually need to connect the Load Fuzzy Controller.vi before the Fuzzy Controller.vi.  This will load up all of the desired information.  Then if you open up the front panen, you will find that all of the controls will be set according to the file that was loaded.  If you then go through the steps 6-9. you should have a Fuzzy Controller set up that you can use without the load (providing you only ever use one instance of the controller and it needs those settings every time.)  Otherwise I would suggest that you have the load Fuzzy Controller.vi outside of your control loop to initialise all the settings.

I have attached the latest pdf file manual for the toolkit I have installed on my computer.  You may find more information there.

Below is also a simple setup of the loader and controler.

Please post back and tell me how your getting on.

Hope this all helps

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
Download All
Message 2 of 12
(4,334 Views)

Hi Adam,

Thank you so much for your reply. The version of the PID controller I am using is 6.0, fuzzy logic toolkit is 1.0 (comes with the PID controller installation), and Labview is 7.1.

 

I have done everything that you advised. I have connected the Load Fuzzy Controller.vi before the Fuzzy Controller.vi. You can see this connection on the attached file titled Loading Fuzzy Controller.bmp. I start this simple connection. Then I have to select the desired fuzzy controller data file. Loading Fuzzy File.bmp shows the possible selections in my computer. I select fcpr.fc. Then I double-click the icon of Fuzzy Controller.vi to open the VI. Front Panel of Fuzzy Controller VI.bmp shows what I get. As you can see, the controls have not been set according to the file that was loaded. However, if I bring the block diagram to the front and double click the icon of Fuzzify.vi, Inferenz4.vi and Defuzzify.vi, I can see the parameters have been changed according to the file that was loaded.

 

Perhaps, if you don't mind, I would like to see what you get after loading the Fuzzy Controller.vi with fcpr.fc please. I would like to compare with what I have got. If you also would not mind, you could also follow the sequence on page 9-11 and 9-12 of the User Manual and design a new VI as shown on Figure 9-14. In my case, the fuzzy logic for the pattern recognition application works, but it does not give me the output. For instance, if you see Figure 9-12, I don't see "Triangle right" displayed on my front panel.

 

Thanks in advance for your help and looking forward to hear from you.

 

Regards,

 

dedy

 

P.S. You might not be able to see the attachment as I am always reply to you always refuse by ni when attachements are included.

Message 3 of 12
(4,313 Views)
Hi Dedy,
 
Without the file I'm not going to be able to recreate your problem.  Maybe you could try zipping all of the files you wish to attach and sending them hat way?
If not, if you could go to ftp.ni.com/incoming and create a folder with the name FAOadamB I will download the data from there.
when you don't get the "triangle right" on your front panel, could you also try probing all of your outputs and inputs to see where the data is being lost (or not received)
 
Post back once you have tried these and placed the data on the ftp site and I will get on to the problem as soon as I can
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 4 of 12
(4,307 Views)
Hi Adam,
thank you so much for the help. I have now enclosed the zipped files. Please have a look and tell me what you think. Also, I have found another problem which may be the cause of all my problems so far. If you open Fuzzy-Logic Toolkit.bmp, you will see that the project manager front panel of the fuzzy logic-toolkit does not show any run, stop and pause button. what do you think it is?
Dedy
0 Kudos
Message 5 of 12
(4,302 Views)

Hi Dedy,

Could you attach the fcpr.fc file please?

Thanx

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 6 of 12
(4,298 Views)
Hi Adam, please find the fcpr.fc attached. Also, someone known as Airo in NI forum had one of my problem. He/she did not see any run, stop or pause button. But nobody answer him/her.
 
Dedy 
0 Kudos
Message 7 of 12
(4,298 Views)

Hi Dedy,

I managed to find the problem for you. If you go to the fuzzy controller (and all it's subvi's).

Select File>>VI properties >> Execution you will see that it is all set to subroutine.  This means that sometimes (more often than not) the code won't actually run at all.

You need to set this to anything but subroutine.  This will solve the updating all the values problem.  As for the play buttons etc missing..

What exactly did you do to open the program and how does it behave if you try and run it?

Thanx

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 8 of 12
(4,285 Views)

Hi Adam,

you are a genius. The program works perfectly well now. Thank you very much for that.

As with no run buttons, all I do is to open a blank VI and go to Tools>>Fuzzy Logic Controller Design. The Project Manager Front Panel of the Fuzzy-Logic Toolkit is opened in another window, without any run button. It is different than the one shown on Figure 8-1 PID Control Toolset User Manual.

Dedy

 

 

Message 9 of 12
(4,282 Views)

Hi Dedy,

No worries (it is my job afterall!)  As for the play buttons etc.  I would put that down to incorrect documentation. I expect that the documention was right during cevelopment but the program changed at the last minute.

Nothing to worry about.  When you do use it, you need to double click any of the menu selections to get anything to work. (I can see how this isn't expected behavious so I thought I would mention it)

I hope now that you have got this far you will get your project up and running OK.

Many Thanx

AdamB - Dont forget to rate!

p.s you mentioned someone else was havning a similar problem, but didn't have a reply yet? Could you please forward me the link to that forum and I will educate them... Thanx again

Message Edited by AdamB on 03-15-2006 10:27 AM

Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 10 of 12
(4,281 Views)