Man page - linuxcncrsh(1)
Packages contas this manual
- sim-torch(1)
- latency-plot(1)
- gladevcp(1)
- tool_watch(1)
- enum(9)
- puma560gui(1)
- bitslice(9)
- halmeter(1)
- differential(9)
- hm2_pci(9)
- tpcomp(9)
- schedrmt(1)
- hal_parport(9)
- mdi(1)
- estop_latch(9)
- halscope(1)
- halreport(1)
- 5axisgui(1)
- conv_bit_float(9)
- tool_mmap_read(1)
- joyhandle(9)
- comp(9)
- touchy(1)
- debounce(9)
- ohmic(9)
- linuxcncmkdesktop(1)
- xhc-hb04(1)
- vfs11_vfd(1)
- emccalib(1)
- streamer(9)
- edge(9)
- motion-logger(1)
- gremlin_view(1)
- halshow(1)
- gantrykins(9)
- moveoff_gui(1)
- charge_pump(9)
- wcomp(9)
- corexy_by_hal(9)
- spindle_monitor(9)
- limit1(9)
- eoffset_per_angle(9)
- biquad(9)
- scarakins(9)
- qtvcp(1)
- motion(9)
- watchdog(9)
- linuxcnc_module_helper(1)
- axis(9)
- conv_s32_u32(9)
- max5gui(1)
- sim_home_switch(9)
- bin2gray(9)
- trivkins(9)
- halcmd_twopass(1)
- clarkeinv(9)
- clarke2(9)
- toggle2nist(9)
- tristate_bit(9)
- tof(9)
- latency-test(1)
- filter_kalman(9)
- limit_axis(9)
- thermistor(1)
- mdro(1)
- sphereprobe(9)
- multiswitch(9)
- constant(9)
- mux16(9)
- pyngcgui(1)
- conv_bit_u32(9)
- knob2float(9)
- hm2_eth(9)
- tripodkins(9)
- encoder_ratio(9)
- elbpcom(1)
- lut5(9)
- tooledit(1)
- mux_generic(9)
- inivar(1)
- hal_input(1)
- oneshot(9)
- rotatekins(9)
- hm2_7i43(9)
- qtplasmac_gcode(1)
- conv_u32_float(9)
- pumakins(9)
- melfagui(1)
- flipflop(9)
- ddt(9)
- hostmot2(9)
- histobins(9)
- matrix_kb(9)
- qtplasmac-cfg2prefs(1)
- threads(9)
- clarke3(9)
- io(1)
- plasmac(9)
- pumagui(1)
- scorbot-er-3(1)
- hm2_7i90(9)
- rs274(1)
- conv_u32_s32(9)
- gs2_vfd(1)
- hal-histogram(1)
- xhc_hb04_util(9)
- sample_hold(9)
- simple_tp(9)
- linuxcnc_info(1)
- blend(9)
- scaled_s32_sums(9)
- lincurve(9)
- max31855(9)
- rotarydelta(1)
- linuxcnctop(1)
- millturn(1)
- thc(9)
- shuttle(1)
- spindle(9)
- multiclick(9)
- pmx485(1)
- abs_s32(9)
- ton(9)
- steptest(9)
- gladevcp(9)
- stepgen(9)
- pyui(1)
- sim_matrix_kb(9)
- halsampler(1)
- sampler(9)
- lowpass(9)
- gladevcp_demo(1)
- tristate_float(9)
- update_ini(1)
- near(9)
- linuxcncsvr(1)
- and2(9)
- demux(9)
- opto_ac5(9)
- pentakins(9)
- logic(9)
- select8(9)
- teach-in(1)
- dbounce(9)
- hm2_rpspi(9)
- encoder(9)
- pmx485-test(1)
- mult2(9)
- linuxcnclcd(1)
- tp(9)
- feedcomp(9)
- latency-histogram(1)
- iov2(1)
- pwmgen(9)
- kins(9)
- hexagui(1)
- linuxcncrsh(1)
- limit3(9)
- monitor-xhc-hb04(1)
- linuxcnc(1)
- millturn(9)
- axistest(9)
- gantry(9)
- qtplasmac-materials(1)
- image-to-gcode(1)
- hbmgui(1)
- gmoccapy(1)
- sim_pin(1)
- thcud(9)
- or2(9)
- conv_float_s32(9)
- timedelay(9)
- sum2(9)
- xyzab-tdr-gui(1)
- xhc-whb04b-6(1)
- sim_parport(9)
- setup_designer(1)
- pid(9)
- weighted_sum(9)
- ilowpass(9)
- mesa_7i65(9)
- counter(9)
- message(9)
- wj200_vfd(1)
- serport(9)
- scale(9)
- threadtest(9)
- mux4(9)
- xyzbc-trt-gui(1)
- pyvcp_demo(1)
- mux8(9)
- userkins(9)
- siggen(9)
- qtplasmac-plasmac2qt(1)
- ngcgui(1)
- pncconf(1)
- setsserial(9)
- xyzac-trt-gui(1)
- offset(9)
- mesa_uart(9)
- bitwise(9)
- conv_bit_s32(9)
- match8(9)
- abs(9)
- minmax(9)
- milltask(1)
- xyzab_tdr_kins(9)
- timedelta(9)
- lineardeltakins(9)
- toggle(9)
- simulate_probe(1)
- hm2_spi(9)
- rtapi_app(1)
- limit2(9)
- conv_s32_float(9)
- halstreamer(1)
- sim_encoder(9)
- updown(9)
- conv_u32_bit(9)
- hal_bb_gpio(9)
- hy_gt_vfd(1)
- halui(1)
- xhc-hb04-accels(1)
- pyvcp(1)
- axis(1)
- integ(9)
- halrmt(1)
- sserial(9)
- qtplasmac-setup(1)
- time(9)
- latencybins(9)
- mitsub_vfd(1)
- haltcl(1)
- vfdb_vfd(1)
- at_pid(9)
- classicladder(9)
- mb2hal(1)
- bldc(9)
- modcompile(1)
- panelui(1)
- mqtt-publisher(1)
- axis-remote(1)
- sim_axis_hardware(9)
- svd-ps_vfd(1)
- gentrivkins(9)
- conv_s32_bit(9)
- maj3(9)
- hm2_spix(9)
- lcd(9)
- orient(9)
- debuglevel(1)
- stepconf(1)
- conv_float_u32(9)
- supply(9)
- deadzone(9)
- anglejog(9)
- halcmd(1)
- moveoff(9)
- pi500_vfd(1)
- homecomp(9)
- maxkins(9)
- div2(9)
- scaragui(1)
- hal_manualtoolchange(1)
- mux2(9)
- halrun(1)
- genserkins(9)
- gearchange(9)
- sim_spindle(9)
- genhexkins(9)
- linuxcnc_var(1)
- carousel(9)
- gscreen(1)
- mesa_pktgyro_test(9)
- hypot(9)
- maho600gui(1)
- xor2(9)
- rosekins(9)
- iocontrol(1)
- invert(9)
- sendkeys(1)
- lineardelta(1)
- not(9)
- hy_vfd(1)
- gray2bin(9)
apt-get install linuxcnc-uspace
Manual
| linuxcncrsh(1) | The Enhanced Machine Controller | linuxcncrsh(1) |
NAME
linuxcncrsh - text-mode interface for commanding LinuxCNC over the network
SYNOPSIS
linuxcncrsh [OPTIONS] [-- LINUXCNC_OPTIONS]
DESCRIPTION
linuxcncrsh is a user interface for LinuxCNC. Instead of popping up a GUI window like AXIS(1) and Touchy(1) do, it processes text-mode commands that it receives via the network. A human (or a program) can interface with linuxcncrsh using telnet(1), nc(1) or similar programs.
All features of LinuxCNC are available via the linuxcncrsh interface.
OPTIONS
-p,--port PORT_NUMBER
-n,--name SERVER_NAME
-w,--connectpw PASSWORD
-e,--enablepw PASSWORD
-s,--sessions MAX_SESSIONS
In addition to the options listed above, linuxcncrsh accepts an optional special LINUXCNC_OPTION at the end:
-ini LINUXCNC_INI_FILE
Starting linuxcncrsh
To use linuxcncrsh instead of a normal LinuxCNC GUI like AXIS or Touchy, specify it in your INI file like this:
[DISPLAY]
DISPLAY=linuxcncrsh
To use linuxcncrsh in addition to a normal GUI, you can either start it at the end of your HAL file, or run it by hand in a terminal window.
To start it from HAL, add a line like this to the end of your HAL file:
loadusr linuxcncrsh [OPTIONS] [-- LINUXCNC_OPTIONS]
To start it from the terminal, run linuxcncrsh manually like this:
linuxcncrsh [OPTIONS] [-- LINUXCNC_OPTIONS]
Connecting
Once LinuxCNC is up and linuxcncrsh is running, you can connect to it using telnet or nc or similar:
telnet HOST PORT
Network protocol
linuxcncrsh accepts TCP connections on the port specified by the --port option, or 5007 if not specified.
The client sends requests, and the linuxcncrsh server returns replies. Requests consist of a command word followed by optional command-specific parameters. Requests and most request parameters are case insensitive. The exceptions are passwords, file paths and text strings.
Requests to linuxcncrsh are terminated with line endings, any combination of one or more '\r' and '\n' characters. Replies from linuxcncrsh are terminated with the sequence '\r\n'.
The supported commands are as follows:
hello <password> <client> <version>
If an invalid password or any other syntax error occurs then the server responds with:
get <subcommand> [<parameters>]
set <subcommand> <parameters>
quit
shutdown
help
LinuxCNC Subcommands
Subcommands for get and set are:
echo {on|off}
verbose {on|off}
enable {<passwd>|off}
config [TBD]
comm_mode {ascii|binary}
comm_prot <version>
inifile
plat
ini <var> <section>
debug <value>
set_wait {received|done}
wait {received|done}
set_timeout <timeout>
update {none|auto}
error
operator_display
operator_text
time
estop {on|off}
machine {on|off}
mode {manual|auto|mdi}
mist {on|off}
flood {on|off}
lube {on|off}
lube_level
spindle {forward|reverse|increase|decrease|constant|off}
brake {on|off}
tool
tool_offset
load_tool_table <file>
home {0|1|2|...} | -1
jog_stop joint_number|axis_letter
jog joint_number|axis_letter <speed>
jog_incr jog_number|axis_letter <speed> <incr>
feed_override <percent>
spindle_override <percent>
abs_cmd_pos [{0|1|...}]
abs_act_pos [{0|1|...}]
rel_cmd_pos [{0|1|...}]
rel_act_pos [{0|1|...}]
joint_pos [{0|1|...}]
pos_offset [{X|Y|Z|R|P|W}]
joint_limit [{0|1|...}]
joint_fault [{0|1|...}]
joint_homed [{0|1|...}]
mdi <string>
task_plan_init
open <filename>
run [<StartLine>]
pause
resume
abort
step
program
program_line
program_status
program_codes
joint_type [<joint>]
joint_units [<joint>]
program_units
program_linear_units
program_angular_units
user_linear_units
user_angular_units
display_linear_units
linear_unit_conversion {inch|mm|cm|auto}
angular_unit_conversion {deg|rad|grad|auto}
probe_clear
probe_tripped
probe_value
probe
teleop_enable [on|off]
kinematics_type
override_limits {on|off}
optional_stop {0|1}
Example Session
This section shows an example session to the local machine (localhost). Bold items are typed by you, non-bold is machine output. Default values are shown for --port PORT_NUMBER (5007), --conectpw PASSWORD (EMC), and --enablepw PASSWORD (EMCTOO).
The user connects to linuxcncrsh, handshakes with the server (hello), enables machine commanding from this session (set enable), brings the machine out of E-stop (set estop off) and turns it on (set machine on), homes all the axes, switches the machine to mdi mode, sends an MDI G-code command, then disconnects and shuts down LinuxCNC.
> telnet localhost 5007
Trying 127.0.0.1...
Connected to 127.0.0.1
Escape character is '^]'.
hello EMC user-typing-at-telnet 1.0
HELLO ACK EMCNETSVR 1.1
set enable EMCTOO
set enable EMCTOO
set mode manual
set mode manual
set estop off
set estop off
set machine on
set machine on
set home 0
set home 0
set home 1
set home 1
set home 2
set home 2
set mode mdi
set mode mdi
set mdi g0x1
set mdi g0x1
help
help
Available commands:
Hello <password> <client name> <protocol version>
Get <emc command>
Set <emc command>
Shutdown
Help <command>
help get
help get
Usage: Get <emc command>
Get commands require that a hello has been successfully negotiated.
Emc command may be one of:
Abs_act_pos
Abs_cmd_pos
...
shutdown
shutdown
Connection closed by foreign host.
| May 31, 2011 |