summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDewey Garrett <dgarrett@panix.com>2014-04-03 17:12:32 -0700
committerDewey Garrett <dgarrett@panix.com>2014-04-04 10:53:45 -0700
commit115dee7259e996cbce36826d8b08ef6ba1411ee6 (patch)
tree1f8e955200b5677a69b53345da762925b26ed49b
parentb964ad545f5bd84943888d6f7ecbb8a942fd42db (diff)
downloadlinuxcnc-115dee7259e996cbce36826d8b08ef6ba1411ee6.tar.gz
linuxcnc-115dee7259e996cbce36826d8b08ef6ba1411ee6.zip
docs: updates for configs reorganization
+ restore common/starting-emc.txt to Master_Integrator.txt + update for configs/sim/axis/twopass/
-rw-r--r--docs/src/Master_Integrator.txt2
-rw-r--r--docs/src/common/starting-emc.txt49
-rw-r--r--docs/src/hal/haltcl_es.txt2
-rw-r--r--docs/src/hal/haltcl_fr.txt2
-rw-r--r--docs/src/remap/structure.txt37
5 files changed, 67 insertions, 25 deletions
diff --git a/docs/src/Master_Integrator.txt b/docs/src/Master_Integrator.txt
index f9cf77d77..6adbdfe58 100644
--- a/docs/src/Master_Integrator.txt
+++ b/docs/src/Master_Integrator.txt
@@ -28,6 +28,8 @@ include::common/Integrator_Concepts.txt[]
include::install/Latency_Test.txt[]
+include::common/starting-emc.txt[]
+
include::config/ini_config.txt[]
include::config/ini_homing.txt[]
diff --git a/docs/src/common/starting-emc.txt b/docs/src/common/starting-emc.txt
index ad09297ac..23cbaa386 100644
--- a/docs/src/common/starting-emc.txt
+++ b/docs/src/common/starting-emc.txt
@@ -116,13 +116,16 @@ and their names since when you add (or remove) a component, you
must find and update the single loadrt directive applicable to
the component.
-TWOPASS processing is enabled by including an ini file parameter:
+TWOPASS processing is enabled by including an ini file parameter in
+the [HAL] section:
----
-[HAL]TWOPASS=anything
+[HAL]
+
+TWOPASS = anystring
----
-Where "anything" can be any non-null string.
+Where "anystring" can be any non-null string.
With this setting, you can have multiple specifications like:
----
@@ -136,6 +139,19 @@ loadrt and2 names=ad
These commands can appear in different HALFILES. The HALFILES
are processed in the order of their appearance in the ini file.
+The TWOPASS option can be specified with options to add output for
+debugging (verbose) and to prevent deletion of temporary files (nodelete).
+The options are separated with commas.
+
+Example:
+
+----
+[HAL]
+
+TWOPASS = on,verbose,nodelete
+----
+
+
With TWOPASS processing, all [HAL]HALFILES are first read and
multiple appearances of loadrt directives for each module are
accumulated. No hal commands are executed in this initial pass.
@@ -183,5 +199,28 @@ with the comp utility, numerous other comps support the names=option.
Comps that support names= option include: at_pid, encoder,
encoder_ratio, pid, siggen, and sim_encoder.
-Examples of TWOPASS usage for a simulator are included in the
-configs/simtcl directory.
+Twopass processing occurs before the loading of a gui. When using a
+[HAL]POSTGUI_HALFILE, it is convenient to place all the loadrt
+statements for components needed in a halfile that is loaded earlier.
+
+Example of a HAL section when using a POSTGUI_HALFILE :
+----
+[HAL]
+
+TWOPASS = on
+HALFILE = core_sim.hal
+HALFILE = sim_spindle_encoder.hal
+HALFILE = axis_manualtoolchange.hal
+HALFILE = simulated_home.hal
+HALFILE = load_for_postgui.hal <-- loadrt lines for components in postgui.hal
+
+POSTGUI_HALFILE = postgui.hal
+HALUI = halui
+
+----
+
+Examples of TWOPASS usage for a simulator are included in the directories:
+
+ configs/sim/axis/twopass/
+
+ configs/sim/axis/simtcl/
diff --git a/docs/src/hal/haltcl_es.txt b/docs/src/hal/haltcl_es.txt
index 6fbe0bc28..44c286b9a 100644
--- a/docs/src/hal/haltcl_es.txt
+++ b/docs/src/hal/haltcl_es.txt
@@ -212,7 +212,7 @@ $ halrun -T haltclfile.tcl
== Haltcl Distribution Examples (sim)
-The configs/sim/simtcl directory includes an ini file that uses a .tcl file
+The configs/sim/axis/simtcl directory includes an ini file that uses a .tcl file
to demonstrate a haltcl configuration in conjunction with the usage of
twopass processing. The example shows the use of tcl procedures, looping, the
use of comments, and output to the terminal.
diff --git a/docs/src/hal/haltcl_fr.txt b/docs/src/hal/haltcl_fr.txt
index bb62ab742..211754022 100644
--- a/docs/src/hal/haltcl_fr.txt
+++ b/docs/src/hal/haltcl_fr.txt
@@ -209,7 +209,7 @@ $ halrun -T fichierhaltcl.tcl
== Exemples pour haltcl fournis avec la distribution (sim)
-Le répertoire _configs/sim/simtcl_ contient un fichier ini qui utilise un
+Le répertoire _configs/sim/axis/simtcl_ contient un fichier ini qui utilise un
fichier .tcl pour démontrer une configuration haltcl en conjonction avec
l'utilisation du processus "twopass". L'exemple montre l'utilisation des
procédures Tcl, les boucles, l'utilisation des commentaires avec sortie
diff --git a/docs/src/remap/structure.txt b/docs/src/remap/structure.txt
index 108a62315..b074be7b0 100644
--- a/docs/src/remap/structure.txt
+++ b/docs/src/remap/structure.txt
@@ -579,7 +579,7 @@ def involute(self, **words):
---------------------------------------------------------------------
The examples described so far can be found in
-'configs/sim/remap/getting-started' with complete working
+'configs/sim/axis/remap/getting-started' with complete working
configurations.
== Upgrading an existing configuration for remapping
@@ -607,7 +607,7 @@ file is `/home/user/xxx/xxx.ini`, execute the following commands.
$ cd /home/user/xxx
$ mkdir python
$ cd python
-$ cp /usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/python-stdglue/stdglue.py .
+$ cp /usr/share/linuxcnc/ncfiles/remap_lib/python-stdglue/stdglue.py .
$ echo 'from stdglue import *' >remap.py
$ echo 'import remap' >toplevel.py
---------------------------------------------------------------------
@@ -881,8 +881,8 @@ iocontrol pins need to be looped as well.
=== Writing the change and prepare O-word procedures
-The standard prologs epilogs found in
-`configs/sim/remap/python-stdglue/remap.py` pass a few 'exposed
+The standard prologs and epilogs found in
+`ncfiles/remap_lib/python-stdglue/stdglue.py` pass a few 'exposed
parameters' to the remap procedure.
An 'exposed parameter' is a named local variable visible in a remap
@@ -939,7 +939,7 @@ CAUTION: when redefining a builtin code, *do not specify any leading
zeroes in G- or M-codes* - for example, say `REMAP=M1 ..`, not
`REMAP=M01 ...`.
-See the `configs/sim/remap/extend-builtins` directory for a complete
+See the `configs/sim/axis/remap/extend-builtins` directory for a complete
configuration which is the recommded starting point for own work
when extending builtin codes.
@@ -1085,7 +1085,7 @@ which might be used for conditional cleanup.
Statements in that procedure typically would assure that post-abort
any state has been cleaned up, like HAL pins properly reset. For an
-example, see `configs/sim/remap/rack-toolchange`.
+example, see `configs/sim/axis/remap/rack-toolchange`.
Note that terminating a remapped code by returning INTERP_ERROR from
the epilog (see previous section) will also cause the `on_abort` procedure
@@ -1145,7 +1145,7 @@ spindle, mist and flood during an M0 or M1 program pause, and turn
these settings back on when the program is resumed.
For a complete example doing just that, see
-'configs/sim/remap/extend-builtins/', which adapts M1 as laid out above.
+'configs/sim/axis/remap/extend-builtins/', which adapts M1 as laid out above.
== Creating new G-code cycles [[remap:G-code-cycles]]
@@ -1189,7 +1189,7 @@ instance, the `G33.1` Rigid Tapping code does not behave as a
cycle. With such a wrapper, a new code can be easily created which
uses `G33.1` but behaves as a cycle.
-See 'configs/sim/remap/cycle' for a complete example of this
+See 'configs/sim/axis/remap/cycle' for a complete example of this
feature. It contains two cycles, one with an NGC procedure like above,
and a cycle example using just Python.
@@ -1330,8 +1330,9 @@ display purposes but nothing else), this can be tested for by
'self.task'>>.
An example use of `__init__` and `__delete__` can be found in
-'configs/sim/remap/cycle/python/toplevel.py' initialising attributes
-needed to handle cycles in 'configs/sim/remap/python-stdglue/stdglue.py'.
+'configs/sim/axis/remap/cycle/python/toplevel.py' initialising attributes
+needed to handle cycles in 'ncfiles/remap_lib/python-stdglue/stdglue.py'
+(and imported into 'configs/sim/axis/remap/cycle/python/remap.py').
=== Calling conventions: NGC to Python
@@ -1700,7 +1701,7 @@ advanced example, see `tests/remap/predefined-named-params`.
Since many remapping tasks are very similar, I've started collecting
working prolog and epilog routines in a single Python module. These
can currently be found in
-'configs/sim/remap/python-stdglue/stdglue.py' and provide the
+'ncfiles/remap_lib/python-stdglue/stdglue.py' and provide the
following routines:
=== T: +prepare_prolog+ and +prepare_epilog+
@@ -1933,7 +1934,7 @@ procedure from above:
image::images/debug_embedded_python.png[Debugging with Eclipse]
-See the Python code in `configs/sim/remap/getting-started/python` for details.
+See the Python code in `configs/sim/axis/remap/getting-started/python` for details.
== Axis Preview and Remapped code execution
[[cha:Axis-Preview-and-Remapped-code-execution]]
@@ -1969,7 +1970,7 @@ executes in preview or execution mode. This can be checked for by
testing the `#<_task>` <<sec:Predefined-Named-Parameters, predefined
named parameter>> - it will be 1 during actual execution and 0 during
preview. See
-'configs/sim/remap/manual-toolchange-with-tool-length-switch/nc_subroutines/manual_change.ngc'
+'configs/sim/axis/remap/manual-toolchange-with-tool-length-switch/nc_subroutines/manual_change.ngc'
for a complete usage example.
Within Embedded Python, the task instance can be checked for by
@@ -2404,7 +2405,7 @@ continue. (again, this 'wait' istn strictly necessary IMO)
==== Building the prolog and epilog for Tx
See the Python functions `prepare_prolog` and `prepare_epilog` in
-`configs/sim/remap/toolchange/python/toolchange.py`.
+`configs/sim/axis/remap/toolchange/python/toolchange.py`.
=== How M6 (Change tool) works
@@ -2474,7 +2475,7 @@ model and continues with readahead.
==== Building the prolog and epilog for M6
See the Python functions `change_prolog` and `change_epilog` in
-`configs/sim/remap/toolchange/python/toolchange.py`.
+`configs/sim/axis/remap/toolchange/python/toolchange.py`.
=== How M61 (Change tool number) works
M61 requires a non-negative `Q`parameter (tool number). If zero, this
@@ -2483,7 +2484,7 @@ means 'unload tool', else 'set current tool number to Q'.
==== Building the replacement for M61
An example Python redefinition for M61 can be found in the
`set_tool_number` function in
-`configs/sim/remap/toolchange/python/toolchange.py`.
+`configs/sim/axis/remap/toolchange/python/toolchange.py`.
== Optional Interpreter features: ini file configuration[[sub:ini-features]]
@@ -2643,7 +2644,7 @@ When compiling you might notice that interpmodule.cc takes very long
to compile, which is normal - the extensive use of C++ templates makes the
compiler breathe heavily.
-If you want to play with the configs/sim/remap/iocontrol-removed
+If you want to play with the configs/sim/axis/remap/iocontrol-removed
example, you need to install as follows:
apt-get unixODBC-dev libsqliteodbc sqlite3
@@ -2698,7 +2699,7 @@ platform trying to run gladevcp.
The workaround mentioned below was necessary up to commit
d21a488a9e82dd85aa17207b80e3d930afeff202 . References to
DISPLAY_LD_PRELOAD and TASK_LD_PRELOAD have been removed from the ini
-files under configs/sim/remap because they are not needed anymore.
+files under configs/sim/axis/remap because they are not needed anymore.
Configure now tests whether a workaround is required, and
automatically does 'the right thing' if needed.