LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading jpeg files

Solved!
Go to solution

Hi,

 

I've created a program that loads  a different image depending on a string generated by three user-selectable options.  The must select two numbers between 0 and 12 and a display version. First I just put three  display options in a combobox and program worked. Then I put two more options in the combobox  "Display version" and other variants not want to upload my picture. I do not understand the problem. In case the loaded image are only for some cases I treat, just to test the program  functionality. If someone can help me with an idea.
I do not know why he does not want to work for the two cases added later in combobox.

Download All
0 Kudos
Message 1 of 10
(3,973 Views)

Using three front panel controls to have each select a string in a case of a case structure is done nicely.
Concatenating these three strings and wiring them to a case structure is ok, too.
Be aware, some of your string constants have a trailing "\n" and this will result in the execution of the default case of the case structure that reads the JPG.  As these trailing "\n" are in both VIs they are buggy, both.  (I did not check everything.)

Message 2 of 10
(3,930 Views)

Greetings, I would discourage the use of those menus and concatenate, in favour of enum or rings, and nested cases. The reason is that it can allow for better code recyclying, since it is a tad more laborious at first, but it's mostly copy-paste and will allow for very easy scaling, as you would only add further cases to the menus, and create new logic based on that case. In the attached example you just add images according to case.

 

 

 

 

EDIT: another option would be using separate cases for the menus, and use the build path code to direct the program to the right folder and image. It depends on whether you want to organize the images in a dedicated folder/subfolder tree, or let labview do the sorting and pull the images from any folder you specify.

0 Kudos
Message 3 of 10
(3,917 Views)

Can you upload it in LAbview12 pls. I want to see it.

 

Thank you

0 Kudos
Message 4 of 10
(3,889 Views)

@Noro wrote:

Can you upload it in LAbview12 pls. I want to see it.

 

Thank you


Just for your information, sometimes it is just faster to download the VI, and post it in the dedicated version conversion forum with your request to down-convert it:

http://forums.ni.com/t5/Version-Conversion/bd-p/VersionConversion

 

0 Kudos
Message 5 of 10
(3,872 Views)

I hope i saved it correctly, for Labview12.

Download All
0 Kudos
Message 6 of 10
(3,842 Views)
Solution
Accepted by topic author MP21

Here you go.

Message 7 of 10
(3,812 Views)

Thank you a lot for your inromations. Thank you guys for VI.

0 Kudos
Message 8 of 10
(3,788 Views)

Hi,

Thank you all for your support, I solved the problem. But I have another issue that I couldn't  manage in my application. I want to add a "help" button in the front panel, and if the user access it,  would open a pdf in which  will be several explanations about filling the application options. Any suggestions would be great.

 

Mihaela

0 Kudos
Message 9 of 10
(3,756 Views)

Your latest question was responded in detail on this thread:

 

http://forums.ni.com/t5/LabVIEW/Can-Labiew-be-used-to-open-PDF-files/td-p/416527

 

0 Kudos
Message 10 of 10
(3,713 Views)