LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hiding front panel data

Solved!
Go to solution

Don't be ridiculous. Data is passed to a subVI with a wire.

 

Also shared variables, global variables, files, constants, uninitialized shift registers, and afferent subVIs. At least that's all I can think of. What's your point?

 

 

A control is used if the data needs to be changed by the operator.

 

There are other uses for controls.

 

 

If a control is not shown, then it cannot be changed by the user and you can use a block diagram constant.

 

You let you users see and edit the error-in cluster? You use a block diagram constant for your error-in cluster?

 

 

 

If you have an indicator that is not visible to the operator, then it really does not need to be there.

 

Suppose that I have a 1024 by 1024 array that represents a picture of Abraham Lincoln. Would you rather see that array or would you rather see the image that it is supposed to represent.

0 Kudos
Message 21 of 31
(1,764 Views)

So, the hiding the page 2 works except for printing?  If you are doing the printing for documentation you can control the margins yourself (print setup) or print visible portion of front panel ..??? is that an option?  If the user can do some printing...then on the general tabs you could take away the scroll bars and just size the ap window for what you want the user to see.  I know I must be missing something, so forgive me for not seeing the whole problem...

 

Hope this helps.

 

Hummer1

Message 22 of 31
(1,761 Views)

So, the hiding the page 2 works except for printing?  If you are doing the printing for documentation you can control the margins yourself (print setup) or print visible portion of front panel ..??? is that an option?  If the user can do some printing...then on the general tabs you could take away the scroll bars and just size the ap window for what you want the user to see.  I know I must be missing something, so forgive me for not seeing the whole problem...

 

Hope this helps.

 

Hummer1

 

Nope, you're not missing a thing. If I could pass a subVI the coordinates of a rectangle and it would print everything on my front panel that is inside of that rectangle, then my problem would be solved. Can I do that?

0 Kudos
Message 23 of 31
(1,758 Views)
Solution
Accepted by topic author oyester

Are you controlling the printing?  IE is the user just printing the panel, documenting your programming, or just needing screen shots from time to time?

 

In the last case (which is what I hope you are referring to), it is not as simple as giving it a rectangle to print.  However, you can dynamically reorient and resize your front panel (if it is not already only showing only what you want to print), and then using the fp.getImage method, you can select the get the image of the current view.  Convert that to a jpg file, dump that file to the printer, then delete the file.  A few extra steps to be sure, but easily doable.

-p

Message Edited by PJS on 11-03-2009 10:04 PM

Paul
Message 24 of 31
(1,742 Views)

Are you controlling the printing?  IE is the user just printing the panel, documenting your programming, or just needing screen shots from time to time?

 

In the last case (which is what I hope you are referring to), it is not as simple as giving it a rectangle to print.  However, you can dynamically reorient and resize your front panel (if it is not already only showing only what you want to print), and then using the fp.getImage method, you can select the get the image of the current view.  Convert that to a jpg file, dump that file to the printer, then delete the file.  A few extra steps to be sure, but easily doable.

-p

 

------------------------------------------------------------------------------------------------------------------------------------------

 

Sounds ghastly; but doable. I like it.

 

 

Message Edited by oyester on 11-03-2009 08:54 PM
0 Kudos
Message 25 of 31
(1,729 Views)

I wrote to this forum with what I thought was an interesting question:

 

----------------------------------------------------------------------------------

I haven't seen this discussed yet and I hope I can explain it correctly. Many times I have a lot of front panel controls (and indicators) that I don't want the user to see. Making them invisible is not optimum for me because, if the subVI is complicated and I am in development or debugging mode, it is hard to find all of the hidden controls and indicators. Also invisible stuff very often ends up behind visible stuff and its a pain finding it and dragging it out into the open again. I generally solve this problem by putting all of my variables on a tab structure, with one page containing the user interface and the other pages hidden - unless my debug flag is set. My problem is this. If I have to print that page, the size of the tab control determines the extent of what gets printed. So if my user interface is much smaller than the size of the tab, then I get a plot with a lot of useless white space in it. Does anyone know how to do this better

----------------------------------------------------------------------------------

 

 I never said what the hidden controls and indicators were for. In my mind they weren't the problem. I'v been programming for over 40 years and I've been programming in LabVIEW for over 20 years. I'm not the shiniest rock in the stream but I've got the basics down. It seems however, that everyone else thought I was doing evil things with them.

 

Ben said

------------------------------------------------------------------------------------
Controls and indicators can be used in many ways, some good some not so good.

Allowing user input
Displaying a value (or data set like a graph)
passing avlue to a sub-VI
Getting areturned value for a sub-VI.

Those are all concidered good,proper, appropriate etc.

It sounded (from your original post) as if the controls and indicators you are asking about do not fall into those catagories.

------------------------------------------------------------------------------------

 

jcarmody said
------------------------------------------------------------------------------------

I had images of swarms of Local Variables and Property Nodes strewn all over the place when I read your original post.

------------------------------------------------------------------------------------


This seemed to be the common theme running through most of the replies I got and, I have to admit, I got angry. I felt like I was getting flamed. I have copied some of the advice I got below (One was slightly reworded). I want you to read them as if you were taking a LabVIEW test and that you had to put an S(ometimes), A(lways), or N(ever) next to each line. I can think of only one that I would confidently put an A next to.

 

--------------------------------------------------------------

Don't use controls/indicators that are not intended for user consumption.

Most LV apps do not need extra controls and indictors to work properly.

Controls and indicators are not "variables" - wires are variables.

Controls are for users to enter data and indicators are for users to view data.

Data is passed to a subVI with a wire.

A control is used if the data needs to be changed by the operator.

If a control is not shown, then it cannot be changed by the user and you can use a block diagram constant.

It is not good practice to have your controls and indicators disappear and reappear while your program is running.

---------------------------------------------------------------------------------------

 

I responded to most of these comments based on what they literally said instead of what they actually meant. My point was not to be obtuse, but to give them a taste of what it felt like to be unfairly criticized. I have to say that I was angry enough that I almost said things that would have certainly gotten me kicked out of this forum. It was immature and I am sorry.

 

stevem181 told me something that didn't solve my problem but was really cool. I gave him a kudo.

 

ravens fan gave me a lecture on style

 

hummer1 told me stuff that I already knew, but he didn't know that, and he really did try to understand the problem and help me

 

PJS came up with a complicated scheme that would solve my problem and a few other problems that I have been having.

 

Finally, this morning, I solved the problem myself. Send that stuff I want printed to a subVI and print the subVI.

 

If I have offended any of you. I am sorry. I'm only 60 years old so I will be programming for a few more years. I am sure I will be writing to this forum again and I will need your help again.

 

 

Message Edited by oyester on 11-04-2009 12:43 PM
0 Kudos
Message 26 of 31
(1,690 Views)

You're welcome.  Sorry I wasn't able to get you all the way home.  Sounds like you got a good solution.  So, help me out here...exactly what were you trying to print...an image, a set of variables about an image...a part of a front panel...?

 

Hummer1

0 Kudos
Message 27 of 31
(1,641 Views)

You're welcome. I really appreciated your persistence.

 

I wasn't printing anything exotic. Just a plot, some tramp data, and some statistics. It's just that one of the inputs, a (relatively) huge cluster that I put on page 2, made the tab object huge. Because of the way the user wanted the data arranged, I had a lot of unused space on page 1 that I couldn't fix by resizing the plot. It was a one-in-a-million problem that I had solved by playing with control attributes but I just knew that there had to be a better way.

 

To tell you the truth, I was more interested in seeing what people thought about using tab structures to hide widgets instead of dragging them off screen and/or making them invisible.

0 Kudos
Message 28 of 31
(1,635 Views)

Hi oyester,

 

"a (relatively) huge cluster that I put on page 2, made the tab object huge."

 

Well, I haven't read the whole thread, but:

making the cluster smaller (with auto-sizing disabled) doesn't help set the tab to your desired proportions? 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 29 of 31
(1,622 Views)

What is about this: Put all indicators and controls for the user beside the tab-structure, put all stuff you want to hide in a one-page tab structure and make it invisible as long as you don't need it. 

Then you have only one item (the tab-structure) to be made visible for debug mode. 

If changing to debug mode make the FP larger using property node and make the tab structure visible. You can also set the runtime size of the FP differently from the size in edit mode (VI properties > Window run time position > Panel size).

 

And another idea: make the tab-structure as large as you need it for the user mode and use several additional tab pages to put all controls and indicators on. Then in debug mode you have to browse thru the pages to find the desired control/indicator.

0 Kudos
Message 30 of 31
(1,619 Views)