LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of using fuzzy in my project.

Solved!
Go to solution

Hi everybody,

 

I need your assistance. I have to use fuzzy in my program. But If I add fuzzy to program at project explorer,  fuzzy doesn't generate any value. But  the same program works well out of project explorer. Could you tell me What problem is ?

0 Kudos
Message 1 of 5
(3,528 Views)

When you say "add to the project explorer", what do you mean by that? Are you just creating a Project and making your example to run under "My computer" or under a RT target? Also, I am assuming you are using the PID Fuzzy Logic Toolkit, hopefully version 2011. Please confirm this information.

 

In general, the Fuzzy Logic Function needs the .fs file to be on the target that you are trying to run the code. So, if you are trying to move your code to an RT target and you did not move the .fs file, then it will not work and the 'zero' will be the output of the system.

 

Please see the documentation of LabVIEW Real-Time to know how to move a file to target and verify how to obtain the correct path to the file on RT.

 

Another option, which could be easier for your case, is to create a indicator after the "FL Load Fuzzy System", run one time to populate the indicator, right click to the cluster and "make values default". Then, remove the Load VI and then, right click to the indicator and convert to a "constant". This will make the values fixed and it would run in any environment with the need to load a file.

 

Please let me know if that helps.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 5
(3,503 Views)

My labview version 2010. I'm creating a Project and making my example to run under a RT target. When I run my program under RT, Fuzzy doesn't generate any value. But If I close the project explorer and I run the same program from my desktop, fuzzy works well. my probIem is that fuzzy doesn't work well.

 

 I built my fuzzy program under project explorer so I didn't move it to project.

 

I use win-xp. I wonder can xp cause this problem ?

0 Kudos
Message 3 of 5
(3,488 Views)
Solution
Accepted by topic author pasazade

No. The problem is that Fuzzy is looking for the .fs file on the Real Time machine and since it is not 'downloaded' to your target, it doesn't give you any results.

 

When you try to move your VI to RT, the whole program runs on the RT target, which means that you are trying to read the file on the directory of the Real-Time machine. However, you file is only on the Host machine. That is the reason you see it working when you run without the Project, i.e. your VI is running on the Host Computer and it can find the file.

 

Please verify my previous instructions to help you download the file to the RT target or create a constant and make this fixed on the diagram.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 5
(3,468 Views)

Thank you for reply, I solved the problem with your instruction.

0 Kudos
Message 5 of 5
(3,454 Views)