Hello Guest it is April 25, 2024, 01:53:55 PM

Author Topic: 2 separate displays with independent screens, is it possible?  (Read 1168 times)

0 Members and 1 Guest are viewing this topic.

2 separate displays with independent screens, is it possible?
« on: January 02, 2020, 01:35:27 PM »

I may be using the term "screen" incorrectly in the mach4 context,I[size=78%]s it possible to use 2 displays with independent screens with Mach4? [/size]
[/size]
I have a bunch of small touchscreens that would be perfect for a local control panel while leaving the larger amount of content, i.e. DRO, file functions, etc on another screen.


I suppose if I extended the desktop onto 2 screens I could make it look that way, but that is fraught with fragility because of different screen resolutions. I'm hoping for a supported solution?


Thoughts?


P.S. I've no idea where the markups [/size][size=78%] etc are coming from in the post editor[/size][/size]
Re: 2 separate displays with independent screens, is it possible?
« Reply #1 on: January 25, 2020, 08:52:06 PM »
I am not aware of a feature that you need.

I would create a "wizard" as wizards can create additional windows in Mach 4. The "wizards" are really just dialog windows that you can fully customize. The windows created by these wizards can be dragged across the desktop and are not bound to the main window. You can create them by using lua. You will likely use the
Code: [Select]
wx.wxFrame( ... ) function. In this function you can specify the coordinates and size of the window. If your secondary monitor is the left one and it has a resolution of 1920x1080 you would specify as position(-1920,0).

Whenever you start Mach4 launch the wizard. It should just be a normal function that you could call during startup.

I dont think that there is a screen editor for wizards yet, so you would have to program it yourself. Check out the samples. It is easy to place some buttons / number fields on these wizards.

Best regards

Brandon


Re: 2 separate displays with independent screens, is it possible?
« Reply #2 on: January 26, 2020, 01:40:48 PM »
That sounds like a solid start. Thank you.

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: 2 separate displays with independent screens, is it possible?
« Reply #3 on: February 02, 2020, 03:03:53 PM »
There is also Mach4GUIR.exe.  This is the remote GUI that is meant for controlling a Mach instance remotely.  But in this instance, you would just run it on the same machine and point it to 127.0.0.1 (local host IP address). 

First, design a screen that you want to use on the other monitor.  In this example, I'll name this screen "myAlternateScreen".  Do this with your current profile (you will switch back to your current screen later).  The screen that is to run on the remote GUI cannot have a tool path and you can't load G code files from it.  I think those are the only two restrictions at the moment.  Once you have the remote screen designed (and Mach4GUI.exe running with your current scree and profile), you can launch the Mach4GUIR.exe program like this:

Mach4GUIR -r 127.0.0.1 -s myAlternateScreen

As I said, Mach has to be running already before you launch the remote screen.  This could be automated in the screen load script of the primary MachGUI.exe. 

os.execut("Mach4GUIR -r 127.0.0.1 -s myAlternateScreen")

To terminate the remote GUI along with the primary GUI, you will have to do some register based communications between the GUI. 

On the remote GUI (pseudocode) :

if (some register equals 1) then
   scr.Exit(true)
end

Steve
Re: 2 separate displays with independent screens, is it possible?
« Reply #4 on: February 03, 2020, 05:18:29 PM »
 8) Bookmarking this one for a future project!!!!!! 8)



Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: 2 separate displays with independent screens, is it possible?
« Reply #5 on: February 03, 2020, 11:42:29 PM »
where does one obtain this tasty nugget??
Re: 2 separate displays with independent screens, is it possible?
« Reply #6 on: February 04, 2020, 02:45:51 AM »
Mach4GUIR.exe should already be in your Mach4 installation folder. If not, you will need to update to a more recent version