11-14-2016 10:08 AM
Hello everyone,
I saw so many post about the topic, however, I do not find solution about my problem.
I followed the example in LabVIEW installation files and I want to try it myself using pictures I like. But there is a customized picture control and I stuck there three days. Please give me
some advises, thank you.
Please see the attached example and my test.
Have a good one.
Solved! Go to Solution.
11-14-2016 10:51 AM
The problem is that you create your 2D Picture control in the wrong way...I guess.
I downloaded a png/jpg file from internet, and I follow the description here:
http://digital.ni.com/public.nsf/allkb/328AF568F15B36328625696200511EF0
Then, I change the 2D Picture indicator into a control, and I set the actual value "as default".
Finally I placed this new 2D control into your VI, and the zoom function just works.
11-14-2016 11:00 AM - edited 11-14-2016 11:05 AM
Or just do all in one step:
edit: I think you tried to customize the 2D Picture control, yes? So your picture became part of the customized control, that is why it cannot be zoomed. So it was not stored as data in the control, but it was part of its "decoration", like a background. This is what you tried? Anyway, if you follow the description what I gave, you can create 2D Picture indicators/controls with any picture saved with it "as default"...
11-14-2016 01:30 PM
Thanks for your quick reply. When I change the indicator to a control, the wire is broken.(seen in the attached .vi)
Did I get it wrong? And how to set the value "as default", I just find Edit -> Make current value default. Thanks again.
11-14-2016 01:48 PM
🙂 I advice you to go through some LabVIEW tutorials, so you would learn what is indicator/control, etc...
Anyway, the VI what you show is OK. You just tried to do the things in the wrong order. First use the 2D Picture control as an indicator, not as a control. A wire cannot "flow in" into a control, but in an indicator. So change that 2D Picture into an indicator first (right mouse click, "change to indicator"). Browse the file you want to load, then run the VI once. You should see the picture now in the 2D Picture indicator. Right mouse click on the indicator, and select "Data operation" --> "Make current value default".
Now you can copy/paste this indicator into another VI, or you just in the actual VI (see my example snippet). Either you can use this as indicator (the zoom feature also works), or as a control in your application. If you want to change dynamically the picture during runtime, just keep it as indicator, and inside the While loop. One Event case could be dedicated to a "Load picture" command...Well, all depends on what is your final goal...
11-14-2016 02:32 PM
I made it finally. I just learn LabVIEW about 1 week. I watched some tutorial vedios on Youtube. I am on "go through" stage trying understand the concept of the G Language and I know there is a long way to go. Thanks for your patience and warm advice, I really appreciate it and even willing pay.
11-14-2016 02:44 PM
No need to pay, I also got and still getting lots of help via this forum from the more experienced ones. It is a win-win thing 🙂
Depending on your licence (even if you have student licence!), you might be eligible to access the Core online courses.
If so, start with the Core 1, you will find it very useful!
http://sine.ni.com/tacs/app/overview/p/ap/of/lang/en/pg/1/sn/n5:selfpacedonline,n24:12725/id/1582/
11-14-2016 02:56 PM
Both the forum and you are awesome, thumbsUp.