LinuxCNC Documentation
This page is 26% translated. Untranslated text is shown in English.

СИНОПСИС

halrmt [--port <port number>] [--name <server name>] [--connectpw <password>] [--enablepw <password>] [--sessions <max sessions>] [--ini <INI file>]

ОПЦИИ

-h,--help

Print a brief usage help message.

-n,--name server_name

Sets the server name to specified name for in reply to HELLO command. Default: EMCNETSVR.

-p,--port port

Listen on TCP port port for connection. Both IPv4 and IPv6 connections are accepted. Default port is 5006. (Note: linuxcncrsh uses 5007 as default)

-w,--connectpw password

Sets the HELLO command password to password. Default: EMC.

-e,--enablepw password

Sets the SET ENABLE command password to password. Default: EMCTOO.

-s,--sessions max_sessions

Sets the maximum number of simultaneous connextions to max_sessions. Default is no limit (0).

-i,--ini INI_file

Uses the specified INI_file. The default is to get the INI_file name from the environment variable INI_FILE_NAME.

-q,--quiet

Don’t print informational messages to the console.

ОПИСАНИЕ

The application halrmt supports six primary commands to manipulate the HAL of a remote LinuxCNC instance. Of these, the commands SET and GET contain HAL specific sub-commands. The sub-commands are based on the commands supported by halcmd(1).

COMMANDS

Commands, sub-commands and most parameters are not case sensitive. The exceptions are passwords, file paths and text strings.

The supported commands are as follows:

hello <password> <client> [<version>]

If a valid password was entered the server will respond with
HELLO ACK _<Server Name>_ _<Server Version>_
where server name and server version are looked up from the implementation. If an invalid password or any other syntax error occurs then the server responds with HELLO NAK.

get <sub-command> [args…​]

The get command includes one of the HAL sub-commands, described below and zero or more additional parameters.

set <sub-command> [args…​]

The set command includes one of the HAL sub-commands, described below and one or more additional parameters.

quit

The quit command disconnects the associated socket connection.

shutdown

The shutdown command disconnects all clients and tells halrmt to shut down. This command may only be issued if the HELLO has been successfully negotiated. The connection must be enabled.

help [sub-command]

The help command will return information in text over the network connection. If no parameters are specified, it will itemize the available commands. If a command is specified, it will provide usage information for the specified command. Command HELP will respond regardless of whether a HELLO has been successfully negotiated.

SUBCOMMANDS

A pattern is a glob pattern as the shell implements it. Backslash characters in a pattern are not special (don’t escape) and are case insensitive.

set addf <name> <thread> [arg [arg…​]]

Adds the function specified by name, to the thread specified by thread. Optional parameters may be specified by arg.

get comp <name>

Returns the component matching the specified name.

get comps [pattern]

Returns information about all components matching pattern. If no pattern is specified then all components are returned.

set delf <name> <thread>

Removes the function specified by name from the thread specified by thread.

set delsig <signalname>|all

Deletes the signal specified by signalname. Specifying all will remove all signals in the system.

get echo
set echo {on|off}

With get will return the current echo state. With set, sets the echo state to the supplied argument. When echo is on, all commands will be echoed upon receipt. The echo state is local to each connection.
The echoed line is INI-variable expanded if SET EXPAND is set to On. This allows you to see the actual command being executed.

get enable
set enable <pwd>|off

With get will return On or Off to indicate whether the current connection is enabled to perform control functions. With set and a valid password, the current connection is enabled for control functions. The argument OFF may not be used as a password and disables control functions for this connection.

get expand
set expand {on|off}

Get or set INI-file variable expansion. Setting the INI-file expansion to on will pre-process every input line and substitute variables. An INI-file variable is specified by [SECTION]VAR or [SECTION](VAR). Not using parentheses requires you to have trailing white-space or be at the end of the line. INI-file expansion defaults to off and requires a valid INI-file. Enabling expansion with no or an invalid INI-file will expand to an empty string. Expansion is applied to the input line before it is tokenized. That means that all commands and sub-commands are subject to expansion. Everything typed as input is first expanded before processed. The expand state is local to each connection.

get funct <name>

Returns all information about the parameter matching the specified name.

get functs [pattern]

Returns information about functions matching pattern. If no pattern is specified then all functions are returned.

get ini <var> <section>

Return the variable [section]var from the current INI-file.

get inifile
set inifile <filename>

Gets the current active INI-file’s name or sets the active INI-file to filename. A test is performed to validate the new INI-file when set. Setting the INI-file is local to the connection.

set linkps <pinname> [<signalname>]

Add pinname to signal with signalname. Will act as SET UNLINKP _pinname_ if no signalname is provided.

set linksp <signalname> <pinname>

Add pinname to signal with signalname.

set loadrt <compname> [arg [arg…​]]

Load the real-time component compname with optional arguments. The real-time environment must have been started or an error will be returned.

set loadusr [flags] <program> [arg [arg…​]]

Loads the user component program and passes any optional arguments. The flags are on or more of:

  • -W - to wait for the component to become ready. The component is assumed to have the same name as the first argument of the command. Use -n to override the component name to look for.

  • -n name - to wait for the component, which will have the given name.

  • -w - to wait for the program to exit

  • -i - to ignore the program return value (with -w)

get lock
set lock {all|load|config|params|run|tune|none}

Gets the current HAL lock value or sets the HAL lock of the argument’s value. The tune value is a combination of load and config. The values all, none and tune override any other values in the lock that may be present. Doing SET LOCK none is equivalent to SET UNLOCK all.

get net <signalname>
set net <signalname> <pinname> [pinname [pinname…​]]

Get shows all the pins connected to signalname. Set creates a signal signalname and adds all the pinname pins to the signal.

set newsig <signalname> <type>

Creates the signal specified by signalname and of type specified by type.

get param <paramname>

Returns all information about the parameter matching the specified paramname.

get params [pattern]

Returns information about parameters matching pattern. If no pattern is specified then all parameters are returned.

get paramval <paramname>

Returns just the value of the parameter matching the specified paramname.

get paramvals [pattern]

Returns only value information about all parameters matching pattern. If no pattern is specified then all parameters are returned.

get pin <pinname>

Returns all information about the pin matching the specified pinname.

get pins [pattern]

Returns all information about all pins matching pattern. If no pattern is specified then all pins are returned.

get pinval <pinname>

Returns the value of the pin matching the specified pinname.

get pinvals [pattern]

Returns only value information about all pins matching pattern. If no pattern is specified then all pins are returned.

set save {all|comp|sig|link|linka|net|neta|param|thread} [<filename>]

Will return the saved content on the connection if no filename is provided. Saves the specified set of data to file filename instead if provided.

set setp <pinname|paramname> <value>

Sets the pin or parameter specified by pinname/paramname to the value specified by value.

set sets <signalname> <value>

Sets the signal specified by signalname to the value specified by value.

get signal <signalname>

Returns all information about the pin matching the specified signalname.

get signals [pattern]

Returns all information about all signals matching pattern. If no pattern is specified then all signals are returned.

get sigval <signalname>

Returns just the value of the signal matching the specified signalname.

get sigvals [pattern]

Returns only value information about all signals matching pattern. If no pattern is specified then all signals are returned.

set start

Start the real-time threads. The real-time environment must have been started or an error will be returned.

set stop

Stop the real-time threads. The real-time environment must have been started or an error will be returned.

get time

Returns the time, in seconds, from the start of the epoch. The starting time depends on the platform.

get timestamp
set timestamp {on|off} [{on|off}]

Enable or disable printing of a timestamp on messages sent back from the server to the user. The optional format argument selects human readable date/time format and seconds since the epoch. The format prints seconds when on and human readable when off.

get thread <name>

Returns all information about the thread matching the specified name.

get threads [pattern]

Returns all information about all threads matching pattern. If no pattern is specified then all threads are returned.

set unlinkp <pinname>

Unlinks the specified pinname from any signal it may be attached to.

set unload <compname>

Unloads the real-time component compname. The real-time environment must have been started or an error will be returned.

set unlock {all|load|config|params|run|tune|none}

Removes the HAL lock of the argument’s value. The tune value is a combination of load and config. Removing none has no effect but may be useful in scripting.

get verbose
set verbose on | off

With get will return the current verbose state. With set, sets the verbose state to the supplied argument. When verbose mode is on, all SET commands return positive acknowledgement in the form SET <sub-cmd> ACK. In addition, text error messages will be issued when in verbose mode. The verbose state is local to each connection.

СМОТРИТЕ ТАКЖЕ

linuxcnc(1), halcmd(1).

Much more information about LinuxCNC and HAL is available in the LinuxCNC and HAL User Manuals, found at /usr/share/doc/LinuxCNC/.

BUGS

Probably, but it has been mostly rewritten after the last incarnation incurred som bit-rot and was deemed non-functional.

АВТОР

This man page written by Andy Pugh, as part of the LinuxCNC project. Manual page updated by B.Stultiens after the rewrite.

СООБЩЕНИЕ ОБ ОШИБКАХ

Сообщайте об ошибках по адресу https://github.com/LinuxCNC/linuxcnc/issues.

АВТОРСКОЕ ПРАВО

Copyright © 2020 Andy Pugh.
Copyright © 2026 B.Stultiens.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.