Skip to main content

MachPro Commands, Function Buttons, and Dashboard

Commands

The system has many packaged functions called commands. These commands can perform a variety of actions, such as turning on the spindle or zeroing an axis. All commands have an action associated with them. Some actions also have a feedback associated with them, such as the 'Spindle Forward' command where the feedback is whether the spindle is currently running forward or not.

Commands and User Commands can be assigned to function buttons on the control, in order to customize the experience.

User Commands

Additionally custom commands, called User Commands, can be configured in the 'Screen Configuration' dialog. This is accessible through the 'Screen Config' button on the Service/Maintenance tab.

dZWcreate_user_command.png

To make a new User Command, press the 'Add' button. Each User Command should have a unique name. To edit a User Command, select its name from the list. A searchable list of actions for the command is available in the first box. This selects the general type of action to be done. The second box, labeled 'Options', is also part of the action and must be selected.

The 'Feedback Source' and 'Feedback Target' sections are optional. They are relevant if the User Command will be assigned to a function button. Some User Commands won't have a logical feedback source. A reasonable example is for a command that turns soft limits on and off: the feedback would be if soft limits is on or off. The feedback target offers a way to do a simple forwarding of the user command state if desired.

edit_user_command.png

One option for user commands are User Scripts. These are lua functions that will be executed as the command, to get the feedback state, or to forward to the target. This is a way to create completely custom functionality. They should always be done in the UserGUIModule.UserStartUpScript function. The following is an example of how to create these lua function in the UserGUIModule.

function UserGUIModule.UserStartUpScript()
  local action_func = function()
          local state = w.GetSignalState(mc.OSIG_OUTPUT0)
          w.SetSignalState(mc.OSIG_OUTPUT0, not state)
      end
  w.CreateUserCommandActionOption("Toggle Output #0", action_func)

  local feedback_func = function()
          return w.GetSignalState(mc.OSIG_OUTPUT0)
      end
  w.CreateUserCommandFeedbackOption("Output #0", feedback_func)
  
  return true, true, w.FunctionCompleted()
end

Function Buttons

The MachPro operator panels and wireless pendants have a number of function buttons on them, labelled F1, F2, etc. These buttons initially do nothing, but can have commands or user commands mapped to them. This is done through the MachMotion operator panel configuration.

Each function button on the operator panels and pendants can have a command mapped to their press action and release action. First select the function button to be configured, and then select which press and release functions are desired. Selecting the blank entry will clear the command from the button.

Upon saving and exiting configuration, these commands will be mapped to the function buttons.

assign_user_command.png

Function buttons on the MachPro operator panels have an LED light in the corner. This light will reflect the feedback state of the mapped command. If a command is mapped to the press and to the release function of the button, the LED will reflect the feedback of the press command.

On the screen, there are five function buttons underneath the axis DROs. Instructions on how to configure those buttons, as well as how to add more function buttons to the screen, are in the Dashboard section.

Dashboard

dashboard_config.pngThe MachPro controls have multiple places to customize the interface to meet the users needs. The operator panel has function buttons that can be assigned operations, and there are two dashboards on the screen for the user to place widgets that they want to see. One dashboard is on the far right of the control and is available from all views. The other dashboard available to customize is on the service page.

Dashboards can be configured by right-clicking on them to access their menu. The user can choose how many and which widgets to show on the dashboard, as well as their layout. There is a wide variety of widgets to select from, and some widgets have additional options within them accessible through the 'Configure Widget' menu option.

One particular widget is the 'Function Buttons' widget. It is configurable in a similar way to the overall dashboard, but instead of selecting widgets, the user can select Commands to run on press and release. The user can also set the labels and colors of the button to suit them.

function_buttons.png

Aside from running Commands, function buttons can be configured to run an MDI command instead. Setting the MDI command to run, either press or release, is accessible through the right-click menu. Those menu options will only be available if the button does not have a Command set for it already. To create a multiline MDI command add a "\n" between the MDI lines.

For example, to run this command:

M6 T1

M3 S1000

You must program it like this: "M6 T1 \n M3 S1000". 

Function button list

image.png

image.png

image.png

image.png

Usually we only configure the button press, but we can also configure the button release function. Functions that toggle have a similar effect to the press and release functions. 

Most controls have at least three dashboards on the screen, the first one is under the Axis Positions (Labeled '1' in the example below) referred to as the Axis Positions Dashboard, and the second on the right side of the screen referred to as the Side Bar Dashboard (Labeled '2' in the example below).  The third dashboard is on the Service page.

Dashboards.PNG

Axis Positions Dashboard

The Axis Position Dashboard is locked to only allow the Function Button widget with 5 configurable buttons. These buttons configurable in the same manner as the function button widget on the Side Bar Dashboard, through the right-click menu. 

Side Bar Dashboard

On the right side of the screen is a large Dashboard with lots of space to add Widgets that will improve productivity.  Configure the dashboard through the right-click menu.

Widgets

Widgets are small components that can be added to the dashboards to show data like the last probe position or to add buttons for controlling a chip conveyor.  To see the list of available widgets right-click on the edge of a dashboard and select the drop down list.

Many widgets have additional options to configure the way they look or which variables are shown in the widget.  So see a list of options right-click inside the widget and select from the menu. The menu is context sensitive and some widgets have additional options, but these three options are always available. 

Right click directly on an entry.q9qimage.png

Use compact display or specify height of the rows. The default is 22.

rXNimage.png

 

Select Get Info about the entry you right clicked

Iyjimage.png

image.png

image.png

All Inputs and All Outputs

These are two separate widgets, one for inputs and one for outputs. They have the same function. They may be useful for troubleshooting during installation, and it will display all the inputs or outputs (including ones not enabled or used) in a scroll-able window. Alternately, use the Enabled Inputs and Enabled Outputs widgets, or the Signals widget. The inputs and outputs are at the hardware level and the signals are at the software level. The software signals are mapped to particular hardware inputs and outputs. Use the appropriate widget for the information you need. 

If you add a description to an input in the Controls Inputs tab, that description will be used here.

image.png

Note the scrollbar on the right side. All inputs are visible when you scroll. 

If you right click and select Run Test Sequence, you will see this popup. There are a large number of inputs and running the sequence 10 times will take some time. 

image.png

Analog Input and Output Signals

These are two separate widgets and each allows you to add specific input and output signals to your dashboard. 

To add Analog signals, right click in the widget and select Add Variables. 

image.png

  • You can add an individual signal by selecting it, clicking the Add button at the bottom, and then the Close button. 
  • You can add a contiguous series of signals. Select the first signal. Hold down the shift key on the keyboard and select the last signal in the series. Click the Add button. 
  • You can repeat this action for other series of signals, and click Add after each series is selected.
  • You can add separate signals. Select the first signal. Hold down the control key on the keyboard and select each individual signal that you want to add to the widget. Click the Add button.
  • When you have finished adding all of the signals, click the close button. 

Right click in the widget or directly on one of the signals.

 

image.png

  • Using the process to the left, you can add additional variables.
  • You can also remove all variables, or only the variable that you right clicked on. 
  • You can get more detailed information about the particular variable you right clicked on. 

*Approach Distances

All axes will use this value when doing a probe move for both edges and corners. It is the maximum distance the probe will move while searching for material. If the probe is not activated before this distance is consumed, then an error will occur and the operation will be stopped.

image.png

The Approach Distances feature is used on the fixtures tab with edge finding. It is unclear what function this widget provides. 

*Axis Compensation

image.png

This is used on grinders to adjust for the grind wheel size changing during dressing or grind cycles. Grinder controls will have these functions configured in their profile, and you will not normally need to add this widget.

Calculator

image.png

This is a simple calculator that is useful if you often need one while working on the control. There are no special features to configure here. If you need a calculator with more advanced features, the Windows calculator is available. 

Current Fixture Offsets

This displays the current offset of each axis from the machine zero location on that axis. It is the same as the opening the Fixtures Offsets table on the Fixtures tab. This is a display widget. If you want to change these values, open the Fixture Offsets table on the fixtures tab.

image.png

image.png

*Cylindrical Grinder Part Offsets

The part offset table (Part Correction Offset) which, when multiple features are being ground on the part, can be used in conjunction with an "E" variable in the program to allow adjustments to each feature individually.

image.png

DRO Measure

image.png

This provides a digital "tape measure" that can measure axis movement, and be reset at will. It does not change any operating values or parameters.

Dual Table

image.png

This widget is used on routers with two tables. Setup and use is documented in the 2000 Series Dual Table article. 

Enabled Inputs and Outputs

image.png

These widgets will show only the inputs or outputs that been enabled. Right clicking on the display will bring up a menu. If you click on a particular input or output, you can get information about that entry. 

Feedback

 

image.png

 

This provides an on-screen indicator when any of the axes are moving. 

image.png

Right click on the border space around the buttons and select Configure Widget to access the display options. 

*File Travel Limits

image.png

image.png

This does not appear to be working currently

*G30 Coordinates

image.png

image.png

This does not appear to be working currently

G30 P3 does not work at all

G30 P3 X-5 Y6 Z-1.5 will go to that position, then will finish at machine 0. G90/91 does work appropriately.

 

I cannot see a difference in behavior between G30 and G28

P1 (5301-5306) now appears to be used by G58

G54 - G59 fixture Offsets

This widget displays the current values of your offsets. These coordinates are always the distances from machine zero on each axis. You may add a widget for each set of offsets that you want to monitor. This is a display widget. If you want to change these values, open the Fixture Offsets table on the fixtures tab. If you want a single widget that dynamically updates to show the current offsets, use the Current Fixture Offsets (above). 

Standard display

image.png

Compact Display with Y offset labels customized

image.png

*G92/G50 Offsets

G92 fixture offset shift

G92 and G50 were used before fixture offsets were available, and it is now recommended to use the G54 - G59 fixture offsets instead. This may still be used to correct machine alignment or maintenance issues.

 

Format: G92 X_ Y_ Z_ A_ B_ C_

This will display your fixture offsets applied using G92 within your G-code file. When applied, this shift will take effect using the current position of your axes. Cancel these shifts using G92.1. 

G00 G90 G54 G17 G40 G49 G80		(Safe start line)
G00 X4.0 Y0.0 Z1.0				(Rapid move; current position X4, Y0, Z1)
G92 X1.0 Y2.0 Z3.0				(Set local coordinate system; current position X1, Y2, Z3)
G92.1							(Cancel local coordinate system; current position X4, Y0, Z1)
M30								(Program end and rewind)
%

image.png

image.png

Start with the fixture offsets at machine zero.

Move to X4, Y0, Z1

 

image.png

image.png

  • All movement has completed
  • Run the command G92 X1.0 Y2.0 Z3.0
  • No movement happens, but your fixture offsets are updated to the G92 values you just specified. 
  • The machine coordinates are still X4, Y0, Z1
  • G92.1 cancels the shift and returns the fixture offsets to X4, Y0, Z1

G92 X1.0 Y2.0 Z3.0

image.png

G92.1  

image.png

G52 fixture offset shift (head shift) (No, there was an old G50 command and it still appears to be active in Mach4 along with the new G50 (cancel scaling) command. Pinged Andy 2025-09-12-T16-34)

Format: G52 X_ Y_ Z_ A_ B_ C_

G00 G90 G54 G17 G40 G49 G80		(Safe start line)
G00 X-4.0 Y0.0 Z1.0				(Rapid to position
M03 S2500						(Start spindle)
G12 I2.0 F30					(Cut circle with radius 2.0)
G52 X7.0						(Activate local coordinate shift with X axis offset of 7.0)
G00 X-4.0 Y0.0 Z1.0				(Rapid to same start point)
G12 I2.0 F30					(Cut identical circle)
G52 X0.0						(Cancel local coordinate shift on X axis)
M30								(Program end and rewind)
%

The fixture zeros are set to the machine zero

 

image.png

  • The G-Code will cut a circle, then use G52 to shift the X fixture zero 7.0 inches.
  • It will run the same G-Code to cut the same circle, but the actual cut will be 7.0 inches from the first cut. 
  • Running G52 X0.0 will zero the X axis shift. 

First circle is cut

image.png

Activate G52 shift

image.png

Head Shift Offsets

This is a variant of the G52 fixture offset. This widget allows you to change the G52 / head offset from the screen. 

Widget Customization

Lets test and customize the Pound Variable widget to learn more about its features.  First right click on the Side Bar Dashboard and select the Pound 

Pound Variables 

In this example we are going to add variables to the Pound Variables widget. Right click with your mouse inside the Pound Variables widget and select Configure Widget.

Poundvar-Widget.PNG

Now from this window we can enter the range of variables we want to view and the press Add.  I entered 500-510.

Poundvar-Widget-Configure.PNG

Now we have the widget showing the values from the variables. 

Poundvar-Widget-Displaying-500-510.PNG

Next lets rename one of the variables with a name to make it easier to remember. Right-click on the row labeled #501 and select Set Description: #501.

Poundvar-Widget-Renaming-501.PNG

Enter the name Part Width and press OK.

Poundvar-Widget-Part-Width.PNG

Now we have a widget customized with a description for variable #501.

Poundvar-Widget-Finsished.PNG

You can also set how many decimal places for pound variables. Again, right-click on the row you want to change and select "Set Variable Format String." Then enter a string format with the following syntax: %.Xf (where the X represents how many decimal places. For example, if you only want 1 decimal place, enter %.1f. This will display a value 170.2353 as 170.2. You have to re-enter the value on the screen for it to display with the new format.