LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple screens - getting current screen position

Solved!
Go to solution

Hi,

 

I was trying to do this:

Untitled.png

 

Upon starting the VI 'Monitor' shows 0 no metter which monitor I run the VI on.

 

Any way LabView can know which monitor the VI is currently on?

 

Thanks

0 Kudos
Message 1 of 8
(3,893 Views)

That invoke node returns the values that are set in the VI properties, not the actual real-time properties.  Use the property node FP->Monitor to get the realtime monitor.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 8
(3,875 Views)

That doesn't work either unfortunately... The indicator simply doesn't change no matter which screen I launch the VI on.

I run the VI on my laptop screen and I also have a monitor plugged into the HDMI port of the laptop, if that helps.

0 Kudos
Message 3 of 8
(3,861 Views)

That's an important detail.  I'm not sure how laptops handle an attached monitor.  If you open the screen properties by right clicking the desktop, does it show two side by side monitors that can be customized?  What happens when you click Identify?

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 8
(3,857 Views)

That works ok, I can see that the screens are identified correctly according to the graphical settings.

The laptop is Dell's 7559 inspiron. It has an nVidia GPU, if that matters. I noticed also that the windows display settings don't necessarily match Intel's graphic settings. Not sure if that matters to Labview but could be...

Any ideas what to do?

0 Kudos
Message 5 of 8
(3,849 Views)
Solution
Accepted by topic author SSTBRG

Can you share your code (2012 if possible) or show a picture of your VI properties.  

 

Also you said that FP.Monitor did not work.  Drop this snippet into a new vi by itself and run it on both screens and see if it works properly.PictureBox_BD.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 8
(3,840 Views)

If the Front Panel -> Monitor node doesn't update live on your system (it does on mine, but like you say you may have a setup that doesn't detect it...)...

 

Can you see if the "Application" property Display -> All Monitors outputs an array containing one cluster for each of your monitors?  If it doesn't, then the issue is based on the fact that it's not detecting the second monitor as a distinct monitor at all.

 

If it does find the second monitor, then maybe you can use the VI property Front Panel Window -> Window Bounds values to calculate which monitor it's on based on its coordinates.

Message 7 of 8
(3,826 Views)

OK, it finally works.

At first I isolated the snippet as you suggested and it worked, then I dug deeper into the code and found that somewhere later I reinitialized the indicators. Silly bug that wasted quite a bit of my time !

 

Thanks for all the tips!

0 Kudos
Message 8 of 8
(3,797 Views)