LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hhh

Hello ,

I have an intractable problem with LabVIEW , we are all know that the general programming way is that first configure the front panel , and then program the block diagram , then run it , this is done because the control target is predefined , but if user need to modify the target , e.g., to an electrical power automation system , the different user his requirement is always different , he need to modify the busbar link mode , replace the current power element sign with another element , etc . This needs to create an edit panel , with which user can drag a picture sign and drop it in the panel , define its property , then load and run it .

Is there any way to realize the process with LabVIEW ? or would you please prompt some ideas ? Thanks

David
0 Kudos
Message 1 of 8
(3,302 Views)
Hello David:
Do you have a known number of different configurations? Sometimes it's a lot easier to create a bunch of different but similar VI's than to modify configurations on the run. I have a similar situation here, where I have an ionosonde (all written in Labview) that needs to operate in several different modes. I ended up with 8 different programs with only slightly different front panels. It's turned out to be a very workable arrangement....and one that's very difficult to mess up by inexperienced operators. A VI takes up VERY little hard drive space...even the most elaborate ones. I think the multiple VI approach is what you're looking for. It takes more time at the beginning, but can save you a lot more grief later on 🙂

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 2 of 8
(3,302 Views)
Dear Eric,

Thank you for your answer . From your solution , it seems that my problems can be solved easily , but I am still in a puzzle to what you described .

I think you have known or used the NI's "Lookout " or Wonderware's "InTouch" , In those environment , the user can edit their own graphics interface and run it but does not any programming , my user's requirement is as the same , is your solution also as the same ?

Assuming the number of different configurations is fixed , would you please advise me more detail ? or would you please send me a simple example (DavidLee62@163.com)? Take your time . Thank you very much .

David
0 Kudos
Message 3 of 8
(3,302 Views)
Hi,
actually labview doesn't give you easy solutions to make such CAD?? things. I think this will be difficult to do.
But as a start point I can give you an example which allows to drug and drop element inside picture control. It uses property nodes.

Good luck.

Oleg Chutko.
0 Kudos
Message 4 of 8
(3,302 Views)
I have forgotten to place the code in the loop to see effect. Here is the correct version.

Oleg Chutko.
0 Kudos
Message 5 of 8
(3,302 Views)
Hi Oleg ,

Thank you for your reply ! And also have some questions to consult you :

1, Is there any way to attach a scroll bar to the picture control ? I mean that if the drawing area is too small to contain many pictures , then need to enlarge the drawing area , just like the front panel scroll bar .

2, Can I zoom out or zoom in an insert picture ?

3, Is there any way to assign an insert picture a data property ? e.g. , make an picture which has boolean value .

Thanks

David
0 Kudos
Message 6 of 8
(3,302 Views)
Hi again,
Actually as I told you before I think that it will be difficult to solve your problem. As I understand you want to create new elements programmatically, but labview doesn't allow to create any new control in run mode of VI. I don't know how to solve this. My example was just to show you how to drag and drop.
Your questions....
1.Picture control doesn't have scroll bars. At least in 6.0 version which I use. But you can create very big control which will cover all of your front panel and more. In this case you can use front panel scroll bars.
2.If we speak about picture control at all, then you can't change its sizes (there is a size property node indeed, but it could be used only to read sizes not to change them). But you can chang
e the image which is placed inside picture control. In this case the control will stay the same in sizes, but the image could be changed in the way to create zoom effect.
3.There is no direct way to do it. But you can place the picture control inside cluster with boolean control. Then all you need to do is to cover boolean with picture. In such a way you will not see the boolean but you could change its value with cluster functions.

Good luck.

Oleg Chtuko.
0 Kudos
Message 7 of 8
(3,302 Views)
> 1, Is there any way to attach a scroll bar to the picture control ? I
> mean that if the drawing area is too small to contain many pictures ,
> then need to enlarge the drawing area , just like the front panel
> scroll bar .
>

You can draw your image anywhere you like. Placing sliders near your
picture control, you can make functional, but crude scrollbars. LV7 has
scrollars built into the picture control.

> 2, Can I zoom out or zoom in an insert picture ?
>

Again, you can draw the image however you like. For vector images, you
recreate them with different points. For bitmaps, there are VIs
available that will stretch a bitmap. In LV7, the draw bitmap operation
includes stretching.

> 3, Is there any way to assign an
insert picture a data property ?
> e.g. , make an picture which has boolean value .
>

You can track events on the picture control. You write the program to
catch gestures that you are interested in -- clicks, shift clicks, right
clicks, etc. You cannot attach data to the picture, but you can easily
keep the data in a parallel structure, the structure used to redraw the
image.

If you haven't already, you should look at some of the examples, and
some of the neatest are on devzone.

Greg McKaskle
0 Kudos
Message 8 of 8
(3,302 Views)