10-02-2016 10:44 AM
Hi. I have a VI here that has a problem. Everytime I execute the program and hit the load image button, it loops infinitely and I can't fix that problem. Can you please help me to modify my code to fix the problem? Thanks.
Solved! Go to Solution.
10-02-2016 11:11 AM - edited 10-02-2016 11:12 AM
Hi nerudorin,
your loop iterates UNTIL you press the "Close" button - that's ok for most UI loops.
But your buttons are set to "Switch…" mode - you surely want to use a "Latch…" mode instead! All you need to do is change their switching mode behaviour!
10-02-2016
11:16 AM
- last edited on
01-06-2025
05:13 PM
by
Content Cleaner
It is better you start using the State machine to simplify the problem.
You could follow below links for the same:
Tutorial: State Machines:http://www.ni.com/tutorial/7595/en/
Application Design Patterns: State Machines:https://www.ni.com/en/support/documentation/supplemental/16/simple-state-machine-template-documentat...
Using a State Machine (Event Driven) Architecture:http://www.ni.com/white-paper/2926/en/
10-02-2016 01:48 PM
Thank you for helping! Now, I tried to run the VI and I can load now images to it. I tried to press the FFT button but there is an error, it requires a complex image so I adjusted the image type to complex. Then, I tried to press it again, it works. Now, when it comes to inverse FFT, it also requires a complex image source. I changed the image type but there's still an error. Why is that so? Thank you.
10-02-2016 04:20 PM
I'm worried that you are using Powerful Techniques (like FFTs, EEGs, etc.) for which tools exist in LabVIEW, but you neither have the basic LabVIEW skills necessary to create code using LabVIEW, but you also may not have an understanding of the kind of signal processing that is required to accomplish a particular task.
If you are going to use the LabVIEW Image Processing Tools to do anything more sophisticated than saving images, then you need a body of knowledge about how to work with images, including acquiring them, modifying them, processing them, and, if you are doing anything with color, there's a whole other set of somewhat complex basic knowledge you will need.
Do you know what it is that you want to do? Do you know algorithms that will allow you to do this?
I'm a great believer in "learn by experimenting with the code". This works very well when the data are simple, like a string (for example, parsing string data) or numeric data (for example, creating a multi-channel scrolling graph from sampled data). However, when working with Image data, the basic data structure is so much more complicated (two spatial dimensions + an intensity/color dimension), and, to make things more complicated, there are fewer tutorials and text material available.
Do you have something specific that you would like to do? Can you describe what that is, from a "high level" (that is, independent of the implementation, i.e. without mentioning LabVIEW, and, perhaps, without mentioning FFTs)?
Bob Schor