Skip to content

Commit

Permalink
* move tokenizing into command functions (don't mix globals and funct…
Browse files Browse the repository at this point in the history
…ion parameters)

* rename pch -> s uniformly
* fix double-tokenize e.g. in setDebug()
* lots of cleanup for get/setSpindle(), get/setSpindleOverride() and get/setBrake()
* fixed segfault of "get spindle" without argument
* fixed snprintf() compiler warnings
* support multiple spindles
* make spindlenum the last input argument
* output NML errors after NML failures (untested)
* fix off-by-one in max-spindle test
* replace EMCMOT_MAX_SPINDLES with actual number of spindles
* add missing "zero input items parsed" check for sscanf()
* fix cppcheck warnings
* handle NML errors in setEstop()
* add "get update" command
* replace write() and sockWrite() with dprintf() where applicable
* eliminate sockWrite()
* fix all \n\r -> \r\n (remember "ReturN")
* pass string literals if there's no format string
* prefer using string literals
* use spindle 0 by default, not all spindles
* fix helptext
* handle errors in all send*() functions
* rename *_s -> *Str according to previous style
* fix missing argument documentation
* make getTeleopEnable() output ON/OFF instead of YES/NO according to setTeleopEnable() using checkOnOff(); fix help text
* rename set_wait -> wait_mode
* eliminate initMain()
* rename initSockets -> initSocket
* remove unneeded includes
* replace strncpy() with rtapi_strlcpy(); commenting
* use sizeof() to loop over array instead of last array element; prefer for over while
* introduce OUT() helper macro
* replace snprintf(context->outBuf,...) with OUT() macro; don't use string substitution excessively
* output TOOL_OFFSET as double
* make axisnumber() parse all possible notations
* treat set/getFeedOverride percent as double
* fix commandSet() returns
* rewrite getAbs/Rel*Pos, getJointPos, getPosOffset
* fix commandGet return values
* cleanup parseCommand
* formatting
* more error handling
* more error user feedback
* more input validation
* minor cleanups
  • Loading branch information
Daniel Hiepler authored and daniel committed Nov 15, 2023
1 parent 095f7f0 commit 7448d11
Show file tree
Hide file tree
Showing 4 changed files with 1,590 additions and 1,291 deletions.
31 changes: 17 additions & 14 deletions docs/man/man1/linuxcncrsh.1
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ With set, sends a command to the EMC to set the new debug level, and sets the EM
This will make the two values the same, since they really ought to be the same.
.RE
.P
\fBset_wait {received|done}\fR
\fBwait_mode {received|done}\fR
.RS
The set_wait setting controls the wait after receiving a command.
The wait_mode setting controls the wait after receiving a command.
It can be "received" (after the command was sent and received) or "done" (after the command was done).
With get, any parameter is ignored and the current set_wait setting is returned.
With set, set the set_wait setting to the specified value.
With get, any parameter is ignored and the current wait_mode setting is returned.
With set, set the wait_mode setting to the specified value.
.RE
.P
\fBwait {received|done}\fR
Expand Down Expand Up @@ -305,19 +305,21 @@ With get, ignores any parameters and returns the current flood coolant setting.
With set, sets the flood setting as specified.
.RE
.P
\fBspindle {forward|reverse|increase|decrease|constant|off}\fR
\fBspindle {forward|reverse|increase|decrease|constant|off} {<spindle>}\fR
.RS
With get, any parameter is ignored and the current spindle state is
returned as "forward", "reverse", "increase", "decrease", or "off".
With set, sets the spindle as specified.
Note that "increase" and "decrease" will cause a speed change in the corresponding direction
until a "constant" command is sent.
If "spindle" is omitted, spindle 0 is selected. If -1, all spindles are selected.
.RE
.P
\fBbrake {on|off}\fR
\fBbrake {on|off} {<spindle>}\fR
.RS
With get, any parameter is ignored and the current brake setting is returned.
With set, the brake is set as specified.
If "spindle" is omitted, spindle 0 is selected. If -1, all spindles are selected.
.RE
.P
\fBtool\fR
Expand All @@ -343,22 +345,22 @@ With set, homes the indicated joint or, if -1, homes all joints.
\fBjog_stop joint_number|axis_letter\fR
.RS
With set, stop any in-progress jog on the specified joint or axis.
If TELEOP_ENABLE is NO, use joint_number;
If TELEOP_ENABLE is YES, use axis_letter.
If TELEOP_ENABLE is OFF, use joint_number;
If TELEOP_ENABLE is ON, use axis_letter.
.RE
.P
\fBjog joint_number|axis_letter <speed>\fR
.RS
With set, jog the specified joint or axis at <speed>; sign of speed is direction.
If TELEOP_ENABLE is NO, use joint_number;
If TELEOP_ENABLE is YES, use axis_letter.
If TELEOP_ENABLE is OFF, use joint_number;
If TELEOP_ENABLE is ON, use axis_letter.
.RE
.P
\fBjog_incr jog_number|axis_letter <speed> <incr>\fR
.RS
With set, jog the indicated joint or axis by increment <incr> at the <speed>; sign of speed is direction.
If TELEOP_ENABLE is NO, use joint_number;
If TELEOP_ENABLE is YES, use axis_letter.
If TELEOP_ENABLE is OFF, use joint_number;
If TELEOP_ENABLE is ON, use axis_letter.
.RE
.P
\fBfeed_override <percent>\fR
Expand All @@ -367,10 +369,11 @@ With get, any parameter is ignored and the current feed override is returned (as
With set, sets the feed override as specified.
.RE
.P
\fBspindle_override <percent>\fR
\fBspindle_override <percent> {<spindle>}\fR
.RS
With get, any parameter is ignored and the current spindle override is returned (as a percentage of commanded speed).
With set, sets the spindle override as specified.
If "spindle" is omitted, spindle 0 is selected. If -1, all spindles are selected.
.RE
.P
\fBabs_cmd_pos [{0|1|...}]\fR
Expand Down Expand Up @@ -570,7 +573,7 @@ With get, return the probe state - has the probe tripped since the last clear?
With get, return the current value of the probe signal.
.RE
.P
\fBprobe\fR
\fBprobe <x> <y> <z>\fR
.RS
With set, move toward a certain location.
If the probe is tripped on the way stop motion, record the position and raise the probe tripped flag.
Expand Down
Loading

0 comments on commit 7448d11

Please sign in to comment.