Skip to content

Runner mode#

Runner mode opens a small window for loading and executing existing projects without the project editor. Start it from a command prompt with:

Measmatic.exe /runner

Add /name to identify a runner in its window title and tray icon tooltip, for example Measmatic.exe /runner /name "Station 1". Both then read Measmatic Runner - Station 1. Without /name, both remain Measmatic Runner.

The window shows the loaded project, execution status, JSON-RPC client connection status, and the latest error. Use Load project to select a saved .mmprj file, Start to run it, and Stop to stop the measurement or cancel its preparation. Load and Start are unavailable while a measurement is being prepared or executed. Close the window after the measurement and any export have finished.

Runner mode uses the normal Measmatic installation. Multiple runners can start at the same time, including alongside the regular Measmatic application. The /enable-multiple-instances option cannot be combined with /runner.

To give each runner separate configuration and log files, start it with its own -d directory. If that profile does not yet have a Measmatic configuration file, the runner copies the configuration from the normal installation once. Existing profile files are kept, and the user configuration is created automatically.

Measmatic.exe /runner -d "C:\MeasmaticRunner\Station1" /jsonrpc-port 35011 /device-config "C:\Measmatic\Configuration\station1.mmcfg" /output-dir "D:\Measurements\Station1"

The /jsonrpc-port option accepts values from 1 to 65535. Without it, the configured JSON-RPC port is used. Give each runner a distinct port across all running instances. /scpi-port is rejected in runner mode. /device-config selects an existing .mmcfg file and takes precedence over a device configuration specified by the project. The runner does not copy device configurations and requires an existing one at startup. These command-line overrides are used only for the current run and are not saved in the profile. Without -d, the runner uses the normal Measmatic configuration and log locations.

Use a different -d directory for each parallel runner. The runner keeps its browser cache in its profile and does not use the regular application's browser debug port. /output-dir redirects automatic measurement data saving and the built-in image export presets, including test-level presets, for the current project in memory. It also redirects the additional data file named after the project. Custom Python export scripts may write to other paths; check their settings and code before running them in parallel. Without /output-dir, the project's configured output paths remain in use.

System tray#

Start with Measmatic.exe /runner /start-minimized to launch directly in the Windows system tray with a tray icon, without showing the runner window or splash screen. The /start-minimized option only takes effect in runner mode.

The hidden runner creates a native window handle at startup so controlling applications can send a normal Windows close request without first opening it from the tray. Close requests still require the runner to be idle and any export to have finished.

Minimize the runner window to hide it in the Windows system tray. The project continues running, and remote control remains available. Double-click the tray icon or choose Open from its context menu to show the window again.

Choose Exit from the tray menu to close the runner. If a measurement is being prepared or executed, or an export is still running, the window reopens and shows why it cannot close. Stop the measurement and wait for the export to finish before exiting. The window's X button also closes the runner when it is idle.

Project requirements#

  • Prepare and save the project in the regular Measmatic interface before loading it in runner mode. The runner cannot edit or save project files.
  • Configure separate physical instruments for parallel runners. Different .mmcfg filenames can still refer to the same device address and do not prevent simultaneous access to that device.
  • Projects that require interactive measurement input at startup (EnterUserDataAtStart) cannot be started in runner mode.
  • If automatic data saving or export is configured, its output directories must be valid. Measurement data and configured exports can still be written during execution.

Remote control#

Runner mode always enables JSON-RPC and disables SCPI and developer mode, regardless of the program settings. This policy applies from startup and remains effective if the configuration changes or is reloaded. The saved settings are not changed, including when the configuration is saved during runner operation. Regular Measmatic continues to use the saved settings. JSON-RPC starts after runner initialization.

Developer mode is unavailable in the runner: it does not start the Python debugger or watch test files for changes. Developer-only JSON-RPC communication logging is also disabled. Normal test execution and error logging remain available.

The JSON-RPC interface supports LoadProject, Start, and Stop. Its read methods (Identify, GetProjects, GetLoadedProject, GetProjectName, GetProjectFilePath, GetBin, GetProjectInputParameters, and GetProjectOutputParameters) also remain available. SetMeasurementDescription, SetProjectInputParameter, and SetSiteInfo can set values for execution; these changes are not saved to the project file. RaiseEvent is unavailable in runner mode.