LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to turn off or turn on a specific PC monitor in labview 2015 application?

Solved!
Go to solution

Hi all,

 

We have a labview 2015 application which displays the GUI front panel on monitor 1 and monitor 2, the monitor 2 is remote in a lab, where we need to turn it off for some lab operations to avoid the monitor display light shining onto a finishing product.

 

1. is there a solid software solution in labview?

2. is there a hardware solution to turn on/ff the monitor 2 on its power or video stream?

 

Thanks,

 

Kimberly

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

Hi!

 

Have you considered displaying a black graphic on the second monitor? That may be the simplest and fastest solution if that is dark enough and is entirely possible from within LabVIEW without touching any tools, hardware or configuration options.

 

I could think of a few more options. In roughly ascending intrusiveness and effect:

  • You may be able to cause the operation system to disable the video output on that monitor. Most monitors will respond by going into a sleep mode and wake up once the signal is back.
  • Some monitors can be remote controlled, especially the "signage"-type monitors. Check the manual and manufacturer page for hints if that possibile.
  • Use a remote controlled power switch to control the power supply.
  • Hook up the monitor power button and toggle it using some microcontroller.
0 Kudos
Message 2 of 8
(3,171 Views)
Solution
Accepted by topic author KimberlyWang

You may be successful with a command line tool like this:

 

https://www.nirsoft.net/utils/control_my_monitor.html

 

LabVIEW System Exec with the command line:

 

ControlMyMonitor.exe /TurnOff "\\.\DISPLAY3\Monitor0"

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 8
(3,161 Views)

Here's an article that describes a couple way to achieve this:

Windows Tip: 4 Different Ways to Turn Off Desktop Monitor or Laptop Screen

 

The batch file or Powershell script could be called through LabVIEW

 

Also I don't know it off the top of my head but I would think the Windows API would have a way of doing this too

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 8
(3,148 Views)

@RTSLVU wrote:

 

Also I don't know it off the top of my head but I would think the Windows API would have a way of doing this too


Yes there is: SetVCPFeature()

It allows to set any of the VESA Monitor Control Command Set (MCCS) VCP (Virtual Control Panel) codes (if the monitor supports that command).

 

But it requires one to enumerate the monitors first and that requires to pass an enumeration callback function to another API. But callback function pointers is with the Call Library Node, while not entirely impossible to do, a major pita to implement. So you end up to not really getting around to write some wrapper DLL code.

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 8
(3,124 Views)

ControlMyMonitor.exe /TurnOn "73GTT77JA22L" to turn on the monitor

ControlMyMonitor.exe /TurnOff "73GTT77JA22L" to turn off the monitor

 

If we use the above command to turn off the monitor, what command to use to know that the monitor is indeed off?

 

0 Kudos
Message 6 of 8
(3,054 Views)

@KimberlyWang wrote:

 

If we use the above command to turn off the monitor, what command to use to know that the monitor is indeed off?

 


Your Dell monitor has a completely refined remote control suite, including a C++ API. Have You tried connecting the USB cable and installing the support programs from Dell?

0 Kudos
Message 7 of 8
(3,035 Views)
ControlMyMonitor.exe /GetValue "<your monitor>" D6

 

Make sure to set the SystemExec to wait for completion, check the return string in the standard output and if it is 1 it is on and if it is 4 or 5 it is off.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 8
(3,015 Views)