Skip to content

Commit

Permalink
Merge branch '2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-morley committed Jul 14, 2023
2 parents 39a082c + 3b119c4 commit 068001e
Show file tree
Hide file tree
Showing 29 changed files with 323 additions and 374 deletions.
2 changes: 1 addition & 1 deletion docs/man/man1/halshow.1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ LinuxCNC 2.9:
None known at this time.
.PP
.SH AUTHOR
Raymond E Henry
Raymond E. Henry
.SH REPORTING BUGS
Report bugs at https://github.com/LinuxCNC/linuxcnc/issues
.SH COPYRIGHT
Expand Down
20 changes: 7 additions & 13 deletions docs/src/code/adding-configs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@

= Adding Configuration Selection Items

Example Configurations can be added to the Configuration Selector
by two methods:
Example Configurations can be added to the Configuration Selector by two methods:

* Auxiliary applications -- Applications installed independently
with a deb package can place configuration subdirectories in
a specified system directory. The directory name is specified
using the shell linuxcnc_var script:
* Auxiliary applications -- Applications installed independently with a deb package can place configuration subdirectories in a specified system directory.
The directory name is specified using the shell linuxcnc_var script:
+
----
$ linuxcnc_var LINUXCNC_AUX_EXAMPLES
/usr/share/linuxcnc/aux_examples
----

* Runtime settings -- the configuration selector can also offer
configuration subdirectories specified at runtime using an
exported environamental variable (LINUXCNC_AUX_CONFIGS). This
variable should be a path list of one or more configuration
directories separated by a (:). Typically, this variable
would be set in a shell starting linuxcnc or in a user's
~/.profile startup script. Example:
* Runtime settings -- the configuration selector can also offer configuration subdirectories specified at runtime using an exported environamental variable (LINUXCNC_AUX_CONFIGS).
This variable should be a path list of one or more configuration directories separated by a (:).
Typically, this variable would be set in a shell starting `linuxcnc` or in a user's `~/.profile` startup script.
Example:
+
----
export LINUXCNC_AUX_CONFIGS=~/myconfigs:/opt/otherconfigs
Expand Down
8 changes: 4 additions & 4 deletions docs/src/common/linux-faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ Open the file with File > Open > Edit
=== Root Access

In Ubuntu you can become root by typing in "sudo -i" in a terminal
window then typing in your password. Be careful, because you can really
foul things up as root if you don't know what you're doing.
window then typing in your password. Be careful, because you can really
foul things up as root if you don't know what you're doing.

== Terminal Commands

Expand Down Expand Up @@ -183,7 +183,7 @@ cd linuxcnc/configs

=== Listing files in a directory

To view a list of all the files and subdirectories in the terminal window type:
To view a list of all the files and subdirectories in the terminal window type:

----
dir
Expand Down Expand Up @@ -213,7 +213,7 @@ Open a new terminal window and type:
pwd
----

And pwd might return the following result:
And pwd might return the following result:

----
/home/joe
Expand Down
4 changes: 2 additions & 2 deletions docs/src/config/ini-homing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Homing relies on some fundamental machine assumptions.
* Soft(ware) limits are inside the limit switch area.
* (Final) Homed Position is inside the soft limit area
* (If using switch based homing) the homing switch(es) either utilize the limit switches (shared home / limit switch),
or when using a separate home switch, are inside the limit switch area.
or when using a separate home switch, are inside the limit switch area.
* If using a separate homing switch, it is possible to start homing on the wrong side of the home switch,
which combined with HOME_IGNORE_LIMITS option will lead to a hard crash.
You can avoid this by making the home switch toggle its state when the trip dog is on a particular side until it returns passed the trip point again.
Expand All @@ -59,7 +59,7 @@ This example shows minimum and maximum limit switches with a separate home switc
.Demonstrative Separate Switch Layout
image::images/HomeAxisTravel_V2.png["Example Homing Switch layout",align="center"]

* A is the negative soft limit
* A is the negative soft limit
* B is the G53 machine coordinate Origin
* C is the home switch trip point
* D is the positive soft limit
Expand Down
74 changes: 31 additions & 43 deletions docs/src/config/iov2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

I/O control handles I/O tasks like coolant, toolchange and E-stop. The signals are turned on and off with G-code or in the case of E-stop in HAL.

I/O Control V2 adds more toolchanger support for communication with the
toolchanger.
I/O Control V2 adds more toolchanger support for communication with the toolchanger.

* LinuxCNC originated abort and toolchanger fault: iocontrol reliably abort a
change operation in progress (tool-change asserted). A toolchanger may at any
Expand All @@ -42,7 +41,7 @@ toolchanger.
Handshaking is optional and can be jumpered in HAL if not needed.

* Backwards compatibility: A toolchanger ignoring the iocontrol emc-abort line
and sticking to old handling will "continue to work" (subject to race condition)
and sticking to old handling will "continue to work" (subject to race condition)

If you have strict timing requirements or simply need more I/O, consider using
the realtime I/O provided by link:../man/man9/motion.9.html[motion] instead.
Expand All @@ -52,50 +51,39 @@ the realtime I/O provided by link:../man/man9/motion.9.html[motion] instead.
INI file options:

.[EMCIO] section
PROTOCOL_VERSION = 2 :: Defaults to 2. Setting to 1 will emulate old iocontrol behaviour.
PROTOCOL_VERSION = 2 :: Defaults to 2. Setting to 1 will emulate old iocontrol behaviour.

EMCIO = iov2 -support-start-change :: You need to explicitly enable the start-change protocol by adding the
EMCIO = iov2 -support-start-change :: You need to explicitly enable the start-change protocol by adding the
-support-start-change option; otherwise the start-change pin remains
low and start-change-ack is ignored. The reason for this is better
backwards compatibility.

.[TASK] section
IO_ERROR :: Printf-style template for operator error display (negative
toolchanger fault codes) . No quoting needed. Example: `IO_ERROR = Toolchanger
fault %d`. Default: toolchanger error %d.
IO_ERROR :: Printf-style template for operator error display (negative toolchanger fault codes).
No quoting needed. Example: `IO_ERROR = Toolchanger fault %d`. Default: toolchanger error %d.

.[EMC] section +
DEBUG :: To get a (quite detailed) trace, set either the RCS debugging flag
(0x00000200) to turn on RCS debugging messages all over LinuxCNC or use the
new iocontrol debugging bit (0x00001000) only for iov2 messages.
DEBUG :: To get a (quite detailed) trace,
set either the RCS debugging flag (0x00000200) to turn on RCS debugging messages all over LinuxCNC or use the new iocontrol debugging bit (0x00001000) only for iov2 messages.

== Pins

* 'iocontrol.0.coolant-flood' (bit, out) TRUE when flood coolant is requested.
* 'iocontrol.0.coolant-mist' (bit, out) TRUE when mist coolant is requested.
* 'iocontrol.0.emc-enable-in' (bit, in) Should be driven FALSE when an external
estop condition exists.
* 'iocontrol.0.lube' (bit, out) TRUE when lube is requested. This pin gets driven
TRUE when the controller comes out of E-stop, and when the "Lube On" command
gets sent to the controller. It gets driven FALSE when the controller goes
into E-stop, and when the "Lube Off" command gets sent to the controller.
* 'iocontrol.0.lube_level' (bit, in) Should be driven FALSE when lubrication tank
is empty.
* 'iocontrol.0.emc-enable-in' (bit, in) Should be driven FALSE when an external E-stop condition exists.
* 'iocontrol.0.lube' (bit, out) TRUE when lube is requested.
This pin gets driven TRUE when the controller comes out of E-stop, and when the "Lube On" command gets sent to the controller.
It gets driven FALSE when the controller goes into E-stop, and when the "Lube Off" command gets sent to the controller.
* 'iocontrol.0.lube_level' (bit, in) Should be driven FALSE when lubrication tank is empty.
* 'iocontrol.0.tool-change' (bit, out) TRUE when a tool change is requested
* 'iocontrol.0.tool-changed' (bit, in) Should be driven TRUE when a tool change is
completed.
* 'iocontrol.0.tool-changed' (bit, in) Should be driven TRUE when a tool change is completed.
* 'iocontrol.0.tool-number' (s32, out) Current tool number
* 'iocontrol.0.tool-prep-number' (s32, out) The number of the next tool, from the
RS274NGC T-word
* 'iocontrol.0.tool-prep-pocket' (s32, out) This is the pocket number (location in
the tool storage mechanism) of the tool requested by the most recent T-word.
* 'iocontrol.0.tool-prepare' (bit, out) TRUE when a Tn tool prepare is requested
* 'iocontrol.0.tool-prepared' (bit, in) Should be driven TRUE when a tool prepare
is completed.
* 'iocontrol.0.user-enable-out' (bit, out) FALSE when an internal estop condition
exists
* 'iocontrol.0.user-request-enable' (bit, out) TRUE when the user has requested
that estop be cleared
* 'iocontrol.0.tool-prep-number' (s32, out) The number of the next tool, from the RS274NGC T-word
* 'iocontrol.0.tool-prep-pocket' (s32, out) This is the pocket number (location in the tool storage mechanism) of the tool requested by the most recent T-word.
* 'iocontrol.0.tool-prepare' (bit, out) TRUE when a T__n__ tool prepare is requested.
* 'iocontrol.0.tool-prepared' (bit, in) Should be driven TRUE when a tool prepare is completed.
* 'iocontrol.0.user-enable-out' (bit, out) FALSE when an internal E-stop condition exists
* 'iocontrol.0.user-request-enable' (bit, out) TRUE when the user has requested that E-stop be cleared

Additional pins added by I/O Control V2

Expand All @@ -112,7 +100,7 @@ Additional pins added by I/O Control V2
before any spindle-off, quill-up, or move-to-toolchange-position operations
are executed.

* start-change-ack: (bit, in) acknowledgment line for start-change.
* start-change-ack: (bit, in) acknowledgment line for start-change.

* toolchanger-fault: (bit, in) toolchanger signals fault. This line is
contionuously monitored. A fault toggles a flag in iocontrol which is
Expand All @@ -126,20 +114,20 @@ Additional pins added by I/O Control V2
* toolchanger-reason: (S32, in) convey reason code for toolchanger-originated
fault to iov2. Usage: signal whether to continue or abort the program, plus UI
informational if negative. Read during toolchanger-fault TRUE. Non-zero values
will cause an Axis operator operator message or error message, see below.
will cause an Axis operator operator message or error message, see below.

* toolchanger-faulted: (bit, out) signals toolchanger-notify line has toggled and
toolchanger-reason-code was in the fault range. Next M6 will abort.

* toolchanger-clear-fault: (bit, in) resets TC fault condition. Deasserts
toolchanger-faulted if toolchanger-notify is line FALSE. Usage: UI - e.g.
clear fault condition button.
* toolchanger-clear-fault: (bit, in) resets TC fault condition.
Deasserts toolchanger-faulted if toolchanger-notify is line FALSE.
Usage: UI - e.g., clear fault condition button.

== Parameters

* iocontrol.0.tool-prep-index (s32, RO) IO's internal array index of the prepped
tool requested by the most recent T-word. 0 if no tool is prepped. On random
toolchanger machines this is tool's pocket number (ie, the same as the
toolchanger machines this is tool's pocket number (i.e., the same as the
tool-prep-pocket pin), on non-random toolchanger machines this is a small
integer corresponding to the tool's location in the internal representation of
the tool table. This parameter returns to 0 after a successful tool change M6.
Expand All @@ -153,7 +141,7 @@ done. If you do not need the abort handshake feature, jumper them as follows:

[source,{hal}]
----
net emc-abort-ack iocontrol.0.emc-abort iocontrol.0.emc-abort-ack
net emc-abort-ack iocontrol.0.emc-abort iocontrol.0.emc-abort-ack
----

The emc-reason pin is considered valid during emc-abort being TRUE.
Expand All @@ -169,7 +157,7 @@ The reason codes are as follows for LinuxCNC internally generated aborts
* EMC_ABORT_TASK_STATE_ESTOP = 6,
* EMC_ABORT_TASK_STATE_NOT_ON = 7,
* EMC_ABORT_TASK_ABORT = 8,
* EMC_ABORT_USER = 100
* EMC_ABORT_USER = 100

iov2 adds one more code, namely EMC_ABORT_BY_TOOLCHANGER_FAULT = 101 which is
signaled when an M6 aborts due to the toolchanger-faulted pin being TRUE.
Expand All @@ -188,9 +176,9 @@ The value of the toolchanger-reason pin is used as follows:
Parameter #5601 contains the value of the toolchanger-reason pin.
** toolchanger-reason = 0 : the program is aborted
** toolchanger-reason < 0 : the program is aborted and an operator error
message is displayed by using the IO_ERROR template.
message is displayed by using the IO_ERROR template.

The usage of the toolchanger-fault-ack pin is optional. It will become TRUE when
toolchanger-fault is raised and the toolchanger-reason pin has been read by iov2.
The usage of the toolchanger-fault-ack pin is optional.
It will become TRUE when toolchanger-fault is raised and the toolchanger-reason pin has been read by iov2.

// vim: set syntax=asciidoc:
2 changes: 1 addition & 1 deletion docs/src/drivers/mb2hal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Consider using MB2HAL if:
* You have more than one device to connect. MB2HAL is very efficiently managing multiple devices, transactions and links.
Currently I am monitoring two axis drivers using a Rs232 port, a VFD driver using another Rs232 port, and a remote I/O using TCP/IP.
* You want a protocol to connect your Arduino to HAL.
Look the included sample configuration file, sketch and library for Arduino Modbus.
Look the included sample configuration file, sketch and library for Arduino Modbus.

== Usage

Expand Down
10 changes: 5 additions & 5 deletions docs/src/examples/gs2-example.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ In the custom.hal file we place the following to connect LinuxCNC to the GS2 and
.GS2 Example
[source,{hal}]
----
# load the non-realtime component for the Automation Direct GS2 VFDs
# load the non-realtime component for the Automation Direct GS2 VFDs
loadusr -Wn spindle-vfd gs2_vfd -r 9600 -p none -s 2 -n spindle-vfd
# connect the spindle direction pin to the GS2
# connect the spindle direction pin to the GS2
net gs2-fwd spindle-vfd.spindle-fwd <= spindle.N.forward
# connect the spindle on pin to the GS2
# connect the spindle on pin to the GS2
net gs2-run spindle-vfd.spindle-on <= spindle.N.on
# connect the GS2 at speed to the motion at speed
# connect the GS2 at speed to the motion at speed
net gs2-at-speed spindle.N.at-speed <= spindle-vfd.at-speed
# connect the spindle RPM to the GS2
# connect the spindle RPM to the GS2
net gs2-RPM spindle-vfd.speed-command <= spindle.N.speed-out
----

Expand Down
52 changes: 18 additions & 34 deletions docs/src/gcode/g-code.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1833,61 +1833,45 @@ image::images/g76-threads_en.svg["G76 Threading",align="center"]

* 'Drive Line' - A line through the initial X position parallel to the Z.
* 'P-' - The 'thread pitch' in distance per revolution.
* 'Z-' - The final position of threads. At the end of the cycle the tool
will be at this Z position.
* 'Z-' - The final position of threads. At the end of the cycle the tool will be at this Z position.

[NOTE]
When G7 'Lathe Diameter Mode' is in force the values for 'I', 'J' and 'K'
are diameter measurements. When G8 'Lathe Radius Mode' is in force the
values for 'I', 'J' and 'K' are radius measurements.
When G7 'Lathe Diameter Mode' is in force the values for 'I', 'J' and 'K' are diameter measurements.
When G8 'Lathe Radius Mode' is in force the values for 'I', 'J' and 'K' are radius measurements.

* 'I-' - The 'thread peak' offset from the 'drive line'.
Negative 'I' values are external threads, and positive 'I' values are
internal threads.
Generally the material has been turned to this size before the 'G76'
cycle.
Negative 'I' values are external threads, and positive 'I' values are internal threads.
Generally the material has been turned to this size before the 'G76' cycle.
* 'J-' - A positive value specifying the 'initial cut depth'.
The first threading cut will be 'J' beyond the 'thread peak' position.
* 'K-' - A positive value specifying the 'full thread depth'.
The final threading cut will be 'K' beyond the 'thread peak' position.

Optional settings

* '$-' - The spindle number to which the motion will be synchronised
(default 0).
For example if $1 is programmed then the motion will begin on the
reset of spindle.1.index-enable and proceed in synchrony with the
value of spindle.1.revs
* 'R-' - The 'depth degression'. 'R1.0' selects constant depth on
successive threading passes. 'R2.0' selects constant area.
* '$-' - The spindle number to which the motion will be synchronised (default 0).
For example if $1 is programmed then the motion will begin on the reset of `spindle.1.index-enable` and proceed in synchrony with the value of `spindle.1.revs`.
* 'R-' - The 'depth degression'. 'R1.0' selects constant depth on successive threading passes. 'R2.0' selects constant area.
Values between 1.0 and 2.0 select decreasing depth but increasing area.
Values above 2.0 select decreasing area.
Beware that unnecessarily high degression values will cause a large
number of passes to be used. (degression = a descent by stages or
steps.)
Beware that unnecessarily high degression values will cause a large number of passes to be used.
(degression = a descent by stages or steps.)

[WARNING]
Unnecessarily high degression values will produce an unnecessarily high
number of passes. (degressing = dive in stages)

* 'Q-' - The 'compound slide angle' is the angle (in degrees) describing
to what extent successive passes should be offset along the drive line.
This is used to cause one side of the tool to remove more material than
the other. A positive 'Q' value causes the leading edge of the tool to
cut more heavily.
Typical values are 29, 29.5 or 30.
Unnecessarily high degression values will produce an unnecessarily high number of passes. (degressing = dive in stages)

* 'Q-' - The 'compound slide angle' is the angle (in degrees) describing to what extent successive passes should be offset along the drive line.
This is used to cause one side of the tool to remove more material than the other.
A positive 'Q' value causes the leading edge of the tool to cut more heavily. Typical values are 29, 29.5 or 30.
* 'H-' - The number of 'spring passes'.
Spring passes are additional passes at full thread depth.
If no additional passes are desired, program 'H0'.

Thread entries and exits can be programmed tapered with the 'E'
and 'L' values.
Thread entries and exits can be programmed tapered with the 'E' and 'L' values.

* 'E-' - Specifies the distance along the drive line used for the taper.
The angle of the taper will be so the last pass tapers to the thread
crest over the distance specified with E.
'E0.2' will give a taper for the first/last 0.2 length units along the
thread.
The angle of the taper will be so the last pass tapers to the thread crest over the distance specified with E.
'E0.2' will give a taper for the first/last 0.2 length units along the thread.
For a 45 degree taper program E the same as K.
* 'L-' - Specifies which ends of the thread get the taper.
Program 'L0' for no taper (the default), 'L1' for entry taper, 'L2'
Expand Down
3 changes: 2 additions & 1 deletion docs/src/gcode/o-code.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ they are defined. They may be called from other functions, and may call
themselves recursively if it makes sense to do so. The maximum
subroutine nesting level is 10.

Subroutines can change the value of parameters above #30 and those changes will be visible to the calling code. Subroutines may also change the value of <<gcode:named-parameters,global named parameters>> (i.e. parameters whose names begin with the underscore character "`_`");
Subroutines can change the value of parameters above #30 and those changes will be visible to the calling code.
Subroutines may also change the value of <<gcode:named-parameters,global named parameters>> (i.e. parameters whose names begin with the underscore character "`_`").

[[ocode:fanuc-style-programs]]
=== Fanuc-Style Numbered Programs(((Subroutines,M98,M99)))
Expand Down
Loading

0 comments on commit 068001e

Please sign in to comment.