LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i use two monitors in my application?

Hello,
 
Background
 
I have a dual monitor card and two monitors which I want to use in my LabView application. The application gathers data from a complex sensor and calculates a number of results which need to be displayed graphically, this happens every 10 seconds or so. There is an awful lot of graphs which may be needed to be seen at some time but not routinely. The idea is that one monitor will display all the standard routinely displayed things and will not have any user input whilst the second monitor will display a tab control which has all the other graphs pickable.
 
Question
 
What I want to know is how I can programmatically tell labVIEW to put one vi up in one monitor and another vi in the other. I would then have them both maximised (which I know how to do). I would rather have the monitors set up as individual and that way I could keep the windows control bar on one monitor only. Thus one monitor would be a true user interface and the other simply a display.
 
Basically how do I tell LabVIEW to use one monitor for a specific vi and not the other.
 
The card I have is a matrox p650. Any comments would be appreciated.
 
Regards
 
Kevin
0 Kudos
Message 1 of 9
(4,475 Views)
Hello
If you are using Labview 8, you shoud have no problems. Take a look at "vi properties>window run-time positions". It allows you to choose where to display the vi. This option can be used programmatically,too.

Hope it helps
Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 2 of 9
(4,472 Views)
Hallo,

with new version of LV its more easy, but it also hasn't any troubles with LabVIEW 6.x or 7.x.
Especially with Matrox P650 you will get no any problems (we using exactly this card together with G550 and our application supported three monitors at the same time.).
I recommend to you following sequence:
- After installing driver turn on option for supporting different resoluton on different monitors. As result you will get two absolutely separate monitors.
- In Windows define which one is primary and which one is secondary. (On primary monitor located taskbar and all messages dialog boxes will appear.).
- Arrange secondary monitor in display properties - where he located (left from primary, or right)
- In your VI (which must appear on second monitor) use FrontPanel.PanelBounds Property Node for positioning. You must set four values for two corners. Easiest way to found right values is following: read this property node in while loop and put indicator on front panel. Then run VI, drag front panel onto second monitor and resize if necessary, and then you will see right values for PanelBounds. You can write this property node programmatically in run-time too.

hope it help,

good luck.


Message 3 of 9
(4,443 Views)
Thanks for both responses.
 
I am currently using LabVIEW 7.1 but have the upgrade to 8 which I have not got round to using just yet. From what has been said it is possible in 7.1 but easier in 8. Would it justify me moving to 8 now I wonder?
 
Many thanks
 
Kevin
0 Kudos
Message 4 of 9
(4,417 Views)
Thanks for both responses.
 
I am currently using LabVIEW 7.1 but have the upgrade to 8 which I have not got round to using just yet. From what has been said it is possible in 7.1 but easier in 8. Would it justify me moving to 8 now I wonder?
 
Many thanks
 
Kevin
0 Kudos
Message 5 of 9
(4,411 Views)
I guess, between 7.1 and 8.0 just minor differences...
In LabVIEW you needed to add just one property. Probably its not necessary in LV8.0.

Let's say, you have two monitors with resolution 1600x1200 both.
Then your display properties looks like this (sorry for german screenshot):



Here additional monitor located on the left side from the primary monitor.
All what you need to add into your VI for movement to the second monitor (and resize to whole screen area) is following:

Take a note, that left is not equal -1600 (some space is needed for window decoration)

Constants are depends from appearance properties (with or without menu, scrollbars, etc)

0 Kudos
Message 6 of 9
(4,389 Views)
If I remember correctly, LabVIEW treats multiple monitors as a continuous space.  The legal areas of that space depend on the resolution of your monitors and where your task bar is located.  Attached are a few utility VIs that should help you out (written in LV6.1, I think, I checked them in 7.0).  The included README should give enough information to use them.  Post again if you have trouble with them.
0 Kudos
Message 7 of 9
(4,382 Views)

My original question was how to get two monitors to act individually rather than with the same windows space. This was for reasons of safety in that I would not want anyone to be able to close or move one of the screens. I suppose I could still do that with a single windows area by stopping mouse movements over one of the VI's. Ideally I would like to have a tab control full blown application on one monitor which would be my windows user interface and the other monitor show just a mirror of one of the tab pages (a general purpose display screen) It is just working out the best way to do this. In addition it may be necessary to look at this application over the internet possibly using PC anywhere.

Any general comments would be appreciated.

Regards

Kevin

0 Kudos
Message 8 of 9
(4,354 Views)
LabVIEW 8 has a new VI method which might help a bit.  It is Front Panel.Run Time Position.xxx, where xxx is the particular function you want.  It includes things like centered, maximized, minimized, etc.  If you maximize your application on a particular display, it may help.  The following hack may work to prevent the user from un-maximizing and moving the display.  Set the display size to something just under the maximized size, so that if the user un-maximizes the display, it will change the panel size.  Then use the panel resize event to remaximize the display on the screen you want.  Unfortunately, there is no event for panel move.  I have not tried this, so I don't know how well it will work.

The VIs I posted earlier include a utility to fetch the display ranges of all the screens.  You can use this to get display sizes.  Note that you may need to include resizing code in your VIs for different display sizes if you are using the code on different computers.

Good luck.  Let us know if we can be of more help.
0 Kudos
Message 9 of 9
(4,339 Views)