diff --git a/debian/linuxcnc-doc-en.doc-base b/debian/linuxcnc-doc-en.doc-base index 62972f94a2..e06e5f828d 100644 --- a/debian/linuxcnc-doc-en.doc-base +++ b/debian/linuxcnc-doc-en.doc-base @@ -3,7 +3,8 @@ Title: LinuxCNC Documentation English Section: Science/Engineering Format: PDF -Files: /usr/share/doc/linuxcnc/LinuxCNC_Manual_Pages.pdf - /usr/share/doc/linuxcnc/LinuxCNC_Integrator.pdf - /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started.pdf +Files: /usr/share/doc/linuxcnc/LinuxCNC_Documentation.pdf + /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started.pdf + /usr/share/doc/linuxcnc/LinuxCNC_Integrator.pdf + /usr/share/doc/linuxcnc/LinuxCNC_Manual_Pages.pdf diff --git a/debian/linuxcnc-doc-es.doc-base b/debian/linuxcnc-doc-es.doc-base index 3d74ba800b..6aa86535fe 100644 --- a/debian/linuxcnc-doc-es.doc-base +++ b/debian/linuxcnc-doc-es.doc-base @@ -3,5 +3,6 @@ Title: LinuxCNC Documentation Spanish Section: Science/Engineering Format: PDF -Files: /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started_es.pdf +Files: /usr/share/doc/linuxcnc/LinuxCNC_Documentation_es.pdf + /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started_es.pdf diff --git a/debian/linuxcnc-doc-fr.doc-base b/debian/linuxcnc-doc-fr.doc-base index 8f619810ed..a4336e1621 100644 --- a/debian/linuxcnc-doc-fr.doc-base +++ b/debian/linuxcnc-doc-fr.doc-base @@ -3,7 +3,7 @@ Title: LinuxCNC Documentation French Section: Science/Engineering Format: PDF -Files: /usr/share/doc/linuxcnc/LinuxCNC_User_fr.pdf - /usr/share/doc/linuxcnc/LinuxCNC_Integrator_fr.pdf - /usr/share/doc/linuxcnc/LinuxCNC_HAL_fr.pdf +Files: + /usr/share/doc/linuxcnc/LinuxCNC_Documentation_fr.pdf /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started_fr.pdf + /usr/share/doc/linuxcnc/LinuxCNC_Integrator_fr.pdf diff --git a/debian/rules.in b/debian/rules.in index a6bd14d5e5..41dca12bcf 100644 --- a/debian/rules.in +++ b/debian/rules.in @@ -104,9 +104,8 @@ ifneq "$(enable_build_documentation)" "" # Only the English developer documentation goes to the -dev package mkdir -p debian/$(DEV_PACKAGE_NAME)/usr/share/doc/linuxcnc-dev mv -t debian/$(DEV_PACKAGE_NAME)/usr/share/doc/linuxcnc-dev/ $(DESTDIR)/usr/share/doc/linuxcnc/LinuxCNC_Developer.pdf - # The Spanish developer documentation goes to the spanish -doc package - mv -t debian/$(DEV_PACKAGE_NAME)/usr/share/doc/linuxcnc-dev/ $(DESTDIR)/usr/share/doc/linuxcnc/LinuxCNC_Developer_es.pdf - + # The translated developer documentation goes to the respective regular -doc package + mv -t debian/$(DEV_PACKAGE_NAME)/usr/share/doc/linuxcnc-dev/ $(DESTDIR)/usr/share/doc/linuxcnc/LinuxCNC_Developer_*.pdf for lang in zh_CN es fr; do \ p=$$(echo $$lang | tr _ - | tr A-Z a-z); \ d=debian/linuxcnc-doc-$$p/usr/share/doc/linuxcnc ; \ diff --git a/docs/src/Master_Developer_fr.adoc b/docs/src/Master_Developer_fr.adoc new file mode 100644 index 0000000000..1b3cc53019 --- /dev/null +++ b/docs/src/Master_Developer_fr.adoc @@ -0,0 +1,25 @@ +:lang: en +:lversion: {sys: cat ../VERSION} +:date: {sys: LANG=C date --date="@$(dpkg-parsechangelog --file ../debian/changelog -S timestamp)" '+%d %b %Y'} +:ascii-ids: +:masterdir: {indir} +:revdate: 2021-10-28 += Developer Manual V{lversion}, {date} +== Introduction + +image::common/images/emc2-intro.png[] + +include::common/overleaf_fr.adoc[] + +:leveloffset: 1 + +//include::code/code-notes_fr.adoc[] +//include::code/nml-messages_fr.adoc[] +//include::code/style-guide_fr.adoc[] +//include::code/building-linuxcnc_fr.adoc[] +//include::code/adding-configs_fr.adoc[] +//include::code/contributing-to-linuxcnc_fr.adoc[] +include::common/glossary_fr.adoc[] +include::common/gpld-copyright_fr.adoc[] + +// vim: set syntax=asciidoc: diff --git a/docs/src/Master_Documentation_es.adoc b/docs/src/Master_Documentation_es.adoc index 08e59ff3d5..291c56d981 100644 --- a/docs/src/Master_Documentation_es.adoc +++ b/docs/src/Master_Documentation_es.adoc @@ -70,12 +70,8 @@ include::gui/gmoccapy_es.adoc[] include::gui/ngcgui_es.adoc[] -include::gui/touchy_es.adoc[] - include::gui/gscreen_es.adoc[] -include::gui/tklinuxcnc_es.adoc[] - :leveloffset: 1 = Programacion diff --git a/docs/src/Master_Documentation_fr.adoc b/docs/src/Master_Documentation_fr.adoc new file mode 100644 index 0000000000..b34ea37f27 --- /dev/null +++ b/docs/src/Master_Documentation_fr.adoc @@ -0,0 +1,310 @@ +:lang: en +:lversion: {sys: cat ../VERSION} +:date: {sys: LANG=C date --date="@$(dpkg-parsechangelog --file ../debian/changelog -S timestamp)" '+%d %b %Y'} +LinuxCNC V{lversion}, {date} +============================ +:revdate: 2021-10-28 + += Contents + +:masterdir: {indir} + +:leveloffset: 0 + += About LinuxCNC + +:leveloffset: 1 + += Introduction + +image::common/images/emc2-intro.png[] + +include::common/overleaf.adoc[] + += LinuxCNC History + +include::common/emc-history.adoc[] + +:leveloffset: 0 + += Using LinuxCNC + +:leveloffset: 1 + += General Info + +:leveloffset: 2 + +include::user/user-foreword_fr.adoc[] + +include::user/user-intro_fr.adoc[] + +include::user/user-concepts_fr.adoc[] + +//include::user/starting-linuxcnc_fr.adoc[] + +include::gcode/machining-center_fr.adoc[] + +include::getting-started/running-linuxcnc_fr.adoc[] + +include::config/stepconf_fr.adoc[] + +include::config/pncconf_fr.adoc[] + +include::common/linux-faq_fr.adoc[] + +include::lathe/lathe-user_fr.adoc[] + +//include::plasma/plasma-cnc-primer_fr.adoc[] + +:leveloffset: 1 + + += User Interfaces + +:leveloffset: 2 + +include::gui/axis_fr.adoc[] + +//include::gui/gmoccapy_fr.adoc[] + +include::gui/ngcgui_fr.adoc[] + +include::gui/touchy_fr.adoc[] + +//include::gui/gscreen_fr.adoc[] + +include::gui/tklinuxcnc_fr.adoc[] + +//include::plasma/qtplasmac_fr.adoc[] + +:leveloffset: 1 + += Programming + +:leveloffset: 2 + +include::gcode/coordinates_fr.adoc[] + +include::gcode/overview_fr.adoc[] + +include::gcode/g-code_fr.adoc[] + +include::gcode/m-code_fr.adoc[] + +include::gcode/o-code_fr.adoc[] + +include::gcode/other-code_fr.adoc[] + +include::examples/gcode_fr.adoc[] + +include::gcode/rs274ngc_fr.adoc[] + +include::gui/image-to-gcode_fr.adoc[] + +:leveloffset: 1 + += Tool Compensation + +:leveloffset: 2 + +include::gcode/tool-compensation_fr.adoc[] + +include::gui/tooledit_fr.adoc[] + +:leveloffset: 0 + += Configuration + +:leveloffset: 1 + += General Info + +:leveloffset: 2 + +//include::config/integrator-concepts_fr.adoc[] + +include::install/latency-test_fr.adoc[] + +include::motion/tweaking-steppers_fr.adoc[] + +include::config/stepper-diagnostics_fr.adoc[] + +:leveloffset: 1 + += Configuration + +:leveloffset: 2 + +include::config/stepper-quickstart_fr.adoc[] + +include::config/ini-config_fr.adoc[] + +include::config/ini-homing_fr.adoc[] + +//include::config/iov2_fr.adoc[] + +include::config/lathe-config_fr.adoc[] + +include::hal/haltcl_fr.adoc[] + +//include::remap/remap_fr.adoc[] + +//include::config/moveoff_fr.adoc[] + +include::config/stepper_fr.adoc[] + +:leveloffset: 1 + += Control Panels + +:leveloffset: 2 + +include::gui/pyvcp_fr.adoc[] + +include::gui/pyvcp-examples_fr.adoc[] + +include::gui/gladevcp_fr.adoc[] + +:leveloffset: 1 + += User Interfaces + +:leveloffset: 2 + +//include::gui/panelui_fr.adoc[] + +//include::gui/halui_fr.adoc[] + +include::hal/halui-examples.adoc[] + +//include::config/python-interface_fr.adoc[] + +//include::gui/vismach_fr.adoc[] + +:leveloffset: 1 + += Drivers + +:leveloffset: 2 + +include::hal/parallel-port_fr.adoc[] + +include::drivers/ax5214h_fr.adoc[] + +include::drivers/gs2_fr.adoc[] + +include::drivers/hostmot2_fr.adoc[] + +include::drivers/motenc_fr.adoc[] + +//include::drivers/mb2hal_fr.adoc[] + +include::drivers/opto22_fr.adoc[] + +include::drivers/pico-ppmc_fr.adoc[] + +include::drivers/pluto-p_fr.adoc[] + +//include::drivers/pmx485_fr.adoc[] + +include::drivers/servo-to-go_fr.adoc[] + +//include::drivers/shuttle_fr.adoc[] + +//include::drivers/gm_fr.adoc[] + +//include::drivers/vfs11_fr.adoc[] + +:leveloffset: 1 + += Driver Examples + +:leveloffset: 2 + +include::examples/pci-parallel-port_fr.adoc[] + +include::examples/spindle_fr.adoc[] + +include::examples/mpg_fr.adoc[] + +include::examples/gs2-example_fr.adoc[] + +:leveloffset: 1 + += PLC + +:leveloffset: 2 + +include::ladder/ladder-intro_fr.adoc[] + +//include::ladder/classic-ladder_fr.adoc[] + +//include::ladder/ladder-examples_fr.adoc[] + +:leveloffset: 1 + += HAL + +:leveloffset: 2 + +include::hal/intro_fr.adoc[] + +include::hal/basic-hal_fr.adoc[] + +//include::hal/twopass_fr.adoc[] + +include::hal/tutorial_fr.adoc[] + +include::hal/general-ref_fr.adoc[] + +//include::config/core-components_fr.adoc[] + +//include::hal/canonical-devices_fr.adoc[] + +//include::hal/tools_fr.adoc[] + +include::hal/halshow_fr.adoc[] + +include::hal/components_fr.adoc[] + +include::hal/rtcomps_fr.adoc[] + +include::hal/hal-examples_fr.adoc[] + +include::hal/comp_fr.adoc[] + +include::hal/halmodule_fr.adoc[] + + +:leveloffset: 0 + += Advanced Topics + +:leveloffset: 1 + +include::motion/kinematics_fr.adoc[] + +//include::motion/dh-parameters_fr.adoc[] + +//include::motion/5-axis-kinematics_fr.adoc[] + +//include::motion/switchkins_fr.adoc[] + +include::motion/pid-theory_fr.adoc[] + +//include::motion/external-offsets_fr.adoc[] + +//include::tooldatabase/tooldatabase_fr.adoc[] + +//include::code/rs274_fr.adoc[] + +:leveloffset: 0 + +include::common/glossary_fr.adoc[] + +include::common/gpld-copyright_fr.adoc[] + +// = Index + +// vim: set syntax=asciidoc: diff --git a/docs/src/Master_HAL_fr.adoc b/docs/src/Master_HAL_fr.adoc deleted file mode 100644 index 050653da91..0000000000 --- a/docs/src/Master_HAL_fr.adoc +++ /dev/null @@ -1,37 +0,0 @@ -:lang: fr -:toc: -:ascii-ids: -:lversion: {sys: cat ../VERSION} -:date: {sys: LANG=C date --date="@$(dpkg-parsechangelog --file ../debian/changelog -S timestamp)" '+%d %b %Y'} -:revdate: 2021-10-28 -Manuel de HAL V{lversion}; {date} -================================= -:masterdir: {indir} -:leveloffset: 1 - -image::common/images/emc2-intro.*[] - -The LinuxCNC Team - -include::common/overleaf_fr.adoc[] - -include::common/outdated-notice_fr.adoc[] -:leveloffset: 0 -= HAL -:leveloffset: 1 -include::hal/intro_fr.adoc[] -include::hal/general-ref_fr.adoc[] -include::hal/basic-hal_fr.adoc[] -include::hal/tutorial_fr.adoc[] -include::hal/halshow_fr.adoc[] -include::hal/components_fr.adoc[] -include::hal/rtcomps_fr.adoc[] -include::hal/hal-examples_fr.adoc[] -include::hal/halui_fr.adoc[] -include::hal/comp_fr.adoc[] -include::hal/halmodule_fr.adoc[] - -// = Index - -// vim: set syntax=asciidoc: - diff --git a/docs/src/Master_Integrator_fr.adoc b/docs/src/Master_Integrator_fr.adoc index 67e40e5854..76b40686cd 100644 --- a/docs/src/Master_Integrator_fr.adoc +++ b/docs/src/Master_Integrator_fr.adoc @@ -45,8 +45,6 @@ include::motion/pid-theory_fr.adoc[] = La logique Ladder :leveloffset: 1 include::ladder/ladder-intro_fr.adoc[] -include::ladder/classic-ladder_fr.adoc[] -include::ladder/ladder-examples_fr.adoc[] :leveloffset: 0 = Exemples d'utilisation :leveloffset: 1 diff --git a/docs/src/Master_User_fr.adoc b/docs/src/Master_User_fr.adoc deleted file mode 100644 index 216773e6c1..0000000000 --- a/docs/src/Master_User_fr.adoc +++ /dev/null @@ -1,59 +0,0 @@ -:lang: fr -:toc: -:date: {sys: LANG=C date --date="@$(dpkg-parsechangelog --file ../debian/changelog -S timestamp)" '+%d %b %Y'} -:ascii-ids: -:lversion: {sys: cat ../VERSION} -:revdate: 2021-10-28 -Manuel de l'utilisateur V{lversion}, {date} -=========================================== - -[NOTE] -Cette documentation n'a pas été mise à jour depuis LinuxCNC version 2.5, -publiée en 2012. -C'est très dépassé. Veuillez utiliser la documentation en anglais. -Si vous souhaitez mettre à jour cette traduction, veuillez contacter -l'équipe LinuxCNC via le forum ou la liste de diffusion. - -:masterdir: {indir} -:leveloffset: 1 - -image::common/images/emc2-intro.*[] - -The LinuxCNC Team - -include::common/overleaf_fr.adoc[] - -include::common/outdated-notice_fr.adoc[] -include::user/user-foreword_fr.adoc[] -include::user/user-intro_fr.adoc[] -:leveloffset: 0 -= Les interfaces utilisateur -:leveloffset: 1 -include::gui/axis_fr.adoc[] -include::gui/ngcgui_fr.adoc[] -include::gui/touchy_fr.adoc[] -include::gui/tklinuxcnc_fr.adoc[] -:leveloffset: 0 - -= L'utilisation de LinuxCNC -:leveloffset: 1 -include::user/user-concepts_fr.adoc[] -include::gcode/machining-center_fr.adoc[] -include::gcode/coordinates_fr.adoc[] -include::gcode/tool-compensation_fr.adoc[] -include::gcode/overview_fr.adoc[] -include::gcode/g-code_fr.adoc[] -include::gcode/m-code_fr.adoc[] -include::gcode/o-code_fr.adoc[] -include::gcode/other-code_fr.adoc[] -include::examples/gcode_fr.adoc[] -include::lathe/lathe-user_fr.adoc[] -include::gcode/rs274ngc_fr.adoc[] -include::gui/image-to-gcode_fr.adoc[] -include::common/glossary_fr.adoc[] -include::common/gpld-copyright.adoc[] - -// = Index - -// vim: set syntax=asciidoc: - diff --git a/docs/src/Submakefile b/docs/src/Submakefile index 93bd6487ca..ad968cb21a 100644 --- a/docs/src/Submakefile +++ b/docs/src/Submakefile @@ -50,7 +50,7 @@ DOC_SRCS_EN := \ config/core-components.adoc \ config/ini-config.adoc \ config/ini-homing.adoc \ - config/iov2.adoc \ + config/iov2.adoc \ config/integrator-concepts.adoc \ config/lathe-config.adoc \ config/moveoff.adoc \ @@ -330,22 +330,22 @@ $(DOC_DIR)/LinuxCNC_Getting_Started_zh_CN.pdf:$(DOC_SRCDIR)/Master_Getting_Start @ln -f $< $@ $(DOC_DIR)/LinuxCNC_Getting_Started_fr.pdf: $(DOC_SRCDIR)/Master_Getting_Started_fr.pdf @ln -f $< $@ -$(DOC_DIR)/LinuxCNC_Documentation.pdf: $(DOC_SRCDIR)/Master_Documentation.pdf - @ln -f $< $@ $(DOC_DIR)/LinuxCNC_Integrator.pdf: $(DOC_SRCDIR)/Master_Integrator.pdf @ln -f $< $@ -$(DOC_DIR)/LinuxCNC_Documentation_es.pdf: $(DOC_SRCDIR)/Master_Documentation_es.pdf +$(DOC_DIR)/LinuxCNC_Integrator_fr.pdf: $(DOC_SRCDIR)/Master_Integrator_fr.pdf @ln -f $< $@ -$(DOC_DIR)/LinuxCNC_User_fr.pdf: $(DOC_SRCDIR)/Master_User_fr.pdf +$(DOC_DIR)/LinuxCNC_Documentation.pdf: $(DOC_SRCDIR)/Master_Documentation.pdf @ln -f $< $@ -$(DOC_DIR)/LinuxCNC_HAL_fr.pdf: $(DOC_SRCDIR)/Master_HAL_fr.pdf +$(DOC_DIR)/LinuxCNC_Documentation_es.pdf: $(DOC_SRCDIR)/Master_Documentation_es.pdf @ln -f $< $@ -$(DOC_DIR)/LinuxCNC_Integrator_fr.pdf: $(DOC_SRCDIR)/Master_Integrator_fr.pdf +$(DOC_DIR)/LinuxCNC_Documentation_fr.pdf: $(DOC_SRCDIR)/Master_Documentation_fr.pdf @ln -f $< $@ $(DOC_DIR)/LinuxCNC_Developer.pdf: $(DOC_SRCDIR)/Master_Developer.pdf @ln -f $< $@ $(DOC_DIR)/LinuxCNC_Developer_es.pdf: $(DOC_SRCDIR)/Master_Developer_es.pdf @ln -f $< $@ +$(DOC_DIR)/LinuxCNC_Developer_fr.pdf: $(DOC_SRCDIR)/Master_Developer_fr.pdf + @ln -f $< $@ $(DOC_DIR)/html/man/%.html: $(DOC_DIR)/man/% @echo Formatting $(notdir $<) as HTML @@ -576,13 +576,13 @@ docclean: -rm -f $(DOC_DIR)/LinuxCNC_Getting_Started_fr.pdf -rm -f $(DOC_DIR)/LinuxCNC_Getting_Started_zh_CN.pdf -rm -f $(DOC_DIR)/LinuxCNC_Documentation.pdf - -rm -f $(DOC_DIR)/LinuxCNC_Integrator.pdf -rm -f $(DOC_DIR)/LinuxCNC_Documentation_es.pdf - -rm -f $(DOC_DIR)/LinuxCNC_User_fr.pdf - -rm -f $(DOC_DIR)/LinuxCNC_HAL_fr.pdf + -rm -f $(DOC_DIR)/LinuxCNC_Documentation_fr.pdf + -rm -f $(DOC_DIR)/LinuxCNC_Integrator.pdf -rm -f $(DOC_DIR)/LinuxCNC_Integrator_fr.pdf -rm -f $(DOC_DIR)/LinuxCNC_Developer.pdf -rm -f $(DOC_DIR)/LinuxCNC_Developer_es.pdf + -rm -f $(DOC_DIR)/LinuxCNC_Developer_fr.pdf -rm -f $(DOC_DIR)/LinuxCNC_Manual_Pages.pdf -rm -f $(DOC_SRCDIR)/*.d -rm -f $(DOC_SRCDIR)/*.pdf diff --git a/docs/src/code/code-notes.adoc b/docs/src/code/code-notes.adoc index 363fb1aa93..2ee2b03b43 100644 --- a/docs/src/code/code-notes.adoc +++ b/docs/src/code/code-notes.adoc @@ -106,13 +106,10 @@ with modules -- shared objects for rtpreempt systems or kernel modules for some implementations (RTAI): * 'tpmod' - trajectory planning - * 'homemod' - homing functions - * 'motmod' - processes NML commands and controls hardware via hal - * 'kinematics module' - performs forward (joints-->coordinates) and -inverse (coordinates->joints) kinematics calculations + inverse (coordinates->joints) kinematics calculations LinuxCNC is started by a *linuxcnc* script which reads a configuration ini file and starts all needed processes. For @@ -147,37 +144,37 @@ The above figure shows five of the seven sets of position information that form the main data flow through the motion controller. The seven forms of position data are as follows: -. 'emcmotStatus\->carte_pos_cmd' - This is the desired position, in + * 'emcmotStatus\->carte_pos_cmd' - This is the desired position, in Cartesian coordinates. It is updated at the traj rate, not the servo rate. In coord mode, it is determined by the traj planner. In teleop mode, it is determined by the traj planner? In free mode, it is either copied from actualPos, or generated by applying forward kins to (2) or (3). -. 'emcmotStatus\->joints[n].coarse_pos' - This is the desired position, in + * 'emcmotStatus\->joints[n].coarse_pos' - This is the desired position, in joint coordinates, but before interpolation. It is updated at the traj rate, not the servo rate. In coord mode, it is generated by applying inverse kins to (1) In teleop mode, it is generated by applying inverse kins to (1) In free mode, it is copied from (3), I think. -. 'emcmotStatus\->joints[n].pos_cmd - This is the desired position, in + * 'emcmotStatus\->joints[n].pos_cmd - This is the desired position, in joint coords, after interpolation. A new set of these coords is generated every servo period. In coord mode, it is generated from (2) by the interpolator. In teleop mode, it is generated from (2) by the interpolator. In free mode, it is generated by the free mode traj planner. -. 'emcmotStatus\->joints[n].motor_pos_cmd' - This is the desired position, + * 'emcmotStatus\->joints[n].motor_pos_cmd' - This is the desired position, in motor coords. Motor coords are generated by adding backlash compensation, lead screw error compensation, and offset (for homing) to (3). It is generated the same way regardless of the mode, and is the output to the PID loop or other position loop. -. 'emcmotStatus\->joints[n].motor_pos_fb' - This is the actual position, in + * 'emcmotStatus\->joints[n].motor_pos_fb' - This is the actual position, in motor coords. It is the input from encoders or other feedback device (or from virtual encoders on open loop machines). It is "generated" by reading the feedback device. -. 'emcmotStatus\->joints[n].pos_fb' - This is the actual position, in joint + * 'emcmotStatus\->joints[n].pos_fb' - This is the actual position, in joint coordinates. It is generated by subtracting offset, lead screw error compensation, and backlash compensation from (5). It is generated the same way regardless of the operating mode. -. 'emcmotStatus\->carte_pos_fb' - This is the actual position, in Cartesian + * 'emcmotStatus\->carte_pos_fb' - This is the actual position, in Cartesian coordinates. It is updated at the traj rate, not the servo rate. Ideally, actualPos would always be calculated by applying forward kinematics to (6). However, forward kinematics may not be available, or @@ -746,20 +743,22 @@ iocontrol main loop process: nml message numbers: from emc.hh: -#define EMC_IO_INIT_TYPE ((NMLTYPE) 1601) + -#define EMC_TOOL_STAT_TYPE ((NMLTYPE) 1199) + -#define EMC_TOOL_INIT_TYPE ((NMLTYPE) 1101) + -#define EMC_TOOL_HALT_TYPE ((NMLTYPE) 1102) + -#define EMC_TOOL_ABORT_TYPE ((NMLTYPE) 1103) + -#define EMC_TOOL_PREPARE_TYPE ((NMLTYPE) 1104) + -#define EMC_TOOL_LOAD_TYPE ((NMLTYPE) 1105) + -#define EMC_TOOL_UNLOAD_TYPE ((NMLTYPE) 1106) + -#define EMC_TOOL_LOAD_TOOL_TABLE_TYPE ((NMLTYPE) 1107) + -#define EMC_TOOL_SET_OFFSET_TYPE ((NMLTYPE) 1108) + -#define EMC_TOOL_SET_NUMBER_TYPE ((NMLTYPE) 1109) + -// the following message is sent to io at the very start of an M6 + -// even before emccanon issues the move to toolchange position + -#define EMC_TOOL_START_CHANGE_TYPE ((NMLTYPE) 1110) + +---- +#define EMC_IO_INIT_TYPE ((NMLTYPE) 1601) +#define EMC_TOOL_STAT_TYPE ((NMLTYPE) 1199) +#define EMC_TOOL_INIT_TYPE ((NMLTYPE) 1101) +#define EMC_TOOL_HALT_TYPE ((NMLTYPE) 1102) +#define EMC_TOOL_ABORT_TYPE ((NMLTYPE) 1103) +#define EMC_TOOL_PREPARE_TYPE ((NMLTYPE) 1104) +#define EMC_TOOL_LOAD_TYPE ((NMLTYPE) 1105) +#define EMC_TOOL_UNLOAD_TYPE ((NMLTYPE) 1106) +#define EMC_TOOL_LOAD_TOOL_TABLE_TYPE ((NMLTYPE) 1107) +#define EMC_TOOL_SET_OFFSET_TYPE ((NMLTYPE) 1108) +#define EMC_TOOL_SET_NUMBER_TYPE ((NMLTYPE) 1109) +// the following message is sent to io at the very start of an M6 +// even before emccanon issues the move to toolchange position +#define EMC_TOOL_START_CHANGE_TYPE ((NMLTYPE) 1110) +---- == User Interfaces @@ -857,7 +856,6 @@ internal view of the buffer space. image::CMS_buffer.png[align="center"] .CMS buffer - The CMS base class is primarily responsible for creating the communications pathways and interfacing to the O.S. @@ -881,7 +879,6 @@ Buffers, and a second for Processes that connect to the buffers. The original NIST format of the buffer line is: * 'B name type host size neut RPC# buffer# max_procs key [type specific configs]' - * 'B' - identifies this line as a Buffer configuration. * 'name' - is the identifier of the buffer. * 'type' - describes the buffer type - SHMEM, LOCMEM, FILEMEM, PHANTOM, or GLOBMEM. @@ -1123,7 +1120,8 @@ Internal to LinuxCNC, on tool change the tool information is *copied* from the tool table's source pocket to pocket 0 (which represents the spindle), replacing whatever tool information was previously there. -NOTE: In LinuxCNC configured for nonrandom toolchanger, tool 0 (T0) has +[NOTE] +In LinuxCNC configured for nonrandom toolchanger, tool 0 (T0) has special meaning: "no tool". T0 may not appear in the tool table file, and changing to T0 will result in LinuxCNC thinking it's got an empty spindle. diff --git a/docs/src/code/code-notes_es.adoc b/docs/src/code/code-notes_es.adoc index 8e467cac8a..0957714c78 100644 --- a/docs/src/code/code-notes_es.adoc +++ b/docs/src/code/code-notes_es.adoc @@ -748,20 +748,22 @@ Proceso del bucle principal de iocontrol: números de mensaje nml: de emc.hh: -#define EMC_IO_INIT_TYPE ((NMLTYPE) 1601) + -#define EMC_TOOL_STAT_TYPE ((NMLTYPE) 1199) + -#define EMC_TOOL_INIT_TYPE ((NMLTYPE) 1101) + -#define EMC_TOOL_HALT_TYPE ((NMLTYPE) 1102) + -#define EMC_TOOL_ABORT_TYPE ((NMLTYPE) 1103) + -#define EMC_TOOL_PREPARE_TYPE ((NMLTYPE) 1104) + -#define EMC_TOOL_LOAD_TYPE ((NMLTYPE) 1105) + -#define EMC_TOOL_UNLOAD_TYPE ((NMLTYPE) 1106) + -#define EMC_TOOL_LOAD_TOOL_TABLE_TYPE ((NMLTYPE) 1107) + -#define EMC_TOOL_SET_OFFSET_TYPE ((NMLTYPE) 1108) + -#define EMC_TOOL_SET_NUMBER_TYPE ((NMLTYPE) 1109) + -// el siguiente mensaje se envía a io al comienzo de un M6 + -// incluso antes de que emccanon emita el movimiento a la posición de cambio de herramienta + -#define EMC_TOOL_START_CHANGE_TYPE ((NMLTYPE) 1110) + +---- +#define EMC_IO_INIT_TYPE ((NMLTYPE) 1601) +#define EMC_TOOL_STAT_TYPE ((NMLTYPE) 1199) +#define EMC_TOOL_INIT_TYPE ((NMLTYPE) 1101) +#define EMC_TOOL_HALT_TYPE ((NMLTYPE) 1102) +#define EMC_TOOL_ABORT_TYPE ((NMLTYPE) 1103) +#define EMC_TOOL_PREPARE_TYPE ((NMLTYPE) 1104) +#define EMC_TOOL_LOAD_TYPE ((NMLTYPE) 1105) +#define EMC_TOOL_UNLOAD_TYPE ((NMLTYPE) 1106) +#define EMC_TOOL_LOAD_TOOL_TABLE_TYPE ((NMLTYPE) 1107) +#define EMC_TOOL_SET_OFFSET_TYPE ((NMLTYPE) 1108) +#define EMC_TOOL_SET_NUMBER_TYPE ((NMLTYPE) 1109) +// el siguiente mensaje se envía a io al comienzo de un M6 +// incluso antes de que emccanon emita el movimiento a la posición de cambio de herramienta +#define EMC_TOOL_START_CHANGE_TYPE ((NMLTYPE) 1110) +---- == Interfaces de usuario @@ -856,7 +858,6 @@ vista interna del espacio del búfer. image::CMS_buffer.png[align="center"] .CMS buffer - La clase base de CMS es la principal responsable de crear las vías de comunicación e interfaz con el S.O. @@ -880,7 +881,6 @@ Buffers, y un segundo para Procesos que se conectan a los buffers. El formato NIST original de la línea de búfer es: * 'B nombre tipo host tamaño neut RPC# buffer# max_procs key [configuraciones específicas por tipo]' - * 'B'- identifica la línea como una configuración de búfer. * 'nombre'- es el identificador del búfer. * 'tipo'- describe el tipo de búfer: SHMEM, LOCMEM, FILEMEM, PHANTOM o GLOBMEM. @@ -1159,16 +1159,16 @@ La tabla de herramientas registra la siguiente información para cada herramient número de herramienta:: Un entero que identifica de forma exclusiva esta herramienta. Los números de herramienta son -manejados de manera diferente por LinuxCNC cuando se configuran cambiadores de herramientas no aleatorios -o aleatorios: +manejados de manera diferente por LinuxCNC cuando se configuran cambiadores de herramientas no +aleatorios o aleatorios: * Cuando LinuxCNC está configurado para un cambiador de herramientas no aleatorio, -el número debe ser positivo. T0 recibe un manejo especial y no está -permitido que aparezca en la tabla de herramientas. + el número debe ser positivo. T0 recibe un manejo especial y no está + permitido que aparezca en la tabla de herramientas. * Cuando LinuxCNC está configurado para un cambiador de herramientas aleatorio este número -debe ser positivo o cero. T0 está permitido en la tabla de herramientas y -generalmente se usa para representar "ninguna herramienta", es decir, ranura vacía. + debe ser positivo o cero. T0 está permitido en la tabla de herramientas y + generalmente se usa para representar "ninguna herramienta", es decir, ranura vacía. número de ranura:: @@ -1178,15 +1178,15 @@ de manera diferente por LinuxCNC cuando está configurado para cambiadores de he y no aleatorio: * Cuando LinuxCNC está configurado para un cambiador de herramientas no aleatorio, -el número de ranura en el archivo de herramientas puede ser cualquier número entero positivo (ranura -0 no está permitida). LinuxCNC compacta en silencio -los números de ranura cuando carga el archivo de herramienta, por lo que puede haber una diferencia -entre los números en el archivo de herramientas y los números internos de ranura utilizados -por LinuxCNC. + el número de ranura en el archivo de herramientas puede ser cualquier número entero positivo (ranura + 0 no está permitida). LinuxCNC compacta en silencio + los números de ranura cuando carga el archivo de herramienta, por lo que puede haber una diferencia + entre los números en el archivo de herramientas y los números internos de ranura utilizados + por LinuxCNC. * Cuando LinuxCNC está configurado para un cambiador de herramientas aleatorio, los números de ranura -en el archivo de herramientas deben estar entre 0 y 1000, ambos inclusive. -Las ranuras 1-1000 están en el cambiador de herramientas; la ranura 0 es el husillo. + en el archivo de herramientas deben estar entre 0 y 1000, ambos inclusive. + Las ranuras 1-1000 están en el cambiador de herramientas; la ranura 0 es el husillo. diámetro:: @@ -1202,7 +1202,6 @@ Los ejes que no tienen una TLO especificada, la rellenan con 0. Los gcodes que usan o afectan la información de la herramienta son: - ==== Txxx Le dice al hardware del cambiador de herramientas que se prepare para cambiar a una determinada @@ -1211,23 +1210,23 @@ herramienta +xxx+. Manejado por +Interp::convert_tool_select()+. . Se le pide a la máquina que se prepare para cambiar a la herramienta seleccionada -llamando a la función Canonica +SELECT_POCKET()+ con el número de ranura -de la herramienta solicitada. + llamando a la función Canonica +SELECT_POCKET()+ con el número de ranura + de la herramienta solicitada. .. (saicanon) No-op. .. (emccanon) Crea un mensaje +EMC_TOOL_PREPARE+ con el número de ranura solicitada -y lo envía a Task, que lo envía a IO. IO recibe el mensaje y le pide a HAL que prepare -la ranura configurando +iocontrol.0.tool-prep-pocket+, -+iocontrol.0.tool-prep-number+, y +iocontrol.0.tool-prepare+. -IO luego llama repetidamente a +read_tool_inputs()+ para sondear el pin HAL -+iocontrol.0.tool-ready+, que informa a IO, desde el hardware del cambiador de herramientas, -a través de HAL, que la preparación de la herramienta solicitada está completa. -Cuando ese pin se vuelve true, IO establece +emcioStatus.tool.pocketPrepped+ -con el número de ranura de la herramienta solicitada. + y lo envía a Task, que lo envía a IO. IO recibe el mensaje y le pide a HAL que prepare + la ranura configurando +iocontrol.0.tool-prep-pocket+, + +iocontrol.0.tool-prep-number+, y +iocontrol.0.tool-prepare+. + IO luego llama repetidamente a +read_tool_inputs()+ para sondear el pin HAL + +iocontrol.0.tool-ready+, que informa a IO, desde el hardware del cambiador de herramientas, + a través de HAL, que la preparación de la herramienta solicitada está completa. + Cuando ese pin se vuelve true, IO establece +emcioStatus.tool.pocketPrepped+ + con el número de ranura de la herramienta solicitada. . De vuelta a Interp, se le asigna a +settings->selected_pocket+ el número de ranura -de la herramienta solicitada _xxx_. + de la herramienta solicitada _xxx_. ==== M6 @@ -1237,39 +1236,33 @@ por el comando Txxx anterior). Manejado por +Interp::convert_tool_change()+. . Se le pide a la máquina que cambie a la herramienta seleccionada -llamando a la función Canónica +CHANGE_TOOL()+ con -+settings->selected_pocket+. - + llamando a la función Canónica +CHANGE_TOOL()+ con + +settings->selected_pocket+. .. (saicanon) Establece sai +_active_slot+ en el número de ranura pasado. -La información de la herramienta se copia de la ranura seleccionada -de la tabla de herramientas (es decir, de sai's +_tools[_active_slot]+) -al husillo (a sai +_tools[0]+). - + La información de la herramienta se copia de la ranura seleccionada + de la tabla de herramientas (es decir, de sai's +_tools[_active_slot]+) + al husillo (a sai +_tools[0]+). .. (emccanon) Envía un mensaje +EMC_TOOL_LOAD+ a Task, que -lo envía a IO. IO establece +emcioStatus.tool.toolInSpindle+ -al número de herramienta de la herramienta en el ranura identificado -por +emcioStatus.tool.pocketPrepped+ (establecido por +Txxx+ -alias +SELECT_POCKET()+). Luego solicita que el -cambiador de herramientas hardware realice un cambio de herramienta, configurando -el pin HAL +iocontrol.0.tool-change+ a True. Más tarde, -IO's +read_tool_inputs() + detectará que el pin HAL -+iocontrol.0.tool_changed+ se ha establecido en True, lo que indica que -toolchanger ha completado el cambio de herramienta. Cuando esto pasa, -llama a +load_tool()+ para actualizar el estado de la máquina. - + lo envía a IO. IO establece +emcioStatus.tool.toolInSpindle+ + al número de herramienta de la herramienta en el ranura identificado + por +emcioStatus.tool.pocketPrepped+ (establecido por +Txxx+ + alias +SELECT_POCKET()+). Luego solicita que el + cambiador de herramientas hardware realice un cambio de herramienta, configurando + el pin HAL +iocontrol.0.tool-change+ a True. Más tarde, + IO's +read_tool_inputs() + detectará que el pin HAL + +iocontrol.0.tool_changed+ se ha establecido en True, lo que indica que + toolchanger ha completado el cambio de herramienta. Cuando esto pasa, + llama a +load_tool()+ para actualizar el estado de la máquina. ... +load_tool()+ con un cambiador de herramientas no aleatorio, -copia la información de la herramienta de la ranura seleccionada -al husillo (ranura 0). - + copia la información de la herramienta de la ranura seleccionada + al husillo (ranura 0). ... +load_tool()+ con cambiador de herramientas aleatorio, -intercambia información entre el ranura 0 (el husillo) y la ranura seleccionada, -luego guarda la tabla de herramientas. - + intercambia información entre el ranura 0 (el husillo) y la ranura seleccionada, + luego guarda la tabla de herramientas. . De vuelta en interp, +settings->current_pocket+ se le asigna la nueva -herramienta desde +settings->selected_pocket+ (establecido por +Txxx+). Los parámetros numerados -relevantes (<selected_pocket+ (establecido por +Txxx+). Los parámetros numerados + relevantes (<task.toolOffset+ y los envía a Motion a través de -un comando +EMCMOT_SET_OFFSET+. Motion copia las compensaciones -a +emcmotStatus->tool_offset+, donde se usa para compensar -movimientos futuros - + offsets y lo envía a Task, que copia las compensaciones en + +emcStatus->task.toolOffset+ y los envía a Motion a través de + un comando +EMCMOT_SET_OFFSET+. Motion copia las compensaciones + a +emcmotStatus->tool_offset+, donde se usa para compensar + movimientos futuros . De vuelta en interp, los desplazamientos se registran en +settings->tool_offset+. -La ranura efectiva se registra en +settings->tool_offset_index+, -aunque este valor nunca se usa. - + La ranura efectiva se registra en +settings->tool_offset_index+, + aunque este valor nunca se usa. ==== G10 L1/L10/L11 @@ -1309,65 +1297,61 @@ Modifica la tabla de herramientas. Manejado por +Interp::convert_setup_tool()+. . Selecciona el número de herramienta de la palabra P en el bloque y encuentra la -ranura para esa herramienta: + ranura para esa herramienta: .. Con una configuración de cambiador de herramientas no aleatorio, este es siempre el -número de ranura en el cambiador de herramientas (incluso cuando la herramienta está en -el husillo). + número de ranura en el cambiador de herramientas (incluso cuando la herramienta está en + el husillo). .. Con una configuración de cambiador de herramientas aleatorio, si la herramienta está actualmente -cargada utiliza la ranura 0 (ranura 0 significa "el husillo"), -y si la herramienta no está cargada, usa el número de ranura en -el cambiador de herramientas. (Esta diferencia es importante). + cargada utiliza la ranura 0 (ranura 0 significa "el husillo"), + y si la herramienta no está cargada, usa el número de ranura en + el cambiador de herramientas. (Esta diferencia es importante). . Averigua cuáles deberían ser las nuevas compensaciones. . La nueva información de la herramienta (diámetro, desplazamientos, ángulos y orientación), -junto con el número de herramienta y el número de ranura, se pasan al Canon -llame a SET_TOOL_TABLE_ENTRY (). + junto con el número de herramienta y el número de ranura, se pasan al Canon + llame a SET_TOOL_TABLE_ENTRY (). .. (saicanon) Copie la información de la nueva herramienta en el ranura especificado -(en la tabla de herramientas interna de sai, + _tools +). + (en la tabla de herramientas interna de sai, + _tools +). .. (emccanon) Cree un mensaje + EMC_TOOL_SET_OFFSET + con el nuevo -información de la herramienta y enviarla a Tarea, que la pasa -a IO. IO actualiza el ranura especificado en su interno -copia de la tabla de herramientas (+ emcioStatus.tool.toolTable +), y -si la herramienta especificada está cargada actualmente (se compara con -+emcioStatus.tool.toolInSpindle+ ) luego la información de la nueva herramienta -se copia en el ranura 0 (el eje) también. (FIXME: eso es un -buglet, solo debe copiarse en máquinas no aleatorias). Finalmente IO -guarda la nueva tabla de herramientas. - + información de la herramienta y enviarla a Tarea, que la pasa + a IO. IO actualiza el ranura especificado en su interno + copia de la tabla de herramientas (+ emcioStatus.tool.toolTable +), y + si la herramienta especificada está cargada actualmente (se compara con + +emcioStatus.tool.toolInSpindle+ ) luego la información de la nueva herramienta + se copia en el ranura 0 (el eje) también. (FIXME: eso es un + buglet, solo debe copiarse en máquinas no aleatorias). Finalmente IO + guarda la nueva tabla de herramientas. . De vuelta en interp, si la herramienta modificada está cargada actualmente en el -husillo, y si la máquina es un cambiador de herramientas no aleatorio, entonces -la nueva información de la herramienta se copia del ranura de inicio de la herramienta -al ranura 0 (el huso) en la copia de interp de la tabla de herramientas, -+configuración-> tool_table+. (Esta copia no es necesaria en una herramienta aleatoria -máquinas de cambio porque allí, las herramientas no tienen un ranura en casa y -en su lugar, acabamos de actualizar la herramienta en el ranura 0 directamente). - + husillo, y si la máquina es un cambiador de herramientas no aleatorio, entonces + la nueva información de la herramienta se copia del ranura de inicio de la herramienta + al ranura 0 (el huso) en la copia de interp de la tabla de herramientas, + +configuración-> tool_table+. (Esta copia no es necesaria en una herramienta aleatoria + máquinas de cambio porque allí, las herramientas no tienen un ranura en casa y + en su lugar, acabamos de actualizar la herramienta en el ranura 0 directamente). . Los parámetros numerados relevantes -(<< sub: parámetros numerados, # 5400- # 5413 >>) se actualizan desde la herramienta -información en el huso (copiando la información de interp's -+configuración-> tool_table+ a +configuración-> parámetros+). (FIXME: esto es -un buglet, los params solo deberían actualizarse si era el actual -herramienta que fue modificada). - + (<< sub: parámetros numerados, # 5400- # 5413 >>) se actualizan desde la herramienta + información en el huso (copiando la información de interp's + +configuración-> tool_table+ a +configuración-> parámetros+). (FIXME: esto es + un buglet, los params solo deberían actualizarse si era el actual + herramienta que fue modificada). . Si la herramienta modificada está cargada actualmente en el -eje, y si la configuración es para un cambiador de herramientas no aleatorio, entonces el -la nueva información de herramienta también se escribe en el ranura 0 de la tabla de herramientas, -a través de una segunda llamada a SET_TOOL_TABLE_ENTRY (). (Esta segunda tabla de herramientas -la actualización no es necesaria en máquinas de cambio de herramientas aleatorias porque allí, -las herramientas no tienen un ranura de casa y en su lugar acabamos de actualizar la herramienta -en el ranura 0 directamente.) - + eje, y si la configuración es para un cambiador de herramientas no aleatorio, entonces el + la nueva información de herramienta también se escribe en el ranura 0 de la tabla de herramientas, + a través de una segunda llamada a SET_TOOL_TABLE_ENTRY (). (Esta segunda tabla de herramientas + la actualización no es necesaria en máquinas de cambio de herramientas aleatorias porque allí, + las herramientas no tienen un ranura de casa y en su lugar acabamos de actualizar la herramienta + en el ranura 0 directamente.) ==== M61 Establecer el número de herramienta actual. Esto cambia la representación interna de LinuxCNC -de qué herramienta está en el eje, sin mover realmente el cambiador de herramientas -o intercambiando cualquier herramienta. +de qué herramienta está en el eje, sin mover realmente el cambiador de herramientas o +intercambiando cualquier herramienta. Manejado por + Interp :: convert_tool_change () +. @@ -1376,7 +1360,6 @@ Canon: + CHANGE_TOOL_NUMBER () + settings-> current_pocket tiene asignado el número de ranura actualmente sosteniendo la herramienta especificada por el argumento Q-word. - ==== G41 / G41.1 / G42 / G42.1 Habilite la compensación del radio de corte (generalmente se llama _cutter comp_). @@ -1388,7 +1371,6 @@ tabla de la manera esperada: si se proporciona un número de herramienta D-word arriba el número de ranura del número de herramienta especificado en la tabla, y si no se suministra ninguna palabra D, utiliza la cavidad 0 (el eje). - ==== G40 Cancele la compensación del radio de corte. @@ -1431,7 +1413,6 @@ son los ranuras en el cambiador de herramientas. Esta es una copia completa de la información de la herramienta, mantenida por separado de la de Interp +settings.tool_table+. - ==== interp +settings+ es de tipo +settings+, que es +struct setup_struct+. @@ -1481,10 +1462,10 @@ Esta es una variable + EmcPose +. * Se utiliza para calcular la posición en varios lugares. * Enviado a Motion a través del mensaje +EMCMOT_SET_OFFSET+. -Todo el movimiento que se hace con los desplazamientos es exportarlos a los pines HAL -+motion.0.tooloffset. [xyzabcuvw]+. FIXME: exportarlos desde -algún lugar más cercano a la mesa de herramientas (io o interp, probablemente) -y elimine el mensaje EMCMOT_SET_OFFSET. + Todo el movimiento que se hace con los desplazamientos es exportarlos a los pines HAL + +motion.0.tooloffset. [xyzabcuvw]+. FIXME: exportarlos desde + algún lugar más cercano a la mesa de herramientas (io o interp, probablemente) + y elimine el mensaje EMCMOT_SET_OFFSET. settings.pockets_max :: diff --git a/docs/src/code/contributing-to-linuxcnc.adoc b/docs/src/code/contributing-to-linuxcnc.adoc index 3886c8975a..7cc63b9d64 100644 --- a/docs/src/code/contributing-to-linuxcnc.adoc +++ b/docs/src/code/contributing-to-linuxcnc.adoc @@ -11,22 +11,18 @@ and documentation updates to the LinuxCNC project. Throughout this document, "source" means both the source code to the programs and libraries, and the source text for the documentation. - == Communication among LinuxCNC developers The two main ways that project developers communicate with each other are: * Via IRC, at irc://irc.libera.chat/%23linuxcnc-devel[#linuxcnc-devel on Libera.chat]. - * Via email, on the developers' mailing list: https://lists.sourceforge.net/lists/listinfo/emc-developers - == The LinuxCNC Source Forge project We use Source Forge for mailing lists: http://sourceforge.net/p/emc/mailman/ - == The git Revision Control System All of the LinuxCNC source is maintained in the revision control system @@ -38,7 +34,9 @@ The official LinuxCNC git repo is at http://github.com/linuxcnc/linuxcnc/ Anyone can get a read-only copy of the LinuxCNC source tree via git: -`git clone https://github.com/linuxcnc/linuxcnc linuxcnc-dev` +---- +git clone https://github.com/linuxcnc/linuxcnc linuxcnc-dev +---- If you are a developer with push access, then follow github's instructions for setting up a repository that you can push from. @@ -74,7 +72,6 @@ features (specifically well isolated device drivers and documentation) may (at the discretion of the stable branch release managers) go into a stable branch and get merged up just like bugfixes do. - === git tutorials There are many excellent, free git tutorials on the internet. @@ -86,13 +83,10 @@ follow-on documentation are also available online here: * git tutorial: https://www.kernel.org/pub/software/scm/git/docs/gittutorial.html - * git tutorial 2: https://www.kernel.org/pub/software/scm/git/docs/gittutorial-2.html - * Everyday git with 20 commands or so: https://www.kernel.org/pub/software/scm/git/docs/giteveryday.html - * Git User's Manual: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html @@ -102,7 +96,6 @@ http://git-scm.com/book Another online tutorial that has been recommended is "Git for the Lazy": http://wiki.spheredev.org/Git_for_the_lazy - == Overview of the process The high-level overview of how to contribute changes to the source goes @@ -110,35 +103,24 @@ like this: * Communicate with the project developers and let us know what you're hacking on - * Clone the git repo - * Make your changes in a local branch, making sure you "sign off" your commits according to our signed-off-by policy (see below). - * Adding documentation and tests is an important part of adding a new feature. Otherwise, others won't know how to use your feature, and if other changes break your feature it can go unnoticed without a test. - * Share your changes with the other project developers in one of these ways: - ** Push your branch to github and create a github pull request to https://github.com/linuxcnc/linuxcnc (this requires a github account) - ** Push your branch to a publicly visible git repo (such as github, bitbucket, your own publicly-accessible server, etc) and share that location on the emc-developers mailing list, or - ** Email your commits to the emc-developers mailing list (use `git format-patch` to create the patches) - * Advocate for your patch - ** Explain what problem it addresses and why it should be included in LinuxCNC - ** Be receptive to questions and feedback from the developer community. - ** It is not uncommon for a patch to go through several revisions before it is accepted. @@ -149,9 +131,10 @@ In order to be considered for inclusion in the LinuxCNC source, commits must have correct Author fields identifying the author of the commit. A good way to ensure this is to set your global git config: -`git config --global user.name "Your full name"` - -`git config --global user.email "you@example.com"` +---- +git config --global user.name "Your full name" +git config --global user.email "you@example.com" +---- Use your real name (not a handle), and use an unobfuscated e-mail address. @@ -172,11 +155,13 @@ Use the first line as a summary of the intent of the change (almost like the subject line of an e-mail). Follow it with a blank line, then a longer message explaining the change. Example: - Get rid of RTAPI_SUCCESS, use 0 instead +---- +Get rid of RTAPI_SUCCESS, use 0 instead - The test "retval < 0" should feel familiar; it's the same kind of - test you use in userspace (returns -1 for error) and in kernel space - (returns -ERRNO for error) +The test "retval < 0" should feel familiar; it's the same kind of +test you use in userspace (returns -1 for error) and in kernel space +(returns -ERRNO for error) +---- === Commit to the proper branch @@ -296,8 +281,7 @@ There are many ways to contribute to LinuxCNC, that are not addressed by this document. These ways include: * Answering questions on the forum, mailing lists, and in IRC - * Reporting bugs on the bug tracker, forum, mailing lists, or in IRC - * Helping test experimental features +// vim: set syntax=asciidoc: diff --git a/docs/src/code/contributing-to-linuxcnc_es.adoc b/docs/src/code/contributing-to-linuxcnc_es.adoc index b801ad3732..258977f5f2 100644 --- a/docs/src/code/contributing-to-linuxcnc_es.adoc +++ b/docs/src/code/contributing-to-linuxcnc_es.adoc @@ -8,22 +8,18 @@ Este documento contiene información para desarrolladores sobre la infraestruct En este documento, "fuente" significa tanto el código fuente de programas y bibliotecas, como el texto fuente para la documentación. - == Comunicación entre desarrolladores de LinuxCNC Las dos formas principales en que los desarrolladores de proyectos se comunican entre sí son: * Vía IRC, en #linuxcnc-devel en FreeNode. - * Por correo electrónico, en la lista de correo de los desarrolladores: https://lists.sourceforge.net/lists/listinfo/emc-developers - == El proyecto LinuxCNC Source Forge Utilizamos Source Forge para las listas de correo: http://sourceforge.net/p/emc/mailman/ - == El Sistema de Control de Revisiones git Todas las fuentes LinuxCNC se mantiene en el sistema de control de revisión git @@ -35,7 +31,9 @@ El repositorio oficial git de LinuxCNC está en https://github.com/linuxcnc/linu Cualquiera puede obtener una copia de solo lectura del árbol fuente LinuxCNC a través de git: -`git clone https://github.com/linuxcnc/linuxcnc linuxcnc-dev` +---- +git clone https://github.com/linuxcnc/linuxcnc linuxcnc-dev +---- Si usted es un desarrollador con acceso push, entonces siga las instrucciones de github para configurar un repositorio desde el que pueda hacer push. @@ -73,13 +71,10 @@ documentación de seguimiento también está disponible en línea aquí: * tutorial de git: https://www.kernel.org/pub/software/scm/git/docs/gittutorial.html - * tutorial git 2: https://www.kernel.org/pub/software/scm/git/docs/gittutorial-2.html - * Everyday git with 20 commands or so: https://www.kernel.org/pub/software/scm/git/docs/giteveryday.html - * Manual del usuario de Git: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html @@ -90,7 +85,6 @@ http://git-scm.com/book donde hay versiones en varios idiomas, incluido Español Otro tutorial en línea que se ha recomendado es "Git for the Lazy": http://wiki.spheredev.org/Git_for_the_lazy - == Descripción general del proceso La descripción general de alto nivel de cómo contribuir con cambios a la fuente es @@ -98,50 +92,38 @@ la siguiente: * Comunicarse con los desarrolladores del proyecto e informarles en que está trabajando. - * Clonar el repositorio git - * Realizar sus cambios en una rama local, asegurándose de "cerrar" sus commits de acuerdo con nuestra política de aprobación (ver más abajo). - * Agregar documentación y pruebas es una parte importante al agregar una nueva característica. De lo contrario, otros no sabrán cómo usar su función, y si otros cambios corrompen su función, puede pasar desapercibidos sin una prueba. - * Comparta sus cambios con los otros desarrolladores de proyectos de una de estas maneras: - ** Haga push de su rama a github y cree una solicitud de extracción pull de github a https://github.com/linuxcnc/linuxcnc (esto requiere una cuenta github) - ** Haga push de su rama a un repositorio de git visible públicamente (como github, bitbucket, su propio servidor de acceso público, etc.) y comparta su ubicación en la lista de correo de emc-developers, o - ** Envíe sus confirmaciones por correo electrónico a la lista de correo de emc-developers (use `git format-patch` para crear parches) - * Defienda su parche - ** Explique qué problema aborda y por qué debería incluirse en LinuxCNC - ** Sea receptivo a las preguntas y comentarios de la comunidad de desarrolladores. - ** No es raro que un parche pase por varias revisiones antes de ser aceptado - == Configuración de git Para ser considerada la inclusión en las fuentes de LinuxCNC, los commits deben tener campos de Autor correctos que identifiquen al autor del commit. Una buena manera de garantizar esto es establecer su configuración global de git: -`git config --global user.name "Su nombre completo"` - -`git config --global user.email "SuCorreo@example.com"` +---- +git config --global user.name "Su nombre completo" +git config --global user.email "SuCorreo@example.com" +---- Use su nombre real (no un identificador) y una dirección de correo electrónico clara. - == Uso efectivo de git === Contenidos de Commits @@ -154,11 +136,13 @@ Mantenga los mensajes de commits alrededor de 72 columnas de ancho (de modo que Use la primera línea como un resumen de la intención del cambio (casi como la línea de asunto de un correo electrónico). Sígalo con una línea en blanco, y luego un mensaje más largo explicando el cambio. Ejemplo: - Deshacerse de RTAPI_SUCCESS, usar 0 en su lugar +---- +Deshacerse de RTAPI_SUCCESS, usar 0 en su lugar - La prueba "retval < 0" debería ser familiar; es el mismo tipo de - prueba que se utiliza en el espacio de usuario (devuelve -1 para error) y - en el espacio de kernel (devuelve -ERRNO para error) +La prueba "retval < 0" debería ser familiar; es el mismo tipo de +prueba que se utiliza en el espacio de usuario (devuelve -1 para error) y +en el espacio de kernel (devuelve -ERRNO para error) +---- === Commit a la rama adecuada @@ -221,9 +205,7 @@ Utilice `git pull --rebase` en lugar de` git pull` para mantener un buen histori Hay muchas formas de contribuir a LinuxCNC, que no se abordan en este documento. Estas formas incluyen: * Responder preguntas en el foro, listas de correo y en IRC - * Informar errores en el seguidor de errores, foro, listas de correo o en IRC - * Ayudando a probar características experimentales // vim: set syntax=asciidoc: diff --git a/docs/src/code/rs274_es.adoc b/docs/src/code/rs274_es.adoc index 10c8282d28..f6566d0338 100644 --- a/docs/src/code/rs274_es.adoc +++ b/docs/src/code/rs274_es.adoc @@ -1,6 +1,6 @@ :lang: es -[[cha:rs274]] +[[cha:rs274]] = Intérprete independiente El intérprete autónomo rs274 está disponible para su uso a través de la línea de comandos. diff --git a/docs/src/getting-started/images/pncconf-advanced_fr.png b/docs/src/config/images/pncconf-advanced_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-advanced_fr.png rename to docs/src/config/images/pncconf-advanced_fr.png diff --git a/docs/src/getting-started/images/pncconf-axis-config_fr.png b/docs/src/config/images/pncconf-axis-config_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-axis-config_fr.png rename to docs/src/config/images/pncconf-axis-config_fr.png diff --git a/docs/src/getting-started/images/pncconf-axis-drive_fr.png b/docs/src/config/images/pncconf-axis-drive_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-axis-drive_fr.png rename to docs/src/config/images/pncconf-axis-drive_fr.png diff --git a/docs/src/getting-started/images/pncconf-basic_fr.png b/docs/src/config/images/pncconf-basic_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-basic_fr.png rename to docs/src/config/images/pncconf-basic_fr.png diff --git a/docs/src/getting-started/images/pncconf-diagram-lathe_fr.png b/docs/src/config/images/pncconf-diagram-lathe_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-diagram-lathe_fr.png rename to docs/src/config/images/pncconf-diagram-lathe_fr.png diff --git a/docs/src/getting-started/images/pncconf-external_fr.png b/docs/src/config/images/pncconf-external_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-external_fr.png rename to docs/src/config/images/pncconf-external_fr.png diff --git a/docs/src/getting-started/images/pncconf-file_fr.png b/docs/src/config/images/pncconf-file_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-file_fr.png rename to docs/src/config/images/pncconf-file_fr.png diff --git a/docs/src/getting-started/images/pncconf-gui_fr.png b/docs/src/config/images/pncconf-gui_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-gui_fr.png rename to docs/src/config/images/pncconf-gui_fr.png diff --git a/docs/src/getting-started/images/pncconf-hal_fr.png b/docs/src/config/images/pncconf-hal_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-hal_fr.png rename to docs/src/config/images/pncconf-hal_fr.png diff --git a/docs/src/getting-started/images/pncconf-mesa-config_fr.png b/docs/src/config/images/pncconf-mesa-config_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-mesa-config_fr.png rename to docs/src/config/images/pncconf-mesa-config_fr.png diff --git a/docs/src/getting-started/images/pncconf-mesa-io2_fr.png b/docs/src/config/images/pncconf-mesa-io2_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-mesa-io2_fr.png rename to docs/src/config/images/pncconf-mesa-io2_fr.png diff --git a/docs/src/getting-started/images/pncconf-mesa-io3_fr.png b/docs/src/config/images/pncconf-mesa-io3_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-mesa-io3_fr.png rename to docs/src/config/images/pncconf-mesa-io3_fr.png diff --git a/docs/src/getting-started/images/pncconf-mesa-io4_fr.png b/docs/src/config/images/pncconf-mesa-io4_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-mesa-io4_fr.png rename to docs/src/config/images/pncconf-mesa-io4_fr.png diff --git a/docs/src/getting-started/images/pncconf-parport_fr.png b/docs/src/config/images/pncconf-parport_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-parport_fr.png rename to docs/src/config/images/pncconf-parport_fr.png diff --git a/docs/src/getting-started/images/pncconf-scale-calc_fr.png b/docs/src/config/images/pncconf-scale-calc_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-scale-calc_fr.png rename to docs/src/config/images/pncconf-scale-calc_fr.png diff --git a/docs/src/getting-started/images/pncconf-spindle-config_fr.png b/docs/src/config/images/pncconf-spindle-config_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-spindle-config_fr.png rename to docs/src/config/images/pncconf-spindle-config_fr.png diff --git a/docs/src/getting-started/images/pncconf-splash_fr.png b/docs/src/config/images/pncconf-splash_fr.png similarity index 100% rename from docs/src/getting-started/images/pncconf-splash_fr.png rename to docs/src/config/images/pncconf-splash_fr.png diff --git a/docs/src/config/ini-config_es.adoc b/docs/src/config/ini-config_es.adoc index 2211c95bf1..3fb4b3a41e 100644 --- a/docs/src/config/ini-config_es.adoc +++ b/docs/src/config/ini-config_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:ini-configuration]] - = Configuración INI == Los Componentes del Archivo INI @@ -15,9 +14,7 @@ Un archivo INI típico sigue un diseño bastante simple, que incluye; Cada uno de estos elementos está separado en líneas simples. Cada final de línea o el carácter de nueva línea crea un nuevo elemento. -(((INI File, Comments))) - -=== Comentarios +=== Comentarios(((INI File, Comments))) Una línea de comentario se inicia con un ";" o una marca "#". Cuando el lector ini ve cualquiera de estas marcas al comienzo de una línea, el resto de la línea es @@ -322,111 +319,91 @@ las opciones son compatibles con todas las interfaces de usuario. Consulte el documento <> para obtener detalles sobre AXIS. Consulte el documento <> para obtener detalles sobre Gmoccapy. -* 'DEFAULT_LINEAR_VELOCITY = .25' - La velocidad predeterminada para los movimientos lineales, en + * 'DEFAULT_LINEAR_VELOCITY = .25' - La velocidad predeterminada para los movimientos lineales, en    <> por segundo. - -* 'MIN_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog. - -* 'MAX_LINEAR_VELOCITY = 1.0' - La velocidad máxima para jog lineal, en unidades de máquina por segundo. - -* 'MIN_LINEAR_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog lineal. - -* 'DEFAULT_ANGULAR_VELOCITY = .25' - La velocidad predeterminada para jog angular, en unidades máquina por segundo. - -* 'MIN_ANGULAR_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog angular. - -* 'MAX_ANGULAR_VELOCITY = 1.0' - La velocidad máxima para jog angular, en unidades de máquina por segundo. - -* 'INCREMENTS = 1 mm, .5 in, ...' - Define los incrementos disponibles para jogs incrementales. -    Los INCREMENTS se pueden usar para ajustar los valores predeterminados. -    Los valores pueden ser números decimales (por ejemplo, 0.1000) o números fraccionarios (por ejemplo, 1/16), -    opcionalmente seguido por una unidad (cm, mm, um, inch (pulgadas), in (pulgadas) o mil (milésimas de pulgada)). -    Si no se especifica una unidad, se supone la unidad de máquina. -    Las distancias métricas e imperiales se pueden mezclar: -    INCREMENTS = 1 inch, 1 mil, 1 cm, 1 mm, 1 um es una entrada válida. - -* 'GRIDS = 10 mm, 1 in, ...' - Define los valores preestablecidos para las líneas de cuadrícula. -    El valor se interpreta de la misma manera que 'INCREMENTS'. - -* 'OPEN_FILE = /path/absoluto/a/file.ngc' - el archivo que se mostrará en la gráfica de vista previa cuando se inicie AXIS. + * 'MIN_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog. + * 'MAX_LINEAR_VELOCITY = 1.0' - La velocidad máxima para jog lineal, en unidades de máquina por segundo. + * 'MIN_LINEAR_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog lineal. + * 'DEFAULT_ANGULAR_VELOCITY = .25' - La velocidad predeterminada para jog angular, en unidades máquina por segundo. + * 'MIN_ANGULAR_VELOCITY = .01' - el valor más bajo aproximado del control deslizante de jog angular. + * 'MAX_ANGULAR_VELOCITY = 1.0' - La velocidad máxima para jog angular, en unidades de máquina por segundo. + * 'INCREMENTS = 1 mm, .5 in, ...' - Define los incrementos disponibles para jogs incrementales. +   Los INCREMENTS se pueden usar para ajustar los valores predeterminados. +   Los valores pueden ser números decimales (por ejemplo, 0.1000) o números fraccionarios (por ejemplo, 1/16), +   opcionalmente seguido por una unidad (cm, mm, um, inch (pulgadas), in (pulgadas) o mil (milésimas de pulgada)). +   Si no se especifica una unidad, se supone la unidad de máquina. +   Las distancias métricas e imperiales se pueden mezclar: +   INCREMENTS = 1 inch, 1 mil, 1 cm, 1 mm, 1 um es una entrada válida. + * 'GRIDS = 10 mm, 1 in, ...' - Define los valores preestablecidos para las líneas de cuadrícula. +   El valor se interpreta de la misma manera que 'INCREMENTS'. + * 'OPEN_FILE = /path/absoluto/a/file.ngc' - el archivo que se mostrará en la gráfica de vista previa cuando se inicie AXIS. Una cadena en blanco "" no cargará ningún archivo al inicio. gmoccapy no usará esta configuración, ya que    ofrece una entrada correspondiente en su página de configuración. - -* 'EDITOR = gedit' - el editor que se usará al seleccionar Archivo> Editar para editar código G -    desde el menú de AXIS. Esto debe configurarse para que este elemento de menú -    trabaje. Otra entrada válida es "gnome-terminal -e vim". Esta entrada no se aplica a gmoccapy, ya que gmoccapy -    tiene un editor integrado. - -* 'TOOL_EDITOR = tooledit' - el editor que se utilizará al editar la tabla de herramientas (por ejemplo, al -    seleccionar "Archivo> Editar tabla de herramientas ..." en Axis). Otras entradas validas -    son "gedit", "gnome-terminal -e vim" y "gvim". Esta entrada no se aplica a gmoccapy, ya que gmoccapy -    tiene un editor integrado. - -* 'PYVCP = /filename.xml' - el archivo de descripción del panel PyVCP. Ver el -    <> para más información. - -* 'PYVCP_POSITION = BOTTOM' - la ubicación del panel PyVCP en la interfaz de usuario AXIS. -    Si se omite esta variable, el panel pasará por defecto al lado derecho. La unica alternativa valida -    es BOTTOM. Vea el <> para más información. - -* 'LATHE = 1' - cualquier valor no vacío (incluido "0") hace que Axis utilice el "modo torno" con una vista superior y con Radio y Diámetro en el DRO. - -* 'BACK_TOOL_LATHE = 1' - cualquier valor no vacío (incluido "0") hace que Axis utilice el "modo torno de herramienta trasera" con el eje X invertido. - -* 'FOAM = 1' - cualquier valor no vacío (incluido "0") hace que Axis cambie la visualización para el modo cortador de espuma. - -* 'GEOMETRY = XYZABCUVW' - controla la vista previa y el backplot de movimiento giratorio. Este item consiste -    en una secuencia de letras de eje, opcionalmente precedidas por un signo "-". -    Esta secuencia especifica el orden en que se aplica el efecto -    de cada eje, con un "-" que invierte el sentido de la rotación. -    La cadena de GEOMETRY adecuada depende de la configuración de la máquina y -    de la cinemática usada para controlarla. La cadena de ejemplo GEOMETRY = XYZBCUVW -    es para una máquina de 5 ejes donde la cinemática hace que UVW se muevan en el -    sistema de coordenadas de la herramienta y XYZ en el sistema de coordenadas -    del material. El orden de las letras es importante, porque -    expresa el orden en que se aplican las diferentes transformaciones. -    Por ejemplo, girar alrededor de C y luego de B es diferente que girar alrededor -    B y despues de C. GEOMETRY no tiene efecto sin un eje rotativo. -    Las máquinas de corte de espuma (FOAM = 1) deben especificar "XY;UV" o dejar el valor -    en blanco aunque este valor se ignore actualmente en el modo de cortador de espuma. UNA -    versión futura puede definir qué significa ";", pero si lo hace "XY;UV" significará -    lo mismo que el cortador de espuma actual por defecto. - -* 'ARCDIVISION = 64' - Establece la calidad de la vista previa de los arcos. Los arcos se previsualizan dividiendolos -    en una serie de líneas rectas; un semicírculo se divide en -    *ARCDIVISIÓN* partes. Los valores más grandes dan una vista previa más precisa, pero -    tardan más tiempo en cargar y dan como resultado una pantalla más lenta. Los valores más pequeños dan una -    vista previa menos precisa, pero tarda menos tiempo en cargar y puede resultar en una velocidad más rápida -    del monitor. El valor predeterminado de 64 significa que un círculo de hasta 3 pulgadas -    se mostrará con precision de 1 mil (.03%). - -* 'MDI_HISTORY_FILE =' - El nombre del archivo de historial MDI local. Si no se especifica, Axis -    guardará el historial MDI en *.axis_mdi_history* en el directorio de usuario. -    Esto es útil si tiene múltiples configuraciones en una computadora. - -* 'JOG_AXES =' - el orden en que se asignan las teclas de desplazamiento a las letras del eje. Las flechas izquierda - y derecha se asignan a la letra del primer eje, arriba y abajo a la segunda, página arriba/página abajo a la tercera, - y corchetes izquierdo y derecho a la cuarta. Si no se especifica, el valor predeterminado se determina a partir de - los valores de [TRAJ]COORDINATES, [DISPLAY]LATHE y [DISPLAY]FOAM. - -* 'JOG_INVERT =' - para cada letra de eje, se invierte la dirección de jog. El valor predeterminado es "X" para tornos y + * 'EDITOR = gedit' - el editor que se usará al seleccionar Archivo> Editar para editar código G +   desde el menú de AXIS. Esto debe configurarse para que este elemento de menú +   trabaje. Otra entrada válida es "gnome-terminal -e vim". Esta entrada no se aplica a gmoccapy, ya que gmoccapy +   tiene un editor integrado. + * 'TOOL_EDITOR = tooledit' - el editor que se utilizará al editar la tabla de herramientas (por ejemplo, al +   seleccionar "Archivo> Editar tabla de herramientas ..." en Axis). Otras entradas validas +   son "gedit", "gnome-terminal -e vim" y "gvim". Esta entrada no se aplica a gmoccapy, ya que gmoccapy +   tiene un editor integrado. + * 'PYVCP = /filename.xml' - el archivo de descripción del panel PyVCP. Ver el +    capítulo PyVCP para más información. +//<> + * 'PYVCP_POSITION = BOTTOM' - la ubicación del panel PyVCP en la interfaz de usuario AXIS. +   Si se omite esta variable, el panel pasará por defecto al lado derecho. La unica alternativa valida +   es BOTTOM. Vea el capítulo PyVCP para más información. +//<>. Se usa para definir una posición cero arbitraria independientemente de la orientación de montaje del codificador. - * 'RS274NGC_STARTUP_CODE = G17 G20 G40 G49 G64 P0.001 G80 G90 G92 G94 G97 G98' -    (((CÓDIGO DE INICIO RS274NGC))) Una cadena de códigos NC que inicializa el intérprete.    Esto no es un sustituto para especificar códigos g modales @@ -569,51 +544,45 @@ El primer ejecutable M1xx encontrado en la búsqueda se usa para cada M1xx. [NOTE] El número máximo de directorios USER_M_PATH se define en tiempo de compilación - (predeterminado: 'USER_DEFINED_FUNCTION_MAX_DIRS == 5'). +(predeterminado: 'USER_DEFINED_FUNCTION_MAX_DIRS == 5'). * 'INI_VARS = 1' Predeterminado 1 + Permite que los programas de código G lean valores del archivo INI usando el formato #<_ini[sección]nombre>. Ver <> - * 'HAL_PIN_VARS = 1' Predeterminado 1 + Permite que los programas de código G lean los valores de los pines HAL usando el formato #<_hal[Elemento Hal]> El acceso a esta variable es de solo lectura. Consulte <> para obtener más detalles y una advertencia importante. - * 'RETAIN_G43 = 0' Predeterminado 0 + Cuando está configurado, puede activar G43 después de cargar la primera herramienta, y luego despreocuparse por eso a través del programa. Cuando usted finalmente descargue la última herramienta, el modo G43 se cancela. - * 'OWORD_NARGS = 0' Predeterminado 0 + Si esta función está habilitada, una subrutina llamada puede determinar el número de parámetros posicionales reales pasados ​​al inspeccionar el parámetro +#+. - * 'NO_DOWNCASE_OWORD = 0' Predeterminado 0 + Conservar mayúsculas y minúsculas en los nombres O-word dentro de los comentarios si está configurado, permite leer elementos HAL de mayúsculas y minúsculas en comentarios estructurados como '(debug, #<_hal[MixedCaseItem])'.. - * 'OWORD_WARNONLY = 0' Predeterminado 0 + Advertir en lugar de error en caso de errores en las subrutinas O-word. -[NOTE] Las seis opciones anteriores fueron controladas por la máscara de bits 'FEATURES' +[NOTE] +Las seis opciones anteriores fueron controladas por la máscara de bits 'FEATURES' en versiones de LinuxCNC anteriores a 2.8. Esta etiqueta INI ya no trabaja. [NOTE] [WIZARD]WIZARD_ROOT es una ruta de búsqueda válida pero el asistente no se ha implementado por completo y los resultados de su uso son impredecibles. -* 'REMAP=M400 modalgroup=10 argspec=Pq ngc=myprocedure' -Vea el capítulo <> para más detalles. - -* 'ON_ABORT_COMMAND = O call' -Vea el capítulo <> para más detalles. + * 'REMAP=M400 modalgroup=10 argspec=Pq ngc=myprocedure' + Vea el capítulo <> para más detalles. + * 'ON_ABORT_COMMAND = O call' + Vea el capítulo <> para más detalles. -[[sec:emcmot-section]] (((Archivo INI, Sección EMCMOT))) - -=== Sección [EMCMOT] +[[sec:emcmot-section]] +=== Sección [EMCMOT](((Archivo INI, Sección EMCMOT))) Esta sección es una sección personalizada y LinuxCNC no la utiliza directamente. Muchas configuraciones utilizan valores de esta sección para cargar el controlador de movimiento. @@ -621,65 +590,58 @@ Para obtener más información sobre el controlador de movimiento, consulte la sección <>. * 'EMCMOT = motmod' - el nombre del controlador de movimiento generalmente se usa aquí. - * 'BASE_PERIOD = 50000' - el período de la tarea 'Base' en nanosegundos. - * 'SERVO_PERIOD = 1000000' - Este es el período de tarea "Servo" en nanosegundos. - * 'TRAJ_PERIOD = 100000' - este es el período de la tarea 'Planificador de trayectoria' en   nanosegundos - * 'COMM_TIMEOUT = 1.0' - Número de segundos para esperar a Motion (la   parte en tiempo real del controlador de movimiento) para acusar recibo de   mensajes desde Task (la parte no en tiempo real del controlador de movimiento). -[[sec:task-section]](((Archivo INI, Sección TAREA))) - -=== Sección [TASK] - -* 'TASK = milltask' - -    Especifica el nombre del ejecutable 'task'. El ejecutable 'task' hace varias -    cosas, como comunicarse con las interfaces de usuario a través de NML, comunicarse con el -    planificador de movimiento en tiempo real sobre memoria compartida no HAL e interpretar gcode. -    Actualmente solo hay una tarea ejecutable que tiene sentido para el 99.9% de usuarios, milltask. -     -* 'CYCLE_TIME = 0.010' - -    El período, en segundos, en el que se ejecutará TASK. Este parámetro -    afecta el intervalo de sondeo cuando se espera que se complete el movimiento, cuando -    se ejecuta una instrucción de pausa y al aceptar un comando desde la interfaz de usuario. -    Por lo general, no es necesario cambiar este número. - -[[sec:hal-section]](((Archivo INI, Sección HAL))) - -=== Sección [HAL] - -* 'HALFILE = example.hal' - ejecuta el archivo 'example.hal' al inicio. -    Si se especifica 'HALFILE' varias veces, los archivos se ejecutan en el orden en que -    aparecer en el archivo ini. Casi todas las configuraciones tendrán al menos -    un 'HALFILE', y los sistemas paso a paso suelen tener dos de estos archivos, uno que -    especifica la configuración paso a paso genérica ('core_stepper.hal') y -    uno que especifica los pines de la máquina ('xxx_pinout.hal'). -    HALFILES se encuentran mediante una búsqueda. Si el archivo nombrado se encuentra en el directorio -    que contiene el archivo ini, se utiliza. Si el archivo nombrado no se encuentra en este -    directorio de archivos ini, se realiza una búsqueda utilizando la biblioteca de sistema de halfiles. -    Un HALFILE también se puede especificar como una ruta absoluta (cuando el nombre comienza con "/"). No se recomiendan - rutas absolutas ya que su uso puede limitar la reubicación de configuraciones. - -* 'HALFILE = texample.tcl [arg1 [arg2] ...]]' - Ejecuta el archivo tcl 'texample.tcl' -    al inicio con arg1, arg2, etc. como ::argv list. Los archivos con un sufijo .tcl son -    procesados como se indica arriba, pero usan haltcl para procesado. Vea el capitulo -    <> para más información. - -* 'HALFILE = LIB:sys_example.hal' - Ejecuta el archivo de la biblioteca de sistema 'sys_example.hal' -    al inicio. -    El uso explícito del prefijo LIB: provoca el uso de la biblioteca del sistema HALFILE sin -    buscar en el directorio de archivos ini. - -* 'HALFILE = LIB:sys_texample.tcl [arg1 [arg2 ...]]' - Ejecuta la biblioteca del sistema -    archivo 'sys_texample.tcl' al inicio. -    El uso explícito de LIB: el prefijo provoca el uso de la biblioteca del sistema HALFILE sin -    buscando en el directorio de archivos ini. -+ +[[sec:task-section]] +=== Sección [TASK](((Archivo INI, Sección TAREA))) + + * 'TASK = milltask' - +   Especifica el nombre del ejecutable 'task'. El ejecutable 'task' hace varias +   cosas, como comunicarse con las interfaces de usuario a través de NML, comunicarse con el +   planificador de movimiento en tiempo real sobre memoria compartida no HAL e interpretar gcode. +   Actualmente solo hay una tarea ejecutable que tiene sentido para el 99.9% de usuarios, milltask. + * 'CYCLE_TIME = 0.010' - +   El período, en segundos, en el que se ejecutará TASK. Este parámetro +   afecta el intervalo de sondeo cuando se espera que se complete el movimiento, cuando +   se ejecuta una instrucción de pausa y al aceptar un comando desde la interfaz de usuario. +   Por lo general, no es necesario cambiar este número. + +[[sec:hal-section]] +=== Sección [HAL](((Archivo INI, Sección HAL))) + + * 'HALFILE = example.hal' - ejecuta el archivo 'example.hal' al inicio. +   Si se especifica 'HALFILE' varias veces, los archivos se ejecutan en el orden en que +   aparecer en el archivo ini. Casi todas las configuraciones tendrán al menos +   un 'HALFILE', y los sistemas paso a paso suelen tener dos de estos archivos, uno que +   especifica la configuración paso a paso genérica ('core_stepper.hal') y +   uno que especifica los pines de la máquina ('xxx_pinout.hal'). +   HALFILES se encuentran mediante una búsqueda. Si el archivo nombrado se encuentra en el directorio +   que contiene el archivo ini, se utiliza. Si el archivo nombrado no se encuentra en este +   directorio de archivos ini, se realiza una búsqueda utilizando la biblioteca de sistema de halfiles. +   Un HALFILE también se puede especificar como una ruta absoluta (cuando el nombre comienza con "/"). No se recomiendan + rutas absolutas ya que su uso puede limitar la reubicación de configuraciones. + + * 'HALFILE = texample.tcl [arg1 [arg2] ...]]' - Ejecuta el archivo tcl 'texample.tcl' +   al inicio con arg1, arg2, etc. como ::argv list. Los archivos con un sufijo .tcl son +   procesados como se indica arriba, pero usan haltcl para procesado. Vea el capitulo +   <> para más información. + + * 'HALFILE = LIB:sys_example.hal' - Ejecuta el archivo de la biblioteca de sistema 'sys_example.hal' +   al inicio. +   El uso explícito del prefijo LIB: provoca el uso de la biblioteca del sistema HALFILE sin +   buscar en el directorio de archivos ini. + + * 'HALFILE = LIB:sys_texample.tcl [arg1 [arg2 ...]]' - Ejecuta la biblioteca del sistema +   archivo 'sys_texample.tcl' al inicio. +   El uso explícito de LIB: el prefijo provoca el uso de la biblioteca del sistema HALFILE sin +   buscando en el directorio de archivos ini. + Los elementos HALFILE especifican archivos que cargan componentes Hal y generan conexiones de señales entre pines de componentes. Los errores comunes son 1) omisión de la declaración addf necesaria para agregar las funciones de un componente a un hilo, 2) @@ -688,63 +650,63 @@ casi siempre es un error. Las señales generalmente incluyen una o más conexion y una sola salida (pero ambas no son estrictamente necesarias). Se proporciona un archivo de biblioteca de sistema para verificar estas condiciones y informar a stdout y en una ventana emergente gui: + ----     HALFILE = LIB:halcheck.tcl [nopopup] ---- + [NOTE] La línea LIB:halcheck.tcl debería ser el último [HAL]HALFILE. Especifique la opción 'nopopup' para suprimir el mensaje emergente y permitir el inicio inmediato. Las conexiones realizadas con un POSTGUI_HALFILE no serán chequeadas. -* 'TWOPASS = ON'- utilice el procesamiento de dos pasos para cargar componentes HAL. Con el procesamiento TWOPASS, -    las líneas [HAL]HALFILE= se procesan en dos pasadas. En el primer pase (pass0), -    se leen todos los HALFILES y se acumulan múltiples aspectos de los comandos loadrt y loadusr. -    Estos comandos de carga acumulada se ejecutan al final de pass0. Esta acumulación permite -    líneas de carga que se especificarán más de una vez para un componente dado (siempre que -    los nombres names= utilizados sean únicos en cada uso). En el segundo pase (pase1), los -    HALFILES son releídos y todos los comandos excepto los comandos de carga ejecutados previamente -    son ejecutados + * 'TWOPASS = ON'- utilice el procesamiento de dos pasos para cargar componentes HAL. Con el procesamiento TWOPASS, +   las líneas [HAL]HALFILE= se procesan en dos pasadas. En el primer pase (pass0), +   se leen todos los HALFILES y se acumulan múltiples aspectos de los comandos loadrt y loadusr. +   Estos comandos de carga acumulada se ejecutan al final de pass0. Esta acumulación permite +   líneas de carga que se especificarán más de una vez para un componente dado (siempre que +   los nombres names= utilizados sean únicos en cada uso). En el segundo pase (pase1), los +   HALFILES son releídos y todos los comandos excepto los comandos de carga ejecutados previamente +   son ejecutados + + * 'TWOPASS = nodelete verbose' - la función TWOPASS se puede activar con cualquier +   cadena no nula que incluya las palabras clave verbose y nodelete. +   la palabra clave verbose provoca la impresión de detalles en la salida estandar. La palabra clave nodelete conserva +   archivos temporales en /tmp. -* 'TWOPASS = nodelete verbose' - la función TWOPASS se puede activar con cualquier -  cadena no nula que incluya las palabras clave verbose y nodelete. -  la palabra clave verbose provoca la impresión de detalles en la salida estandar. La palabra clave nodelete conserva -  archivos temporales en /tmp. -+ Para obtener más información, consulte el capítulo <>. -* 'HALCMD = command' - Ejecuta 'command' como un solo comando HAL. + * 'HALCMD = command' - Ejecuta 'command' como un solo comando HAL.    Si se especifica 'HALCMD' varias veces, los comandos se ejecutan en el orden en que -    aparecen en el archivo ini. Las líneas 'HALCMD' se ejecutan después de todas -    las líneas 'HALFILE'. +   aparecen en el archivo ini. Las líneas 'HALCMD' se ejecutan después de todas +   las líneas 'HALFILE'. -* 'SHUTDOWN = shutdown.hal' - Ejecuta el archivo 'shutdown.hal' cuando se sale LinuxCNC. + * 'SHUTDOWN = shutdown.hal' - Ejecuta el archivo 'shutdown.hal' cuando se sale LinuxCNC.    Dependiendo de los controladores de hardware utilizados, esto puede permitir configurar salidas a -    valores definidos cuando LinuxCNC sale normalmente. Sin embargo, ya que -    no se garantiza que este archivo se ejecutará (por ejemplo, en el caso de un -    bloqueo de la computadora) no es un reemplazo para una cadena de parada física adecuada -    u otras protecciones contra fallos de software. +   valores definidos cuando LinuxCNC sale normalmente. Sin embargo, ya que +   no se garantiza que este archivo se ejecutará (por ejemplo, en el caso de un +   bloqueo de la computadora) no es un reemplazo para una cadena de parada física adecuada +   u otras protecciones contra fallos de software. -* 'POSTGUI_HALFILE = example2.hal' - Ejecuta 'example2.hal' después de que la GUI haya creado -  sus pines HAL. Algunas GUI crean pines hal y admiten el uso de un halfile postgui -  para usarlos. Las GUI que admiten halfiles postgui incluyen Touchy, Axis, Gscreen y -  gmoccapy. + * 'POSTGUI_HALFILE = example2.hal' - Ejecuta 'example2.hal' después de que la GUI haya creado +   sus pines HAL. Algunas GUI crean pines hal y admiten el uso de un halfile postgui +   para usarlos. Las GUI que admiten halfiles postgui incluyen Touchy, Axis, Gscreen y +   gmoccapy.   Vea la sección <> para más información. -* 'HALUI = halui' - agrega los pines de la interfaz de usuario de HAL. Para más información, ver -   el capítulo <>. + * 'HALUI = halui' - agrega los pines de la interfaz de usuario de HAL. Para más información, ver +   el capítulo "Interfaz de usuario HAL". [[sec:halui-section]](((Archivo INI, Sección HALUI))) - === Sección [HALUI] * 'MDI_COMMAND = G53 G0 X0 Y0 Z0' - -     Se puede ejecutar un comando MDI utilizando halui.mdi-command-00. Incremente -    el número para cada comando que se enumera en la sección [HALUI]. +  Se puede ejecutar un comando MDI utilizando halui.mdi-command-00. Incremente +  el número para cada comando que se enumera en la sección [HALUI]. [[sec:applications-section]](((Archivo INI, Sección de APLICACIONES))) - === Sección [APPLICATIONS] LinuxCNC puede iniciar otras aplicaciones antes de que se inicie la interfaz gráfica de usuario especificada. @@ -1512,5 +1474,3 @@ STEPGEN_MAXVEL no mejora el ajuste del bucle de posición de stepgen. de la que vino. Por ejemplo, máquinas que intercambian la herramienta en la ranura activa con la herramienta en el husillo. - - diff --git a/docs/src/config/pncconf.adoc b/docs/src/config/pncconf.adoc index bdc5adbc72..9ef95c9e9b 100644 --- a/docs/src/config/pncconf.adoc +++ b/docs/src/config/pncconf.adoc @@ -942,9 +942,9 @@ Custom HAL Files:: There are four custom files that you can use to add HAL commands to: * custom.hal is for HAL commands that don't have to be run after the GUI frontend -loads. It is run after the configuration-named HAL file. + loads. It is run after the configuration-named HAL file. * custom_postgui.hal is for commands that must be run after AXIS loads or a -standalone PYVCP display loads. + standalone PYVCP display loads. * custom_gvcp.hal is for commands that must be run after glade VCP is loaded. * shutdown.hal is for commands to run when LinuxCNC shuts down in a controlled manner. diff --git a/docs/src/config/pncconf_es.adoc b/docs/src/config/pncconf_es.adoc index e09e9b97a4..64bf0e60ee 100644 --- a/docs/src/config/pncconf_es.adoc +++ b/docs/src/config/pncconf_es.adoc @@ -2,7 +2,6 @@ :toc: [[cha:pncconf-wizard]] - = Asistente de configuracion Mesa PNCconf está hecho para ayudar a construir configuraciones que utilizan productos específicos Mesa 'Anything I/O'. diff --git a/docs/src/getting-started/pncconf_fr.adoc b/docs/src/config/pncconf_fr.adoc similarity index 98% rename from docs/src/getting-started/pncconf_fr.adoc rename to docs/src/config/pncconf_fr.adoc index 4bab1fdecb..66b837450d 100644 --- a/docs/src/getting-started/pncconf_fr.adoc +++ b/docs/src/config/pncconf_fr.adoc @@ -1,9 +1,8 @@ :lang: fr +[[cha:pncconf-wizard]] = Assistant graphique de configuration Mesa -[[cha:Assistant-graphique-PNCConf]] - L'assistant de configuration PNCconf couvre toute la gamme des cartes d'entrées/ sorties Mesa et jusqu'à trois ports parallèles. Il est destiné à la configuration de systèmes à servomoteurs en boucle fermée ou de systèmes à @@ -56,13 +55,11 @@ pncconf ---- .Écran d'accueil de PnCConf - image::images/pncconf-splash_fr.png[alt="Écran d'accueil de PnCConf"] == Créer ou éditer une configuration .Créer ou éditer - image::images/pncconf-file_fr.png[alt="Créer ou éditer"] Il est possible de créer une nouvelle configuration ou d'en modifier une @@ -82,7 +79,6 @@ la liste. == Informations machine .Informations machine - image::images/pncconf-basic_fr.png[alt="Informations machine"] _Éléments de base_ @@ -226,11 +222,11 @@ _TOUCHY_ * Touchy est une interface conçue pour les écrans tactiles. * Elle ne nécessite que quelques interrupteurs physiques et une manivelle de -jog. + jog. * Elle nécessite les boutons _Départ cycle_, _Abandon_, _Marche par pas_. * Elle nécessite également un bouton sélecteur d'axe sur le jog. * Elle est basée sur GTK et intègre naturellement GladeVCP (création de -panneaux de contrôle). + panneaux de contrôle). * Elle permet d'intégrer les panneaux de contrôle virtuels (VCP). * Elle n'a pas de fenêtre de suivi du parcours d'outil. * L'aspect peut être modifié avec des thèmes personnalisés. @@ -272,14 +268,14 @@ Joystick USB pour le jog:: fichier. * Ajouter règle dispositif: s'utilise pour configurer un nouveau périphérique - en suivant les instructions. Le périphérique doit être branché et disponible. + en suivant les instructions. Le périphérique doit être branché et disponible. * test dispositif: permet de charger un périphérique, d'afficher les noms de - ses broches et de visualiser ses fonctions avec l’outil halmeter. + ses broches et de visualiser ses fonctions avec l’outil halmeter. * Rechercher règles pour le dispositif: va rechercher les règles dans le - système, utilisable pour trouver le nom des périphériques déjà construits - avec PNCconf. + système, utilisable pour trouver le nom des périphériques déjà construits + avec PNCconf. Les manettes de jeu utilisées en jog utilisent HALUI et le composant hal_input. @@ -312,7 +308,6 @@ ajouter des panneaux de commande virtuels (VCP) et définir certaines options d'LinuxCNC. .Configuration des GUI - image::images/pncconf-gui_fr.png[alt="Configuration des GUI"] _Options des interfaces graphiques_ @@ -435,11 +430,10 @@ ici s'effectue le choix du micro logiciel parmi ceux disponibles, puis le choix le paramétrage des composants nécessaires à la machine. .Configuration Mesa - image::images/pncconf-mesa-config_fr.png[alt="Configuration Mesa"] Adresse du port parallèle MESA:: - Un port parallèle est utilisé seulement avec la carte Mesa 7i43. + Un port parallèle est utilisé seulement avec la carte Mesa 7i43. Les ports parallèles sur la carte mère ont généralement les adresses 0x378 et 0x278 il est possible de trouver l'adresse sur la page du BIOS. Le 7i43 nécessite de programmer le port parallèle dans le mode EPP, @@ -505,8 +499,8 @@ des cartes Mesa. PNCconf permet de créer des noms de signaux personnalisés à utiliser dans les fichiers de HAL personnalisés. .Réglages des E/S Mesa C2 - image::images/pncconf-mesa-io2_fr.png[alt="Réglages des E/S Mesa C2"] + Sur cet onglet, avec ce micro logiciel, les composants sont liés à l'installation d'une carte fille 7i33, généralement utilisée avec des servomoteurs en boucle fermée. Noter que les numéros de composant des codeurs, des compteurs et des pilotes PWM @@ -514,16 +508,16 @@ ne sont pas dans l'ordre numérique. Cela fait suite aux exigences de l'architecture des cartes filles. .Réglages des E/S Mesa C3 - image::images/pncconf-mesa-io3_fr.png[alt="Réglages des E/S Mesa C3"] + Sur cet onglet, il n'y a que des broches GPIO. Noter les numéros à trois chiffres, ils correspondent au numéros des _HAL pins_. Les broches GPIO peuvent être sélectionnées comme des entrées ou des sorties et elles peuvent être inversées. .Réglages des E/S Mesa C4 - image::images/pncconf-mesa-io4_fr.png[alt="Réglages des E/S Mesa C4"] + Sur cet onglet, il y a un mélange entre des broches GPIO et des générateurs de pas. Les sorties générateur de pas et de direction peuvent être inversées. Noter que l'inversion d'un signal Step Gen modifie les délais de pas, @@ -540,7 +534,6 @@ broches GPIO Mesa. .Configuration des axes - image::images/pncconf-axis-drive_fr.png[alt="Configuration des axes"] Cette page permet de configurer et tester un moteur combiné ou non à un codeur. @@ -601,8 +594,7 @@ d'échelle), .Construire une table de calibration pour la sortie. Piloter le DAC avec la tension souhaitée et mesurer le résultat: -Mesure des tensions de sortie: - +.Mesure des tensions de sortie [width="50%"] |======================================== |*Sortie brute* | *Mesure* @@ -660,8 +652,8 @@ intervention pour terminer les connexions de HAL. Contacter la mail-liste ou un forum pour avoir de l'aide. .Calcul de l'échelle d'axe - image::images/pncconf-scale-calc_fr.png[alt="Calcul de l'échelle d'axe"] + Les paramètres d'échelle peuvent être saisis directement ou, on peut utiliser le bouton _calculer échelle_ pour être assisté. Utiliser alors les cases à cocher pour sélectionner les calculs appropriés. Noter que _Dents des poulies_ exige @@ -672,7 +664,6 @@ calculée manuellement, il est possible de la saisir directement sans passer par l'assistant. .Configuration des axes - image::images/pncconf-axis-config_fr.png[alt="Configuration des axes"] Se référer également à l'onglet diagramme pour deux exemples de disposition des @@ -693,11 +684,11 @@ Sur une fraiseuse classique:: Sur un tour classique:: - Lorsque l'outil se déplace à droite, en s'éloignant du mandrin, c'est le sens - positif de l'axe Z. + positif de l'axe Z. - Lorsque l'outil se déplace vers l'opérateur, c’est le sens positif de l'axe X. - Certains tours ont un axe X opposé, dans ce cas l'outil est à l'arrière, cela - fonctionne bien, mais l'affichage graphique d'AXIS ne peut pas refléter cette - configuration. + fonctionne bien, mais l'affichage graphique d'AXIS ne peut pas refléter cette + configuration. Lorsque des contacts d'origine machine et des contacts de fin de course sont utilisés, LinuxCNC attend des signaux de HAL au niveaux haut lorsque le contact est actionné. @@ -839,7 +830,6 @@ Utiliser la compensation de jeu:: en même temps qu'un fichier de compensation. Voir le manuel. .Dessin d'aide à l'identification des axes et fins de course - image::images/pncconf-diagram-lathe_fr.png[alt="Dessin d'aide à l'identification des axes et fins de course"] Ce dessin devrait aider à comprendre un exemple de positionnement des contacts @@ -864,7 +854,6 @@ appropriées ont été choisies dans les pages précédentes. Si des signaux de ont été sélectionnés, alors cette page est disponible pour les configurer. .Configuration de la broche - image::images/pncconf-spindle-config_fr.png[alt="Configuration de la broche"] Cette page est semblable à la page de configuration des moteurs d'axe mais il y a @@ -920,7 +909,6 @@ classicladder dans le manuel. .Options avancées - image::images/pncconf-advanced_fr.png[alt="Options avancées"] == Composants de HAL @@ -931,7 +919,6 @@ d'éditer le fichier HAL principal en permettant malgré tout à l'utilisateur d définir ses propres composants. .Composants de HAL - image::images/pncconf-hal_fr.png[alt="Composants de HAL"] La première sélection est prévue pour les composants que pncconf utilise en interne. @@ -1015,15 +1002,15 @@ Tous les microprogrammes ne peuvent pas être utilisés avec PNCCONF. Fichiers HAL Personnalisés:: Il y a quatre fichiers personnalisés utilisables pour ajouter des commandes a HAL: - custom.hal est prévu pour les commandes HAL utilisées avant le chargement de - l'interface graphique. Il est exécuté après le fichier HAL de configuration - nommé : non-de-la-configuration.hal + l'interface graphique. Il est exécuté après le fichier HAL de configuration + nommé : non-de-la-configuration.hal - custom_postgui.hal est prévu pour les commandes qui doivent être exécutées après - le chargement de l'interface graphique Axis ou PYVCP autonomes. + le chargement de l'interface graphique Axis ou PYVCP autonomes. // PYVCP a trouver - custom_gvcp.hal est prévu pour les commandes qui doivent être exécutées après - le chargement de GLADE VCP. + le chargement de GLADE VCP. - shutdown.hal est prévu pour des commandes exécutées quand LinuxCNC se ferme de façon - contrôlée. + contrôlée. // vim: set syntax=asciidoc: diff --git a/docs/src/config/stepconf.adoc b/docs/src/config/stepconf.adoc index 20b4e808b7..a8429841bb 100644 --- a/docs/src/config/stepconf.adoc +++ b/docs/src/config/stepconf.adoc @@ -1,6 +1,6 @@ :lang: en -[[cha:stepconf-wizard]] +[[cha:stepconf-wizard]](((Stepper Configuration Wizard))) = Stepper Configuration Wizard == Introduction @@ -25,7 +25,6 @@ The Stepconf Wizard works best with at least 800 x 600 screen resolution. == Start Page -[[cap:init-Page]] .Entry Page image::images/stepconf-start_en.png["Entry Page",align="center"] @@ -253,7 +252,6 @@ image::images/stepconf-axis-x_en.png["Axis X Configuration Page",align="center"] //== Test This Axis C .Test This Axis B - image::images/stepconf-x-test_en.png["Test This Axis",align="center",] Test this axis is a basic tester that only outputs step and direction signals @@ -324,7 +322,6 @@ reduce it by 10% and use that as the axis Maximum Acceleration. == Spindle Configuration .Spindle Configuration Page - image::images/stepconf-spindle_en.png["Spindle Configuration Page",align="center"] This page only appears when 'Spindle PWM' is chosen in the 'Parallel Port Pinout' page for one of the outputs. @@ -336,7 +333,6 @@ If 'Spindle PWM' appears on the pinout, the following information should be ente * 'PWM Rate' - The 'carrier frequency' of the PWM signal to the spindle. Enter '0' for PDM mode, which is useful for generating an analog control voltage. Refer to the documentation for your spindle controller for the appropriate value. - * 'Speed 1 and 2, PWM 1 and 2' - The generated configuration file uses a simple linear relationship to determine the PWM value for a given RPM value. If the values are not known, they can be determined. For more information see @@ -349,10 +345,8 @@ LinuxCNC via HAL, LinuxCNC supports lathe threading. These signals are: * 'Spindle Index' - Is a pulse that occurs once per revolution of the spindle. - * 'Spindle Phase A' - This is a pulse that occurs in multiple equally-spaced locations as the spindle turns. - * 'Spindle Phase B (optional)' - This is a second pulse that occurs, but with an offset from Spindle Phase A. The advantages to using both A and B are direction sensing, increased noise immunity, and increased resolution. @@ -363,13 +357,10 @@ on the pinout, the following information should be entered: * 'Use Spindle-At-Speed' - With encoder feedback one can choose to have linuxcnc wait for the spindle to reach the commanded speed before feed moves. Select this option and set the 'close enough' scale. - * 'Speed Display Filter Gain' - Setting for adjusting the stability of the visual spindle speed display. - * 'Cycles per revolution' - The number of cycles of the 'Spindle A' signal during one revolution of the spindle. This option is only enabled when an input has been set to 'Spindle Phase A' - * 'Maximum speed in thread' - The maximum spindle speed used in threading. For a high spindle RPM or a spindle encoder with high resolution, a low value of 'BASE_PERIOD' is required. @@ -409,19 +400,15 @@ then find the PWM values that give 1600 RPM (40%) and 2800 RPM (70%). == Options //.Options Configuration - image::images/stepconf-options_en.png["Options Configuration",align="center"] * 'Include Halui' - This will add the Halui user interface component. See the <> for more information on. - * 'Include pyVCP' - This option adds the pyVCP panel base file or a sample file to work on. See the <> for more information. - * 'Include ClassicLadder PLC' - This option will add the ClassicLadder PLC (Programmable Logic Controller). See the <> for more information. - * 'Onscreen Prompt For Tool Change' - If this box is checked, LinuxCNC will pause and prompt you to change the tool when 'M6' is encountered. This feature is usually only useful if you have presettable tools. @@ -470,9 +457,7 @@ A machine can be operated without limit switches. In this case, only the soft limits stop the machine from reaching the hard stop. Soft limits only operate after the machine has been homed. -[[sub:Operating-without-Home]] -=== Operating without Home Switches -(((Operating without Home Switches))) +=== Operating without Home Switches(((Operating without Home Switches))) A machine can be operated without home switches. If the machine has limit switches, but no home switches, @@ -505,13 +490,11 @@ Otherwise the input might float between on and off when the circuit is open. Typically for a parallel port you might use 47k. .Normally Closed Switches - Wiring N/C switches in series (simplified diagram) image::images/switch-nc-series_en.svg["Normally Closed Switches",align="center"] .Normally Open Switches - Wiring N/O switches in parallel (simplified diagram) image::images/switch-no-parallel_en.svg["Normally Open Switches",align="center"] @@ -525,4 +508,3 @@ The following combinations of switches are permitted in Stepconf: * Combine one limit switch and the home switch for one axis // vim: set syntax=asciidoc: - diff --git a/docs/src/config/stepconf_es.adoc b/docs/src/config/stepconf_es.adoc index 23b67badb2..fce7154047 100644 --- a/docs/src/config/stepconf_es.adoc +++ b/docs/src/config/stepconf_es.adoc @@ -1,8 +1,7 @@ :lang: es -= Asistente de configuracion Stepconf - [[cha:stepconf-wizard]] += Asistente de configuracion Stepconf == Introduccion @@ -24,78 +23,66 @@ La extension del archivo es *.stepconf*. El asistente Stepconf necesita una resolucion de pantalla de al menos 800 x 600 para que los botones de la parte baja de la pantalla sean visibles. - -== Pagina de entrada[[sec:Entry-Page]] +== Pagina de entrada .Pagina inicial[[cap:init-Page]] - -image::images/stepconf-start_1_es.png[align="center", alt="Pagina inicial"] +image::images/stepconf-start_1_es.png["Pagina inicial",align="center"] .Pimera Pagina[[cap:Entry-Page]] - -image::images/stepconf-start_2_es.png[align="center", alt="Pagina de entrada"] +image::images/stepconf-start_2_es.png["Pagina de entrada",align="center"] Los tres primeros botones radio son autoexplicativos: -* 'Crear una nueva configuración' - - Crea una configuracion nueva. - -* 'Modificar una configuracion ya creada...' - - Modifica una configuracion existente. - Despues de seleccionar esta opcion, aparecera una pantalla de seleccion de archivo - y usted debera seleccionar el archivo con extension .stepconf que desea modificar. - Si usted relizo alguna modificacion previa a los archivos principales .hal o .ini, estas modificaciones se perderan. - Las modificaciones en los archivos custom.hal y custom_postgui.hal no seran canbiadas por el - asistente Stepconf. Stepconf resaltara la ultima configuracion que se construyo. - -* 'Importar un archivo Mach' - - Despues de seleccionar esta opcion, aparecera una pantalla de seleccion de archivo. - Seleccione un archivo de configuración de Mach; LinuxCNC intentará convertirlo en un archivo de configuración - apropiado para si mismo. - Después de la importación, pase por las páginas de stepconf para confirmar/modificar las entradas. - El archivo mach xml original no se cambiará. + * 'Crear una nueva configuración' - + Crea una configuracion nueva. + * 'Modificar una configuracion ya creada...' - + Modifica una configuracion existente. + Despues de seleccionar esta opcion, aparecera una pantalla de seleccion de archivo + y usted debera seleccionar el archivo con extension .stepconf que desea modificar. + Si usted relizo alguna modificacion previa a los archivos principales .hal o .ini, estas modificaciones se perderan. + Las modificaciones en los archivos custom.hal y custom_postgui.hal no seran canbiadas por el + asistente Stepconf. Stepconf resaltara la ultima configuracion que se construyo. + * 'Importar un archivo Mach' - + Despues de seleccionar esta opcion, aparecera una pantalla de seleccion de archivo. + Seleccione un archivo de configuración de Mach; LinuxCNC intentará convertirlo en un archivo de configuración + apropiado para si mismo. + Después de la importación, pase por las páginas de stepconf para confirmar/modificar las entradas. + El archivo mach xml original no se cambiará. Las siguientes opciones se registrarán en un archivo de preferencias para la próxima ejecución de Stepconf. -* 'Crear Atajo en Escritorio' - - Se generara en su escritorio un enlace a los archivos. - -* 'Crear un Lanzador en Escritorio' - - Se generara un lanzador en su escritorio para iniciar la aplicacion. - -* 'Crear Hardware Simulado' - - Permite crear configuraciones para pruebas, - incluso sin tener el hardware apropiado. - + * 'Crear Atajo en Escritorio' - + Se generara en su escritorio un enlace a los archivos. + * 'Crear un Lanzador en Escritorio' - + Se generara un lanzador en su escritorio para iniciar la aplicacion. + * 'Crear Hardware Simulado' - + Permite crear configuraciones para pruebas, + incluso sin tener el hardware apropiado. == Informacion Basica[[sec:Basic-Information]] .Informacion Basica[[cap:Basic-Information-Page]] - -image::images/stepconf-base_es.png[align="center", alt="Informacion Basica"] - -* 'Nombre de la maquina' - - (((Nombre de la Maquina))) - Seleccione un nombre para su maquina. - Utilice solo letras mayusculas, minusculas, digitos, '-' y '_'. - -* 'Configuracion de Ejes' - - (((Configuracion de Ejes))) - Seleccione XYZ (Fresadora), XYZA (Fresadora de 4 ejes) o XZ (Torno). - -* 'Unidades Maquina' - - (((Unidades Maquina))) - Seleccione pulgadas o milimetros. Todas las preguntas posteriores - (tales como el largo de los ejes, el paso de los tornillos, etc) - deberan ser contestadas utilizando las unidades seleccionadas. - -* 'Tipo de Driver' - - (((Tipo de Driver))) - Si usted tiene uno de los controladores de motor a pasos listados en el menu desplegable, seleccionelo directamente. - En cualquier otro caso, busque los 4 valores de tiempo necesarios. - Utilize los manuales de su controlador y rellene los campos. - Si sus manuales le dan los datos en microsegundos multipliquelos por 1000 para nanosegundos. - Por ejemplo, si el manual marca 4.5 us, escriba 4500 ns. +image::images/stepconf-base_es.png["Informacion Basica",align="center"] + + * 'Nombre de la maquina' - + (((Nombre de la Maquina))) + Seleccione un nombre para su maquina. + Utilice solo letras mayusculas, minusculas, digitos, '-' y '_'. + * 'Configuracion de Ejes' - + (((Configuracion de Ejes))) + Seleccione XYZ (Fresadora), XYZA (Fresadora de 4 ejes) o XZ (Torno). + * 'Unidades Maquina' - + (((Unidades Maquina))) + Seleccione pulgadas o milimetros. Todas las preguntas posteriores + (tales como el largo de los ejes, el paso de los tornillos, etc) + deberan ser contestadas utilizando las unidades seleccionadas. + * 'Tipo de Driver' - + (((Tipo de Driver))) + Si usted tiene uno de los controladores de motor a pasos listados en el menu desplegable, seleccionelo directamente. + En cualquier otro caso, busque los 4 valores de tiempo necesarios. + Utilize los manuales de su controlador y rellene los campos. + Si sus manuales le dan los datos en microsegundos multipliquelos por 1000 para nanosegundos. + Por ejemplo, si el manual marca 4.5 us, escriba 4500 ns. En la pagina wiki de LinuxCNC.org puede ser consultada una lista de controladores populares, asi como sus tiempos, en http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing[Temporizado de Drivers Stepper]. @@ -105,42 +92,33 @@ pueden requerir diferentes valores de tiempo a los indicados para su controlador Puede ser el caso que se requiera agregar tiempo extra a los valores de temporizacion para compensar los filtros o aislamientos. La seccion de seleccion de configuracion tiene maquinas de la marca Sherline ya configuradas para su uso en caso de que posea una de estas. -* 'Step Time' - - Tiempo del pulso de paso "Encendido" en nanosegundos. - -* 'Step Space' - - Tiempo minimo entre dos pulsos de paso en nanosegundos. - -* 'Direction Hold' - - Tiempo que debe ser mantenido activo el pin de direccion despues de ordenar cambio de direccion, en nanosegundos. - -* 'Direction Setup' - - Tiempo debe preceder a un cambio de direccion despues del ultimo pulso de paso en la direccion anterior. - -* 'Primer Parport' - - Usualmente la direcion en hexadecimal del primer puerto paralelo es 0x378 (puerto no PCI). - -* 'Segundo Parport' - - En caso de ser necesario especificar un puerto paralelo extra, introduca la direccion - y el tipo. Para informacion de como encontrar la direccion de puertos paralelos PCI - vea la seccion Port Address en el manual de integrador (trate con 0x278 o 0x3BC para puertos no PCI) - - -* 'Maximo Jitter en Periodo Base' - - (((Jitter Maximo del Periodo Base))) - Introduzca el resultado de la prueba de latencia. - Para correr la prueba de latencia presione el boton "Test Jitter Periodo Base". - Vea la seccion de la prueba de latencia para mas detalles. - -* 'Tasa Max de Pasos' - - (((Max Step Rate))) - Stepconf calculara automaticamente la tasa maxima de pulsos de pasos - basandose en las caracteristicas del controlador del motor y en el resultado de la prueba de latencia. - -* 'Periodo Base Mínimo' - - (((Min Base Period))) - Stepconf calculara automaticamente el periodo base minimo - basandose en las caracteristicas del controlador del motor y el resultado de la prueba de latencia. + * 'Step Time' - + Tiempo del pulso de paso "Encendido" en nanosegundos. + * 'Step Space' - + Tiempo minimo entre dos pulsos de paso en nanosegundos. + * 'Direction Hold' - + Tiempo que debe ser mantenido activo el pin de direccion despues de ordenar cambio de direccion, en nanosegundos. + * 'Direction Setup' - + Tiempo debe preceder a un cambio de direccion despues del ultimo pulso de paso en la direccion anterior. + * 'Primer Parport' - + Usualmente la direcion en hexadecimal del primer puerto paralelo es 0x378 (puerto no PCI). + * 'Segundo Parport' - + En caso de ser necesario especificar un puerto paralelo extra, introduca la direccion + y el tipo. Para informacion de como encontrar la direccion de puertos paralelos PCI + vea la seccion Port Address en el manual de integrador (trate con 0x278 o 0x3BC para puertos no PCI) + * 'Maximo Jitter en Periodo Base' - + (((Jitter Maximo del Periodo Base))) + Introduzca el resultado de la prueba de latencia. + Para correr la prueba de latencia presione el boton "Test Jitter Periodo Base". + Vea la seccion de la prueba de latencia para mas detalles. + * 'Tasa Max de Pasos' - + (((Max Step Rate))) + Stepconf calculara automaticamente la tasa maxima de pulsos de pasos + basandose en las caracteristicas del controlador del motor y en el resultado de la prueba de latencia. + * 'Periodo Base Mínimo' - + (((Min Base Period))) + Stepconf calculara automaticamente el periodo base minimo + basandose en las caracteristicas del controlador del motor y el resultado de la prueba de latencia. == Prueba de latencia[[sub:latency-test]](((Latency Test))) @@ -157,8 +135,7 @@ la computadora; no se requiere que conecte los controladores de motores. No ejecute LinuxCNC mientras realiza la prueba de latencia. .Prueba de Latencia - -image::images/latency-test_en.png[align="center", alt="Prueba de Latencia"] +image::images/latency-test_en.png["Prueba de Latencia",align="center"] La latencia es el tiempo que le tomara a una PC concreta detener lo que esta haciendo y responder a una solicitud externa. En este caso, la solicitud es @@ -195,12 +172,10 @@ de pulsos de paso por software. Numeros superiores a 1 milisegundo (1 000 000 na significan que la PC no es una buena candidata para ejecutar LinuxCNC, sin importar si se usa generacion de pulsos de paso por software o no. +== Ajustes del puerto Paralelo(((Parallel Port Setup))) -== Ajustes del puerto Paralelo[[sec:Parallel-Port-Setup]](((Parallel Port Setup))) - -.Pagina de ajuste del Puerto Paralelo[[cap:Parallel-Port-Setup]] - -image::images/stepconf-parallel-1_es.png[align="center", alt="Pagina de ajuste del Puerto Paralelo 1"] +.Pagina de ajuste del Puerto Paralelo +image::images/stepconf-parallel-1_es.png["Pagina de ajuste del Puerto Paralelo 1",align="center"] Para cada pin se debera seleccionar la señal de control que concuerde con la configuracion del puerto. @@ -208,35 +183,30 @@ que concuerde con la configuracion del puerto. Active la casilla "invert" si la señal de control requiere ser invertida (0V para activo/Verdadero, 5v para inactivo/Falso) -* 'Esquemas de pines predefinidos' - + * 'Esquemas de pines predefinidos' - Se configuraran automaticamente los pines del 2 al 9 de acuerdo al estandar de las maquinas Sherline (Direccion en los pines 2, 4, 6, 8) o Xylotex (Direccion en los pines 3, 5, 7, 9). - -* 'Entradas y Salidas' - - Si el pin no sera utilizado como entrada o salida, seleccionarlo como "Sin uso". - -* 'Señal de Paro Externo (E stop)' - - Esta señal pude ser seleccionada en la casilla desplegable. - Una cadena de señal de paro tipica utiliza solo contactos en serie normalmente cerrados. - -* 'Posicion home y limites de seguridad (Homing & Limit Switches) - - Estos pines pueden ser seleccionados para la mayoria de las configuraciones - utilizando la casilla desplegable. - -* 'Bomba de Carga (Charge Pump)' - - Si su controlador de motor requiere de una señal de bomba de carga, - simplemente seleccione esta opcion de la lista desplegable y conecte la señal - al pin seleccionado. - La salida de la bomba de carga sera conectada a la tarea base por el programa Stepconf. - La salida de bomba de carga sera aproximadamente 1/2 de la maxima tasa de generacion - de pulsos de paso mostrados en la pagina de configuracion basica. + * 'Entradas y Salidas' - + Si el pin no sera utilizado como entrada o salida, seleccionarlo como "Sin uso". + * 'Señal de Paro Externo (E stop)' - + Esta señal pude ser seleccionada en la casilla desplegable. + Una cadena de señal de paro tipica utiliza solo contactos en serie normalmente cerrados. + * 'Posicion home y limites de seguridad (Homing & Limit Switches)' - + Estos pines pueden ser seleccionados para la mayoria de las configuraciones + utilizando la casilla desplegable. + * 'Bomba de Carga (Charge Pump)' - + Si su controlador de motor requiere de una señal de bomba de carga, + simplemente seleccione esta opcion de la lista desplegable y conecte la señal + al pin seleccionado. + La salida de la bomba de carga sera conectada a la tarea base por el programa Stepconf. + La salida de bomba de carga sera aproximadamente 1/2 de la maxima tasa de generacion + de pulsos de paso mostrados en la pagina de configuracion basica. == Configuracion del puerto paralelo 2 .Página de configuración del puerto paralelo 2 - -image::images/stepconf-parallel-2_es.png[align="center", alt="Página de configuración del puerto paralelo 2"] +image::images/stepconf-parallel-2_es.png["Página de configuración del puerto paralelo 2",align="center"] El segundo puerto paralelo (si está seleccionado) puede configurarse y asignar sus pines en esta página. + No se pueden seleccionar señales de paso y dirección. + @@ -247,22 +217,21 @@ Puede especificar la dirección como hexadecimal (a menudo 0x378) o como el núm .Configuracion avanzada -image::images/stepconf-options_es.png[align="center", alt="Configuración avanzada"] +image::images/stepconf-options_es.png["Configuración avanzada",align="center"] * 'Incluir Halui': esto agregará el componente de interfaz de usuario Halui. Ver el -<> para más información. - + capitulo "HALUI" para más información. +//cha:hal-user-interface removed * 'Incluir pyVCP': esta opción agrega el archivo base del panel pyVCP o un archivo ejemplo -para trabajar en el. Ver el <> para más información. - + para trabajar en el. Ver el capítulo PyVCP para más información. +//<> para más información. * 'Incluir ClassicLadder PLC' - Esta opción agregará el PLC ClassicLadder -(Controlador lógico programable). Ver el -Capitulo Classicladder para más información. + (Controlador lógico programable). Ver el + Capitulo Classicladder para más información. //<> - "all-english" document removed - * 'Indicador en pantalla para cambio de herramienta' - Si esta casilla está marcada, LinuxCNC -para y le pide que cambie la herramienta cuando se encuentre 'M6'. Esta característica -generalmente solo es útil si tiene herramientas predimensionadas. + para y le pide que cambie la herramienta cuando se encuentre 'M6'. Esta característica + generalmente solo es útil si tiene herramientas predimensionadas. == Configuracion de los Ejes[[sec:Axis-Configuration]](((Axis Configuration))) @@ -270,127 +239,110 @@ generalmente solo es útil si tiene herramientas predimensionadas. image::images/stepconf-axis-x_es.png[align="center", alt="Pagina de configuracion de ejes"] -* 'Pasos del motor por revolucion' (Motor Steps Per Revolution) - - (((Motor Steps Per Revolution))) - El numero de pasos completos por revolucion del motor. - Si solo se tiene el dato de los grados por paso del motor (ejemplo 1.8 grados), - se debe dividir 360 por el numero de grados por paso - para encontrar el numero de pasos por revolucion. - -* 'Micro pasos' (Driver Microstepping) - - (((Driver Microstepping))) - El numero de micropasos producidos por el controlador por cada paso fisico completo del motor. - Entre "2" para semipasos. - Por ejemplo, si el controlador produce 1/10 de giro de un paso completo - del motor por cada pulso de paso que recibe, escriba 10 en la casilla. - -* 'Relacion de Poleas' (Pulley Ratio) - - (((Pulley Ratio))) - Si su maquina tiene poleas o engranes entre el motor y el tornillo, - escriba su relacion mecanica aqui. Si no tiene, escriba "1:1". - -* 'Paso del tornillo' (Leadscrew Pitch) - - (((Leadscrew Pitch))) - Entre aqui el paso del tornillo. - Si se selecciono unidades "Inch", entre el numero de - hilos por pulgada (por ejemplo, 8 para un tornillo de 8 TPI). - Si se tiene un tornillo con varias entradas, se necesita saber - cuantas vueltas se requieren para mover la tuerca una pulgada. - Si se selecciono 'mm' como unidades, entre el numero de milimetros que la tuerca - se movera por revolucion (ejemplo, 2 para 2 mm/rev). - Si la maquina se mueve en la direccion opuesta a la esperada, - entre un valor negativo, o invierta el pin de direccion del eje. - -* 'Velocidad Maxima' (Maximum Velocity) - - (((Maximum Velocity))) - Entre la velocidad maxima del eje, en unidades por segundo. - -* 'Aceleracion Maxima (Maximum Acceleration) - - (((Maximum Acceleration))) - El valor correcto de esta casilla solo puede ser determinado - por experimentacion. Vea - <> y + <>. + * 'Posicion Home' (Home Location) - + (((Home Location))) + Home es la posicion a la que la maquina se movera despues de completar + el procedimiento de inicio del eje. + Para maquinas sin interruptores de posicion home, + esta es la posicion a la cual el operador debera mover la maquina + antes de presionar el boton de inicializacion del eje (Home). + Si se combinan interruptores home y de limite, + se debera mover la maquina fuera del interruptor para inicializar el eje + o se recibira un error de limite en el eje. + * 'Carrera de la mesa' (Table Travel) - + (((Table Travel))) + El rango de carrera que el codigo g no podra sobrepasar. + La posicion de inicializacion del eje debe estar dentro del area de carrera. + En particular, tener la posicion de inicializacion (Home) de un eje exactamente + en un limite del area de carrera, producira una configuracion invalida. + * 'Localizacion de los interruptores home' (Home Switch Location) - + (((Home Switch Location))) + La posicion en la cual el interruptor home se activa o desactiva, + relativa al origen maquina. Este apartado y los dos siguientes + solo apareceran cuando se selecciona la existencia de interruptores home + en la configuracion de los pines del puerto paralelo. Si se combinan los + interruptores de limite y de home, la posicion del interruptor home + no puede ser la misma que la posicion home o se producira un error de limite de articulacion. + * 'Velocidad de busqueda de home' (Home Search Velocity) - + (((Home Search Velocity))) + Velocidad usada en la busqueda de los interruptores home. + Si el interruptor se encuentra cercano al limite de carrera del eje, + esta velocidad debe ser seleccionada de tal forma que el eje tenga + suficiente tiempo para desacelerar hasta detenerse antes de llegar al + limite fisico de la carrera. + Si el interruptor se encuentra cerrado en un rango corto de carrera, + (en lugar de estar cerrado desde el punto de disparo hasta un final de carrera), + la velocidad debera ser seleccionada de tal forma que el eje pueda desacelerar + hasta detenerse antes de que el interruptor se habra otra vez, y el procedimiento + de homing debera comenzarse siempre desde el mismo lado del interruptor. + Si la maquina se mueve en la direccion contraria al inicio del homing, + cambie el signo del parametro *Home Search Velocity*. + * 'Direccion de enclavamiento' (Home Latch Direction) - + (((Home Latch Direction))) + Seleccione "Igual" para que el interruptor sea liberado + y posteriormente la maquina se acerque a el a muy baja velocidad. + La segunda vez que el interruptor se cierre, definira la posicion home. + Seleccione "Opuesto" para realizar la inializacion liberando lentamente el interruptor; cuando el interruptor se abra, se marcara la posiocion home. - -* 'Tiempo para acelerar hasta maxima velocidad' (Time to accelerate to max speed) - - (((Time to accelerate to max speed))) - Tiempo calculado a partir de 'Max Acceleration' y 'Max Velocity'. - -* 'Distancia para acelerar hasta maxima velocidad' (Distance to accelerate to max speed) - - (((Distance to accelerate to max speed))) - Distancia para alcanzar maxima velocidad desde posicion de parado. - -* 'Tasa de pulsos a maxima velocidad' (Pulse rate at max speed) - - (((Pulse rate at max speed))) - Este dato se calcula en base a los valores anteriores. - El valor maximo de la *Tasa* determina el 'BASE_PERIOD'. - Valores por encima de 20000Hz pueden producir tiempos de respuesta muy bajos o incluso bloqueos - (La tasa maxima varia entre computadoras) - -* 'Escala del Eje' (Axis SCALE) - - El numero que sera usado en el archivo ini en la seccion [SCALE]. - Representa cuantos pasos se deben dar por unidad de usuario. - -* 'Probar este Eje' (Test this axis) - - (((Test this axis))) - Esta opcion abre una ventana para permitir probar cada eje - y puede ser utilizada despues de llenar toda la informacion referente a cada eje. + * 'Tiempo para acelerar hasta maxima velocidad' (Time to accelerate to max speed) - + (((Time to accelerate to max speed))) + Tiempo calculado a partir de 'Max Acceleration' y 'Max Velocity'. + * 'Distancia para acelerar hasta maxima velocidad' (Distance to accelerate to max speed) - + (((Distance to accelerate to max speed))) + Distancia para alcanzar maxima velocidad desde posicion de parado. + * 'Tasa de pulsos a maxima velocidad' (Pulse rate at max speed) - + (((Pulse rate at max speed))) + Este dato se calcula en base a los valores anteriores. + El valor maximo de la *Tasa* determina el 'BASE_PERIOD'. + Valores por encima de 20000Hz pueden producir tiempos de respuesta muy bajos o incluso bloqueos + (La tasa maxima varia entre computadoras) + * 'Escala del Eje' (Axis SCALE) - + El numero que sera usado en el archivo ini en la seccion [SCALE]. + Representa cuantos pasos se deben dar por unidad de usuario. + * 'Probar este Eje' (Test this axis) - + (((Test this axis))) + Esta opcion abre una ventana para permitir probar cada eje + y puede ser utilizada despues de llenar toda la informacion referente a cada eje. === Probar este eje .Probar este eje - image::images/stepconf-x-test_es.png[align="center", alt="Probar este Eje"] Es un comprobador básico que solo emite señales de paso y dirección @@ -404,7 +356,6 @@ Probar el eje no reacciona a las entradas del interruptor de límite. Usar con p [[sub:finding-maximum-velocity]] .Encontrar la velocidad máxima - Comience con una baja aceleración // comenta el latexmath hasta que se encuentre una solución para los documentos html // (por ejemplo, latexmath: [2 in / s ^ 2] o latexmath: [50 mm / s ^ 2]) @@ -447,10 +398,8 @@ Una vez que haya encontrado una velocidad a la que el eje no se detiene o pierde durante este procedimiento de prueba, reducirlo en un 10% y usarlo como 'Velocidad máxima' del eje. -[[sub:finding-maximum-acceleration]](((Encontrar la máxima aceleración))) - -.Encontrar la máxima aceleración - +[[sub:finding-maximum-acceleration]] +.Encontrar la máxima aceleración(((Encontrar la máxima aceleración))) Con la velocidad máxima que encontro en el paso anterior, ingrese el valor de aceleración a probar. Usando el mismo procedimiento anterior, @@ -464,7 +413,6 @@ reducirlo en un 10% y usarlo como Aceleración máxima del eje. == Configuracion del husillo .Página de configuración del husillo - image::images/stepconf-spindle_es.png[align="center", alt="Página de configuración del husillo"] Esta página solo aparece cuando se selecciona 'Spindle PWM' en @@ -476,13 +424,12 @@ Si 'Spindle PWM' aparece en el pinout, debe aportarse la siguiente información: * 'PWM Rate' - La 'frecuencia portadora' de la señal PWM al husillo. Entrar -'0' para el modo PDM, que es útil para generar un voltaje de control analógico. -Consulte la documentación de su controlador de husillo para conocer el valor apropiado. - + '0' para el modo PDM, que es útil para generar un voltaje de control analógico. + Consulte la documentación de su controlador de husillo para conocer el valor apropiado. * 'Speed 1 y 2, PWM 1 y 2': el archivo de configuración generado utiliza una -relación lineal simple para determinar el valor PWM para un valor RPM dado. Si los -valores no se conocen, se pueden determinar. Para más información, ver -<>. + relación lineal simple para determinar el valor PWM para un valor RPM dado. Si los + valores no se conocen, se pueden determinar. Para más información, ver + <>. === Movimiento sincronizado con el husillo @@ -491,35 +438,29 @@ LinuxCNC a través de HAL, LinuxCNC admite el roscado en torno. Estas señales son: * 'Índice del husillo' - Es un pulso que ocurre 'una vez por revolución' del husillo. - * 'Fase A del husillo' - Este es un pulso que ocurre en múltiples ubicaciones, -igualmente espaciadas, a medida que gira el husillo. - + igualmente espaciadas, a medida que gira el husillo. * 'Fase B del husillo (opcional)' - Este es un segundo pulso, pero con -un desplazamiento de la fase A del husillo. Las ventajas de usar tanto A como B son -detección de dirección, mayor inmunidad al ruido y mayor resolución. + un desplazamiento de la fase A del husillo. Las ventajas de usar tanto A como B son + detección de dirección, mayor inmunidad al ruido y mayor resolución. Si aparecen 'Fase A de husillo' e 'Índice de husillo' en el pinout, se debe ingresar la siguiente información: -* 'Usar Spindle-At-Speed' - Con la retroalimentación del encoder se puede hacer que linuxcnc -espere a que el husillo alcance la velocidad ordenada antes de que se mueva la alimentación. Seleccione esta -opción y establezca la escala 'close enough'. - -* 'Ganancia del filtro de pantalla de velocidad' - Configuración para ajustar la estabilidad de la -visualización de la velocidad del husillo. - -* 'Ciclos por revolución' - El número de ciclos de la señal A del husillo -durante una revolución. Esta opción solo está habilitada cuando -una entrada se ha configurado como 'Fase A del husillo' - -* 'Velocidad máxima en roscado' - La velocidad máxima del husillo utilizada en el roscado. -Para un husillo de altas RPM o un encóder de husillo con alta resolución, es obligatorio un valor bajo -de 'BASE_PERIOD' . - -[[sub:determining-spindle-calibration]](((Determinación de la calibración del husillo))) - -=== Determinacion de la calibracion del husillo + * 'Usar Spindle-At-Speed' - Con la retroalimentación del encoder se puede hacer que linuxcnc + espere a que el husillo alcance la velocidad ordenada antes de que se mueva la alimentación. Seleccione esta + opción y establezca la escala 'close enough'. + * 'Ganancia del filtro de pantalla de velocidad' - Configuración para ajustar la estabilidad de la + visualización de la velocidad del husillo. + * 'Ciclos por revolución' - El número de ciclos de la señal A del husillo + durante una revolución. Esta opción solo está habilitada cuando + una entrada se ha configurado como 'Fase A del husillo' + * 'Velocidad máxima en roscado' - La velocidad máxima del husillo utilizada en el roscado. + Para un husillo de altas RPM o un encóder de husillo con alta resolución, es obligatorio un valor bajo + de 'BASE_PERIOD' . + +[[sub:determining-spindle-calibration]] +=== Determinacion de la calibracion del husillo(((Determinación de la calibración del husillo))) Ingrese los siguientes valores en la página Configuración del husillo: @@ -546,7 +487,7 @@ curvas de respuesta, lo mejor es: - Asegúrese de que las dos velocidades de calibración no estén demasiado juntas en RPM - Asegúrese de que las dos velocidades de calibración estén en el rango de velocidades que -típicamente usará durante el fresado + típicamente usará durante el fresado Por ejemplo, si su husillo va de 0 RPM a 8000 RPM, pero generalmente usa velocidades de 400 RPM (10%) a 4000 RPM (100%), @@ -596,8 +537,7 @@ Una máquina puede ser operada sin interruptores de límite. En este caso, solo los límites suaves impiden que la máquina alcance la parada dura. Los límites suaves solo funcionan después de que la máquina ha sido puesta a home. -=== Operando sin Switches Home[[sub:Operating-without-Home]] -(((Operando sin Switches Home))) +=== Operando sin Switches Home(((Operando sin Switches Home))) Una máquina puede operarse sin interruptores home. Si la máquina tiene interruptores de límite, pero no hay interruptores home, @@ -630,16 +570,14 @@ Sin resistencia, la entrada puede flotar entre encendido y apagado cuando el cir Normalmente, para un puerto paralelo, puede usar resistencias de 47k. . Interruptores normalmente cerrados - Cableado de interruptores N/C en serie (diagrama simplificado) -image::images/switch-nc-series_es.png[align="center", alt = "Interruptores normalmente cerrados"] +image::images/switch-nc-series_es.png["Interruptores normalmente cerrados",align="center"] . Interruptores normalmente abiertos - Cableado de interruptores de N/O en paralelo (diagrama simplificado) -image::images/switch-no-parallel_es.png[align="center", alt = "Interruptores normalmente abiertos"] +image::images/switch-no-parallel_es.png["Interruptores normalmente abiertos",align="center"] Las siguientes combinaciones de interruptores están permitidas en Stepconf: @@ -650,4 +588,3 @@ Las siguientes combinaciones de interruptores están permitidas en Stepconf: * Combinar un interruptor de límite y el interruptor de home para un eje // vim: set syntax = asciidoc: - diff --git a/docs/src/config/stepconf_fr.adoc b/docs/src/config/stepconf_fr.adoc index 633160082c..a6bc45ba73 100644 --- a/docs/src/config/stepconf_fr.adoc +++ b/docs/src/config/stepconf_fr.adoc @@ -1,9 +1,8 @@ :lang: fr -[[cha:Assistant-graphique-StepConf]] (((Assistant stepconf))) +[[cha:stepconf-wizard]](((Assistant stepconf))) = Assistant graphique de configuration StepConf -[[sec:gettingstarted-stepconf-introduction]] == Introduction(((Introduction))) LinuxCNC est capable de contrôler un large éventail de machines @@ -28,60 +27,49 @@ pour que les boutons sur le bas des pages soient apparents. == Page d'accueil .La page d'accueil de stepconf - -image::images/stepconf-config_fr.png[alt="La page d'accueil de stepconf"] +image::images/stepconf-config_fr.png["La page d'accueil de stepconf"] * _Créer une nouvelle configuration_ - -Créera une configuration nouvelle. - + Créera une configuration nouvelle. * _Modifier une configuration déjà créée_ - -Modifiera une configuration existante, déjà créée avec Stepconf. -Après la sélection de celle-ci un sélecteur de fichier s'ouvre pour y -choisir le fichier .stepconf à modifier. Si des modifications sont -faites aux fichiers .hal et .ini avec un autre éditeur, ils ne seront -plus utilisables par Stepconf. Les modifications de custom.hal et de -custom_postgui.hal, par contre, sont conservées par Stepconf. - + Modifiera une configuration existante, déjà créée avec Stepconf. + Après la sélection de celle-ci un sélecteur de fichier s'ouvre pour y + choisir le fichier .stepconf à modifier. Si des modifications sont + faites aux fichiers .hal et .ini avec un autre éditeur, ils ne seront + plus utilisables par Stepconf. Les modifications de custom.hal et de + custom_postgui.hal, par contre, sont conservées par Stepconf. * _Créer un lien_ - -Placera un lien sur le bureau, pointant sur le dossier des fichiers -de configuration. - + Placera un lien sur le bureau, pointant sur le dossier des fichiers + de configuration. * _Créer un lanceur_ - -Placera un lanceur sur le bureau pour démarrer l'application avec sa -configuration. + Placera un lanceur sur le bureau pour démarrer l'application avec sa + configuration. [[sub:Informations-base]] == Informations machine .Page d'informations sur la machine - -image::images/stepconf-basic_fr.png[alt="Page d'informations sur la machine"] - -* _Nom de la machine_ - -(((Nom de la machine))) -Choisir un nom pour la machine. -Utiliser uniquement des lettres majuscules, minuscules, des chiffres -ou "-" et "_". - -* _Configuration des axes_ - -(((Configuration des axes))) -Choisir les axes correspondants à la machine: -XYZ (fraiseuse 3 axes), XYZA (fraiseuse 4 axes) ou XZ (tour). - -* _Unité machine_ - -(((Unité machine))) -Choisir entre le pouce et le millimètre. Toutes les questions suivantes -(telles que la longueur des courses, le pas de la vis, etc) -devront obtenir des réponses dans l'unité choisie ici. - -* _Caractéristiques du pilote_ - -(((Caractéristiques du pilote))) -Si un des pilotes énumérés dans la liste déroulante peut être utilisé, -cliquer sur son nom. Sinon, trouver les 4 valeurs de timing dans la fiche -de caractéristiques fournie par le fabricant du pilote et les saisir. -Si la fiche donne des valeurs en microsecondes, les multiplier par 1000. -pour les convertir en nanosecondes. -Par exemple, pour 4.5µs saisir 4500ns. +image::images/stepconf-basic_fr.png["Page d'informations sur la machine"] + +* _Nom de la machine_ - (((Nom de la machine))) + Choisir un nom pour la machine. + Utiliser uniquement des lettres majuscules, minuscules, des chiffres + ou "-" et "_". + +* _Configuration des axes_ - (((Configuration des axes))) + Choisir les axes correspondants à la machine: + XYZ (fraiseuse 3 axes), XYZA (fraiseuse 4 axes) ou XZ (tour). +* _Unité machine_ - (((Unité machine))) + Choisir entre le pouce et le millimètre. Toutes les questions suivantes + (telles que la longueur des courses, le pas de la vis, etc) + devront obtenir des réponses dans l'unité choisie ici. +* _Caractéristiques du pilote_ - (((Caractéristiques du pilote))) + Si un des pilotes énumérés dans la liste déroulante peut être utilisé, + cliquer sur son nom. Sinon, trouver les 4 valeurs de timing dans la fiche + de caractéristiques fournie par le fabricant du pilote et les saisir. + Si la fiche donne des valeurs en microsecondes, les multiplier par 1000. + pour les convertir en nanosecondes. + Par exemple, pour 4.5µs saisir 4500ns. Une liste de certains des pilotes pas à pas les plus populaires, avec leurs valeurs caractéristiques de timing, se trouve sur le wiki de LinuxCNC.org à la page @@ -92,287 +80,215 @@ peuvent imposer des contraintes de temps supplémentaires aux signaux, il convient de les ajouter à celles du pilote. La Configuration LinuxCNC pour Sherline est déjà réglée. -* _Step Time_ - -Durée de la largeur de l'impulsion de pas à l'état _on_, en nanosecondes. - -* _Valeur Space d'un pas_ - -Temps entre deux impulsions de pas, en nanosecondes. - -* _Direction Hold_ - -Durée de maintien du signal après un changement de direction, en +* _Step Time_ - Durée de la largeur de l'impulsion de pas à l'état _on_, en nanosecondes. +* _Valeur Space d'un pas_ - Temps entre deux impulsions de pas, en nanosecondes. +* _Direction Hold_ - Durée de maintien du signal après un changement de direction, en nanosecondes. - -* _Réglage direction_ - -Délai avant le changement de direction après la dernière impulsion de pas, +* _Réglage direction_ - Délai avant le changement de direction après la dernière impulsion de pas, en nanosecondes. - -* _Adresse de base du premier port parallèle_ - -Généralement l'adresse 0x378 est correcte pour le premier port. -Le premier port a toujours ses broches 2 à 9 configurées en sortie. - +* _Adresse de base du premier port parallèle_ - Généralement l'adresse 0x378 est correcte pour le premier port. + Le premier port a toujours ses broches 2 à 9 configurées en sortie. * _Adresse du second port parallèle_ - -Si un second port parallèle est nécessaire, entrer son adresse ici. -Si ce port est intégré à la carte mère il est possible de vérifier leur -ordre dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes -additionnelles ont d'autres adresses. -Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom -du chipset de la carte est connu. -Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. -Le bouton situé à droite du champs d'adresse du port, permet de choisir le -sens des broches 2 à 9, soit comme étant des entrée, soit comme étant des -sorties. - + Si un second port parallèle est nécessaire, entrer son adresse ici. + Si ce port est intégré à la carte mère il est possible de vérifier leur + ordre dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes + additionnelles ont d'autres adresses. + Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom + du chipset de la carte est connu. + Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. + Le bouton situé à droite du champs d'adresse du port, permet de choisir le + sens des broches 2 à 9, soit comme étant des entrée, soit comme étant des + sorties. * _Adresse du troisième port parallèle_ - -Si un troisième port parallèle est nécessaire, entrer son adresse ici. -Si ce port est intégré à la carte mère il est possible de vérifier leur -ordre dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes -additionnelles ont d'autres adresses. -Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom -du chipset de la carte est connu. -Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. -Le bouton situé à droite du champs d'adresse du port, permet de choisir le -sens des broches 2 à 9, soit comme étant des entrée, soit comme étant des -sorties. - -* _Période de base minimale_ - -(((Période de base minimale))) -En se basant sur les caractéristiques du pilote et sur le résultat du -test de latence, Stepconf détermine automatiquement la période de base -(BASE_PERIOD) la plus petite utilisable et l'affiche ici. - -* _Fréquence maxi des pas_ - -(((Fréquence maximale de pas))) -Affiche la valeur calculée de la fréquence maximum des pas que la -machine devrait atteindre avec les paramètres de cette configuration. - -* _Base Period Maximum Jitter_ - -(((Période de base maximale))) -Après un test de latence, entrer ici la valeur retournée -dans la colonne "Max Jitter" et à la ligne "Base thread". Cette valeur -correspond à la latence maximale du PC testé. -Pour exécuter directement un test de latence cliquer sur le bouton -_Test de latence_. Lire le <> pour tous les détails concernant ce test. - -* _Dialogue à l'écran pour le changement d'outil_ - -(((Dialogue d'appel d'outil))) -Si cette case est cochée, LinuxCNC va faire une pause et ouvrir un dialogue -pour charger l'outil lorsque qu'un G-Code M6 T sera rencontré. -Laisser cette case cochée sauf si le support d'un changeur d'outils -automatique est prévu dans un fichier personnalisé HAL. - -[[sec:Options-de-configuration-avancee]] -== Options de configuration avancée -(((Options de configuration avancée))) - -[[cap:Configuration-avancee]] + Si un troisième port parallèle est nécessaire, entrer son adresse ici. + Si ce port est intégré à la carte mère il est possible de vérifier leur + ordre dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes + additionnelles ont d'autres adresses. + Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom + du chipset de la carte est connu. + Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. + Le bouton situé à droite du champs d'adresse du port, permet de choisir le + sens des broches 2 à 9, soit comme étant des entrée, soit comme étant des + sorties. +* _Période de base minimale_ - (((Période de base minimale))) + En se basant sur les caractéristiques du pilote et sur le résultat du + test de latence, Stepconf détermine automatiquement la période de base + (BASE_PERIOD) la plus petite utilisable et l'affiche ici. +* _Fréquence maxi des pas_ - (((Fréquence maximale de pas))) + Affiche la valeur calculée de la fréquence maximum des pas que la + machine devrait atteindre avec les paramètres de cette configuration. +* _Base Period Maximum Jitter_ - (((Période de base maximale))) + Après un test de latence, entrer ici la valeur retournée + dans la colonne "Max Jitter" et à la ligne "Base thread". Cette valeur + correspond à la latence maximale du PC testé. + Pour exécuter directement un test de latence cliquer sur le bouton + _Test de latence_. Lire le <> + pour tous les détails concernant ce test. +* _Dialogue à l'écran pour le changement d'outil_ - (((Dialogue d'appel d'outil))) + Si cette case est cochée, LinuxCNC va faire une pause et ouvrir un dialogue + pour charger l'outil lorsque qu'un G-Code M6 T sera rencontré. + Laisser cette case cochée sauf si le support d'un changeur d'outils + automatique est prévu dans un fichier personnalisé HAL. + +== Options de configuration avancée(((Options de configuration avancée))) .Configuration avancée - -image::images/stepconf-advanced_fr.png[alt="Configuration avancée"] - +image::images/stepconf-advanced_fr.png["Configuration avancée"] * _Inclure l'interface Halui_ - -Ajoutera l'interface utilisateur Halui. -Voir le manuel de l'intégrateur pour plus d'informations sur Halui. - + Ajoutera l'interface utilisateur Halui. + Voir le manuel de l'intégrateur pour plus d'informations sur Halui. * _Inclure un panneau pyVCP_ - -Ceci ajoutera un panneau pyVCP de base, avec son fichier de configuration -sur lequel il sera possible de travailler. Quelques options sont disponibles -pour enrichir le panneau grâce à des cases à cocher. -Voir le manuel de l'intégrateur pour plus d'information sur pyVCP. - + Ceci ajoutera un panneau pyVCP de base, avec son fichier de configuration + sur lequel il sera possible de travailler. Quelques options sont disponibles + pour enrichir le panneau grâce à des cases à cocher. + Voir le manuel de l'intégrateur pour plus d'information sur pyVCP. * _Inclure l'API ClassicLadder_ - -Cette option ajoutera l'automate programmable en logique à contacts -ClassicLadder. Un certain nombre d'options sont disponibles pour enrichir -l'API grâce à des cases à cocher. L'éditeur de programme ladder est -accessible par le bouton _Editer prog. ladder_ -Voir le manuel de l'intégrateur pour plus d'information sur ClassicLadder. + Cette option ajoutera l'automate programmable en logique à contacts + ClassicLadder. Un certain nombre d'options sont disponibles pour enrichir + l'API grâce à des cases à cocher. L'éditeur de programme ladder est + accessible par le bouton _Editer prog. ladder_ + Voir le manuel de l'intégrateur pour plus d'information sur ClassicLadder. -[[sec:Reglage-du-port-parallele]] == Réglage du port parallèle -[[cap:Reglage-du-port-parallele]] - .Page de réglage du port parallèle - -image::images/stepconf-pinout_fr.png[alt="Page de réglage du port parallèle"] +image::images/stepconf-pinout_fr.png["Page de réglage du port parallèle"] * _Sorties (PC vers machine)_ - -Pour chacune des broches, choisir le signal correspondant au brochage entre -le port parallèle et l'interface matérielle. Cocher la case inverser -si le signal est inversé (0V pour vrai/actif, 5V pour faux/inactif). - -* _Sorties présélectionnées_ - -(((Sorties présélectionnées))) -Réglage automatique des pins 2 à 9 -Direction sur les pins 2, 4, 6, 8, selon le _type Sherline_ -Direction sur les pins 3, 5, 7, 9, selon le _type Xylotex_ - + Pour chacune des broches, choisir le signal correspondant au brochage entre + le port parallèle et l'interface matérielle. Cocher la case inverser + si le signal est inversé (0V pour vrai/actif, 5V pour faux/inactif). +* _Sorties présélectionnées_ - (((Sorties présélectionnées))) + Réglage automatique des pins 2 à 9 + Direction sur les pins 2, 4, 6, 8, selon le _type Sherline_ + Direction sur les pins 3, 5, 7, 9, selon le _type Xylotex_ * _Entrées et sorties_ - -Les entrées ou les sorties non utilisées doivent être placées sur -Inutilisé. - + Les entrées ou les sorties non utilisées doivent être placées sur + Inutilisé. * _Sortie arrêt d'urgence_ - -Sélectionnable dans la liste déroulante des sorties. -La sortie d'arrêt d'urgence est utilisée pour actionner l'organe de coupure -du circuit de puissance de la machine. Le contact de cet organe est câblé -en série avec les contacts des boutons d'arrêt d'urgence extérieurs ainsi -qu'avec tous les contacts compris dans la boucle d'arrêt d'urgence. - + Sélectionnable dans la liste déroulante des sorties. + La sortie d'arrêt d'urgence est utilisée pour actionner l'organe de coupure + du circuit de puissance de la machine. Le contact de cet organe est câblé + en série avec les contacts des boutons d'arrêt d'urgence extérieurs ainsi + qu'avec tous les contacts compris dans la boucle d'arrêt d'urgence. * _Entrées (machine vers PC)_ - -Ces choix se font dans la liste déroulante des entrées. - + Ces choix se font dans la liste déroulante des entrées. * _Pompe de charge_ - -Si la carte de contrôle accepte un signal pompe de charge, dans la liste -déroulante des sorties, sélectionner _Pompe de charge_ sur la sortie -correspondant à l'entrée Pompe de charge de la carte de contrôle. -La sortie pompe de charge sera connectée en interne par Stepconf. -Le signal de pompe de charge sera d'environ la moitié de la fréquence -maxi des pas affichée sur la page des informations machine. - -[[sec:Configuration-des-axes]] -== Configuration des axes -(((Configuration des axes))) + Si la carte de contrôle accepte un signal pompe de charge, dans la liste + déroulante des sorties, sélectionner _Pompe de charge_ sur la sortie + correspondant à l'entrée Pompe de charge de la carte de contrôle. + La sortie pompe de charge sera connectée en interne par Stepconf. + Le signal de pompe de charge sera d'environ la moitié de la fréquence + maxi des pas affichée sur la page des informations machine. -[[cap:Configuration-des-axes]] +[[sec:Axis-Configuration]] +== Configuration des axes(((Configuration des axes))) .Page de configuration des axes +image::images/stepconf-axis_fr.png["Page de configuration des axes"] -image::images/stepconf-axis_fr.png[alt="Page de configuration des axes"] - -* _Nombre de pas moteur par tour_ - -(((Nombre de pas par tour))) +* _Nombre de pas moteur par tour_ - (((Nombre de pas par tour))) Nombre de pas entiers par tour de moteur. Si l'angle d'un pas en degrés est connu (par exemple, 1.8 degrés), diviser 360 par cet angle pour obtenir le nombre de pas par tour du moteur. -* _Micropas du pilote_ - -(((Micropas du pilote))) -Le nombre de micropas produits par le pilote. Entrer par exemple 2 -pour le demi pas ou une des valeurs permise par le pilote du moteur. - -* _Dents des poulies_ - -(((Dents des poulies))) -Si entre le moteur et la vis un réducteur poulie/courroie est présent, -entrer ici le nombre de dents de chacune des poulies. -Pour un entrainement direct, entrer 1:1. - -* _Pas de la vis_ - -(((Pas de la vis))) -Entrer ici le pas de la vis. Si le pouce a été choisi comme -unité, entrer ici le nombre de filets par pouce. -Si le mm a été choisi, entrer ici le pas du filet en millimètres. -Si la vis est à plusieurs filets, déterminer de combien se -déplace le mobile par tour de vis et entrer cette valeur ici. -Si la machine se déplace dans la mauvaise direction, -entrer une valeur négative au lieu d'une positive, et vice-versa. - -* _Vitesse maximale_ - -(((Vitesse maximale))) -Entrer ici la vitesse de déplacement maximale de l'axe, en unités par -seconde. - -* _Accélération maximale_ - -(((Accélération maximale))) -Les valeurs correctes pour ces deux entrées ne peuvent être -déterminées que par l'expérimentation. Consulter -<> pour trouver la -vitesse et <> -pour trouver l'accélération maximale. - -* _Emplacement de l'origine machine_ - -(((Emplacement de l'origine machine))) -Position sur laquelle la machine se place après avoir terminé la -procédure de prise d'origine de cet axe. -Pour les machines sans contact placé au point d'origine, -c'est la position à laquelle l'opérateur place la machine en manuel, -avant de presser le bouton de _POM des axes_. -Si des capteurs de fin de course sont utilisés pour la prise d'origine, -le point d'origine ne doit pas se trouver au même coordonnées que le -capteur. Une erreur de limite simultanée à l'origine surviendrait. - -* _Course de la table_ - -(((Course de la table))) -Étendue de la course que le programme en G-code ne doit jamais dépasser. -L'origine machine doit être située à l'intérieur de cette course. -En particulier, avoir un point d'origine exactement égal à cette course est -une configuration incorrecte. - -* _Position du contact d'origine machine_ - -(((Position du contact d'origine machine))) -Position à laquelle le contact d'origine machine est activé ou relâché -pendant la procédure de prise d'origine machine. Ces entrées et les -deux suivantes, n'apparaissent que si les contacts d'origine ont été -sélectionnés dans le réglage des broches du port parallèle. - -* _Vitesse de recherche de l'origine_ - -(((Vitesse de recherche de l'origine))) -Vitesse utilisée pendant le déplacement vers le contact d'origine machine. -Si le contact est proche d'une limite physique de déplacement de la table, -cette vitesse doit être suffisamment basse pour permettre de décélérer et de -s'arrêter avant d'atteindre la butée mécanique et cela, malgré l'inertie du -mobile. Si le contact est fermé par la came sur une faible longueur de -déplacement (au lieu d'être fermé depuis son point de fermeture jusqu'au -bout de le course), cette vitesse doit être réglée pour permettre la -décélération et l'arrêt, avant que le contact ne soit dépassé et ne s'ouvre -à nouveau. La prise d'origine machine doit toujours commencer du même côté -du contact. Si la machine se déplace dans la mauvaise direction au début de -la procédure de prise d'origine machine, rendre négative la valeur de +* _Micropas du pilote_ - (((Micropas du pilote))) + Le nombre de micropas produits par le pilote. Entrer par exemple 2 + pour le demi pas ou une des valeurs permise par le pilote du moteur. +* _Dents des poulies_ - (((Dents des poulies))) + Si entre le moteur et la vis un réducteur poulie/courroie est présent, + entrer ici le nombre de dents de chacune des poulies. + Pour un entrainement direct, entrer 1:1. +* _Pas de la vis_ - (((Pas de la vis))) + Entrer ici le pas de la vis. Si le pouce a été choisi comme + unité, entrer ici le nombre de filets par pouce. + Si le mm a été choisi, entrer ici le pas du filet en millimètres. + Si la vis est à plusieurs filets, déterminer de combien se + déplace le mobile par tour de vis et entrer cette valeur ici. + Si la machine se déplace dans la mauvaise direction, + entrer une valeur négative au lieu d'une positive, et vice-versa. +* _Vitesse maximale_ - (((Vitesse maximale))) + Entrer ici la vitesse de déplacement maximale de l'axe, en unités par + seconde. +* _Accélération maximale_ - (((Accélération maximale))) + Les valeurs correctes pour ces deux entrées ne peuvent être + déterminées que par l'expérimentation. Consulter + <> pour trouver la + vitesse et <> + pour trouver l'accélération maximale. + +* _Emplacement de l'origine machine_ - (((Emplacement de l'origine machine))) + Position sur laquelle la machine se place après avoir terminé la + procédure de prise d'origine de cet axe. + Pour les machines sans contact placé au point d'origine, + c'est la position à laquelle l'opérateur place la machine en manuel, + avant de presser le bouton de _POM des axes_. + Si des capteurs de fin de course sont utilisés pour la prise d'origine, + le point d'origine ne doit pas se trouver au même coordonnées que le + capteur. Une erreur de limite simultanée à l'origine surviendrait. +* _Course de la table_ - (((Course de la table))) + Étendue de la course que le programme en G-code ne doit jamais dépasser. + L'origine machine doit être située à l'intérieur de cette course. + En particulier, avoir un point d'origine exactement égal à cette course est + une configuration incorrecte. +* _Position du contact d'origine machine_ - (((Position du contact d'origine machine))) + Position à laquelle le contact d'origine machine est activé ou relâché + pendant la procédure de prise d'origine machine. Ces entrées et les + deux suivantes, n'apparaissent que si les contacts d'origine ont été + sélectionnés dans le réglage des broches du port parallèle. +* _Vitesse de recherche de l'origine_ - (((Vitesse de recherche de l'origine))) + Vitesse utilisée pendant le déplacement vers le contact d'origine machine. + Si le contact est proche d'une limite physique de déplacement de la table, + cette vitesse doit être suffisamment basse pour permettre de décélérer et de + s'arrêter avant d'atteindre la butée mécanique et cela, malgré l'inertie du + mobile. Si le contact est fermé par la came sur une faible longueur de + déplacement (au lieu d'être fermé depuis son point de fermeture jusqu'au + bout de le course), cette vitesse doit être réglée pour permettre la + décélération et l'arrêt, avant que le contact ne soit dépassé et ne s'ouvre + à nouveau. La prise d'origine machine doit toujours commencer du même côté + du contact. Si la machine se déplace dans la mauvaise direction au début de + la procédure de prise d'origine machine, rendre négative la valeur de _Vitesse de recherche de l'origine_. - -* _Dégagement du contact d'origine_ - -(((Dégagement du contact d'origine))) -Choisir _Identique_ pour que la machine reparte d'abord en arrière pour -dégager le contact, puis revienne de nouveau vers lui à très petite -vitesse. La seconde fois que le contact se ferme, la position de l'origine -machine est acquise. Choisir _Opposition_ pour que la machine -reparte en arrière à très petite vitesse jusqu'au dégagement du contact. -Quand le contact s'ouvre, la position de l'origine machine est acquise. - -* _Temps pour accélérer à la vitesse maxi_ - -(((Temps pour accélérer à la vitesse maxi))) -Temps en secondes, calculé en fonction des paramètres renseignés -précédemment. - -* _Distance pour accélérer à la vitesse maxi_ - -(((Distance pour accélérer à la vitesse maxi))) -Distance en mm, calculée en fonction des paramètres renseignés précédemment. - -* _Fréquence des impulsions à la vitesse maxi_ - -(((Fréquence des impulsions à la vitesse maxi))) -Informations calculées sur la base des informations entrées précédemment. -Il faut rechercher la plus haute fréquence des impulsions à la vitesse maxi -possible, elle détermine la période de base: BASE_PERIOD. -Des valeurs supérieures à 20000Hz peuvent toutefois provoquer des -ralentissements importants de l'ordinateur, voir même son blocage -(La plus grande fréquence utilisable variera d'un ordinateur à un autre) - +* _Dégagement du contact d'origine_ - (((Dégagement du contact d'origine))) + Choisir _Identique_ pour que la machine reparte d'abord en arrière pour + dégager le contact, puis revienne de nouveau vers lui à très petite + vitesse. La seconde fois que le contact se ferme, la position de l'origine + machine est acquise. Choisir _Opposition_ pour que la machine + reparte en arrière à très petite vitesse jusqu'au dégagement du contact. + Quand le contact s'ouvre, la position de l'origine machine est acquise. +* _Temps pour accélérer à la vitesse maxi_ - (((Temps pour accélérer à la vitesse maxi))) + Temps en secondes, calculé en fonction des paramètres renseignés + précédemment. +* _Distance pour accélérer à la vitesse maxi_ - (((Distance pour accélérer à la vitesse maxi))) + Distance en mm, calculée en fonction des paramètres renseignés précédemment. +* _Fréquence des impulsions à la vitesse maxi_ - (((Fréquence des impulsions à la vitesse maxi))) + Informations calculées sur la base des informations entrées précédemment. + Il faut rechercher la plus haute fréquence des impulsions à la vitesse maxi + possible, elle détermine la période de base: BASE_PERIOD. + Des valeurs supérieures à 20000Hz peuvent toutefois provoquer des + ralentissements importants de l'ordinateur, voir même son blocage + (La plus grande fréquence utilisable variera d'un ordinateur à un autre) * _Échelle de l'axe_ - -Le nombre qui sera utilisé dans le fichier ini [SCALE]. -C'est le nombre de pas moteur par unité utilisateur. - -* _Test de cet axe_ - -(((Test de cet axe))) -Ouvre une fenêtre permettant de tester les paramètres pour chaque axe. -Il est possible de modifier par expérimentation certaines données et de -les reporter dans la configuration. - + Le nombre qui sera utilisé dans le fichier ini [SCALE]. + C'est le nombre de pas moteur par unité utilisateur. +* _Test de cet axe_ - (((Test de cet axe))) + Ouvre une fenêtre permettant de tester les paramètres pour chaque axe. + Il est possible de modifier par expérimentation certaines données et de + les reporter dans la configuration. * _Adresse du second port parallèle_ - -Si un second port parallèle est nécessaire, entrer son adresse ici. -Si les ports sont intégrés à la carte mère il est possible de vérifier -dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes -additionnelles ont d'autres adresses. -Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom -du chipset de la carte est connu. -Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. - -[[cap:Tester-Cet-Axe]] + Si un second port parallèle est nécessaire, entrer son adresse ici. + Si les ports sont intégrés à la carte mère il est possible de vérifier + dans le BIOS, habituellement 0x378 0x278 0x3bc. Attention les cartes + additionnelles ont d'autres adresses. + Dans ce cas, la commande lspci -v dans un terminal peux aider, si le nom + du chipset de la carte est connu. + Plus de détails à ce sujet sont disponibles dans le manuel de l'intégrateur. + == Tester cet axe .Tester cet axe - -image::images/stepconf-test_fr.png[alt="Tester cet axe"] +image::images/stepconf-test_fr.png["Tester cet axe"] Tester cet axe et un test simple pour définir les signaux de directions et de pas, ainsi que les valeurs d'accélération et de vitesse. @@ -382,9 +298,8 @@ Pour pouvoir utiliser ce test d'axe, il sera peut-être nécessaire de valider manuellement l'axe à tester. Si le driver utilise une pompe de charge, il faudra la bi-passer pour essayer les différentes valeurs de vitesse et d'accélération. -[[sec:Trouver-Vitesse-Maximale]] -== Trouver la vitesse maximale -(((Trouver Vitesse Maximale))) +[[sub:finding-maximum-velocity]] +== Trouver la vitesse maximale (((Trouver Vitesse Maximale))) Commencer avec une faible valeur d'accélération (par exemple, *+2 pouces/s^2^+* ou *+50 mm/s^2^+*) @@ -414,15 +329,14 @@ suivants: - Le brochage du port et la polarité des impulsions. Les cases _Inverser_. - La qualité des connexions et le blindage des câbles. - Les problèmes mécaniques avec le moteur, l'accouplement moteur, vis, -raideurs etc. + raideurs etc. Quand la vitesse à laquelle l'axe ne perd plus de pas et à laquelle les mesures sont exactes pendant le test a été déterminée, réduire cette vitesse de 10% et l'utiliser comme vitesse maximale pour cet axe. -[[sec:Trouver-Acceleration-Maximale]] -== Trouver l'accélération maximale -(((Trouver Accélération Maximale))) +[[sub:finding-maximum-acceleration]] +== Trouver l'accélération maximale(((Trouver Accélération Maximale))) Avec la vitesse maximale déterminée à l'étape précédente, entrer une valeur d'accélération approximative. Procéder comme pour la vitesse, @@ -433,18 +347,15 @@ la vitesse sélectionnée. Une fois que la valeur à laquelle l'axe ne perd plus de pas pendant le test a été déterminée, la réduire de 10% et l'utiliser comme accélération maximale pour cet axe. -[[sec:Page-configuration-de-la-broche]] == Configuration de la broche .Page configuration de la broche[[cap:Page-Configuration-de-la-broche]] - -image::images/stepconf-spindle_fr.png[alt="Page configuration de la broche"] +image::images/stepconf-spindle_fr.png["Page configuration de la broche"] Ces options ne sont accessibles que quand _PWM broche_, _Phase A codeur broche_ ou _index broche_ sont configurés dans le réglage du port parallèle. -[[sec:Controle-de-la-vitesse-de-broche]] == Contrôle de la vitesse de broche(((Contrôle de la vitesse de broche))) Si _PWM broche_ apparaît dans le réglage du port parallèle, les @@ -463,12 +374,9 @@ pour connaître la valeur appropriée. Le fichier de configuration généré utilise une simple relation linéaire pour déterminer la valeur PWM correspondant à une vitesse de rotation. Si les valeurs ne sont pas connues, elles peuvent être déterminées. -Voir la section sur <>. +Voir la section sur <>. -[[sec:Mouvement-avec-broche-synchronisee]] -== Mouvement avec broche synchronisée (filetage sur tour, taraudage rigide) -(((Mouvement avec broche synchronisée))) +== Mouvement avec broche synchronisée (filetage sur tour, taraudage rigide)(((Mouvement avec broche synchronisée))) Lorsque les signaux appropriés, provenant d'un codeur de broche, sont connectés au port parallèle, LinuxCNC peut être utilisé pour les usinages @@ -506,9 +414,8 @@ La vitesse de broche maximale utilisée en filetage. Pour exploiter un moteur de broche rapide ou un codeur ayant une résolution élevée, une valeur basse de BASE_PERIOD est requise. -[[sub:Determiner-broche-Etalonnage-broche]] -== Calibrer la broche -(((Calibrer la broche))) +[[sub:determining-spindle-calibration]] +== Calibrer la broche(((Calibrer la broche))) Entrer les valeurs suivantes dans la page de configuration de la broche: @@ -541,17 +448,13 @@ Par exemple, si la broche tourne entre 0tr/mn et 8000tr/mn, mais qu'elle est utilisée généralement entre 400tr/mn et 4000tr/mn, prendre alors des valeurs qui donneront 1600tr/mn et 2800tr/mn. -[[sec:Terminer-configuration]] -== Terminer la configuration -(((Terminer la configuration))) +== Terminer la configuration(((Terminer la configuration))) Cliquer _Appliquer_ pour enregistrer les fichiers de configuration. Ensuite, il sera possible de relancer ce programme et ajuster les réglages entrés précédemment. -[[sec:Position-Origine-Position-Contacts]] -== Position des fins de course sur les axes -(((Position origine machine)))(((Emplacements des contacts))) +== Position des fins de course sur les axes(((Position origine machine)))(((Emplacements des contacts))) image::images/HomeAxisTravel.png[] @@ -596,7 +499,6 @@ la position de l'origine ne doit jamais être égale à une limite logicielle. On place habituellement cette position au point le plus facile pour réaliser le changement d'outil. -[[sec:exploitation-sans-limite]] == Exploitation sans fin de course(((exploitation sans limite sans fin de course))) Une machine peut être utilisée sans contact de fin de course. Dans ce cas, @@ -609,7 +511,6 @@ sous-menu _Machine → Prises d'origines machine → POM de l'axe_. L'opérateur devra cocher chacun des axes individuellement pour faire la POM de chacun d'eux. -[[sec:exploitation-sans-origine]] == Exploitation sans contact d'origine(((Exploitation sans contact d'origine))) Une machine peut être utilisée sans contact d'origine machine. Si la machine @@ -623,9 +524,7 @@ Faire la prise d'origine à la main n'est certes pas aussi reproductible que sur des contacts, mais elle permet tout de même aux limites logicielles d'être utilisables. -[[sec:Contacts-Origine-et-Limites]] -== Câblage des contacts de fin de course et d'origine machine -(((Câblage des contacts d'origine machine et des limites))) +== Câblage des contacts de fin de course et d'origine machine(((Câblage des contacts d'origine machine et des limites))) Le câblage idéal des contacts externes serait une entrée par contact. Toutefois, un seul port parallèle d'ordinateur offre un total de 5 entrées, @@ -644,15 +543,13 @@ nivaux haut. La valeur typique pour un port parallèle est de 47K. Une bonne sécurité utilise des contacts normalement fermés sans pièce de commande souple. -.Contacts normalement fermés[[cap:Contacts-Normalement-Fermes]] - -image::images/switch-nc-series_fr.png[alt="Contacts normalement fermés"] +.Contacts normalement fermés +image::images/switch-nc-series_fr.png["Contacts normalement fermés"] Câblage de contacts NC en série (schéma simplifié) -.Contacts normalement ouverts[[cap:Contacts-Normalement-Ouverts]] - -image::images/switch-no-parallel_fr.png[alt="Contacts normalement ouverts"] +.Contacts normalement ouverts +image::images/switch-no-parallel_fr.png["Contacts normalement ouverts"] Câblage de contacts NO en parallèle (schéma simplifié) @@ -662,9 +559,9 @@ Les combinaisons suivantes sont permises dans Stepconf: - Les contacts de fin de course de tous les axes combinés. - Les contacts de fin de course d'un seul axe combinés. - Les contacts de fin de course et le contact d'origine machine d'un seul axe -combinés. + combinés. - Un seul contact de fin de course et le contact d'origine machine d'un seul axe -combinés. + combinés. Les deux dernières combinaisons sont également appropriées quand le type contact + origine est utilisé. diff --git a/docs/src/config/stepper-quickstart_fr.adoc b/docs/src/config/stepper-quickstart_fr.adoc index 22027bf17b..a7d0edd6ae 100644 --- a/docs/src/config/stepper-quickstart_fr.adoc +++ b/docs/src/config/stepper-quickstart_fr.adoc @@ -1,7 +1,6 @@ :lang: fr [[cha:stepper-quickstart]] - = Configuration rapide pour moteurs pas à pas Cette section suppose qu'une installation du logiciel à partir du CD Live a été @@ -16,20 +15,21 @@ Le test de latence détermine la capacité du processeur à répondre aux requêtes qui lui sont faites. Certains matériels peuvent interrompre ce processus, causant des pertes de pas lorsque le PC pilote une machine CNC. Ce test est la toute première chose à faire pour valider un PC. -Pour le lancer, suivre les instructions de la section <>. +Pour le lancer, suivre les instructions de la section <>. -== Sherline[[sec:Sherline]](((Sherline))) +[[sec:Sherline]] +== Sherline(((Sherline))) Si vous avez une machine Sherline plusieurs configurations prédéfinies sont fournies. Au premier démarrage de LinuxCNC, le sélecteur de configuration s'ouvre, sélectionnez alors le modèle correspondant à votre machine _Sherline_, puis acceptez d'enregistrer une copie. -== Xylotex[[sec:Xylotex]](((Xylotex))) +[[sec:Xylotex]] +== Xylotex(((Xylotex))) Si vous avez une machine _Xylotex_ vous pouvez utiliser l'assistant graphique de configuration fourni avec LinuxCNC et créer rapidement votre configuration -personnalisée <>. +personnalisée <>. == Informations relatives à la machine @@ -49,7 +49,6 @@ http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing[de linuxcnc.org]. |X | | | | | |Y | | | | | |Z | | | | | -| | | | | | |============================================================================== footnote:[ndt: les termes sont laissés dans la langue d'origine pour @@ -93,7 +92,6 @@ taille du pas est utilisée par SCALE dans le fichier .ini. |X | | | | | |Y | | | | | |Z | | | | | -| | | | | | |==================================================================== _Pas par tour_ indique combien de pas moteur sont nécessaires pour que celui-ci @@ -119,11 +117,13 @@ vis d'entrainement de l'axe. Un exemple en pouces: - Moteur = 200 pas par tour - Pilote = 10 micropas par pas - Dents côté moteur = 20 - Dents côté vis = 40 - Pas de vis = 0.2000 pouces par tour +---- +Moteur = 200 pas par tour +Pilote = 10 micropas par pas +Dents côté moteur = 20 +Dents côté vis = 40 +Pas de vis = 0.2000 pouces par tour +---- D'après les informations ci-dessus: @@ -134,27 +134,28 @@ D'après les informations ci-dessus: Encore un autre exemple, en millimètres cette fois: - Pas par tour = 200 pas par tour - Micropas = 8 micropas - Dents côté moteur = 30 - Dents côté vis = 90 - Pas de la vis = 5.00 mm par tour +---- +Pas par tour = 200 pas par tour +Micropas = 8 micropas +Dents côté moteur = 30 +Dents côté vis = 90 +Pas de la vis = 5.00 mm par tour +---- D'après les informations ci-dessus: -- la vis déplacera le mobile de 5.00 mm par tour. -- Le moteur fera 3 tours pour 1 tour de vis. (90/30) -- Le pilote utilisera 8 micropas pour faire un pas. -- Le pilote aura besoin de 1600 impulsions pour un tour moteur + - la vis déplacera le mobile de 5.00 mm par tour. + - Le moteur fera 3 tours pour 1 tour de vis. (90/30) + - Le pilote utilisera 8 micropas pour faire un pas. + - Le pilote aura besoin de 1600 impulsions pour un tour moteur et donc de 4800 pour 1 tour de vis. == Assistants de configuration graphique - Pour les moteurs pas à pas, voir la documentation de l'assistant graphique Stepconf -au chapitre <> + au chapitre <>. - Pour les servomoteurs et les moteurs pas à pas, voir la documentation de -l'assistant graphique PNCconf au chapitre <> + l'assistant graphique PNCconf au chapitre <>. // vim: set syntax=asciidoc: diff --git a/docs/src/docs.xml b/docs/src/docs.xml index f6b287d47c..7f34669dd0 100644 --- a/docs/src/docs.xml +++ b/docs/src/docs.xml @@ -87,8 +87,6 @@ - - @@ -118,7 +116,6 @@ - @@ -127,22 +124,16 @@ - - - - - - - - + + @@ -154,7 +145,6 @@ - @@ -177,18 +167,11 @@ - - - - - - - @@ -240,7 +223,7 @@ - + @@ -253,8 +236,8 @@ - - + + diff --git a/docs/src/drivers/AX5214H_fr.adoc b/docs/src/drivers/ax5214h_fr.adoc similarity index 100% rename from docs/src/drivers/AX5214H_fr.adoc rename to docs/src/drivers/ax5214h_fr.adoc diff --git a/docs/src/drivers/mitsub-vfd.adoc b/docs/src/drivers/mitsub-vfd.adoc index 0bca5ce054..bc176a1bd8 100644 --- a/docs/src/drivers/mitsub-vfd.adoc +++ b/docs/src/drivers/mitsub-vfd.adoc @@ -4,8 +4,6 @@ :hal: {basebackend@docbook:'':hal} -[[cha:mitsub-vfd-driver]] - This is a userspace HAL program, written in python, to control VFD's from Mitsubishi. + Specifcally the A500 F500 E500 A500 D700 E700 F700 series - others may work. + diff --git a/docs/src/examples/gs2-example.adoc b/docs/src/examples/gs2-example.adoc index 12b6b13e2b..3b53bbeb16 100644 --- a/docs/src/examples/gs2-example.adoc +++ b/docs/src/examples/gs2-example.adoc @@ -17,6 +17,7 @@ screen. In the custom.hal file we place the following to connect LinuxCNC to the GS2 and have LinuxCNC control the drive. + ---- # load the user space component for the Automation Direct GS2 VFD's loadusr -Wn spindle-vfd gs2_vfd -r 9600 -p none -s 2 -n spindle-vfd @@ -46,14 +47,16 @@ based on your physical requirements but these are beyond the scope of this manual. Refer to the GS2 manual that came with the drive for more information on the drive parameters. -* The communications switches must be set to RS-232C -* The motor parameters must be set to match the motor -* P3.00 (Source of Operation Command) must be set to Operation - determined by RS-485 interface, 03 or 04 -* P4.00 (Source of Frequency Command) must be set to Frequency - determined by RS232C/RS485 communication interface, 05 -* P9.01 (Transmission Speed) must be set to 9600 baud, 01 -* P9.02 (Communication Protocol) must be set to "Modbus RTU mode, - 8 data bits, no parity, 2 stop bits", 03 + * The communications switches must be set to RS-232C + * The motor parameters must be set to match the motor + * P3.00 (Source of Operation Command) must be set to Operation + determined by RS-485 interface, 03 or 04 + * P4.00 (Source of Frequency Command) must be set to Frequency + determined by RS232C/RS485 communication interface, 05 + * P9.01 (Transmission Speed) must be set to 9600 baud, 01 + * P9.02 (Communication Protocol) must be set to "Modbus RTU mode, + 8 data bits, no parity, 2 stop bits", 03 A PyVCP panel based on this example is <>. + +// vim: set syntax=asciidoc: diff --git a/docs/src/examples/gs2-example_es.adoc b/docs/src/examples/gs2-example_es.adoc index 6a438b07c8..d1fc595bd3 100644 --- a/docs/src/examples/gs2-example_es.adoc +++ b/docs/src/examples/gs2-example_es.adoc @@ -1,5 +1,7 @@ -[[cha:gs2-spindle]] +:lang: es +:toc: +[[cha:gs2-spindle]] = Husillo con GS2 Este ejemplo muestra las conexiones necesarias para usar un VFD GS2 @@ -43,17 +45,17 @@ basado en sus requisitos físicos, pero estos están más allá del alcance de e manual. Consulte el manual de GS2 que vino con la unidad para obtener más información sobre los parámetros del variador. -* Los interruptores de comunicación deben configurarse en RS-232C -* Los parámetros del motor deben configurarse para que coincidan con el motor -* P3.00 (Fuente del comando de operación) debe establecerse en Operación + * Los interruptores de comunicación deben configurarse en RS-232C + * Los parámetros del motor deben configurarse para que coincidan con el motor + * P3.00 (Fuente del comando de operación) debe establecerse en Operación determinada por la interfaz RS-485, 03 o 04 -* P4.00 (Fuente del comando de frecuencia) debe establecerse en Frecuencia + * P4.00 (Fuente del comando de frecuencia) debe establecerse en Frecuencia determinada por la interfaz de comunicación RS232C/RS485, 05 -* P9.01 (Velocidad de transmisión) debe establecerse en 9600 baudios, 01 -* P9.02 (Protocolo de comunicación) debe establecerse en "Modo Modbus RTU, + * P9.01 (Velocidad de transmisión) debe establecerse en 9600 baudios, 01 + * P9.02 (Protocolo de comunicación) debe establecerse en "Modo Modbus RTU, 8 bits de datos, sin paridad, 2 bits de parada ", 03 -Un panel PyVCP basado en este ejemplo está <>. - - +Un panel PyVCP basado en este ejemplo está aqui. +//<>. +// vim: set syntax=asciidoc: diff --git a/docs/src/examples/gs2-example_fr.adoc b/docs/src/examples/gs2-example_fr.adoc index c358a2c14e..21d7ea8ede 100644 --- a/docs/src/examples/gs2-example_fr.adoc +++ b/docs/src/examples/gs2-example_fr.adoc @@ -1,6 +1,7 @@ :lang: fr :toc: +[[cha:gs2-spindle]] = Broche avec variateur GS2 == Exemple @@ -18,6 +19,7 @@ port parallèle. Placer les lignes suivantes dans le fichier custom.hal pour connecter LinuxCNC au GS2 et avoir le contrôle de celui-ci depuis l'interface utilisateur. + ---- # Charger le composant utilisateur pour le variateur variateur loadusr -Wn spindle-vfd gs2_vfd -n spindle-vfd @@ -41,16 +43,16 @@ ajustés selon les caractéristiques demandées par le système. Ces réglages sortent, pour la plupart, du cadre de cet exemple, ils sont tous expliqués dans le manuel du variateur qu'il est impératif de consulter. -- Les switches de communication doivent être positionnés sur RS-232C. -- Les paramètres moteur doivent être ajustés en fonction du moteur. -- P3.00 (Source des commandes de marche) doit être ajusté sur _Opérations + * Les switches de communication doivent être positionnés sur RS-232C. + * Les paramètres moteur doivent être ajustés en fonction du moteur. + * P3.00 (Source des commandes de marche) doit être ajusté sur _Opérations déterminées par l'interface RS-485_, _03_ ou _04_ -- P4.00 (Source des commandes de fréquence) doit être ajusté sur _Fréquence + * P4.00 (Source des commandes de fréquence) doit être ajusté sur _Fréquence déterminée par l'interface RS232C/RS485_, _05_ -- P9.02 (Protocole de communication) doit être ajusté sur _Modbus RTU mode, + * P9.02 (Protocole de communication) doit être ajusté sur _Modbus RTU mode, 8 bits de donnée, pas de parity, 2 bits de stop_, _03_ Un panneau de commande virtuel PyVCP, basé sur cet exemple, est donné dans l'<>. - +// vim: set syntax=asciidoc: diff --git a/docs/src/gcode/g-code_fr.adoc b/docs/src/gcode/g-code_fr.adoc index 21816e0c6c..612f66967f 100644 --- a/docs/src/gcode/g-code_fr.adoc +++ b/docs/src/gcode/g-code_fr.adoc @@ -50,7 +50,7 @@ chose. (((Table des index du G Code))) [width="75%", options="header", cols="2^,5<"] -|============================================================================== +|==== |Sections | Descriptions |<> | Interpolation linéaire en vitesse rapide |<> | Interpolation linéaire en vitesse travail @@ -105,7 +105,7 @@ chose. |<> | Vitesse de coupe constante (IPM ou m/mn) |<> | Vitesse en tours par minute |<> | Options de retrait des cycles de perçage -|============================================================================== +|==== [[gcode:g0]] == G0 Interpolation linéaire en vitesse rapide(((G0 Interpolation linéaire en vitesse rapide)))(((rapide))) @@ -133,7 +133,7 @@ M2 (fin de programme) Si la compensation d'outil est active, le mouvement sera différent de celui décrit ci-dessus, voir la section -<>. +<>. Si 'G53' est programmé sur la même ligne, le mouvement sera également différent, voir la section <>. @@ -2183,7 +2183,6 @@ Voir la section sur les <>. Voir la section sur les <>. - [[gcode:g92.1-g92.2]] == G92.1, G92.2 Remise à zéro des décalages des systèmes de coordonnées diff --git a/docs/src/gcode/overview.adoc b/docs/src/gcode/overview.adoc index 621092f85a..0148b1768e 100644 --- a/docs/src/gcode/overview.adoc +++ b/docs/src/gcode/overview.adoc @@ -1276,4 +1276,4 @@ material removal rate. * 'File ended with no percent sign or program end' - Every G-code file must end in a M2 or M30 or be wrapped with the percent sign %. - +// vim: set syntax=asciidoc: diff --git a/docs/src/gcode/overview_es.adoc b/docs/src/gcode/overview_es.adoc index c996fcbb19..5cb5761d57 100644 --- a/docs/src/gcode/overview_es.adoc +++ b/docs/src/gcode/overview_es.adoc @@ -72,17 +72,15 @@ La entrada no distingue entre mayúsculas y minúsculas, excepto en los comentar fuera de un comentario puede estar en mayúsculas o minúsculas sin cambiar el significado de una línea -[[sub:block-delete]] (((Block Delete))) - -=== Eliminar Bloque +[[sub:block-delete]] +=== Eliminar Bloque(((Block Delete))) El carácter opcional de eliminación de bloque es la barra '/' cuando se coloca el primero en una línea. Algunas interfaces de usuario pueden utilizarlo para omitir líneas de código cuando sea necesario. En Axis, la combinación de teclas Alt-m-/ activa o desactiva la eliminación de bloque. Cuando eliminar bloque está activado, cualquier línea que comience con la barra '/' se omite. -=== Numero de línea -(((Line Number))) +=== Numero de línea(((Line Number))) Un número de línea es la letra N seguida de un entero sin signo, seguida opcionalmente por un punto y otro entero sin signo. Por @@ -104,7 +102,6 @@ Las letras que hacen referencia a los nombres de los ejes no son válidas en una no tiene el eje correspondiente. .Palabras y sus significados. - [width="75%", options="header", cols="^1,<5"] |==== | Letra | Significado @@ -142,14 +139,14 @@ Las siguientes reglas se utilizan para números (explícitos). En estas reglas, dígito es un solo carácter entre 0 y 9. * Un número consta de (1) un signo, más o menos, opcional, seguido de -(2) de cero a muchos dígitos, seguido, posiblemente, por (3) un punto decimal, -seguido de (4) cero a muchos dígitos, siempre que haya al menos -un dígito en algún lugar del número. + (2) de cero a muchos dígitos, seguido, posiblemente, por (3) un punto decimal, + seguido de (4) cero a muchos dígitos, siempre que haya al menos + un dígito en algún lugar del número. * Hay dos tipos de números: enteros y decimales. Un entero -no tiene un punto decimal en él; un decimal si lo tiene. + no tiene un punto decimal en él; un decimal si lo tiene. * Los números pueden tener cualquier número de dígitos, sujeto a la limitación de -longitud de la línea. Solo se retendrán unas diecisiete cifras significativas, -suficiente para todas las aplicaciones conocidas. + longitud de la línea. Solo se retendrán unas diecisiete cifras significativas, + suficiente para todas las aplicaciones conocidas. * Un número distinto de cero sin signo en su primer carácter, se supone que es positivo. Observe que los ceros inicial (antes del punto decimal y el primer dígito distinto de cero) @@ -197,9 +194,9 @@ variable global, son visibles. Las variables locales de un procedimiento de llamada no son visibles por el procedimiento llamado. Comportamiento de parámetros no inicializados:: -* Los parámetros globales no inicializados y los parámetros de subrutina no utilizados + * Los parámetros globales no inicializados y los parámetros de subrutina no utilizados    devuelve valor cero cuando se usan en una expresión. -* Los parámetros con nombre no inicializados indican un error cuando se usan en una expresión. + * Los parámetros con nombre no inicializados indican un error cuando se usan en una expresión. Modo:: La mayoría de los parámetros son de lectura/escritura y pueden asignarse dentro de una declaración de asignación. Sin embargo, para muchos parámetros predefinidos @@ -219,22 +216,18 @@ los parámetros numerados volatiles se restablecen a cero. Uso previsto:: * parámetros de usuario:: parámetros numerados en el rango 31..5000, y -parámetros nombrados globales y locales, excepto parámetros predefinidos. Estan -disponible para almacenamiento de uso general de valores de punto flotante, como -resultados intermedios, banderas, etc., a lo largo de la ejecución del programa. -Son de lectura/escritura (se le puede asignar un valor). - + parámetros nombrados globales y locales, excepto parámetros predefinidos. Estan + disponible para almacenamiento de uso general de valores de punto flotante, como + resultados intermedios, banderas, etc., a lo largo de la ejecución del programa. + Son de lectura/escritura (se le puede asignar un valor). * <> - se utilizan para   mantener los parámetros reales pasados ​​a una subrutina. - * <> - La mayoría de estos se utilizan   para acceder a offsets de sistemas de coordenadas. - * <> - utilizado para determinar la -   versión en ejecución. Son de solo lectura. +  versión en ejecución. Son de solo lectura. [[sub:numbered-parameters]] - === Parametros numerados Un parámetro numerado es el carácter de numeral '#' seguido de un @@ -262,90 +255,61 @@ parámetro 1, no el valor encontrado en el parámetro 3. Por supuesto, '\#[1+2] valor encontrado en el parámetro 3. El carácter '\#' puede repetirse; por ejemplo '##2' significa el valor del parámetro cuyo índice es el valor (entero) del parámetro 2. - -* '31 -5000 ' - parámetros de usuario del código G. Estos parámetros son globales en +* '31-5000' - parámetros de usuario del código G. Estos parámetros son globales en   archivos de código G, y disponibles para uso general. Volátiles. - * '5061-5069' - Coordenadas de un resultado de la sonda <> (X, Y,   Z, A, B, C, U, V y W). Las coordenadas están en el sistema de coordenadas en   que tuvo lugar el G38. Volátil. - * '5070' - Resultado de la sonda <> ; 1 si es exitoso, 0 si la sonda   no se pudo cerrar. Utilizado con G38.3 y G38.5. Volátil. - * '5161-5169' - Home "G28" para X, Y, Z, A, B, C, U, V y W. Persistente. - * '5181-5189' - Home "G30" para X, Y, Z, A, B, C, U, V y W. Persistente. - * '5210' - 1 si actualmente se aplica el desplazamiento "G52" o "G92", 0 -   en caso contrario. Volátil por defecto; persistente si -   'DISABLE_G92_PERSISTENCE = 1' en la sección '[RS274NGC]' del -   archivo '.ini'. - +  en caso contrario. Volátil por defecto; persistente si +  'DISABLE_G92_PERSISTENCE = 1' en la sección '[RS274NGC]' del +  archivo '.ini'. * '5211-5219' - offsets compartidos "G52" y "G92" para X, Y, Z, A, B, C, U,   V y W. Volátil por defecto; persistente si   'DISABLE_G92_PERSISTENCE = 1' en la sección '[RS274NGC]' del   archivo '.ini'. - * '5220' - Sistema de coordenadas número 1-9 para G54 - G59.3. Persistente. - * '5221-5230' - Sistema de coordenadas 1, G54 para X, Y, Z, A, B, C, U, V, W y R.   R denota el ángulo de rotación XY alrededor del eje Z. Persistente. - * '5241-5250' - Sistema de coordenadas 2, G55 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5261-5270' - Sistema de coordenadas 3, G56 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5281-5290' - Sistema de coordenadas 4, G57 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5301-5310' - Sistema de coordenadas 5, G58 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5321-5330' - Sistema de coordenadas 6, G59 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5341-5350' - Sistema de coordenadas 7, G59.1 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5361-5370' - Sistema de coordenadas 8, G59.2 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5381-5390' - Sistema de coordenadas 9, G59.3 para X, Y, Z, A, B, C, U, V, W y R.   Persistente. - * '5399' - Resultado de M66 - Verifica o espera la entrada. Volátil. - * '5400' - Número de herramienta. Volátil. - * '5401-5409' - Offsets de herramientas para X, Y, Z, A, B, C, U, V y W. Volátil. - * '5410' - Diámetro de herramienta. Volátil. - * '5411' - Ángulo frontal de herramienta. Volátil. - * '5412' - Ángulo posterior de la herramienta. Volátil. - * '5413' - Orientación de herramienta. Volátil. - * '5420-5428' - Posición relativa actual en el sistema de coordenadas activo   incluyendo todas los offsets y en las unidades de programa actuales para   X, Y, Z, A, B, C, U, V y W, volátiles. - * '5599' - Indicador para controlar la salida de las declaraciones (DEBUG,). -   1 = salida, 0 = sin salida; predeterminado = 1. Volátil. - +  1 = salida, 0 = sin salida; predeterminado = 1. Volátil. * '5600' - Indicador de fallo del cambiador de herramientas. Utilizado con el componente iocontrol-v2. -   1: cambiador de herramientas con fallos, 0: normal. Volátil. - +  1: cambiador de herramientas con fallos, 0: normal. Volátil. * '5601' - Código de fallo del cambiador de herramientas. Utilizado con el componente iocontrol-v2. -   Refleja el valor del pin HAL 'toolchanger-reason' si ocurrió un fallo. -   Volátil. +  Refleja el valor del pin HAL 'toolchanger-reason' si ocurrió un fallo. +  Volátil. .Persistencia de Parámetros Numerados - Los valores de los parámetros en el rango persistente se conservan en el tiempo, incluso si el centro de mecanizado está apagado. LinuxCNC usa un archivo de parámetros para garantizar la persistencia. Es administrado por el @@ -375,9 +339,7 @@ orden ascendente El archivo original se guarda como un archivo de respaldo cuando se escribe el nuevo archivo. [[gcode:format-parameter-file]] - .Formato de archivo de parámetros - [width="90%", options="header"] |==== |Número de parámetro | Valor del parámetro @@ -386,7 +348,6 @@ El archivo original se guarda como un archivo de respaldo cuando se escribe el n |==== [[sub:subroutine-parameters]] - === Parametros de subrutina * '1-30' Parámetros locales de argumentos de llamada de subrutina. Estos parámetros son @@ -445,7 +406,6 @@ finaliza y tendrán esos valores cuando el programa se ejecute nuevamente. La <> prueba si existe un parámetro con nombre dado. [[gcode:predefined-named-parameters]] - === Parametros con nombre predefinidos Los siguientes parámetros globales con nombre, de solo lectura, están disponibles para @@ -456,11 +416,8 @@ programa con sentencias if-then-else. Tenga en cuenta que un nuevo se puede agregar fácilmente, sin cambios en el código .ngc. * '#<_vmajor>' - Versión principal del paquete. Si la versión actual fuera 2.5.2, devolvería 2.5. - * '#<_vminor>' - Versión menor del paquete. Si la versión actual fuera 2.6.2, devolvería 0.2. - * '#<_line>' - Número de secuencia. Si ejecuta un archivo de código G, esto devuelve el número de línea actual. - * '#<_motion_mode>' - Devuelve el modo de movimiento actual del intérprete: [width="20%",options="header"] @@ -514,20 +471,14 @@ se puede agregar fácilmente, sin cambios en el código .ngc. |==== * '#<_metric>' - Devuelve 1 si G21 está activado, de lo contrario 0. - * '#<_imperial>' - Devuelve 1 si G20 está activado, de lo contrario 0. - * '#<_absolute>' - Devuelve 1 si G90 está activado, de lo contrario 0. - * '#<_incremental>' - Devuelve 1 si G91 está activado, de lo contrario 0. - * '#<_inverse_time>' - Devuelve 1 si el modo de alimentación inversa (G93) está activado, de lo contrario 0. - * '#<_units_per_minute>' - Devuelve 1 si el modo de alimentación udes/minuto (G94) está activado, de lo contrario 0. - * '#<_units_per_rev>' - Devuelve 1 si el modo udes/revolución (G95) está activado, de lo contrario 0. - * '#<_coord_system>' - Devuelve un flotante del nombre del sistema de coordenadas actual (G54..G59.3). + Por ejemplo, si está en el sistema de coordenadas G55, el valor de retorno es 550.000000 y si está en G59.1 el valor de retorno es 591.000000. @@ -546,126 +497,91 @@ Por ejemplo, si está en el sistema de coordenadas G55, el valor de retorno es |==== * '#<_tool_offset>' - Devuelve 1 si el offset de herramienta (G43) está activado, de lo contrario 0. - * '#<_retract_r_plane>' - Devuelve 1 si G98 está configurado, de lo contrario 0. - * '#<_retract_old_z>' - Devuelve 1 si G99 está activado, de lo contrario 0. [[sub:system-parameters]] - === Parametros del sistema * '#<_spindle_rpm_mode>' - -    Devuelva 1 si el modo rpm del cabezal (G97) está activado, de lo contrario 0. - +  Devuelva 1 si el modo rpm del cabezal (G97) está activado, de lo contrario 0. * '#<_spindle_css_mode>' - -    Devuelve 1 si el modo de velocidad de superficie constante (G96) está activado, de lo contrario 0. - +  Devuelve 1 si el modo de velocidad de superficie constante (G96) está activado, de lo contrario 0. * '#<_ijk_absolute_mode>' - -    Devuelve 1 si el modo de distancia de Arco absoluto (G90.1) está activado, de lo contrario 0. - +  Devuelve 1 si el modo de distancia de Arco absoluto (G90.1) está activado, de lo contrario 0. * '#<_lathe_diameter_mode>' - -    Devuelve 1 si el modo de diámetro en torno (G7) está activado, de lo contrario 0. - +  Devuelve 1 si el modo de diámetro en torno (G7) está activado, de lo contrario 0. * '#<_lathe_radius_mode>' - -    Devuelve 1 si el modo de radio en torno (G8) está activado, de lo contrario 0. - +  Devuelve 1 si el modo de radio en torno (G8) está activado, de lo contrario 0. * '#<_spindle_on>' - -    Devuelve 1 si el husillo está girando actualmente (M3 o M4), de lo contrario 0. - +  Devuelve 1 si el husillo está girando actualmente (M3 o M4), de lo contrario 0. * '#<_spindle_cw>' - -    Devuelve 1 si la dirección del husillo es en sentido horario (M3), de lo contrario 0. - +  Devuelve 1 si la dirección del husillo es en sentido horario (M3), de lo contrario 0. * '#<_mist>' - -    Devuelve 1 si la niebla (M7) está activada. - +  Devuelve 1 si la niebla (M7) está activada. * '#<_flood>' - -    Devuelve 1 si la inundación (M8) está activada. - +  Devuelve 1 si la inundación (M8) está activada. * '#<_speed_override>' - -    Devuelva 1 si la anulación de alimentación (M48 o M50 P1) está activada, de lo contrario 0. - +  Devuelva 1 si la anulación de alimentación (M48 o M50 P1) está activada, de lo contrario 0. * '#<_feed_override>' - -    Devuelve 1 si el ajuste de alimentación (M48 o M51 P1) está activado, de lo contrario 0. - +  Devuelve 1 si el ajuste de alimentación (M48 o M51 P1) está activado, de lo contrario 0. * '#<_adaptive_feed>' - -    Devuelve 1 si la alimentación adaptativa (M52 o M52 P1) está activada, de lo contrario 0. - +  Devuelve 1 si la alimentación adaptativa (M52 o M52 P1) está activada, de lo contrario 0. * '#<_feed_hold>' - -    Devuelve 1 si el interruptor de retención de alimentación está habilitado (M53 P1), de lo contrario 0. - +  Devuelve 1 si el interruptor de retención de alimentación está habilitado (M53 P1), de lo contrario 0. * '#<_feed>' - -    Devuelve el valor actual de F, no la velocidad de alimentación real. - +  Devuelve el valor actual de F, no la velocidad de alimentación real. * '#<_rpm>' - -    Devuelve el valor actual de S, no la velocidad real del husillo. - +  Devuelve el valor actual de S, no la velocidad real del husillo. * '#<_x>' - -    Devuelve la coordenada X relativa actual, incluidos todos los offsets. Igual que #5420. - +  Devuelve la coordenada X relativa actual, incluidos todos los offsets. Igual que #5420. * '#<_y>' - -    Devuelve la coordenada Y relativa actual, incluidos todos los offsets. Igual que #5421. - +  Devuelve la coordenada Y relativa actual, incluidos todos los offsets. Igual que #5421. * '#<_z>' - -    Devuelve la coordenada Z relativa actual, incluidos todos los offsets. Igual que #5422. - +  Devuelve la coordenada Z relativa actual, incluidos todos los offsets. Igual que #5422. * '#<_a>' - -    Devuelve la coordenada relativa actual A, incluidos todos los offsets. Igual que #5423. - +  Devuelve la coordenada relativa actual A, incluidos todos los offsets. Igual que #5423. * '#<_b>' - -    Devuelve la coordenada B relativa actual, incluidos todos los offsets. Igual que #5424. - +  Devuelve la coordenada B relativa actual, incluidos todos los offsets. Igual que #5424. * '#<_c>' - -    Devuelve la coordenada C relativa actual, incluidos todos los offsets. Igual que #5425. - +  Devuelve la coordenada C relativa actual, incluidos todos los offsets. Igual que #5425. * '#<_u>' - -    Devuelve la coordenada U relativa actual, incluidos todos los offsets. Igual que #5426. - +  Devuelve la coordenada U relativa actual, incluidos todos los offsets. Igual que #5426. * '#<_v>' - -    Devuelve la coordenada V relativa actual, incluidos todos los offsets. Igual que #5427. - +  Devuelve la coordenada V relativa actual, incluidos todos los offsets. Igual que #5427. * '#<_w>' - -    Devuelve la coordenada W relativa actual, incluidos todos los offsets. Igual que #5428. - +  Devuelve la coordenada W relativa actual, incluidos todos los offsets. Igual que #5428. * '#<_current_tool>' - -    Número de la herramienta actual en el husillo. Igual que # 5400. - +  Número de la herramienta actual en el husillo. Igual que # 5400. * '#<_current_pocket>' - -    Devuelve el número de ranura de la herramienta actual. - +  Devuelve el número de ranura de la herramienta actual. * '#<_selected_tool>' - -    El número de la herramienta seleccionada por un código T. Por defecto -1. - +  El número de la herramienta seleccionada por un código T. Por defecto -1. * '#<_selected_pocket>' - -    El número de ranura seleccionado por un código T. Predeterminado -1 -    (sin ranura seleccionada). - +  El número de ranura seleccionado por un código T. Predeterminado -1 +  (sin ranura seleccionada). * '#<_value>' - -Valor de retorno de la última palabra O 'return' o 'endsub'. Por defecto -    valor 0 si no hay expresión después de 'return' o 'endsub'. Inicializado -    a 0 al inicio del programa. - + Valor de retorno de la última palabra O 'return' o 'endsub'. Por defecto +  valor 0 si no hay expresión después de 'return' o 'endsub'. Inicializado +  a 0 al inicio del programa. * '#<_value_returned>' - -    1.0 si la última palabra O 'return' o 'endsub' devolvió un valor, 0 -    de otra manera. Limpiado por la siguiente llamada O-word. - +  1.0 si la última palabra O 'return' o 'endsub' devolvió un valor, 0 +  de otra manera. Limpiado por la siguiente llamada O-word. * '#<_task>' - -    1.0 si la instancia del intérprete en ejecución es parte de milltask, 0.0 -    de otra manera. A veces es necesario tratar este caso especialmente -    para mantener una vista previa adecuada, por ejemplo, cuando se prueba el éxito de -    una sonda (G38.n) inspeccionando #5070, que siempre fallará en el -    intérprete de vista previa (por ejemplo, Axis). - +  1.0 si la instancia del intérprete en ejecución es parte de milltask, 0.0 +  de otra manera. A veces es necesario tratar este caso especialmente +  para mantener una vista previa adecuada, por ejemplo, cuando se prueba el éxito de +  una sonda (G38.n) inspeccionando #5070, que siempre fallará en el +  intérprete de vista previa (por ejemplo, Axis). * '#<_call_level>' - -    nivel actual de anidamiento de los procedimientos O-word. Para depuracion. - +  nivel actual de anidamiento de los procedimientos O-word. Para depuracion. * '#<_remap_level>' - -    nivel actual de la pila de reasignación. Cada reasignación en un bloque agrega uno -    al nivel de reasignación. Para depuracion. +  nivel actual de la pila de reasignación. Cada reasignación en un bloque agrega uno +  al nivel de reasignación. Para depuracion. [[gcode:ini-hal-params]] - == Pines HAL y valores INI + Si está habilitado en el <> G-code tiene acceso a los valores de las entradas del archivo INI y a los pines HAL. @@ -736,7 +652,6 @@ espacio de nombres límitado y no mnemotécnico y es innecesariamente engorroso mecanismo de comunicación UI/Intérprete. [[gcode:expressions]] - == Expresiones Una expresión es un conjunto de caracteres que comienzan con un corchete izquierdo '[' @@ -748,7 +663,6 @@ se lee, antes de que se ejecute nada en la línea. Un ejemplo de una expresión es '[1 + acos[0] - [#3 ** [4.0/2]]]'. [[gcode:binary-operators]] - == Operadores binarios Los operadores binarios solo aparecen dentro de las expresiones. Hay cuatro operaciones @@ -776,7 +690,6 @@ número, no solo en enteros. El número cero es equivalente a falso lógico, y cualquier número distinto de cero es equivalente a verdadero lógico. .Precedencia de operadores - [width="60%", options="header", cols="2*^"] |==== |Operador | Precedencia @@ -797,7 +710,6 @@ diferencia absoluta es menor que 0.0001 (este valor se define como 'TOLERANCE_EQUAL' en src/emc/rs274ngc/interp_internal.hh). [[gcode:functions]] - == Funciones Las funciones disponibles se muestran en la siguiente tabla. Los argumentos unarios @@ -806,7 +718,6 @@ grados. Los valores devueltos por operaciones unarias que devuelven medidas de ('ACOS', 'ASIN' y 'ATAN') también están en grados. .Funciones - [width="75%", options="header", cols="^,<"] |==== |Nombre de la función | Resultado de la función @@ -914,9 +825,7 @@ esa línea, a menos que en ella se dé un comando explícito usando las palabras Los códigos 'no modales' solo tienen efecto en las líneas en las que se encuentran. Por ejemplo, G4 (Dwell) no es modal. -(((Polar Coordinates))) - -== Coordenadas Polares +== Coordenadas Polares(((Polar Coordinates))) Las coordenadas polares se pueden usar para especificar la coordenada XY de un movimiento. El @n es la distancia y ^n es el ángulo. La ventaja de esto está @@ -953,7 +862,7 @@ la distancia desde la posición XY cero aumentó con cada línea. Espiral polar -image::images/polar01.png[align="center", alt="Espiral polar"] +image::images/polar01.png["Espiral polar",align="center"] El siguiente código producirá nuestro patrón cuadrado. @@ -971,16 +880,15 @@ la distancia del punto final es la misma para cada línea. Cuadrado polar -image::images/polar02.png[align="center", alt="Cuadrado polar"] +image::images/polar02.png["Cuadrado polar",align="center"] Es un error si: * Se inicia un movimiento incremental en el origen * Se usa una mezcla de palabras Polar y X o Y -[[gcode:modal-groups]](((Modal Groups))) - -== Grupos modales +[[gcode:modal-groups]] +== Grupos modales(((Modal Groups))) Los comandos modales se organizan en conjuntos llamados 'grupos modales', y solo un miembro de un grupo modal puede estar en vigor en cualquier momento. En @@ -991,7 +899,6 @@ en muchos modos al mismo tiempo, con un modo de cada grupo modal en vigor. Los grupos modales se muestran en la siguiente tabla. .Grupos modales de código G.[[cap:modal-groups]] - [width="80%", cols="4,6", options="header"] |==== |Significado del grupo modal | Miembros @@ -1013,7 +920,6 @@ en vigor. Los grupos modales se muestran en la siguiente tabla. |==== .Grupos modales de código M. - [width="80%", cols="4,6", options="header"] |==== |Significado del grupo modal | Miembros @@ -1078,62 +984,51 @@ NOTA: Los comentarios en línea en palabras O no deben usarse. Vea la sección d == Mensajes * '(MSG,)' - muestra el mensaje si aparece 'MSG' después del paréntesis izquierdo -y antes de cualquier otro caracter imprimible. Se permiten variantes de 'MSG' que incluyen -espacios en blanco y minúsculas. El resto de -los caracteres antes del paréntesis derecho se consideran un mensaje. -Los mensajes deben mostrarse en el dispositivo de visualización de mensajes del interfaz de usuario, -si se proporciona. + y antes de cualquier otro caracter imprimible. Se permiten variantes de 'MSG' que incluyen + espacios en blanco y minúsculas. El resto de + los caracteres antes del paréntesis derecho se consideran un mensaje. + Los mensajes deben mostrarse en el dispositivo de visualización de mensajes del interfaz de usuario, + si se proporciona. .Ejemplo de mensaje ---- (MSG, esto es un mensaje) ---- -(((Probe Logging))) - -== Registro de sonda +== Registro de sonda(((Probe Logging))) * '(PROBEOPEN filename.txt)' - abrirá filename.txt y almacenará 9 números de -coordenadas, XYZABCUVW, de cada sondeo recto exitoso en el. - + coordenadas, XYZABCUVW, de cada sondeo recto exitoso en el. * '(PROBECLOSE)' - cerrará el archivo abierto. Para más información sobre -sondeo ver la sección <>. - -(((Logging))) + sondeo ver la sección <>. -== Registro +== Registro(((Logging))) * '(LOGOPEN, filename.txt)' - abre el archivo de registro nombrado. Si el archivo ya -existe, se trunca. - + existe, se trunca. * '(LOGAPPEND, filename)' - abre el archivo de registro nombrado. Si el archivo ya -existe, los datos se adjuntan. - + existe, los datos se adjuntan. * '(LOGCLOSE)' - cierra un archivo de registro abierto. - * '(LOG,)' - todo lo sigue a la ',' se escribe en el archivo de registro si está abierto. -Admite la expansión de parámetros como se describe a continuación. + Admite la expansión de parámetros como se describe a continuación. Ejemplos de registro están en 'nc_files/examples/smartprobe.ngc' y en 'nc_files/ngcgui_lib/rectange_probe.ngc' archivos de código G de muestra. [[gcode:debug]] -== Mensajes de depuracion -(((Debug Messages))) +== Mensajes de depuracion(((Debug Messages))) * '(DEBUG,)' - muestra un mensaje como '(MSG,)' con la adición de manejo especial -de parámetros de comentarios como se describe a continuación. + de parámetros de comentarios como se describe a continuación. [[gcode:print]] -== Imprimir mensajes -(((Print Messages))) +== Imprimir mensajes(((Print Messages))) * '(PRINT,)' - los mensajes se envían a 'stderr' con un manejo especial para -parámetros como se describe a continuación. + parámetros como se describe a continuación. [[gcode:comment-parameters]] -== Parametros de comentario -(((Comment Parameters))) +== Parametros de comentario(((Comment Parameters))) En los comentarios DEBUG, PRINT y LOG, los valores de los parámetros en el mensaje se expanden. @@ -1154,7 +1049,6 @@ tendrán los espacio en blanco eliminados. Por tanto, '\# se convertirá en '# '. [[gcode:file-requirements]] - == Requisitos de archivos Un archivo de código G debe contener una o más líneas de código G y debe terminarse @@ -1188,15 +1082,14 @@ La vista previa se puede desactivar en Axis para acelerar la carga de grandes programas. En Axis, las secciones de la vista previa se pueden desactivar usando comentarios de <>. -[[gcode:order-of-execution]](((G Code Order of Execution))) - -== Orden de ejecución del Codigo G +[[gcode:order-of-execution]] +== Orden de ejecución del Codigo G(((G Code Order of Execution))) El orden de ejecución de los elementos en una línea no se define por la posición de cada elemento en la línea, sino según la siguiente lista: * Comandos O-word (opcionalmente seguidos de un comentario, pero no se permiten otras palabras -en la misma línea) + en la misma línea) * Comentario (incluido mensajes) * Establecer el modo de velocidad de alimentación (G93, G94). * Establecer la velocidad de alimentación (F). @@ -1224,33 +1117,28 @@ en la misma línea) (posiblemente) por G53. * Detener (M0, M1, M2, M30, M60). -(((G Code Best Practices))) - -== Buenas practicas de código G +== Buenas practicas de código G(((G Code Best Practices))) .Utilice una precisión decimal adecuada. - Use al menos 3 dígitos después del decimal al fresar en milímetros, y al menos 4 dígitos después del decimal al fresar en pulgadas. .Use espacios en blanco consistentes. - El código G es más legible cuando aparece al menos un espacio antes de las palabras. Si bien está permitido insertar espacios en blanco en medio de los números, no hay razón para hacerlo. .Utilice arcos de formato central. - Los arcos de formato central (que usan 'I- J- K-' en lugar de 'R-') se comportan más consistentemente que los arcos de formato R, particularmente para ángulos incluidos cerca de 180 o 360 grados. .Utilice un conjunto de grupos modales en el preámbulo - Cuando la ejecución correcta de su programa depende de la configuración modal, asegúrese de configurarlos al comienzo del programa de pieza. Los modos pueden llegar desde programas anteriores y desde los comandos MDI. Preámbulo de ejemplo para una fresadora. + [source,{ngc}] --------------------------------------------------------------------- G17 G20 G40 G49 G54 G80 G90 G94 @@ -1266,18 +1154,15 @@ programa a diferentes escalas. Otras configuraciones, como el modo de retorno en los ciclos fijos también pueden ser importantes. .No ponga demasiadas cosas en una línea. - Ignore todo en la Sección <>, y en su lugar no escriba ninguna línea de código que sea ambigua. .No establezca y use un parámetro en la misma línea. - No use y establezca un parámetro en la misma línea, aunque la semántica está bien definida. Actualizar una variable a un nuevo valor, como '#1=[#1+#2]' está bien. .No use números de línea. - Los números de línea no ofrecen beneficios. Cuando se informan números de línea en mensajes de error, los números se refieren al número de línea en el archivo, no al valor de palabras N. @@ -1294,14 +1179,15 @@ tasa de eliminación de material deseada. == Mensajes de error comunes * 'Código G fuera de rango' - se utilizó un código G mayor que G99; el alcance de -los códigos G en LinuxCNC son 0 - 99. No todos los números entre 0 y 99 son -código G válidos. + los códigos G en LinuxCNC son 0 - 99. No todos los números entre 0 y 99 son + código G válidos. * 'Código g desconocido utilizado' - se utilizó un código G que no forma parte de LinuxCNC. * 'palabra i, j, k sin Gx para usarla' - las palabras i, j y k deben usarse en la misma -línea del código G. + línea del código G. * 'No se pueden usar valores de eje sin un código g que los use' - Los valores de eje -no debe usarse en una línea sin un código G modal vigente o un código G -en la misma linea. + no debe usarse en una línea sin un código G modal vigente o un código G + en la misma linea. * 'Archivo finalizado sin signo de porcentaje o fin de programa' - Cada archivo de código G debe -termina en un M2 o M30 o estar envuelto con signos de porcentaje %. + termina en un M2 o M30 o estar envuelto con signos de porcentaje %. +// vim: set syntax=asciidoc: diff --git a/docs/src/getting-started/Getting-Started-with-LinuxCNC.contents_fr.adoc b/docs/src/getting-started/Getting-Started-with-LinuxCNC.contents_fr.adoc index 524236881c..67a4c480e0 100644 --- a/docs/src/getting-started/Getting-Started-with-LinuxCNC.contents_fr.adoc +++ b/docs/src/getting-started/Getting-Started-with-LinuxCNC.contents_fr.adoc @@ -14,6 +14,4 @@ include::updating-linuxcnc_fr.adoc[] include::running-linuxcnc_fr.adoc[] -include::pncconf_fr.adoc[] - // vim: set syntax=asciidoc: diff --git a/docs/src/getting-started/system-requirements.adoc b/docs/src/getting-started/system-requirements.adoc index 77aa9a9a2d..d8a86fa87d 100644 --- a/docs/src/getting-started/system-requirements.adoc +++ b/docs/src/getting-started/system-requirements.adoc @@ -13,7 +13,7 @@ Keep in mind that the Latency Test numbers are more important than the processor speed for software step generation. More information on the Latency Test is <>. In addition LinuxCNC needs to be run on an operating system that uses a -specially modified kernel. See <> +specially modified kernel. See <> Additional information is on the LinuxCNC Wiki site: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hardware_Requirements[Hardware Requirements] @@ -40,7 +40,8 @@ check the https://www.debian.org/releases/stable/amd64/ch02.en.html[Debian] web site for details on the LiveCD you're using. Older hardware may benefit from selecting an older version of the LiveCD when available. -== Kernel and Version requirements[[kernel_and_version_requirements]] +[[sec:kernel_and_version_requirements]] +== Kernel and Version requirements LinuxCNC requires a kernel modified for realtime use to control real machine hardware. It can, however run on a standard kernel in simulation diff --git a/docs/src/getting-started/system-requirements_es.adoc b/docs/src/getting-started/system-requirements_es.adoc index ab1cb5faf9..f2127ac267 100644 --- a/docs/src/getting-started/system-requirements_es.adoc +++ b/docs/src/getting-started/system-requirements_es.adoc @@ -36,6 +36,7 @@ Los requerimientos mínimos del sistema cambian conforme las distribuciones Linu sitio https://www.debian.org/releases/stable/amd64/ch02.es.html[Debian] para mas detalles sobre el LiveCD que esta usando. El hardware antiguo podría beneficiarse si se selecciona una versión mas antigua del LiveCD cuando se encuentre disponible. +[[sec:kernel_and_version_requirements]] == Kernel y requisitos de Versión LinuxCNC requiere un kernel modificado para uso con tiempo real para controlar hardware real @@ -48,7 +49,7 @@ Las opciones de kernel en tiempo real son preempt-rt, RTAI y Xenomai. Puede descubrir la versión del kernel de su sistema con el comando - uname -a + uname -a Si ve (como arriba) `-rt-` en el nombre del kernel, entonces está ejecutando el preempt-rt kernel y debería instalar la versión "uspace" de linuxcnc. @@ -57,7 +58,7 @@ También debe instalar uspace para configuraciones "sim" en kernels que no son e Si ve `-rtai-` en el nombre del kernel, entonces está ejecutando RTAI tiempo real. Consulte a continuación la versión de linuxcnc para instalar. -=== Preempt-RT con linuxcnc-uspace +=== Preempt-RT con 'linuxcnc-uspace' Preempt-RT es el más nuevo de los sistemas en tiempo real, y también es la versión que está más cerca de un kernel estandar. Los kernels Preempt-RT están disponibles @@ -67,7 +68,7 @@ Preempt-RT generalmente tendrá el mejor soporte de controladores y es la única opción para sistemas que usan tarjetas Mesa Ethernet. En general, preempt-rt tiene la peor latencia de los sistemas disponibles, pero hay excepciones. -=== RTAI con linuxcnc +=== RTAI con 'linuxcnc' RTAI ha sido el pilar de las distribuciones LinuxCNC durante muchos años. Generalmente dará el mejor rendimiento en tiempo real, en términos de baja @@ -76,12 +77,12 @@ de pantallas. Un Kernel RTAI está disponible desde el repositorio de paquetes d Si instaló desde la imagen Live/Install, entonces proceda con el kernel y LinuxCNC como se describe en [Installing-RTAI]. -=== Xenomai con linuxcnc-uspace +=== Xenomai con 'linuxcnc-uspace' Xenomai también es compatible, pero tendrá que buscar o construir el kernel y compilar LinuxCNC desde las fuentes para utilizarlo. -=== RTAI con linuxcnc-uspace +=== RTAI con 'linuxcnc-uspace' También es posible ejecutar LinuxCNC con RTAI en modo de espacio de usuario. Como con Xenomai, necesitará compilar desde las fuentes para hacer esto. @@ -101,4 +102,3 @@ reconoció apropiadamente su monitor o tarjeta de vídeo. Esto se puede solucion o creando/editando archivos Xorg.conf. // vim: set syntax=asciidoc: - diff --git a/docs/src/getting-started/system-requirements_fr.adoc b/docs/src/getting-started/system-requirements_fr.adoc index 22ec2bb8a4..594a2cd975 100644 --- a/docs/src/getting-started/system-requirements_fr.adoc +++ b/docs/src/getting-started/system-requirements_fr.adoc @@ -1,7 +1,6 @@ :lang: fr -[[cha:Configuration-requise]] - +[[cha:system-requirements]] = Configuration requise == Configuration minimale @@ -15,7 +14,8 @@ l'esprit que les valeurs retournées par le test de latence (Latency Test), sont plus importantes que la vitesse du microprocesseur pour la génération logicielle des pas. Plus d'informations à ce propos dans la section relative au <>. -De surcroît, LinuxCNC a besoin d'être exécuté sur un noyau modifié. Voir <> +De surcroît, LinuxCNC a besoin d'être exécuté sur un noyau modifié. +Voir <>. Des informations additionnelles sont disponibles sur le http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Hardware_Requirements[wiki de linuxcnc.org.] @@ -42,7 +42,7 @@ Pensez à regarder sur le site de https://www.debian.org/releases/stable/amd64/c pour le Live-CD que vous utilisé. Du matériel plus ancien peut bénéficier d'une version plus ancienne du Live-CD -[[Noyau_et_version_requise]] +[[sec:kernel_and_version_requirements]] == Noyau et version requise LinuxCNC a besoin d'un noyau modifié pour une utilisation en temps réel @@ -57,9 +57,9 @@ Les options temps réel du noyau sont: "preempt-rt", "RTAI" et "Xenomai" Pour savoir la version de votre noyau, utiliser la commande suivante dans un terminal: - uname -a + uname -a - === Preempt-RT avec linuxcnc-uspace +=== Preempt-RT avec linuxcnc-uspace Preempt-RT est le plus récent des systèmes temps réel, il est aussi le plus proche du noyau principal. Preempt-RT est disponible déjà compilé dans les @@ -68,7 +68,6 @@ Preempt-RT posséde généralement le meilleur support de driver et est la seule faire fonctionner les cartes MESA en ethernet. Preempt-RT posséde la pire latence, mais des exceptions existent. - === RTAI avec linuxcnc RTAI était l'option temps réel la plus utilisée. Il donne généralement les meilleurs @@ -77,7 +76,6 @@ et moins de choix sur les résolutions d'écrans. Un noyau RTAI est disponible d dépots de LinuxCNC. Si vous avez installé depuis un Live-CD, passer sur le noyau LinuxCNC est décrit dans [Installer-RTAI]. - === Xenomai avec linuxcnc-uspace Xenomai est aussi supporté, mais vous devez trouvé ou crée le noyau, diff --git a/docs/src/getting-started/system-requirements_zh_CN.adoc b/docs/src/getting-started/system-requirements_zh_CN.adoc index b87ffb257e..1cc8471f7d 100644 --- a/docs/src/getting-started/system-requirements_zh_CN.adoc +++ b/docs/src/getting-started/system-requirements_zh_CN.adoc @@ -9,7 +9,7 @@ 请注意,延迟测试结果比处理器速度对于软件步进生成更为重要。 有关延迟测试的更多信息请访问 http://linuxcnc.org/docs/2.8/html/install/latency-test.html[此处]。 再者,LinuxCNC必须运行于使用经过特殊更改的内核的操作系统。 -请看 <> +请看 <> 其他补充信息在LinuxCNC Wiki网站: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hardware_Requirements[Hardware_Requirements] diff --git a/docs/src/gui/gmoccapy.adoc b/docs/src/gui/gmoccapy.adoc index 0acda1b8c2..141c3c6eb5 100644 --- a/docs/src/gui/gmoccapy.adoc +++ b/docs/src/gui/gmoccapy.adoc @@ -75,31 +75,32 @@ There is really not to much to configure just to run gmoccapy, but there are som you should take care off if you want to use all the features of the GUI. You will find a lot of simulation configurations (INI files) included, just to show the basics: + - + - * gmoccapy.ini + - * gmoccapy_4_axis.ini + - * lathe_configs/gmoccapy_lathe.ini + - * lathe_configs/gmoccapy_lathe_imperial.ini + - * gmoccapy_left_panel.ini + - * gmoccapy_right_panel.ini + - * gmoccapy_messages.ini + - * gmoccapy_pendant.ini + - * gmoccapy_sim_hardware_button.ini + - * gmoccapy_tool_sensor.ini + - * gmoccapy_with_user_tabs.ini + - * gmoccapy_XYZAB.ini + - * gmoccapy_XYZAC.ini + - * gmoccapy_XYZCW.ini + - * gmoccapy-JA/Gantry/gantry_mm.ini + - * gmoccapy-JA/scara/scara.ini + - * gmoccapy-JA/table-rotary-tilting/xyzac-trt.ini + - * and a lot more ... + - + -The names should explain the main intention of the different INI Files. + -If you use an existing configuration of your machine, just edit your INI according to this document. + + * gmoccapy.ini + * gmoccapy_4_axis.ini + * lathe_configs/gmoccapy_lathe.ini + * lathe_configs/gmoccapy_lathe_imperial.ini + * gmoccapy_left_panel.ini + * gmoccapy_right_panel.ini + * gmoccapy_messages.ini + * gmoccapy_pendant.ini + * gmoccapy_sim_hardware_button.ini + * gmoccapy_tool_sensor.ini + * gmoccapy_with_user_tabs.ini + * gmoccapy_XYZAB.ini + * gmoccapy_XYZAC.ini + * gmoccapy_XYZCW.ini + * gmoccapy-JA/Gantry/gantry_mm.ini + * gmoccapy-JA/scara/scara.ini + * gmoccapy-JA/table-rotary-tilting/xyzac-trt.ini + * and a lot more ... + +The names should explain the main intention of the different INI Files. + +If you use an existing configuration of your machine, just edit your INI according to this document. -IMPORTANT: If you want to use <>, don't forget to set the path to your macros or +[IMPORTANT] + If you want to use <>, don't forget to set the path to your macros or subroutines folder as described below. So let us take a closer look to the the INI file and what you need to include @@ -108,24 +109,26 @@ to use gmoccapy on your machine: + [[gmoccapy:display-section]] === The DISPLAY Section - [DISPLAY] - DISPLAY = gmoccapy - PREFERENCE_FILE_PATH = gmoccapy_preferences - MAX_FEED_OVERRIDE = 1.5 - MAX_SPINDLE_OVERRIDE = 1.2 - MIN_SPINDLE_OVERRIDE = 0.5 - LATHE = 1 - BACK_TOOL_LATHE = 1 - PROGRAM_PREFIX = ../../nc_files/ - -'''' +---- +[DISPLAY] +DISPLAY = gmoccapy +PREFERENCE_FILE_PATH = gmoccapy_preferences +MAX_FEED_OVERRIDE = 1.5 +MAX_SPINDLE_OVERRIDE = 1.2 +MIN_SPINDLE_OVERRIDE = 0.5 +LATHE = 1 +BACK_TOOL_LATHE = 1 +PROGRAM_PREFIX = ../../nc_files/ +---- The most important part is to tell LinuxCNC to use gmoccapy, editing the [DISPLAY] section. - [DISPLAY] - DISPLAY = gmoccapy +---- +[DISPLAY] +DISPLAY = gmoccapy - PREFERENCE_FILE_PATH = gmoccapy_preferences +PREFERENCE_FILE_PATH = gmoccapy_preferences +---- gmoccapy 3 does support the following command line options: @@ -175,7 +178,7 @@ The second line is optional and will switch the X axis in a way you need for a back tool lathe. Also the keyboard shortcuts will react in a different way. It is allowed with gmoccapy to configuer a lathe also with additional axis, so you may use also a XZCW config for a lathe. [TIP] -See also the <> +See also the <> * PROGRAM_PREFIX = ../../nc_files/ @@ -187,7 +190,6 @@ linuxcnc/nc_files and then the users home directory. [[gmoccapy:configuration-of-tabs-and-side-panels]] .Configuration of tabs and side panels - You can add embedded programs to gmoccapy like you can do in axis, touchy and gscreen. All is done by gmoccapy automatically if you include a few lines in your INI file in the DISPLAY section. @@ -196,15 +198,14 @@ If you never used a glade panel, I recommend to read the excellent documentation http://www.linuxcnc.org/docs/html/gui/gladevcp.html[Glade VCP] .Example - ---- - EMBED_TAB_NAME = DRO - EMBED_TAB_LOCATION = ntb_user_tabs - EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade +EMBED_TAB_NAME = DRO +EMBED_TAB_LOCATION = ntb_user_tabs +EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade - EMBED_TAB_NAME = Second user tab - EMBED_TAB_LOCATION = ntb_preview - EMBED_TAB_COMMAND = gladevcp -x {XID} vcp_box.glade +EMBED_TAB_NAME = Second user tab +EMBED_TAB_LOCATION = ntb_preview +EMBED_TAB_COMMAND = gladevcp -x {XID} vcp_box.glade ---- All you have to take care off, is that you include for every tab or side panel @@ -212,11 +213,9 @@ the mentioned three lines, * EMBED_TAB_NAME = Represents the name of the tab or side panel, it is up to you what name you use, but it must be present! - - * EMBED_TAB_LOCATION = Is the place where your program will be placed in the GUI. -.valid values are: +Valid values are: * ntb_user_tabs (as main tab, covering the complete screen)' * ntb_preview (as tab on the preview side)' @@ -267,23 +266,18 @@ postgui hal file specified in your INI file, because this pin do not exist prior Here are some examples: .ntb_preview - as maximized version - image::images/gmoccapy_ntb_preview_maximized_2.png[align="left"] .ntb_preview - image::images/gmoccapy_ntb_preview.png[align="left"] .box_left - showing gmoccapy in edit mode - image::images/gmoccapy_with_left_box_in_edit_mode.png[align="left"] .box_right - and gmoccapy in MDI mode - image::images/gmoccapy_with_right_panel_in_MDI_mode.png[align="left"] .Configuration of User Created Messages - Gmoccapy has the ability to create hal driven user messages. To use them you need to introduce some lines in the [DISPLAY] section of the INI file. @@ -299,10 +293,8 @@ MESSAGE_PINNAME = is the name of the hal pin group to be created * 'status' : Will just display a message as pop up window, using the messaging system of gmoccapy - * 'okdialog' : Will hold focus on the message dialog and will activate a - "-waiting" Hal_Pin OUT. Closing the message will reset the waiting pin - + "-waiting" Hal_Pin OUT. Closing the message will reset the waiting pin * 'yesnodialog' : Will hold focus on the message dialog and will activate a "-waiting" Hal_Pin bit OUT it will also give access to an "-response" Hal_Pin Bit Out, this pin will hold 1 if the user clicks OK, and in all @@ -461,7 +453,7 @@ pins are available. + You can have multiple line of 'POSTGUI_HALFILE=' in the INI. + Each will be run one after the other in the order they appear. + -See <> for details. +See <> for details. === Right And Bottom Button Lists @@ -1044,7 +1036,6 @@ MAXPROBE = -20 ---- .The Change Position Section - This is not named TOOL_CHANGE_POSITION on purpose - *canon uses that name and will interfere otherwise.* The position to move the machine before giving the change tool command. All values are in absolute coordinates. @@ -1154,22 +1145,22 @@ Main Window:: * start maximized * start as window + - If you select start as window the spinboxes to set the position and size will get active. + - One time set, the GUI will start every time on the place and with the size selected. + - Nevertheless the user can change the size and position using the mouse, but that will + - not have any influence on the settings. + + If you select start as window the spinboxes to set the position and size will get active. + One time set, the GUI will start every time on the place and with the size selected. + Nevertheless the user can change the size and position using the mouse, but that will + not have any influence on the settings. '*hide the cursor*' does allow to hide the cursor, what is very useful if you use a touch screen. Keyboard:: - The check-boxes allows the user to select if he want the on board keyboard to be shown immediately, + - when entering the MDI Mode, when entering the offset page, the tooledit widget or when open a program + - in the EDIT mode. The keyboard button on the bottom button list will not been affected by this settings, + - so you be able to show or hide the keyboard by pressing the button. The default behavior will be set by + + The check-boxes allows the user to select if he want the on board keyboard to be shown immediately, + when entering the MDI Mode, when entering the offset page, the tooledit widget or when open a program + in the EDIT mode. The keyboard button on the bottom button list will not been affected by this settings, + so you be able to show or hide the keyboard by pressing the button. The default behavior will be set by the check-boxes. + + - Default are : + + Default are : [NOTE] If this section is not sensitive, you have not installed a virtual keyboard, @@ -1289,8 +1280,7 @@ to fix that in a future release. [NOTE] The grid will not be shown in perspective view. -'Show DRO' + -Will show the a DRO also in the preview window, it will be shown automatically in fullsize preview +'Show DRO' Will show the a DRO also in the preview window, it will be shown automatically in fullsize preview 'Show DTG' will show also the DTG (direct distance to end point) in the preview, only if Show DRO is active and not full size preview. @@ -1549,11 +1539,9 @@ to the special needs for a lathe. Mainly the Y axis will be hidden and the jog buttons will be arranged in a different order. .Normal Lathe - image::images/gmoccapy_lathe.png[align="left"] .Back Tool Lathe - image::images/gmoccapy_back_tool_lathe.png[align="left"] As you see the R DRO has a black background and the D DRO is gray. This will @@ -1678,3 +1666,4 @@ o endsub m2 --------- +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/gmoccapy_es.adoc b/docs/src/gui/gmoccapy_es.adoc index 4749c98394..c64834b223 100644 --- a/docs/src/gui/gmoccapy_es.adoc +++ b/docs/src/gui/gmoccapy_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:gmoccapy]] - = GMOCCAPY == Introducción @@ -18,7 +17,7 @@ Como un buen ejemplo de esto, puede verse. http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Gmoccapy_plasma[gmoccapy_plasma] * gmoccapy 3 soporta hasta 9 ejes y 9 articulaciones. Como el código ha cambiado en gmoccapy 3 -para admitir los cambios articulaciones/ejes en LinuxCNC, ¡NO trabaja en versiones 2.7 o 2.6! + para admitir los cambios articulaciones/ejes en LinuxCNC, ¡NO trabaja en versiones 2.7 o 2.6! Tiene soporte para teclado virtual (onboard o matchbox), por lo que no hay necesidad de un teclado o mouse de hardware, pero también se puede usar @@ -73,30 +72,30 @@ image::images/gmoccapy_3_axis.png[align="left"] Realmente no hay mucho que configurar para ejecutar gmoccapy, pero hay algunos puntos con los que debe tener cuidado si desea utilizar todas las funciones de la GUI. -Encontrará los siguientes archivos INI incluidos, solo para mostrar lo básico: + - + - * gmoccapy.ini + - * gmoccapy_4_axis.ini + - * lathe_configs/gmoccapy_lathe.ini + - * lathe_configs/gmoccapy_lathe_imperial.ini + - * gmoccapy_left_panel.ini + - * gmoccapy_right_panel.ini + - * gmoccapy_messages.ini + - * gmoccapy_pendant.ini + - * gmoccapy_sim_hardware_button.ini + - * gmoccapy_tool_sensor.ini + - * gmoccapy_with_user_tabs.ini + - * gmoccapy_XYZAB.ini + - * gmoccapy_XYZAC.ini + - * gmoccapy_XYZCW.ini + - * gmoccapy-JA/Gantry/gantry_mm.ini + - * gmoccapy-JA/scara/scara.ini + - * gmoccapy-JA/table-rotary-tilting/xyzac-trt.ini + - * y algunos mas... + - + -Los nombres deben explicar la intención principal de los diferentes archivos INI. + - -Si utiliza una configuración existente en su máquina, simplemente edite su INI de acuerdo con este documento. + +Encontrará los siguientes archivos INI incluidos, solo para mostrar lo básico: + + * gmoccapy.ini + * gmoccapy_4_axis.ini + * lathe_configs/gmoccapy_lathe.ini + * lathe_configs/gmoccapy_lathe_imperial.ini + * gmoccapy_left_panel.ini + * gmoccapy_right_panel.ini + * gmoccapy_messages.ini + * gmoccapy_pendant.ini + * gmoccapy_sim_hardware_button.ini + * gmoccapy_tool_sensor.ini + * gmoccapy_with_user_tabs.ini + * gmoccapy_XYZAB.ini + * gmoccapy_XYZAC.ini + * gmoccapy_XYZCW.ini + * gmoccapy-JA/Gantry/gantry_mm.ini + * gmoccapy-JA/scara/scara.ini + * gmoccapy-JA/table-rotary-tilting/xyzac-trt.ini + * y algunos mas... + +Los nombres deben explicar la intención principal de los diferentes archivos INI. + +Si utiliza una configuración existente en su máquina, simplemente edite su INI de acuerdo con este documento. IMPORTANTE: si desea utilizar <>, no olvide configurar la ruta a sus macros o carpeta de subrutinas como se describe a continuación. @@ -187,7 +186,6 @@ linuxcnc/nc_files y luego el directorio home de los usuarios. [[gmoccapy:configuration-of-tabs-and-side-panels]] .Configuración de pestañas y paneles laterales. - Puede agregar programas integrados a gmoccapy como lo puede hacer en axis, touchy y gscreen. Todo se hace automáticamente por gmoccapy si incluye algunas líneas en su archivo INI en la sección DISPLAY. Si nunca usó un panel glade, se recomienda leer la excelente documentación. @@ -210,8 +208,6 @@ las tres líneas mencionadas, * EMBED_TAB_NAME = Representa el nombre de la pestaña o el panel lateral. Depende de usted qué nombre usar, pero debe estar presente. - - * EMBED_TAB_LOCATION = Es el lugar donde se colocará su programa en la GUI. .Los valores válidos son: @@ -263,23 +259,18 @@ realizarse en el archivo hal postgui especificado en su archivo INI, porque este Aquí hay unos ejemplos: .ntb_preview - como versión maximizada - image::images/gmoccapy_ntb_preview_maximized_2.png[align="left"] .ntb_preview - image::images/gmoccapy_ntb_preview.png[align="left"] .box_left - mostrando gmoccapy en modo de edición - image::images/gmoccapy_with_left_box_in_edit_mode.png[align="left"] .box_right - y gmoccapy en modo MDI - image::images/gmoccapy_with_right_panel_in_MDI_mode.png[align="left"] .Configuración de mensajes creados por el usuario - Gmoccapy tiene la capacidad de crear mensajes de usuario desde hal. Para usarlos es necesario introducir algunas líneas en la sección [DISPLAY] del archivo INI. @@ -295,10 +286,8 @@ MESSAGE_PINNAME = es el nombre del grupo de pines hal que se creará * 'status' : solo mostrará un mensaje como ventana emergente, usando el sistema de mensajes de gmoccapy - * 'okdialog' : mantendrá el foco en el cuadro de diálogo del mensaje y activará un Hal_Pin OUT - "-waiting". Cerrar el mensaje restablecerá el pin de espera - + "-waiting". Cerrar el mensaje restablecerá el pin de espera * 'yesnodialog' : mantendrá el foco en el cuadro de diálogo del mensaje y lo activará un bit Hal_Pin OUT "-waiting" y también dará acceso a un bit Hal_Pin Out "-response". Este pin mantendrá 1 si el usuario hace clic en Aceptar, y en todos @@ -326,7 +315,6 @@ Las convenciones específicas de pines hal para esto se pueden encontrar en la s <>. [[gmocappy:rs274ngc]] - === La sección RS274NGC ---- @@ -338,7 +326,6 @@ Establece la ruta para buscar macros y otras subrutinas. Si quiere usar varias rutas de subrutinas, simplemente sepárelas con ":" [[gmoccapy:macros]] - === La sección MACRO Puede agregar macros a gmoccapy, de manera parecida a Touchy. Una macro no es nada @@ -430,7 +417,6 @@ Si desea usar una macro sin ningún movimiento, vea también las notas en <>. +<>. === Pines de realimentación del husillo @@ -901,7 +884,6 @@ herramienta, como 'Fresa 7,5 mm 3 filos'. La información se toma de la tabla de por lo que depende de usted lo qué se muestre. .Cambio manual de herramienta - image::images/manual_toolchange.png[align = "center"] * gmoccapy.toolchange-number, HAL_S32, El número de la herramienta que se va a cambiar @@ -918,12 +900,10 @@ net tool-prep-loop iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared ---- .Pines de offsets de herramientas - Estos pines le permiten mostrar los valores de offset de la herramienta activa para X y Z en el cuadro de información de la herramienta. Solo están activos después de G43. .Informacion de herramienta - image::images/gmoccapy_0_9_7_tool_info.png[align="center"] * gmoccapy.tooloffset-x @@ -948,7 +928,6 @@ Al escribir un programa, usted es responsable de incluir un G43 después cada cambio de herramienta! [[gmoccapy:auto-tool-measurement]] - == Medición automática de herramientas Gmoccapy ofrece una medición automática integrada de herramientas. Para usar esta característica, usted @@ -974,7 +953,6 @@ Debe seguir estos pasos: Aquí hay un pequeño boceto: .Datos para medicion de herramientas - image::images/sketch_auto_tool_measurement.png[align="center"] Con el primer cambio de herramienta, la herramienta se medirá y el offset @@ -1031,7 +1009,6 @@ MAXPROBE = -20 ---- .La sección de cambio de posición - Esto no se ha llamado TOOL_CHANGE_POSITION a propósito - *canon usa ese nombre e interferiria.*. Es la posición a donde mover la máquina antes de dar el comando para cambiar la herramienta. Todos los valores están en coordenadas absolutas. @@ -1044,7 +1021,6 @@ Z = -2 ---- .La Sección de Python. - Los complementos de Python sirven como intérprete y tarea. ---- @@ -1070,7 +1046,7 @@ Desde 'su_directorio_linuxcnc-dev/configs/sim/gmoccapy/macros' copie: 'on_abort.ngc' y 'change.ngc' al directorio especificado como SUBROUTINE_PATH. -Vea <>. +Vea <>. Abra 'change.ngc' con un editor y descomente las siguientes líneas (49 y 50): @@ -1113,7 +1089,6 @@ net tool-prep-loop iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared ------- [[gmoccapy:settings-page]] - == La página de configuración Para ingresar a la página deberás hacer click en @@ -1125,7 +1100,6 @@ en este momento tendrá que editar el archivo de preferencias oculto. Vea La página se ve así: .Pagina de configuracion - image::images/gmoccapy_settings_appearance.png[align="center"] La página está separada en tres pestañas principales: @@ -1143,13 +1117,12 @@ Ventana principal:: * iniciar como pantalla completa * iniciar maximizado * iniciar como ventana - + - Si selecciona Iniciar como ventana, se activarán los cuadros para establecer la posición y el tamaño. + - Una vez establecidos, la GUI se iniciará cada vez en el lugar y con el tamaño seleccionado. + - Sin embargo, el usuario puede cambiar el tamaño y la posición con el mouse, pero eso + - no tiene ninguna influencia en la configuración. + + Si selecciona Iniciar como ventana, se activarán los cuadros para establecer la posición y el tamaño. + + Una vez establecidos, la GUI se iniciará cada vez en el lugar y con el tamaño seleccionado. + + Sin embargo, el usuario puede cambiar el tamaño y la posición con el mouse, pero eso + + no tiene ninguna influencia en la configuración. + -'* Ocultar cursor *' permite ocultar el cursor, lo que es muy útil si utilizar una pantalla táctil. +* 'Ocultar cursor' permite ocultar el cursor, lo que es muy útil si utilizar una pantalla táctil. Teclado:: Las casillas de verificación permiten al usuario seleccionar si desea que el teclado integrado se muestre de inmediato, + @@ -1323,7 +1296,6 @@ Puede configurar aquí el directorio a donde saltar si presiona el botón corres en el cuadro de diálogo de selección de archivos. .Seleccion de directorio - image::images/gmoccapy_file_selection_dialog_with_keyboard.png[align="center"] Temas y sonidos :: @@ -1409,18 +1381,16 @@ MAX = 6000 ---- [[gmoccapy:turtle-jog]] - Turtle Jog:: [[sub:turtle_jog]] Esta configuración tendrá influencia en las velocidades de jog. * 'Ocultar boton jog tortuga' ocultará el botón a la derecha del control deslizante de velocidad de jog. -Si oculta este botón, tenga cuidado de que se muestre el icono conejo, -de lo contrario no podrá hacer jog más rápido que la velocidad de tortuga, -que se calcula utilizando el factor jog de tortuga. - + Si oculta este botón, tenga cuidado de que se muestre el icono conejo, + de lo contrario no podrá hacer jog más rápido que la velocidad de tortuga, + que se calcula utilizando el factor jog de tortuga. * 'factor de jog de tortuga' establece la escala para el modo jog tortuga. Si le pone -un factor de 20, la velocidad máxima de jog será 1/20 de la velocidad máxima de la máquina -si está en modo tortuga (botón presionado, mostrando la tortuga) + un factor de 20, la velocidad máxima de jog será 1/20 de la velocidad máxima de la máquina + si está en modo tortuga (botón presionado, mostrando la tortuga) [NOTE] Este botón se puede activar usando el pin hal <>. @@ -1428,11 +1398,9 @@ Este botón se puede activar usando el pin hal <> * Usar la medición automática de herramientas: si se marca, después de cada cambio de herramienta -se realizará la medición. El resultado se almacenará en la tabla de herramientas y se ejecutará un -G43 después del cambio. + se realizará la medición. El resultado se almacenará en la tabla de herramientas y se ejecutará un + G43 después del cambio. .Información de sonda - Las siguientes informaciones se tomaran de las de su archivo INI y se deben proporcionar en coordenadas absolutas * X Pos. = La posición X del interruptor de herramienta * Y Pos. = La posición Y del interruptor de herramienta * Z Pos. = La posición Z del interruptor de la herramienta, iremos como movimiento rápido a - esta coordenada + esta coordenada * Max. Sonda = es la distancia para buscar contacto. Un error será - lanzado si no se da contacto dentro de ella. La distancia tiene que ser dada en coordenadas relativas, - comenzando el movimiento desde Z Pos., por lo que tiene que dar un valor negativo - para bajar! + lanzado si no se da contacto dentro de ella. La distancia tiene que ser dada en coordenadas relativas, + comenzando el movimiento desde Z Pos., por lo que tiene que dar un valor negativo + para bajar! * Altura sonda = es la altura de su interruptor de sonda; puede medirlo. - Solo toque la base donde se encuentra el interruptor de la sonda y ajústelo a - cero. Luego haga un cambio de herramienta y observe el valor de tool_offset_z, que es el - valor que debe entrar aquí. + Solo toque la base donde se encuentra el interruptor de la sonda y ajústelo a + cero. Luego haga un cambio de herramienta y observe el valor de tool_offset_z, que es el + valor que debe entrar aquí. .Las velocidades de la sonda - * Vel. Búsqueda = La velocidad para buscar el interruptor. Después del contacto, - la herramienta volverá a subir y luego volverá hacia la sonda con la velocidad de sonda, - por lo que obtendrá mejores resultados. + la herramienta volverá a subir y luego volverá hacia la sonda con la velocidad de sonda, + por lo que obtendrá mejores resultados. * Vel. Sonda = Es la velocidad para el segundo movimiento hacia el interruptor, que - debe ser más lento para obtener mejores resultados. (En modo sim, esto es - comentado en macros/change.ngc, de lo contrario el usuario tendría que hacer clic - dos veces en el botón de la sonda) + debe ser más lento para obtener mejores resultados. (En modo sim, esto es + comentado en macros/change.ngc, de lo contrario el usuario tendría que hacer clic + dos veces en el botón de la sonda) .Cambiador de herramientas - Si su cuarto eje 'se utiliza en un cambiador de herramientas, es posible que desee ocultar el DRO y todos los demás botones relacionados con ese eje. @@ -1489,7 +1454,6 @@ Puedes hacerlo marcando la casilla de verificación, que ocultará: * Columna del 4º eje en el editor de herramientas. [[gmoccapy:reload-tool-on-start]] - Si se marca, la herramienta en el husillo se guardará en cada cambio en el archivo de preferencias, lo que hace posible volver a cargar la última herramienta montada en nuevo arranque. La herramienta se cargará después de que todos los ejes estén conectados, porque antes no está @@ -1497,9 +1461,7 @@ permitido ejecutar comandos MDI. Si usa NO_FORCE_HOMING no puedes usar esta característica, porque nunca se emitirá la señal 'all_homed' necesaria. [[gmoccapy:message-behavior]] - .Comportamiento y apariencia de mensajes. - Esto mostrará pequeñas ventanas emergentes que muestran el mensaje o el texto de error. El comportamiento es muy similar al que utiliza AXIS. Puede eliminar un determinado mensaje haciendo clic en el botón Cerrar. Si desea eliminar el último, @@ -1509,22 +1471,21 @@ con . Puedes configurar algunas opciones: * X Pos = La posición X de la esquina superior izquierda del mensaje - en pixels desde la esquina superior izquierda de la pantalla. + en pixels desde la esquina superior izquierda de la pantalla. * Y Pos = La posición Y de la esquina superior izquierda del mensaje - en pixels desde la esquina superior izquierda de la pantalla. + en pixels desde la esquina superior izquierda de la pantalla. * Ancho = El ancho del cuadro de mensaje * max = el máximo de mensajes que desea ver. Si establece esto en 10, - el mensaje número 11 eliminará el primero, por lo que solo verá los últimos 10. + el mensaje número 11 eliminará el primero, por lo que solo verá los últimos 10. * Fuente = la fuente y el tamaño que desea utilizar para mostrar los mensajes * usar marcos = Si activa la casilla de verificación, se mostrará cada mensaje - en un marco, por lo que es mucho más fácil distinguir los mensajes, pero - se necesitara un poco más de espacio. + en un marco, por lo que es mucho más fácil distinguir los mensajes, pero + se necesitara un poco más de espacio. * Lanzamiento de mensaje de prueba solo hará lo que se supone que debe hacer, - mostrar un mensaje, para que pueda ver los cambios de su configuración sin la necesidad - para generar un error. + mostrar un mensaje, para que pueda ver los cambios de su configuración sin la necesidad + para generar un error. .La opción Ejecutar desde línea - Puede permitir o rechazar la ejecución desde línea. Esto pondra al correspondiente botón insensible (en gris), por lo que el usuario no podrá utilizar esta opción. El valor predeterminado es deshabilitar la ejecución desde la línea. @@ -1536,7 +1497,6 @@ son mas que probables [[gmoccapy:lathe-section]] - == Sección específica del torno Si en el archivo INI se da LATHE = 1, la GUI cambiará su apariencia @@ -1544,11 +1504,9 @@ a las necesidades especiales de un torno. Principalmente se ocultará el eje Y y Los botones de jog se ordenarán en un orden diferente. .Torno normal (herramienta delantera) - image::images/gmoccapy_lathe.png[align="center"] .Torno con herramienta trasera - image::images/gmoccapy_back_tool_lathe.png[align="center"] Como ve, el R DRO tiene un fondo negro y el de D DRO es gris. Esto puede @@ -1581,7 +1539,6 @@ offset X y la tabla de herramientas muestra toda la información relevante del t == Sección específica de plasma .GUI plasma - image::images/gmoccapy_plasma.png[align="center"] Hay un muy buen WIKI, que en realidad está creciendo, mantenido por Marius. @@ -1616,7 +1573,6 @@ Inglés = http://www.youtube.com/watch?v=ItVWJBK9WFA http://www.youtube.com/watch?v=rG1zmeqXyZI [[gmoccapy:tool-measurement-videos]] - === Videos de Medicion de Herramientas Simulacion de medicion Auto = http://youtu.be/rrkMw6rUFdk @@ -1632,7 +1588,6 @@ Máquina de medición automática de herramientas = http://youtu.be/1arucCaDdX4 Si obtienes números extraños en el área de información de gmoccapy como: .Numeros extraños - image::images/strange_numbers.png[align="center"] ha creado su archivo de configuración con una versión anterior de StepConfWizard. @@ -1676,5 +1631,4 @@ o endsub m2 --------- - - +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/gscreen.adoc b/docs/src/gui/gscreen.adoc index a7b1ac8686..bdf8c88fbe 100644 --- a/docs/src/gui/gscreen.adoc +++ b/docs/src/gui/gscreen.adoc @@ -69,7 +69,6 @@ in the folder that holds all the configuration files for the configuration you selected. .Local Glade Files - If present, local glade files in the configuration folder will be loaded instead of the stock Glade files. Local Glade files allow you to use your customized designs rather then the default screens. There is a switch in the INI file to @@ -88,7 +87,6 @@ also have signals defined for them in the GLADE editor. It defines what signal is given and what method to call. .Modifying Stock Skins - If you change the name of a widget, Gscreen might not be able to find it. If this widget is referenced to from python code, at best this makes the widget not work anymore at worst it will cause an error when loading Gscreen's default @@ -97,7 +95,6 @@ python code. If you move (cut and paste) a widget with signals, the signals will not be copied. You must add them again manually. .Handler Files - A handler file is a file containing python code, which Gscreen adds to it's default routines. A handler file allows one to modify defaults, or add logic to a Gscreen skin without having to modify Gscreen proper. You can combine new @@ -115,7 +112,6 @@ such as adding a sound. Please see the <> for the basics to GladeVCP handler files. Gscreen uses a very similar technique. .Themes - Gscreen uses the PyGTK toolkit to display the screen. Pygtk is the Python language binding to GTK. GTK supports 'themes'. @@ -150,13 +146,11 @@ Gscreen is just a big complicated GladeVCP panel, with python code to control it. To customize it we need the Glade file loaded in the Glade editor. .Installed LinuxCNC - If you have LinuxCNC 2.6+ installed on Ubuntu 10.04 just start the Glade editor from the applications menu or from the terminal. Newer versions of Linux will require you to install Glade 3.8.0 - 3.8.6 (you may need to compile it yourself). .RIP compiled commands - Using a compiled from source version of http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC[LinuxCNC] open a terminal and <> to the top of the LinuxCNC folder. Set up the @@ -253,14 +247,11 @@ There are special functions Gscreen checks the handler file for. If you add these in you handler file Gscreen will call them instead of gscreen's internal same-named functions. * initialize_preferences(self): You can install new preference routines. - * initialize_keybindings(self) You can install new keybinding routines. In most cases you won't want to do this, you will want to override the individual keybinding calls. You can also add more keybindings that will call an arbitrary function. - * initialize_pins(self): makes / initializes HAL pins - * connect_signals(self,handlers): If you are using a completely different screen the default Gscreen you must add this or gscreen will try to connect signals to widgets that are not there. Gscreen's default function is called @@ -268,33 +259,25 @@ If you add these in you handler file Gscreen will call them instead of gscreen's signals to your screen but still want the default ones call this first then add more signals. If you signals are simple (no user data passed) then you can also use the Glade signal selection in the Glade editor. - * initialize_widgets(self): You can use this to set up any widgets. Gscreen usually calls 'self.gscreen.initialize_widgets()' which actually calls many separate functions. If you wish to incorporate some of those widgets then just call those functions directly. or add self.gscreen.init_show_windows() so widgets are just shown. Then if desired, initialize/adjust your new widgets. - * initialize_manual_toolchange(self): allows a complete revamp of the manual toolchange system. - * set_restart_line(self.line): - * timer_interrupt(self): allows one to complete redefine the interrupt routine This is used for calling periodic() and checking for errors from linuxcnc.status. - * check_mode(self): used to check what mode the screen is in. Returns a list[] 0 -manual 1- mdi 2- auto 3- jog. - * on_tool_change(self,widget): You can use this to override the manual tool change dialog -this is called when 'gscreen.tool-change' changes state. - * dialog_return(self,dialog_widget,displaytype,pinname): Use this to override any user message or manual tool change dialog. Called when the dialog is closed. - * periodic(self): This is called every (default 100) milliseconds. Use it to update your widgets/HAL pins. You can call Gscreen regular periodic afterwards too, self.gscreen.update_position() or just add pass to not @@ -307,15 +290,16 @@ would add a signal to a widget to call your function. === Adding Keybindings Functions -Our tester example would be more useful if it responded to keyboard commands. + -There is a function called keybindings() that tries to set this up. + -While you can override it completely, we didn't - but it assumes some things. + -It assumes the estop toggle button is call 'button_estop' and that F1 key controls it. + -It assumes the power button is called 'button_machine_on' and the F2 key controls it. + -These are easily fixed by renaming the buttons in the Glade editor to match. + -But instead we are going to override the standard calls and add our own. + - + +Our tester example would be more useful if it responded to keyboard commands. +There is a function called keybindings() that tries to set this up. +While you can override it completely, we didn't - but it assumes some things. +It assumes the estop toggle button is call 'button_estop' and that F1 key controls it. +It assumes the power button is called 'button_machine_on' and the F2 key controls it. +These are easily fixed by renaming the buttons in the Glade editor to match. +But instead we are going to override the standard calls and add our own. + Add these command to the handler file: + ---- # override Gscreen Functions # keybinding calls @@ -335,21 +319,24 @@ Add these command to the handler file: return True ---- -So now we have overridden Gscreen's function calls of the same name and deal with them in our handler file. + -We now reference the widgets by the name we used in the Glade editor. + -We also added a built in gscreen function to make a sound when Estop changes. + -Note that we we call Gscreen's built in functions we must use self.gscreen.[FUNCTION NAME]() + -If we used self.[FUNCTION NAME]() it would call the function in our handler file. + +So now we have overridden Gscreen's function calls of the same name and deal with them in our handler file +We now reference the widgets by the name we used in the Glade editor. +We also added a built in gscreen function to make a sound when Estop changes. +Note that we we call Gscreen's built in functions we must use self.gscreen.[FUNCTION NAME]() +If we used self.[FUNCTION NAME]() it would call the function in our handler file. + +Lets add another key binding that loads halmeter when F4 is pressed. -Lets add another key binding that loads halmeter when F4 is pressed. + - + In the handler file under 'def initialize_widgets(self):' change to: + ---- def initialize_widgets(self): self.gscreen.init_show_windows() self.gscreen.keylookup.add_conversion('F4','TEST','on_keycall_HALMETER') ---- + Then add these functions under the 'HandlerClass' class: + ---- def on_keycall_HALMETER(self,state,SHIFT,CNTRL,ALT): if state: @@ -362,34 +349,38 @@ Then we add the function to the handle file to call a Gscreen builtin function t === Linuxcnc State Status -The module 'Gstat' polls linuxcnc's state every 100ms and sends callback messages to user functions when state changes. + -You can register messages to act on specific state changes. + -As an example we will register to get 'file-loaded' messages when linuxcnc loads a new file. + -First we must import the module and instantiate it: + -In the import section of the handler file add: + +The module 'Gstat' polls linuxcnc's state every 100ms and sends callback messages to user functions when state changes. +You can register messages to act on specific state changes. +As an example we will register to get 'file-loaded' messages when linuxcnc loads a new file. +First we must import the module and instantiate it: +In the import section of the handler file add: + ---- from hal_glib import GStat GSTAT = GStat() ---- -In the handler file under 'def \_\_init__(self):' add: + +In the handler file under 'def \_\_init__(self):' add: + ---- GSTAT.connect('file-loaded', self.update_filepath) ---- -Then in the 'HandlerClass', add the function: + +Then in the 'HandlerClass', add the function: + ---- self.update_filepath(self, obj, path): self.widgets.my_path_label.set_text(path) ---- -When linuxcnc loads a new file, Gstat will send a callback message to the function 'update_filepath'. + -In this example we update a label with that path name (assuming there is a label nammed 'my_path_label') in the GLADE file. + +When linuxcnc loads a new file, Gstat will send a callback message to the function 'update_filepath'. +In this example we update a label with that path name (assuming there is a label nammed 'my_path_label') in the GLADE file. === Jogging Keys -There are no special widgets to do screen-button jogging, so we must do it with python code. + -Under the connect_signals function add this code: + +There are no special widgets to do screen-button jogging, so we must do it with python code. +Under the connect_signals function add this code: + ---- for i in('x','y','z'): self.widgets[i+'neg'].connect("pressed", self['jog_'+i],0,True) @@ -400,6 +391,7 @@ Under the connect_signals function add this code: + ---- Add these functions under the HandlerClass class: + ---- def jog_x(self,widget,direction,state): self.gscreen.do_key_jog(_X,direction,state) @@ -410,9 +402,10 @@ Add these functions under the HandlerClass class: def jog_speed_changed(self,widget,value): self.gscreen.set_jog_rate(absolute = value) ---- -Finally add two buttons to the GLADE file for each axis - one for positive, one for negative direction jogging. + -Name these buttons xneg, xpos, yneg, ypos zneg, zpos respectively. + -add a SpeedControl widget to the GLADE file and name it jog_speed + + +Finally add two buttons to the GLADE file for each axis - one for positive, one for negative direction jogging. +Name these buttons xneg, xpos, yneg, ypos zneg, zpos respectively. +add a SpeedControl widget to the GLADE file and name it jog_speed == Gscreen Start Up @@ -484,6 +477,7 @@ DISPLAY = gscreen -c tester -d debugging on -v verbose debugging on ---- + The -c switch allows one to select a 'skin'. Gscreen assumes the Glade file and the handler file use this same name. The optional second screen will be the same name with a 2 (eg. tester2.glade) There is no second handler file allowed. @@ -493,23 +487,22 @@ skin folder. == User Dialog Messages -This function is used to display pop up dialog messages on the screen. + +This function is used to display pop up dialog messages on the screen. These are defined in the INI file and controlled by HAL pins. + 'Boldtext' is generally a title. + 'text' is below that and usually longer. + 'Detail' is hidden unless clicked on. + 'pinname' is the basename of the HAL pins. + 'type' specifies whether its a yes/no, ok, or status message. + -Status messages will be shown in the status bar and the notify dialog. + +Status messages will be shown in the status bar and the notify dialog. it requires no user intervention. + ok messages require the user to click ok to close the dialog. + -ok messages have one HAL pin to launch the dialog and one to signify it's waiting -for response. + +ok messages have one HAL pin to launch the dialog and one to signify it's waiting for response. + yes/no messages require the user to select yes or no buttons to close the dialog. + yes/no messages have three hal pins - one to show the dialog, one for waiting, + and one for the answer. + -Here is a sample INI code. It would be under the [DISPLAY] heading. + +Here is a sample INI code. It would be under the [DISPLAY] heading. [source,{ini}] ---- @@ -539,19 +532,20 @@ MESSAGE_PINNAME = bothtest === Copy the Stock Handler/Glade File For Modification If you wish to use a stock screen but modify it's handler file, you need to -copy the stock file to your config file folder. + +copy the stock file to your config file folder. Gscreen will see this and use the -copied file. + +copied file. But where is the original file? If using a RIP linuxcnc the -sample skins are in /share/gscreen/skins/'SCREENNAME' + +sample skins are in /share/gscreen/skins/'SCREENNAME' Installed versions of linuxcnc have them in slightly different places depending -on the distribution used. + +on the distribution used. An easy way to find the location is to open a terminal -and start the sim screen you wish to use. + -In the terminal the file locations will be printed. + -It may help to add the -d switch t0 the gscreen load line in the INI. + +and start the sim screen you wish to use. +In the terminal the file locations will be printed. +It may help to add the -d switch t0 the gscreen load line in the INI. Here is a sample: + ---- chris@chris-ThinkPad-T500 ~/emc-dev/src $ linuxcnc LINUXCNC - 2.7.14 @@ -573,10 +567,13 @@ Found file(lib): /home/chris/emc-dev/lib/hallib/simulated_home.hal **** GSCREEN INFO: handler file path: ['/home/chris/emc-dev/share/gscreen/skins/industrial/industrial_handler.py'] ---- -The line: + +The line: + ---- **** GSCREEN INFO: handler file path: ['/home/chris/emc-dev/share/gscreen/skins/industrial/industrial_handler.py'] ---- + shows where the stock file lives. Copy this file to your config folder. + This works the same for the Glade file. +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/gscreen_es.adoc b/docs/src/gui/gscreen_es.adoc index dc9da61506..ee0b1d6d89 100644 --- a/docs/src/gui/gscreen_es.adoc +++ b/docs/src/gui/gscreen_es.adoc @@ -71,7 +71,6 @@ en la carpeta que contiene todos los archivos de configuración para la configur seleccionado. .Archivos Glade Locales - Si están presentes, se cargarán los archivos glade locales en la carpeta de configuración en lugar de los archivos de Glade de serie. Los archivos locales de Glade le permiten usar sus diseños personalizados en lugar de las pantallas por defecto. Hay un interruptor en el archivo INI para @@ -90,7 +89,6 @@ tener señales definidas para ellos en el editor de GLADE. Esto define que seña se da y qué método llamar. .Modificación de Skins de serie. - Si cambia el nombre de un widget, Gscreen no podrá encontrarlo. Si se hace referencia a este widget desde el código Python, en el mejor de los casos el widget no funcionara y, en el peor de los casos, causará un error al cargar las pantallas predeterminadas de Gscreen @@ -99,7 +97,6 @@ código python. Si mueve (corta y pega) un widget con señales, las señales no serán copiadas. Debe agregarlas de nuevo manualmente. .Archivos Handler - Un archivo handler es un archivo que contiene código python que Gscreen agrega a su rutinas por defecto. Un archivo handler permite modificar valores predeterminados o agregar lógica a una skin Gscreen sin tener que modificar Gscreen propiamente dicho. Puede combinar nuevas @@ -117,7 +114,6 @@ como añadir un sonido. Por favor vea el capitulo GladeVCP para entender los fundamentos de los archivos handler GladeVCP. Gscreen utiliza una técnica muy similar. .Temas - Gscreen usa el kit de herramientas PyGTK para mostrar la pantalla. Pygtk es el enlace del lenguaje Python con GTK. GTK soporta 'temas'. @@ -152,13 +148,11 @@ Gscreen es solo un gran y complicado panel GladeVCP, con código python para con Para personalizarlo necesitamos el archivo Glade cargado en el editor de Glade. .LinuxCNC Instalado - Si tiene LinuxCNC 2.6+ instalado en Ubuntu 10.04, simplemente inicie el editor Glade Desde el menú de aplicaciones o desde el terminal. Las nuevas versiones de Linux requieren que instale Glade 3.8.0 - 3.8.6 (posiblemente deberá compilarlo) .Comandos en compilados RIP - Usando un compilado de la versión fuente de http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC[LinuxCNC], abra un terminal y cambie de directorio a la parte superior de la carpeta LinuxCNC. Configure el @@ -195,7 +189,7 @@ Recuerde, si utiliza una opción de pantalla personalizada, USTED es responsable == Construyendo una simple pantalla limpia personalizada -image::images/tester.png[align="center", alt="pantalla utilizable simple"] +image::images/tester.png["pantalla utilizable simple",align="center"] Permite construir una pantalla usable simple. Construya esto en el editor de Glade (si usa un RIP ejecutelo desde un terminal después de usar .scripts/rip-environment). @@ -219,7 +213,7 @@ RIP ejecutelo desde un terminal después de usar .scripts/rip-environment). * Los botones en este ejemplo son botones normales, no botones HAL. Nosotros no necesitamos los pines HAL. -image::images/tester_editor.png[align="center", alt="Glade editor tester.glade"] +image::images/tester_editor.png["Glade editor tester.glade",align="center"] En esta pantalla estamos usando VCP_actions para comunicar a LinuxCNC las acciones que queremos. Esto nos permite funciones estándar sin agregar código python en el @@ -309,15 +303,16 @@ agregaría una señal a un widget para llamar a su función. === Agregar funciones de combinación de teclas -Nuestro ejemplo de probador sería más útil si respondiera a los comandos del teclado. + -Hay una función llamada keybindings () que intenta configurar esto. + -Si bien puede anularlo completamente, no lo hicimos, pero asume algunas cosas. + -Asume que el botón de alternancia de parada se llama 'button_estop' y que la tecla F1 lo controla. + -Asume que el botón de encendido se llama 'button_machine_on' y la tecla F2 lo controla. + -Estos se pueden corregir fácilmente cambiando el nombre de los botones en el editor de Glade para que coincidan. + -Pero en cambio, vamos a anular las llamadas estándar y agregar las nuestras. + +Nuestro ejemplo de probador sería más útil si respondiera a los comandos del teclado. +Hay una función llamada keybindings () que intenta configurar esto. +Si bien puede anularlo completamente, no lo hicimos, pero asume algunas cosas. +Asume que el botón de alternancia de parada se llama 'button_estop' y que la tecla F1 lo controla. +Asume que el botón de encendido se llama 'button_machine_on' y la tecla F2 lo controla. +Estos se pueden corregir fácilmente cambiando el nombre de los botones en el editor de Glade para que coincidan. +Pero en cambio, vamos a anular las llamadas estándar y agregar las nuestras. Agregue estos comandos al archivo de controlador: + ---- # Ajustar funciones de Gscreen # llamadas de combinacion de teclas @@ -337,20 +332,23 @@ Agregue estos comandos al archivo de controlador: return True ---- -Así que ahora hemos anulado las llamadas de función de Gscreen del mismo nombre y las tratamos en nuestro archivo de manejador. + -Ahora hacemos referencia a los widgets por el nombre que usamos en el editor de Glade. + -También agregamos una función gscreen incorporada para hacer un sonido cuando cambia Estop. + -Tenga en cuenta que llamamos a las funciones integradas de Gscreen que debemos usar self.gscreen. [NOMBRE DE LA FUNCIÓN] () + -Si usamos self. [NOMBRE DE LA FUNCIÓN] () llamaría a la función en nuestro archivo de controlador. + +Así que ahora hemos anulado las llamadas de función de Gscreen del mismo nombre y las tratamos en nuestro archivo de manejador. +Ahora hacemos referencia a los widgets por el nombre que usamos en el editor de Glade. +También agregamos una función gscreen incorporada para hacer un sonido cuando cambia Estop. +Tenga en cuenta que llamamos a las funciones integradas de Gscreen que debemos usar self.gscreen. [NOMBRE DE LA FUNCIÓN] () +Si usamos self. [NOMBRE DE LA FUNCIÓN] () llamaría a la función en nuestro archivo de controlador. -Permite agregar otro enlace de teclas que carga el halómetro cuando se presiona F4. + +Permite agregar otro enlace de teclas que carga el halómetro cuando se presiona F4. En el archivo del controlador bajo def initialize_widgets (self): cambie a: + ---- def initialize_widgets(self): self.gscreen.init_show_windows() self.gscreen.keylookup.add_conversion('F4','TEST','on_keycall_HALMETER') ---- + Luego agregue estas funciones bajo la clase HandlerClass: + ---- def on_keycall_HALMETER(self,state,SHIFT,CNTRL,ALT): if state: @@ -358,27 +356,30 @@ Luego agregue estas funciones bajo la clase HandlerClass: return True ---- -Esto agrega una conversión de combinación de teclas que dirige a gscreen a llamar a on_keycall_HALMETER cuando se presiona F4. + -Luego agregamos la función al archivo de identificador para llamar a una función incorporada de Gscreen para iniciar el halómetro. + +Esto agrega una conversión de combinación de teclas que dirige a gscreen a llamar a on_keycall_HALMETER cuando se presiona F4. +Luego agregamos la función al archivo de identificador para llamar a una función incorporada de Gscreen para iniciar el halómetro. === Linuxcnc State Status -The module 'Gstat' polls linuxcnc's state every 100ms and sends callback messages to user functions when state changes. + -You can register messages to act on specific state changes. + -As an example we will register to get 'file-loaded' messages when linuxcnc loads a new file. + -First we must import the module and instantiate it: + -In the import section of the handler file add: + +The module 'Gstat' polls linuxcnc's state every 100ms and sends callback messages to user functions when state changes. +You can register messages to act on specific state changes. +As an example we will register to get 'file-loaded' messages when linuxcnc loads a new file. +First we must import the module and instantiate it: +In the import section of the handler file add: + ---- from hal_glib import GStat GSTAT = GStat() ---- In the handler file under 'def \_\_init__(self):' add: + + ---- GSTAT.connect('file-loaded', self.update_filepath) ---- Then in the 'HandlerClass', add the function: + + ---- self.update_filepath(self, obj, path): self.widgets.my_path_label.set_text(path) @@ -391,6 +392,7 @@ In this example whe update a label with that path name (assuming there is a labe No hay widgets especiales para hacer jogging con botones de pantalla, así que debemos hacerlo con el código de Python. + Bajo la función connect_signals agregue este código: + + ---- for i in('x','y','z'): self.widgets[i+'neg'].connect("pressed", self['jog_'+i],0,True) @@ -401,6 +403,7 @@ Bajo la función connect_signals agregue este código: + ---- Agregue estas funciones bajo la clase HandlerClass: + ---- def jog_x(self,widget,direction,state): self.gscreen.do_key_jog(_X,direction,state) diff --git a/docs/src/gui/halui.adoc b/docs/src/gui/halui.adoc index 1bc37ddf57..ce1a9ccb6f 100644 --- a/docs/src/gui/halui.adoc +++ b/docs/src/gui/halui.adoc @@ -1,4 +1,5 @@ :lang: en +:toc: [[cha:hal-user-interface]] = HAL User Interface diff --git a/docs/src/gui/halui_es.adoc b/docs/src/gui/halui_es.adoc deleted file mode 100644 index 61a0f80ee1..0000000000 --- a/docs/src/gui/halui_es.adoc +++ /dev/null @@ -1,263 +0,0 @@ -[[cha:hal-user-interface]] - -= HAL User Interface - -== Introduction - -Halui is a HAL based user interface for LinuxCNC, it connects HAL pins to -NML commands. Most of the functionality (buttons, indicators etc.) that -is provided by a traditional GUI (mini, Axis, etc.), is provided by HAL -pins in Halui. - -The easiest way to add halui is to add the following to the [HAL] -section of the ini file. - ----- -HALUI = halui ----- - -An alternate way to invoke it is to include the following in your .hal -file. Make sure you use the actual path to your ini file. - ----- -loadusr halui -ini /path/to/inifile.ini ----- - -== Halui pin reference - -.Abort - -* 'halui.abort' (bit, in) - pin to send an abort message (clears out most errors) - -.Axis - -* 'halui.axis.n.pos-commanded' (float, out) - Commanded axis position in machine coordinates -* 'halui.axis.n.pos-feedback' (float, out) - Feedback axis position in machine coordinates -* 'halui.axis.n.pos-relative' (float, out) - Commanded axis position in relative coordinates - -.E-Stop - -* 'halui.estop.activate' (bit, in) - pin for requesting E-Stop -* 'halui.estop.is-activated' (bit, out) - indicates E-stop reset -* 'halui.estop.reset' (bit, in) - pin for requesting E-Stop reset - -.Feed Override - -* 'halui.feed-override.count-enable' (bit, in) - must be true for 'counts' or -'direct-value' to work. -* 'halui.feed-override.counts' (s32, in) - counts * scale = FO percentage. Can -be used with an encoder or 'direct-value'. -* 'halui.feed-override.decrease' (bit, in) - pin for decreasing the FO (-=scale) -* 'halui.feed-override.increase' (bit, in) - pin for increasing the FO (+=scale) -* 'halui.feed-override.direct-value' (bit, in) - false when using encoder to -change counts, true when setting counts directly. The 'count-enable' pin must -be true. -* 'halui.feed-override.scale' (float, in) - pin for setting the scale for - increase and decrease of 'feed-override'. -* 'halui.feed-override.value' (float, out) - current FO value - -.Mist - -* 'halui.mist.is-on' (bit, out) - indicates mist is on -* 'halui.mist.off' (bit, in) - pin for requesting mist off -* 'halui.mist.on' (bit, in) - pin for requesting mist on - -.Flood - -* 'halui.flood.is-on' (bit, out) - indicates flood is on -* 'halui.flood.off' (bit, in) - pin for requesting flood off -* 'halui.flood.on' (bit, in) - pin for requesting flood on - -.Homing - -* 'halui.home-all' (bit, in) - pin for requesting all axis to home. This - pin will only be there if HOME_SEQUENCE is set in the ini file. - -.Jog - - is a number between 0 and 8 and 'selected'. - -* 'halui.jog-deadband' (float, in) - deadband for analog jogging (smaller - jogging speed requests are not performed) -* 'halui.jog-speed' (float, in) - pin for setting jog speed for minus/plus jogging -* 'halui.jog..analog' (float, in) - analog velocity input for jogging - (useful with joysticks or other analog devices) -* 'halui.jog..increment' (float,in) - pin for setting the jog increment for - axis when using increment-minus or increment-plus to jog. -* 'halui.jog..increment-minus' (bit, in) - pin for moving the axis one - increment in the minus direction for each off to on transition. -* 'halui.jog..increment-plus' (bit, in) - pin for moving the axis one - increment in the plus direction for each off to on transition. -* 'halui.jog..minus' (bit, in) - pin for jogging axis in negative - direction at the halui.jog.speed velocity -* 'halui.jog..plus' (bit, in) - pin for jogging axis in positive - direction at the halui.jog.speed velocity -* 'halui.jog.selected.increment' (float,in) - pin for setting the jog increment - for the selected axis when using increment-minus or incremet-plus to jog. -* 'halui.jog.selected.increment-minus' (bit, in) - pin for moving the selected axis - one increment in the minus direction for each off to on transition. -* 'halui.jog.selected.increment-plus' (bit, in) - pin for moving the selected axis - one increment in the plus direction for each off to on transition. -* 'halui.jog.selected.minus' (bit, in) - pin for jogging the selected axis - in negative direction at the halui.jog.speed velocity -* 'halui.jog.selected.plus' (bit, in) - pin for jogging the selected axis - in positive direction at the halui.jog.speed velocity - -.Joint - - is a number between 0 and 8 and 'selected'. - -* 'halui.joint..has-fault' (bit, out) - status pin telling the joint - has a fault -* 'halui.joint..home' (bit, in) - pin for homing the specific joint -* 'halui.joint..is-homed' (bit, out) - status pin telling that the joint is homed -* 'halui.joint..is-selected bit' (bit, out) - status pin a joint is selected* internal halui -* 'halui.joint..on-hard-max-limit' (bit, out) - status pin telling - joint is on the positive hardware limit switch -* 'halui.joint..on-hard-min-limit' (bit, out) - status pin telling - joint is on the negative hardware limit switch -* 'halui.joint..on-soft-max-limit' (bit, out) - status pin telling - joint is at the positive software limit -* 'halui.joint..on-soft-min-limit' (bit, out) - status pin telling - joint is at the negative software limit -* 'halui.joint..select' (bit, in) - select joint (0..8) - internal halui -* 'halui.joint..unhome' (bit, in) - unhomes this joint -* 'halui.joint.selected' (u32, out) - selected joint (0..8) - internal halui -* 'halui.joint.selected.has-fault' (bit, out) - status pin telling that - the joint has a fault -* 'halui.joint.selected.home' (bit, in) - pin for homing the selected joint -* 'halui.joint.selected.is-homed' (bit, out) - status pin telling that the - selected joint is homed -* 'halui.joint.selected.on-hard-max-limit' (bit, out) - status pin telling - that the selected joint is on the positive hardware limit -* 'halui.joint.selected.on-hard-min-limit' (bit, out) - status pin telling - that the selected joint is on the negative hardware limit -* 'halui.joint.selected.on-soft-max-limit' (bit, out) - status pin telling - that the selected joint is on the positive software limit -* 'halui.joint.selected.on-soft-min-limit' (bit, out) - status pin telling - that the selected joint is on the negative software limit -* 'halui.joint.selected.unhome' (bit, in) - pin for unhoming the selected joint. - -.Lube - -* 'halui.lube.is-on' (bit, out) - indicates lube is on -* 'halui.lube.off' (bit, in) - pin for requesting lube off -* 'halui.lube.on' (bit, in) - pin for requesting lube on - -.Machine - -* 'halui.machine.is-on' (bit, out) - indicates machine on -* 'halui.machine.off' (bit, in) - pin for requesting machine off -* 'halui.machine.on' (bit, in) - pin for requesting machine on - -.Max Velocity - -The maximum linear velocity can be adjusted from 0 to the MAX_VELOCITY -that is set in the [TRAJ] section of the ini file. - -* 'halui.max-velocity.count-enable' (bit, in) - must be true for 'counts' or -'direct-value' to work. -* 'halui.max-velocity.counts' (s32, in) - counts * scale = MV percentage. Can -be used with an encoder or 'direct-value'. -* 'halui.max-velocity.direct-value' (bit, in) - false when using encoder to -change counts, true when setting counts directly. The 'count-enable' pin must -be true. -* 'halui.max-velocity.decrease' (bit, in) - pin for decreasing max velocity -* 'halui.max-velocity.increase' (bit, in) - pin for increasing max velocity -* 'halui.max-velocity.scale' (float, in) - the amount applied to the - current maximum velocity with each transition from off to on of the - increase or decrease pin in machine units per second. -* 'halui.max-velocity.value' (float, out) - is the maximum linear velocity - in machine units per second. - -.MDI - -Sometimes the user wants to add more complicated tasks to be performed -by the activation of a HAL pin. This is possible using the following -MDI commands scheme: - -* The MDI_COMMAND is added to the ini file in the [HALUI] section. - ----- -[HALUI] -MDI_COMMAND = G0 X0 ----- - -* When halui starts it will read the MDI_COMMAND fields in the ini, and - export pins from 00 to the number of MDI_COMMAND's found in the ini up - to a maximum of 64 commands. -* 'halui.mdi-command-' (bit, in) - halui will try to send the MDI - command defined in the ini. This will not always succeed, depending on - the operating mode LinuxCNC is in (e.g. while in AUTO halui can't - successfully send MDI commands). If the command succeeds then it will - place LinuxCNC in the MDI mode and then back to Manual mode. - -.Joint Selection - -* 'halui.joint.select' (u32, in) - select joint (0..8) - internal halui -* 'halui.joint.selected' (u32, out) - joint (0..8) selected* internal halui -* 'halui.joint.x.select bit' (bit, in) - pins for selecting a joint* internal halui -* 'halui.joint.x.is-selected bit' (bit, out) - indicates joint selected* internal halui - -.Mode - -* 'halui.mode.auto' (bit, in) - pin for requesting auto mode -* 'halui.mode.is-auto' (bit, out) - indicates auto mode is on -* 'halui.mode.is-joint' (bit, out) - indicates joint by joint jog mode is on -* 'halui.mode.is-manual' (bit, out) - indicates manual mode is on -* 'halui.mode.is-mdi' (bit, out) - indicates mdi mode is on -* 'halui.mode.is-teleop' (bit, out) - indicates coordinated jog mode is on -* 'halui.mode.joint' (bit, in) - pin for requesting joint by joint jog mode -* 'halui.mode.manual' (bit, in) - pin for requesting manual mode -* 'halui.mode.mdi' (bit, in) - pin for requesting mdi mode -* 'halui.mode.teleop' (bit, in) - pin for requesting coordinated jog mode - -.Program - -* 'halui.program.block-delete.is-on' (bit, out) - status pin telling that block delete is on -* 'halui.program.block-delete.off' (bit, in) - pin for requesting that block delete is off -* 'halui.program.block-delete.on' (bit, in) - pin for requesting that block delete is on -* 'halui.program.is-idle' (bit, out) - status pin telling that no program is running -* 'halui.program.is-paused' (bit, out) - status pin telling that a program is paused -* 'halui.program.is-running' (bit, out) - status pin telling that a program is running -* 'halui.program.optional-stop.is-on' (bit, out) - status pin telling that the optional stop is on -* 'halui.program.optional-stop.off' (bit, in) - pin requesting that the optional stop is off -* 'halui.program.optional-stop.on' (bit, in) - pin requesting that the optional stop is on -* 'halui.program.pause' (bit, in) - pin for pausing a program -* 'halui.program.resume' (bit, in) - pin for resuming a paused program -* 'halui.program.run' (bit, in) - pin for running a program -* 'halui.program.step' (bit, in) - pin for stepping in a program -* 'halui.program.stop' (bit, in) - pin for stopping a program - -.Spindle Override - -* 'halui.spindle.N.override.count-enable' (bit, in) - must be true for 'counts' or -'direct-value' to work. -* 'halui.spindle.N.override.counts' (s32, in) - counts * scale = SO percentage -* 'halui.spindle.N.override.decrease' (bit, in) - pin for decreasing the SO (-=scale) -* 'halui.spindle.N.override.direct-value' (bit, in) - false when using encoder to change counts, -true when setting counts directly. The 'count-enable' pin must be true. -* 'halui.spindle.N.override.increase' (bit, in) - pin for increasing the SO (+=scale) -* 'halui.spindle.N.override.scale' (float, in) - pin for setting the scale on changing the SO -* 'halui.spindle.N.override.value' (float, out) - current SO value - -.Spindle - -* 'halui.spindle.N.brake-is-on' (bit, out) - indicates brake is on -* 'halui.spindle.N.brake-off' (bit, in) - pin for deactivating spindle/brake -* 'halui.spindle.N.brake-on' (bit, in) - pin for activating spindle-brake -* 'halui.spindle.N.decrease' (bit, in) - decreases spindle speed -* 'halui.spindle.N.forward' (bit, in) - starts the spindle with CW motion -* 'halui.spindle.N.increase' (bit, in)- increases spindle speed -* 'halui.spindle.N.is-on' (bit, out) - indicates spindle is on (either direction) -* 'halui.spindle.N.reverse' (bit, in)- starts the spindle with a CCW motion -* 'halui.spindle.N.runs-backward' (bit, out) - indicates spindle is on, and in reverse -* 'halui.spindle.N.runs-forward' (bit, out) - indicates spindle is on, and in forward -* 'halui.spindle.N.start' (bit, in) - starts the spindle -* 'halui.spindle.N.stop' (bit, in) - stops the spindle - -.Tool - -* 'halui.tool.length-offset' (float, out) - indicates current applied tool-length-offset -* 'halui.tool.number' (u32, out) - indicates current selected tool - diff --git a/docs/src/hal/halui_fr.adoc b/docs/src/gui/halui_fr.adoc similarity index 77% rename from docs/src/hal/halui_fr.adoc rename to docs/src/gui/halui_fr.adoc index e206d0bc01..4362e1d751 100644 --- a/docs/src/hal/halui_fr.adoc +++ b/docs/src/gui/halui_fr.adoc @@ -1,11 +1,10 @@ :lang: fr :toc: -= L'interface Halui - [[cha:Halui]] += L'interface Halui -== Introduction[[sec:HaluiIntroduction]] +== Introduction Halui est une interface utilisateur pour LinuxCNC s'appuyant sur HAL, elle connecte les pins de HAL à des commandes NML. La plupart des @@ -15,6 +14,7 @@ par des pins de HAL dans Halui. La façon la plus facile pour utiliser halui est de modifier votre dossier d'ini pour inclure + ---- HALUI = halui ---- @@ -23,13 +23,14 @@ dans la section [HAL]. Une solution alternative pour l'invoquer (surtout si vous générez la config avec stepconf) est d'inclure + ---- loadusr halui -ini /path/to/inifile.ini ---- dans votre fichier custom.hal. -== Nomenclature des pins d'Halui[[sec:Halui-pin-reference]] +== Nomenclature des pins d'Halui Abandon:: (abort) - halui.abort (bit, in) - pin de requête d'abandon (efface les erreurs) @@ -52,10 +53,10 @@ _counts_ ou _direct-value_ soient opérationnels. - halui.feed-override.decrease (bit, in) - pin pour diminuer la correction (-=scale) - halui.feed-override.increase (bit, in) - pin pour augmenter la correction (+=scale) - halui.feed-override.direct-value (bit, in) - fausse lors de l'utilisation un - codeur pour changer counts, vraie pour ajuster counts directement. La pin -_count-enable_ doit être vraie. + codeur pour changer counts, vraie pour ajuster counts directement. La pin + _count-enable_ doit être vraie. - halui.feed-override.scale (float, in) - pin pour positionner l'échelle pour -accroître ou décroître la correction de vitesse d'avance. + accroître ou décroître la correction de vitesse d'avance. - halui.feed-override.value (float, out) - Valeur de la correction courante de vitesse d'avance Arrosage par gouttelettes:: (Mist) @@ -132,12 +133,12 @@ Vitesse maximum:: La vitesse linéaire maximum peut être ajustée entre 0 et la valeur de la variable MAX_VELOCITY dans la section [TRAJ] du fichier ini. - halui.max-velocity.count-enable (bit, in) - Doit être vraie pour que les -_counts_ ou _direct-value_ soit opérationnels. + _counts_ ou _direct-value_ soit opérationnels. - halui.max-velocity.counts (s32, in) - counts * scale = MV pourcent. Utilisable -avec un codeur ou _direct-value_. + avec un codeur ou _direct-value_. - halui.max-velocity.direct-value (bit, in) - faux quand un codeur est utilisé -pour modifier _counts_, vraie pour ajuster _counts_ directement. La pin -_count-enable_ doit être vraie. + pour modifier _counts_, vraie pour ajuster _counts_ directement. La pin + _count-enable_ doit être vraie. - halui.max-velocity.decrease (bit, in) - pin pour diminuer la vitesse max - halui.max-velocity.increase (bit, in) - pin pour augmenter la vitesse max - halui.max-velocity.scale (float, in) - Valeur appliquée sur le @@ -152,11 +153,13 @@ devant être effectuées par l'activation d'une pin de HAL. C'est possible en utilisant le schéma de commande en données manuelles (MDI) suivant: - Une MDI_COMMAND est ajoutée dans la section [HALUI] du fichier ini, -par exemple: + par exemple: + ---- [HALUI] MDI_COMMAND = G0 X0 ---- + - Quand halui démarre il va lire/détecter le champ MDI_COMMAND dans le fichier ini et exporter les pins de type (bit) halui.mdi-command-, est un nombre compris entre 00 et le @@ -204,13 +207,13 @@ Programme:: (Program) Correcteur de vitesse de broche:: (Spindle Override) - halui.spindle-override.count-enable (bit, in) - doit être vraie pour que -_counts_ ou _direct-value_ soient opérationnels. + _counts_ ou _direct-value_ soient opérationnels. - halui.spindle-override.counts (s32, in) - comptage depuis un codeur, par exemple pour modifier la correction de vitesse de broche - halui.spindle-override.decrease (bit, in) - pin pour diminuer la correction de vitesse de broche (-=scale) - halui.spindle-override.direct-value (bit, in) - fausse en utilisant un codeur -pour modifier _counts_ directement. La pin _count-enable_ doit être vraie. + pour modifier _counts_ directement. La pin _count-enable_ doit être vraie. - halui.spindle-override.increase (bit, in) - pin pour augmenter la correction de vitesse de broche (+=scale) - halui.spindle-override.scale (float, in) - pin pour positionner @@ -236,89 +239,11 @@ Outil:: (Tool) - halui.tool.length-offset (float, out) - indique la correction de longueur d'outil appliquée - halui.tool.number (u32, out) - indique l'outil courant sélectionné -[[sec:Exemple-Commande-Distante]] == Exemples de programme avec Halui Pour que ces exemples fonctionnent, il faut ajouter la ligne suivante dans la section [HAL] du fichier ini. ----- -HALUI = halui ----- - -=== Démarrage à distance - -Pour connecter un bouton de démarrage à distance à LinuxCNC il faut utiliser -la pin _halui.program.run_ et la pin _halui.mode.auto_. - -Il faut s'assurer qu'il est possible de démarrer en utilisant la -pin _halui.mode.is-auto_. On peut faire cela avec un composant de HAL _and2_. -La figure suivante montre comment faire. - -Quand le bouton de commande à distance est pressé, il est connecté à -_halui.mode.auto_ et à l'entrée _and2.0.in0_. Si le le mode auto est activé, -la pin _halui.mode.is-auto_ sera TRUE. - -Si les deux entrées du composant _and2.0_ sont TRUE, la sortie _and2.0.out_ -sera TRUE également et le programme sera démarré. - -.Exemple de commande distante -image::images/remote-start.png[alt="Exemple de commande distante"] - -Les commandes de Hal pour accomplir ces actions sont les suivantes: ----- -net program-start-btn halui.mode.auto and2.0.in0 <= -net program-run-ok and2.0.in1 <= halui.mode.is-auto -net remote-program-run halui.program.run <= and2.0.out ----- -Noter que sur la première ligne il y a deux pins en lecture, ce qui pourrait aussi -se séparer en deux lignes comme ceci: ----- -net program-start-btn halui.mode.auto <= -net program-start-btn and2.0.in0 ---- - -=== Pause et Reprise - -Cet exemple a été developpé pour permettre à LinuxCNC de déplacer un -axe rotatif selon un signal provenant d'une machine extérieure. La -coordination entre les deux systèmes est assurée par deux composants de Halui: - - - halui.program.is-paused - - halui.program.resume - -Dans le fichier _custom.hal_, ajoutez les deux lignes suivantes -qui seront connectées à vos entrées/sorties pour mettre le -programme en pause ou pour le reprendre quand l'autre système veut -qu'LinuxCNC soit relancé. ----- -net ispaused halui.program.is paused => "la pin de sortie" -net resume halui.program.resume <= "la pin d'entrée" +HALUI = halui ---- - -Les pins d'entrée et de sortie, correspondent à celles qui sont -câblées vers l'autre contrôleur. Elles peuvent être des broches du -port parallèle ou toutes autres broches auquelles nous avons accès. - -Le fonctionnement est le suivant, quand un M0 est rencontré dans le -programme G-code, _halui.program.is-paused_ devient TRUE. Ce -qui rend la broche de sortie également TRUE de sorte que -l'autre contrôleur sait que LinuxCNC est arrêté. - -Pour reprendre l'exécution du G-code, l'autre contrôleur devra rendre -l'entrée TRUE. Ce qui relancera LinuxCNC jusqu'au prochain M0. - -Difficultés de timing - - - Le signal de reprise ne doit pas être plus long que le temps - nécessaire pour exécuter le G-code. - - - Le signal _Is Paused_ ne doit plus être actif quand le signal - suivant de reprise arrive. - -Ces problèmes de timming pourraient être évités, en utilisant -ClassicLadder pour activer le signal _is paused_ avec une tempo -et le désactiver en fin de tempo. La reprise pourrait également -être fournie par un signal monostable très court. - - diff --git a/docs/src/gui/image-to-gcode.adoc b/docs/src/gui/image-to-gcode.adoc index 510caf3dd9..6255bc6c3a 100644 --- a/docs/src/gui/image-to-gcode.adoc +++ b/docs/src/gui/image-to-gcode.adoc @@ -180,6 +180,5 @@ In this image, Roughing depth per pass is 0.2 inches and roughing offset is 0.1 inches. .Roughing passes and final pass - image::images/i2g-roughing.png["Roughing passes and final pass"] diff --git a/docs/src/gui/image-to-gcode_es.adoc b/docs/src/gui/image-to-gcode_es.adoc deleted file mode 100644 index d713689fc0..0000000000 --- a/docs/src/gui/image-to-gcode_es.adoc +++ /dev/null @@ -1,183 +0,0 @@ -[[cha:image-to-g-code]] - -= Image to G Code - -image::images/image-to-gcode.png[align="center", alt="Image to G Code"] - -== What is a depth map? - -A depth map is a greyscale image where the brightness of each pixel -corresponds to the depth (or height) of the object at each point. - -== Integrating image-to-gcode with the AXIS user interface - -Add the following lines to the '[FILTER]' section of your .ini file -to make AXIS automatically invoke -image-to-gcode when you open a .png, .gif, or .jpg image - ----- -PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image -png = image-to-gcode -gif = image-to-gcode -jpg = image-to-gcode ----- - -The standard 'sim/axis.ini' configuration file is already configured -this way. - -== Using image-to-gcode - -Start image-to-gcode either by opening an image file in AXIS, or by -invoking image-to-gcode from the terminal, as follows: - ----- -image-to-gcode torus.png > torus.ngc ----- - -Verify all the settings in the right-hand column, then press OK to -create the gcode. Depending on the image size and options chosen, this -may take from a few seconds to a few minutes. If you are loading the -image in AXIS, the gcode will automatically be loaded and previewed -once image-to-gcode completes. In AXIS, hitting reload will show the -image-to-gcode option screen again, allowing you to tweak them. - -== Option Reference - -=== Units - -Specifies whether to use G20 (inches) or G21 (mm) in the generated -g-code and as the units for each option labeled '(units)'. - -=== Invert Image - -If “no”, the black pixel is the lowest point and the white pixel is -the highest point. If “yes”, the black pixel is the highest point and -the white pixel is the lowest point. - -=== Normalize Image - -If 'yes', the darkest pixel is remapped to black, the lightest pixel -is remapped to white. - -=== Expand Image Border - -If 'None', the input image is used as-is, and details which are at the -very edges of the image may be cut off. If 'White' or 'Black', then a -border of pixels equal to the tool diameter is added on all sides, and -details which are at the very edges of the images will not be cut off. - -=== Tolerance (units) - -When a series of points are within 'tolerance' of being a straight -line, they are output as a straight line. -Increasing tolerance can lead to better contouring performance in LinuxCNC, -but can also remove or blur small details in the image. - -=== Pixel Size (units) - -One pixel in the input image will be this many units--usually this -number is much smaller than 1.0. For instance, to mill a 2.5x2.5-inch -object from a 400x400 image file, use a pixel size of .00625, because -2.5 / 400 = .00625. - -=== Plunge Feed Rate (units per minute) - -The feed rate for the initial plunge movement. - -=== Feed Rate (units per minute) - -The feed rate for other parts of the path. - -=== Spindle Speed (RPM) - -The spindle speed S code that should be put into the gcode file. - -=== Scan Pattern - -Possible scan patterns are: - - - Rows - - Columns - - Rows, then Columns - - Columns, then Rows - -=== Scan Direction - -Possible scan directions are: - - - Positive: Start milling at a low X or Y axis value, and move towards a - high X or Y axis value - - Negative: Start milling at a high X or Y axis value, and move towards - a low X or Y axis value - - Alternating: Start on the same end of the X or Y axis travel that the - last move ended on. This reduces the amount of traverse movements - - Up Milling: Start milling at low points, moving towards high points - - Down Milling: Start milling at high points, moving towards low points - -=== Depth (units) - -The top of material is always at 'Z=0'. The deepest cut into the -material is 'Z=-depth.' - -=== Step Over (pixels) - -The distance between adjacent rows or columns. To find the number of -pixels for a given units distance, compute 'distance/pixel size' and -round to the nearest whole number. For example, if 'pixel size=.006' -and the desired step over 'distance=.015', then use a Step Over of 2 or -3 pixels, because '.015/.006=2.5''.' - -=== Tool Diameter - -The diameter of the cutting part of the tool. - -=== Safety Height - -The height to move to for traverse movements. image-to-gcode always -assumes the top of material is at 'Z=0'. - -=== Tool Type - -The shape of the cutting part of the tool. Possible tool shapes are: - - - Ball End - - Flat End - - 45 degree “vee” - - 60 degree “vee” - -=== Lace bounding - -This controls whether areas that are relatively flat along a row or -column are skipped. This option only makes sense when both rows and -columns are being milled. Possible bounding options are: - - - None: Rows and columns are both fully milled. - - Secondary: When milling in the second direction, areas that do not - strongly slope in that direction are skipped. - - Full: When milling in the first direction, areas that strongly slope - in the second direction are skipped. When milling in the second - direction, areas that do not strongly slope in that direction are - skipped. - -=== Contact angle - -When 'Lace bounding' is not 'None', slopes greater than 'Contact angle' -are considered to be 'strong' slopes, and slopes less than that angle -are considered to be weak slopes. - -=== Roughing offset and depth per pass - -Image-to-gcode can optionally perform rouging passes. The depth of -successive roughing passes is given by 'Roughing depth per pass'. For -instance, entering 0.2 will perform the first roughing pass with a -depth of 0.2, the second roughing pass with a depth of 0.4, and so on -until the full Depth of the image is reached. No part of any roughing -pass will cut closer than Roughing Offset to the final part. The following -figure shows a tall vertical feature being milled. -In this image, Roughing depth per pass is 0.2 inches and roughing -offset is 0.1 inches. - -.Roughing passes and final pass - -image::images/i2g-roughing.png[alt="Roughing passes and final pass"] - diff --git a/docs/src/gui/image-to-gcode_fr.adoc b/docs/src/gui/image-to-gcode_fr.adoc index ad71d845d4..81f1e0923d 100644 --- a/docs/src/gui/image-to-gcode_fr.adoc +++ b/docs/src/gui/image-to-gcode_fr.adoc @@ -1,9 +1,10 @@ :lang: fr :toc: +[[cha:image-to-g-code]] = Image-to-gcode: Usiner un depth maps -image::images/image-to-gcode.png[alt="Image-to-gcode: Usiner un depth maps"] +image::images/image-to-gcode.png["Image-to-gcode: Usiner un depth maps"] == Qu'est-ce qu'un _depth map_? @@ -16,6 +17,7 @@ l'objet. Ajoutez les lignes suivantes dans la section: _[FILTER]_ de votre fichier .ini pour qu'AXIS invoque automatiquement image-to-gcode à l'ouverture d'une image .png, .gif, ou .jpg: + ---- PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image ---- @@ -28,6 +30,7 @@ cette façon. image-to-gcode peut être démarré soit en ouvrant une image dans AXIS, soit en invoquant image-to-gcode dans une console, de la manière suivante: + ---- image-to-gcode torus.png > torus.ngc ---- @@ -107,15 +110,15 @@ Modèles de balayage possibles: Directions de balayage possibles: - - Positive: le fraisage commence à de petites valeurs de X ou Y et se + - Positive: le fraisage commence à de petites valeurs de X ou Y et se poursuit avec des valeurs croissantes. - - Négative: le fraisage commence à des valeurs élevées de X ou Y et se + - Négative: le fraisage commence à des valeurs élevées de X ou Y et se poursuit avec des valeurs décroissantes. - - Alternative: le fraisage commence aux valeurs de X ou Y où s'est + - Alternative: le fraisage commence aux valeurs de X ou Y où s'est terminé le dernier mouvement. Cela réduit les déplacements _en l'air_. - - Up Milling: le fraisage commence en points bas et se poursuit vers les + - Up Milling: le fraisage commence en points bas et se poursuit vers les points hauts. - - Down Milling: le fraisage commence en points hauts et se poursuit vers + - Down Milling: le fraisage commence en points hauts et se poursuit vers les points bas. === Depth (unités) @@ -183,7 +186,7 @@ ci-dessous montre une grande profondeur verticale à usiner. Sur cette image, la profondeur des passes d'ébauche est de 0.2 pouces et Roughing Offset de 0.1 pouces. -.Passes d'ébauche[[cap:Passes-Ebauche]] - -image::images/i2g-roughing.png[alt="Passes d'ébauche"] +[[cap:Passes-Ebauche]] +.Passes d'ébauche +image::images/i2g-roughing.png["Passes d'ébauche"] diff --git a/docs/src/gui/ngcgui_es.adoc b/docs/src/gui/ngcgui_es.adoc index 7c2e069e72..b13e509279 100644 --- a/docs/src/gui/ngcgui_es.adoc +++ b/docs/src/gui/ngcgui_es.adoc @@ -55,7 +55,6 @@ Un ejemplo completo integrado como una aplicación gladevcp y usando gcmc está Configuraciones de muestra/sim/gscreen/ngcgui/pyngcgui_gcmc - Las configuraciones sim de ejemplo utilizan archivos de biblioteca que proporcionan ejemplo de archivos de subrutina de código G (.ngc) y archivos de metacompilador de código G (.gcmc): @@ -197,12 +196,15 @@ Uso: [--quiet] (menos comentarios en outfile) [--noiframe] (predeterminado: el cuadro muestra la imagen) ---- + [NOTE] Como aplicación independiente, ngcgui maneja un único archivo de subrutina que se puede invocar varias veces. Se puede iniciar múltiples aplicaciones ngcgui independientes. === PYNGCGUI independiente + Para su uso, escriba en un terminal: + ---- pyngcgui --help Uso: @@ -243,7 +245,7 @@ Los siguientes elementos del archivo INI van en la sección [DISPLAY]. (Ver a co * 'TKPKG = Ngcgui 1.0' - el paquete NGCGUI * 'TKPKG = Ngcguittt 1.0': el paquete True Type Tracer para generar texto - para grabar (opcional, debe seguir TKPKG = Ngcgui). + para grabar (opcional, debe seguir TKPKG = Ngcgui). * 'TTT = truetype-tracer': nombre del programa truetype tracer (debe estar en la RUTA del usuario) * 'TTT_PREAMBLE = in_std.ngc' - Opcional, especifica el nombre del archivo para el preámbulo utilizado para subfiles ttt creados. (alternativo: mm_std.ngc) @@ -289,6 +291,7 @@ Los siguientes elementos del archivo INI van en la sección [DISPLAY] para cualq ** 'noiframe' - sin imagen interna, muestra imágenes en un widget de nivel superior separado ** 'nom2' - Esta opción elimina todos los efectos secundarios de la terminación m2 * 'GCMC_INCLUDE_PATH = dirname1:dirname2' - busca directorios para archivos include de gcmc + Este es un ejemplo de NGCGUI incrustado en Axis. Las subrutinas deben estar en un directorio especificado por [RS274NGC]SUBROUTINE_PATH. En algun ejemplo las subrutinas usan otras subrutinas, así que asegúrese de tener las dependencias, si las hay, en un directorio SUBROUTINE_PATH. Algunas subrutinas pueden usar archivos M personalizados que deben estar en un directorio especificado por [RS274NGC]USER_M_PATH. Gcode-meta-compiler (gcmc) puede incluir declaraciones como: @@ -335,7 +338,6 @@ TTT = truetype-tracer TTT_PREAMBLE = in_std.ngc PROGRAM_PREFIX = ../../nc_files - ---- [NOTE] @@ -362,6 +364,7 @@ Item: [DISPLAY]TTT_PREAMBLE = preamble_filename Example: [DISPLAY]TTT_PREAMBLE = in_std.ngc Note: Opcional, especifica el nombre de archivo para el preámbulo utilizado para los archivos subttt creados. .... + === Especificaciones de ruta en archivo INI Ngcgui usa la ruta de búsqueda de LinuxCNC. @@ -374,6 +377,7 @@ seguido de múltiples directorios especificados por: [RS274NGC]SUBROUTINE_PATH=directorio1_nombre:directorio1_nombre:directorio3_nombre ... Los directorios pueden especificarse como rutas absolutas o relativas. + .... Ejemplo: [DISPLAY]PROGRAM_PREFIX = /home/myname/linuxcnc/nc_files Ejemplo: [DISPLAY]PROGRAM_PREFIX = ~/linuxcnc/nc_files @@ -423,6 +427,7 @@ Los nuevos usuarios pueden intentar inadvertidamente usar archivos que no están para usar como subarchivos puede incluir un comentario especial: "(not_a_subfile)" para que ngcgui los rechace automáticamente con un mensaje relevante. === Resumen de los detalles de elementos del archivo INI para usar NGCGUI + .... Elemento: [RS274NGC]SUBROUTINE_PATH = dirname1:dirname2:dirname3 ... Ejemplo: [RS274NGC]SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs @@ -534,10 +539,10 @@ Elemento: [DISPLAY]GCMC_INCLUDE_PATH = dirname1: dirname2: ... Ejemplo: [DISPLAY]GCMC_INCLUDE_PATH =/home/myname/gcmc_includes:/home/myname/gcmc_includes2 Nota: Opcional, cada directorio se incluirá cuando se invoque gcmc usando la opción: --incluir dirname - .... == Requisitos de archivo para compatibilidad NGCGUI + === Requisitos de subrutina de Gcode de un solo archivo (.ngc) Un subfile compatible con NGCGUI contiene una única definición de subrutina. El nombre de la subrutina debe ser el mismo que el nombre del archivo (sin incluir el sufijo .ngc). LinuxCNC admite subrutinas con nombre o numeradas, pero solo las subrutinas con nombre son compatibles con NGCGUI. Para más información ver el @@ -658,6 +663,7 @@ el metacompilador Gcode (gcmc) Se pueden encontrar subrutinas adicionales para usuarios en el Foro, en la sección de subrutinas. === Requisitos del archivo Gcode-meta-compiler (.gcmc) + Ngcgui lee los archivos de Gcode-meta-compiler (gcmc) y crea cuadros de entrada para variables etiquetadas en el archivo. Cuando una característica del archivo finaliza, ngcgui pasa el archivo como entrada al compilador gcmc y, si la compilación es exitosa, el archivo gcode resultante se envía a LinuxCNC para su ejecución. El archivo resultante está formateado como subrutina de un solo archivo; Los archivos .gcmc y los archivos .ngc se pueden mezclar en ngcgui. @@ -687,7 +693,9 @@ formatos de línea de etiqueta aceptados. Los formatos alternativos ignoran los //ngcgui: varname2 = value2; //ngcgui: varname3 = value3; //, etiqueta3; ---- + Ejemplos: + ---- //ngcgui: feedrate = 10; //ngcgui: xl = 0; //, límite x @@ -703,10 +711,13 @@ Una línea de información que aparecerá en la parte superior de una pestaña p Cuando sea necesario, las opciones se pueden pasar al compilador gcmc con una línea etiquetada: Formato de etiqueta de línea de opción + ---- //ngcgui: -option_name [ [=] option_value] ---- + Ejemplos: + ---- //ngcgui: -I //ngcgui: --imperial @@ -715,6 +726,7 @@ Ejemplos: ---- Las opciones para gcmc están disponibles con el comando de terminal: + ---- gcmc --help ---- @@ -756,3 +768,5 @@ Esta imagen muestra el uso del nuevo botón y la pestaña personalizada para cre tres recortes DB25 en un programa. image::images/ngcgui-db25-3.png[align="center"] + +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/ngcgui_fr.adoc b/docs/src/gui/ngcgui_fr.adoc index 07c30a1302..bec8298e9a 100644 --- a/docs/src/gui/ngcgui_fr.adoc +++ b/docs/src/gui/ngcgui_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= L'utilitaire graphique NGCGUI - [[cha:ngcgui]] += L'utilitaire graphique NGCGUI image::images/ngcgui_fr.png[] @@ -18,9 +17,9 @@ Ngcgui est un outil puissant pour construire les programmes de G-code en sous-programmes. * Les sous-programmes peuvent être concaténés pour fournir un programme de -G-code complet. + G-code complet. * De multiples instances d'un sous-programme peuvent être utilisées pour -fournir la même tâche à différents emplacements sur la même pièce. + fournir la même tâche à différents emplacements sur la même pièce. * N'importe quel G-code valide peut être utilisé dans un sous-programme. * De nouveaux sous-programmes peuvent être ajoutés à la volée. @@ -129,13 +128,13 @@ D'autres exemples de sous-programmes se trouvent dans le répertoire sim/ngcgui Les items de fichier INI pour NGCGUI vont dans la section [DISPLAY]. * _TKPKG_ = Ngcgui 1.0 - Le paquet principal de NGCGUI (doit -précéder Ngcguittt). + précéder Ngcguittt). * _TKPKG_ = Ngcguittt 1.0 - Le paquet du traceur True Type pour -générer des textes à graver. + générer des textes à graver. * _NGCGUI_FONT_ = Helvetica -12 normal - Spécifie la police utilisée. * _NGCGUI_PREAMBLE_ = in_std.ngc - Le fichier de préambule à ajouter au début -du sous-programme. Quand plusieurs sous-programmes sont concaténés, un seul -est ajouté. + du sous-programme. Quand plusieurs sous-programmes sont concaténés, un seul + est ajouté. * _NGCGUI_SUBFILE_ = simp.ngc - Crée un onglet depuis le sous-programme nommé. * _NGCGUI_SUBFILE_ = "" - Crée un onglet personnalisé. * _#NGCGUI_OPTIONS_ = opt1 opt2 ... - Options Ngcgui @@ -146,8 +145,7 @@ est ajouté. *** # noiframe -- no internal image, image on separate top level * _TTT_ = Le programme True-type Tracer * _TTT_PREAMBLE_ = in_std.ngc - Optionnel, spécifie le nom de fichier de -préambule utilisé par ttt pour créer les sous-fichiers. - + préambule utilisé par ttt pour créer les sous-fichiers. Voici un exemple d'intégration de NGCGUI dans Axis. Les sous-programmes doivent être placés dans un répertoire spécifié par la variable @@ -163,7 +161,6 @@ par ngcgui. D'autres items sont requis par LinuxCNC pour obtenir un fichier ini complet. .Simple fichier.ini - ---- [RS274NGC] SUBROUTINE_PATH = ../../../nc_files/ngcgui_lib:../../../ngcgui_lib/utilitysubs @@ -245,6 +242,7 @@ suivi par les répertoires multiples spécifiés par: .Répertoires Les répertoires peuvent être spécifiés comme des chemins absolus ou des chemins relatifs. + .... Exemple: [DISPLAY]PROGRAM_PREFIX = /home/myname/linuxcnc/nc_files Exemple: [DISPLAY]PROGRAM_PREFIX = ~/linuxcnc/nc_files @@ -315,6 +313,7 @@ séparés pour dissuader toute tentative d'utilisation de ces sous-fichiers. Pour intégrer ngcgui dans Axis, spécifier les items suivants dans le fichier ini: + .... Item: [DISPLAY]PROGRAM_PREFIX = dirname Exemple: [DISPLAY]PROGRAM_PREFIX = ../../../nc_files @@ -396,6 +395,7 @@ Note: De multiples options séparées par des blancs. avoir des possibilités de sélection de sous-fichiers et de création d'onglet additionnels limitées. .... + :showcomments: // FIX-ME Keyboard shortcuts do not work in version _fr. @@ -568,7 +568,6 @@ et l'usage de ngcgui. Des sous-programmes additionnels soumis par les utilisateurs se trouvent dans le forum dans la section _Subroutines_. - == Exemple, découpe pour DB25 L'exemple ci-dessous montre l'utilisation du sous-programme DB25. @@ -588,14 +587,15 @@ image::images/ngcgui-db25-3_fr.png[] == Création d'un sous-programme * Pour la création d'un sous-programme à utiliser avec Ngcgui, le nom de fichier - et le nom du sous-programme doivent être les mêmes. + et le nom du sous-programme doivent être les mêmes. * Le fichier doit être placé dans le sous-répertoire pointé dans le fichier ini. * À la première ligne peut se trouver un commentaires de type info: qui doit - être placé au début du sous-programme. + être placé au début du sous-programme. * Le sous-programme doit être entouré par les balises `sub` et `endsub`. * Les variables utilisées doivent être des variables numérotées et ne doivent pas - sauter de numéro. + sauter de numéro. * Des commentaires et presets peuvent être inclus. + ---- (info: simp -- simple exemple de sous-programme -- Ctrl-U pour éditer) o sub @@ -608,3 +608,4 @@ o sub o endsub ---- +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/panelui.adoc b/docs/src/gui/panelui.adoc index cbf7113f83..8c92eb693f 100644 --- a/docs/src/gui/panelui.adoc +++ b/docs/src/gui/panelui.adoc @@ -29,13 +29,16 @@ This will initialize panelui, which will look for the INI file panelui.ini in the config folder or user folder. One can validate the INI file with this command: + ---- loadusr pyui ---- + This will read, try to correct, then save the panelui.ini file. It will print errors to the terminal if found. A typical HAL file will have these commands added: + [source,{hal}] ---- # commands needed for panelui loading @@ -66,6 +69,7 @@ net key-scan sampler.0.pin.0 addf sim-matrix-kb.0 servo-thread addf sampler.0 servo-thread ---- + == panelui.ini file reference .*Key words* @@ -89,6 +93,7 @@ addf sampler.0 servo-thread [HAL_PREFIX] NAME= Yourname ---- + This allows one to change the prefix of the HAL pins from 'panelui' to an arbitrary name. .*ZMQ Messaging Setup* @@ -99,6 +104,7 @@ This allows one to change the prefix of the HAL pins from 'panelui' to an arbitr SOCKET = 'tcp://127.0.0.1:5690' ENABLE = True ---- + This sets up and enables ZMQ based messaging. + TOPIC and SOCKET must match the listening program. + @@ -106,6 +112,7 @@ TOPIC and SOCKET must match the listening program. + Radiobutons allow only one button in the group to be active at a time. + Each group has its own output pin, separate from each button in the group. + Radio button definitions start with the text 'RADIO_BUTTON' inside single brackets. + [source,{ini}] ---- [RADIO_BUTTONS] @@ -160,6 +167,7 @@ Radio button definitions start with the text 'RADIO_BUTTON' inside single bracke .*Toggle Buttons* Togglebuttons only change state on each press of the button. Toggle button definitions start with the text 'TOGGLE_BUTTON' inside single brackets. + [source,{ini}] ---- [TOGGLE_BUTTONS] @@ -181,10 +189,10 @@ Toggle button definitions start with the text 'TOGGLE_BUTTON' inside single brac FALSE_STATE = 0 ---- - .*Momentary Buttons* Momentary buttons are true when pressed and false when released. Momentary button definitions start with the text 'MOMENTARY_BUTTON' inside single brackets. + [source,{ini}] ---- [MOMENTARY_BUTTONS] @@ -210,7 +218,8 @@ Momentary button definitions start with the text 'MOMENTARY_BUTTON' inside singl ---- == Internal Command reference -There are a number of internal commands you may use. + + +There are a number of internal commands you may use. *mist_on* @@ -249,7 +258,7 @@ There are a number of internal commands you may use. + .*spindle_forward* * optional argument: starting RPM (int) - default 100 -*spindle_stop* +.*spindle_stop* .*spindle_reverse* * optional argument: starting RPM (int) - default 100 @@ -331,6 +340,7 @@ There are a number of internal commands you may use. + * Description: sets mode to MDI, calls commands. == ZMQ Messages + panelui can send ZMQ based messages on button presses. + In this way panelui can interact will other programs such as qtvcp screens. + diff --git a/docs/src/gui/panelui_es.adoc b/docs/src/gui/panelui_es.adoc index abc36f4cfa..942e8c0441 100644 --- a/docs/src/gui/panelui_es.adoc +++ b/docs/src/gui/panelui_es.adoc @@ -21,21 +21,27 @@ While actual input buttons are required to be momentary, Panelui will use this input to make toggle, radio, or momentary button output. + == Loading Commands + The command used to load panelui (with optional -d debug switch): + ---- loadusr -W panelui -d ---- + This will initialize panelui, which will look for the INI file panelui.ini in the config folder or user folder. One can validate the INI file with this command: + ---- loadusr pyui ---- + This will read, try to correct, then save the panelui.ini file. It will print errors to the terminal if found. A typical HAL file will have these commands added: + [source,{hal}] ---- # commands needed for panelui loading @@ -66,11 +72,12 @@ net key-scan sampler.0.pin.0 addf sim-matrix-kb.0 servo-thread addf sampler.0 servo-thread ---- + == panelui.ini file reference .*Key words* * KEY= This is used to designate the key that the button responds to. It can be NONE or -ROW number and column number eg R1C2. A row and column can only be used once. + ROW number and column number eg R1C2. A row and column can only be used once. * OUTPUT= This sets the Button's output type, eg S32, U32, FLOAT, BIT, NONE, COMMAND * DEFAULT= This sets the starting output of the group or button. * GROUP= In radiobuttons, designates the group the button interacts with. @@ -87,12 +94,14 @@ ROW number and column number eg R1C2. A row and column can only be used once. [HAL_PREFIX] NAME= Yourname ---- + This allows one to change the prefix of the HAL pins from 'panelui' to an arbritary name. .*Radio Buttons* Radiobutons allow only one button in the group to be active at a time. + Each group has its own output pin, separate from each button in the group. + Radio button definitions start with the text 'RADIO_BUTTON' inside single brackets. + [source,{ini}] ---- [RADIO_BUTTONS] @@ -147,6 +156,7 @@ Radio button definitions start with the text 'RADIO_BUTTON' inside single bracke .*Toggle Buttons* Togglebuttons only change state on each press of the button. Toggle button definitions start with the text 'TOGGLE_BUTTON' inside single brackets. + [source,{ini}] ---- [TOGGLE_BUTTONS] @@ -168,7 +178,6 @@ Toggle button definitions start with the text 'TOGGLE_BUTTON' inside single brac FALSE_STATE = 0 ---- - .*Momentary Buttons* Momentary buttons are true when pressed and false when released. Momentary button definitions start with the text 'MOMENTARY_BUTTON' inside single brackets. diff --git a/docs/src/gui/pyvcp-examples.adoc b/docs/src/gui/pyvcp-examples.adoc index b033793bec..ba8a1f21a9 100644 --- a/docs/src/gui/pyvcp-examples.adoc +++ b/docs/src/gui/pyvcp-examples.adoc @@ -517,4 +517,7 @@ MDI command. net rth halui.mdi-command-00 <= pyvcp.rth-button ---- -NOTE: Information about the <> command +[NOTE] +Information about the <> command + +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/pyvcp-examples_es.adoc b/docs/src/gui/pyvcp-examples_es.adoc deleted file mode 100644 index 73e127edee..0000000000 --- a/docs/src/gui/pyvcp-examples_es.adoc +++ /dev/null @@ -1,532 +0,0 @@ -= PyVCP Examples - -== AXIS - -To create a PyVCP panel to use with the AXIS interface that is -attached to the right of AXIS you need to do the following basic -things. - -* Create an .xml file that contains your panel description and put it in - your config directory. -* Add the PyVCP entry to the [DISPLAY] section of the ini file with your - .xml file name. -* Add the POSTGUI_HALFILE entry to the [HAL] section of the ini file - with the name of your postgui HAL file name. -* Add the links to HAL pins for your panel in the postgui.hal file to - 'connect' your PyVCP panel to LinuxCNC. - -== Floating Panels - -To create floating PyVCP panels that can be used with any interface -you need to do the following basic things. - -* Create an .xml file that contains your panel description and put it in - your config directory. -* Add a loadusr line to your .hal file to load each panel. -* Add the links to HAL pins for your panel in the postgui.hal file to - 'connect' your PyVCP panel to LinuxCNC. - -The following is an example of a loadusr command to load two PyVCP -panels and name each one so the connection names in HAL will be known. - -[source,c] ----- -loadusr -Wn btnpanel pyvcp -c btnpanel panel1.xml -loadusr -Wn sppanel pyvcp -c sppanel panel2.xml ----- - -The -Wn makes HAL 'Wait for name' to be loaded before proceeding. The -pyvcp -c makes PyVCP name the panel. - -The HAL pins from panel1.xml will be named btnpanel. - -The HAL pins from panel2.xml will be named sppanel. - -Make sure the loadusr line is before any nets that make use of the -PyVCP pins. - -== Jog Buttons - -In this example we will create a PyVCP panel with jog buttons for X, -Y, and Z. This configuration will be built upon a Stepconf Wizard -generated configuration. First we run the Stepconf Wizard and configure -our machine, then on the Advanced Configuration Options page we make a -couple of selections to add a blank PyVCP panel as shown in the -following figure. For this example we named the configuration -'pyvcp_xyz' on the Basic Machine Information page of the Stepconf -Wizard. - -.XYZ Wizard Configuration[[cap:XYZ-Wizard-Configuration]] - -image::images/xyz_ACO.png[alt="XYZ Wizard Configuration"] - -The Stepconf Wizard will create several files and place them in the -linuxcnc/configs/pyvcp_xyz directory. If you left the create link checked -you will have a link to those files on your desktop. - -=== Create the Widgets - -Open up the custompanel.xml file by right clicking on it and selecting -'open with text editor'. Between the tags we will add -the widgets for our panel. - -Look in the PyVCP Widgets Reference section of the manual for more -detailed information on each widget. - -In your custompanel.xml file we will add the description of the -widgets. - -[source,xml] ----- - - - ("Helvetica",16) - - - - RAISED - 3 - - - - - - - RAISED - 3 - - - - - - - RAISED - 3 - - - - - - - RAISED - 3 - - - ("Helvetica",14) - "jog-speed" - 1 - HORIZONTAL - 0 - 80 - - - - ----- - -After adding the above you now will have a PyVCP panel that looks like -the following attached to the right side of AXIS. It looks nice but it -does not do anything until you 'connect' the buttons to halui. If you -get an error when you try and run scroll down to the bottom of the pop -up window and usually the error is a spelling or syntax error and it -will be there. - -.Jog Buttons[[cap:Jog-Buttons]] - -image::images/xyz_buttons.png[alt="Jog Buttons"] - -=== Make Connections - -To make the connections needed open up your custom_postgui.hal file -and add the following. - ----- -# connect the X PyVCP buttons -net my-jogxminus halui.axis.x.minus <= pyvcp.x-minus -net my-jogxplus halui.axis.x.plus <= pyvcp.x-plus - -# connect the Y PyVCP buttons -net my-jogyminus halui.axis.y.minus <= pyvcp.y-minus -net my-jogyplus halui.axis.y.plus <= pyvcp.y-plus - -# connect the Z PyVCP buttons -net my-jogzminus halui.axis.z.minus <= pyvcp.z-minus -net my-jogzplus halui.axis.z.plus <= pyvcp.z-plus - -# connect the PyVCP jog speed slider -net my-jogspeed halui.axis.jog-speed <= pyvcp.jog-speed-f ----- - -After resetting the E-Stop and putting it into jog mode and moving the -jog speed slider in the PyVCP panel to a value greater than zero the -PyVCP jog buttons should work. You can not jog when running a g code -file or while paused or while the MDI tab is selected. - -== Port Tester - -This example shows you how to make a simple parallel port tester using -PyVCP and HAL. - -First create the ptest.xml file with the following code to create the -panel description. - -[source,xml] ----- - - - - RIDGE - 2 - - - "led-01" - 25 - "green" - "red" - - - - RIDGE - 2 - - - "led-02" - 25 - "green" - "red" - - - - RIDGE - 2 - - - "led-10" - 25 - "green" - "red" - - - - RIDGE - 2 - - - "led-11" - 25 - "green" - "red" - - - ----- - -This will create the following floating panel which contains a couple -of in pins and a couple of out pins. - -.Port Tester Panel[[cap:Port-Tester-Panel]] - -image::images/ptest.png[alt="Port Tester Panel"] - -To run the HAL commands that we need to get everything up and running -we put the following in our ptest.hal file. - -[source,c] ----- -loadrt hal_parport cfg="0x378 out" -loadusr -Wn ptest pyvcp -c ptest ptest.xml -loadrt threads name1=porttest period1=1000000 -addf parport.0.read porttest -addf parport.0.write porttest -net pin01 ptest.btn01 parport.0.pin-01-out ptest.led-01 -net pin02 ptest.btn02 parport.0.pin-02-out ptest.led-02 -net pin10 parport.0.pin-10-in ptest.led-10 -net pin11 parport.0.pin-11-in ptest.led-11 -start ----- - -To run the HAL file we use the following command from a terminal window. - ----- -~$ halrun -I -f ptest.hal ----- - -The following figure shows what a complete panel might look like. - -.Port Tester Complete[[cap:Port-Tester-Complete]] - -image::images/ptest-final.png[alt="Port Tester Complete"] - -To add the rest of the parallel port pins just modify the .xml and -.hal files. - -To show the pins after running the HAL script use the following -command at the halcmd prompt: - ----- -halcmd: show pin -Component Pins: -Owner Type Dir Value Name - 2 bit IN FALSE parport.0.pin-01-out <== pin01 - 2 bit IN FALSE parport.0.pin-02-out <== pin02 - 2 bit IN FALSE parport.0.pin-03-out - 2 bit IN FALSE parport.0.pin-04-out - 2 bit IN FALSE parport.0.pin-05-out - 2 bit IN FALSE parport.0.pin-06-out - 2 bit IN FALSE parport.0.pin-07-out - 2 bit IN FALSE parport.0.pin-08-out - 2 bit IN FALSE parport.0.pin-09-out - 2 bit OUT TRUE parport.0.pin-10-in ==> pin10 - 2 bit OUT FALSE parport.0.pin-10-in-not - 2 bit OUT TRUE parport.0.pin-11-in ==> pin11 - 2 bit OUT FALSE parport.0.pin-11-in-not - 2 bit OUT TRUE parport.0.pin-12-in - 2 bit OUT FALSE parport.0.pin-12-in-not - 2 bit OUT TRUE parport.0.pin-13-in - 2 bit OUT FALSE parport.0.pin-13-in-not - 2 bit IN FALSE parport.0.pin-14-out - 2 bit OUT TRUE parport.0.pin-15-in - 2 bit OUT FALSE parport.0.pin-15-in-not - 2 bit IN FALSE parport.0.pin-16-out - 2 bit IN FALSE parport.0.pin-17-out - 4 bit OUT FALSE ptest.btn01 ==> pin01 - 4 bit OUT FALSE ptest.btn02 ==> pin02 - 4 bit IN FALSE ptest.led-01 <== pin01 - 4 bit IN FALSE ptest.led-02 <== pin02 - 4 bit IN TRUE ptest.led-10 <== pin10 - 4 bit IN TRUE ptest.led-11 <== pin11 ----- - -This will show you what pins are IN and what pins are OUT as well as -any connections. - - -== GS2 RPM Meter[[gs2-rpm-meter]] - -The following example uses the Automation Direct GS2 VDF driver and -displays the RPM and other info in a PyVCP panel. This example is based -on the GS2 example in the Hardware Examples section this manual. - -=== The Panel - -To create the panel we add the following to the .xml file. - -[source,xml] ----- - - - - - RAISED - 3 - - "spindle_rpm" - "Spindle" - "RPM" - 200 - 0 - 3000 - 500 - 100 - 0,10,"yellow" - - - - - - RAISED - 3 - - RAISED - 2 - - 5 - - - - - - - RAISED - 2 - - - - - - RAISED - 2 - - - - ----- - -The above gives us a PyVCP panel that looks like the following. - -.GS2 Panel[[cap:GS2-Panel]] - -image::images/gs2_panel.png[alt="GS2 Panel"] - -=== The Connections - -To make it work we add the following code to the custom_postgui.hal -file. - ----- -# display the rpm based on freq * rpm per hz -loadrt mult2 -addf mult2.0 servo-thread -setp mult2.0.in1 28.75 -net cypher_speed mult2.0.in0 <= spindle-vfd.frequency-out -net speed_out pyvcp.spindle_rpm <= mult2.0.out - -# run led -net gs2-run => pyvcp.on-led - -# fwd led -net gs2-fwd => pyvcp.fwd-led - -# rev led -net running-rev spindle-vfd.spindle-rev => pyvcp.rev-led ----- - -Some of the lines might need some explanations. The fwd led line uses -the signal created in the custom.hal file whereas the rev led needs to -use the spindle-rev bit. You can't link the spindle-fwd bit twice so -you use the signal that it was linked to. - - -== Rapid to Home Button - -This example creates a button on the PyVCP side panel when pressed will send -all the axis back to the home position. This example assumes you don't have a -PyVCP panel. - -image::images/pyvcp-rth.png[align="center"] - -In your configuration directory create the .xml file. In this example it's named -'rth.xml'. In the 'rth.xml' file add the following code to create the button. - ----- - - - - ----- - -Open your .ini file with a text editor and in the [DISPLAY] section add the -following line. This is what loads the PyVCP panel. - ----- -PYVCP = rth.xml ----- - -If you don't have a [HALUI] section in the ini file create it and add the -following MDI command. - ----- -MDI_COMMAND = G53 G0 X0 Y0 Z0 ----- - -[NOTE] -Information about <> and <> G codes - -In the [HAL] section if you don't have a post gui file add the following and -create a file called 'postgui.hal'. - ----- -POSTGUI_HALFILE = postgui.hal ----- - -In the 'postgui.hal' file add the following code to link the PyVCP button to the -MDI command. - ----- -net rth halui.mdi-command-00 <= pyvcp.rth-button ----- - -NOTE: Information about the <> command diff --git a/docs/src/gui/pyvcp-examples_fr.adoc b/docs/src/gui/pyvcp-examples_fr.adoc index a0f107ee8c..cd1639574a 100644 --- a/docs/src/gui/pyvcp-examples_fr.adoc +++ b/docs/src/gui/pyvcp-examples_fr.adoc @@ -28,6 +28,7 @@ n'importe quelle interface, suivre les points suivants: pour "connecter" les panneaux PyVCP à LinuxCNC. L'exemple suivant montre le chargement de deux panneaux PyVCP. + ---- loadusr -Wn btnpanel pyvcp -c btnpanel panel1.xml loadusr -Wn sppanel pyvcp -c sppanel panel2.xml @@ -57,7 +58,6 @@ suivante. Pour cet exemple nous avons nommé la configuration _pyvcp_xyz_ sur la page _Basic Machine Information_ de l'assistant Stepconf. .Assistant de configuration XYZ[[cap:XYZ-Wizard-Configuration]] - image::images/xyz_ACO.png[alt="Assistant de configuration XYZ"] L'assistant Stepconf Wizard va créer plusieurs fichiers et les placer dans le @@ -71,7 +71,7 @@ sélectionnant _Ouvrir avec l'éditeur de texte_. Entre les balises __ et __ nous ajouterons les widgets pour le panneau. Tous les détails sur chacun des Widgets de PyVCP sont donnés dans la -<>. +<>. Dans le fichier custompanel.xml nous ajoutons la description des widgets. @@ -165,7 +165,6 @@ une erreur de syntaxe ou d'écriture, elle est donc dans cette partie qu'il conviendra tout d'abord de vérifier soigneusement. .Boutons de Jog[[cap:Jog-Buttons]] - image::images/xyz_buttons.png[alt="Boutons de Jog"] === Effectuer les connections @@ -272,7 +271,6 @@ Le panneau flottant contenant deux pins de HAL d'entrée et deux pins de HAL de sortie. .Panneau flottant testeur de port parallèle[[cap:Port-Tester-Panel]] - image::images/ptest.png[alt="Panneau flottant testeur de port parallèle"] Pour lancer les commandes de HAL dont nous avons besoin et démarrer tout ce @@ -301,7 +299,6 @@ suivantes: La figure suivante montre à quoi ressemble le panneau complet. .Testeur de port parallèle, complet[[cap:Port-Tester-Complete]] - image::images/ptest-final.png[alt="Testeur de port parallèle, complet"] Pour ajouter le reste des pins du port parallèle, il suffi de modifier les @@ -347,7 +344,8 @@ Owner Type Dir Value Name Cela montre quelles pins sont IN est lesquelles sont OUT, ainsi que toutes les connections. -== Compte tours pour GS2[[sec:Exemple-Compte-Tours-GS2]] +[[sec:Exemple-Compte-Tours-GS2]] +== Compte tours pour GS2 L'exemple suivant utilise un variateur de fréquence GS2 de la société Automation Direct. footnote:[ En Europe on trouve ce type de variateur sous la marque Omron.] @@ -450,9 +448,9 @@ Pour créer le panneau nous ajoutons ce code au fichier .xml. L'image ci-dessous montre notre panneau PyVCP en fonctionnement. -.Panneau pour GS2[[cap:Panneau-GS2]] - -image::images/gs2_panel.png[alt="Panneau pour GS2"] +[[cap:Panneau-GS2]] +.Panneau pour GS2 +image::images/gs2_panel.png["Panneau pour GS2"] === Les connections @@ -481,9 +479,8 @@ net running-rev spindle-vfd.spindle-rev => pyvcp.rev-led Certaines lignes demandent quelques explications. - La ligne de la led Sens horaire utilise le signal créé dans le fichier - custom.hal dans lequel la led Sens inverse doit utiliser le bit _spindle-rev_. + custom.hal dans lequel la led Sens inverse doit utiliser le bit _spindle-rev_. - On ne _peut pas_ lier deux fois le bit _spindle-fwd_ pour utiliser le signal - auquel il est déjà lié. - - + auquel il est déjà lié. +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/pyvcp.adoc b/docs/src/gui/pyvcp.adoc index 43a69df555..bcf906f348 100644 --- a/docs/src/gui/pyvcp.adoc +++ b/docs/src/gui/pyvcp.adoc @@ -6,7 +6,6 @@ == Introduction .Python Virtual Control Panel - The PyVCP (Python Virtual Control Panel) is designed to give the integrator the ability to customize the AXIS interface with buttons and indicators to do special tasks. @@ -101,16 +100,14 @@ Here we've made a panel with a Label and a Bar widget, specified that the HAL pin connected to the Bar should be named 'spindle-speed', and set the maximum value of the bar to 5000 (see widget reference below for all options). To make AXIS aware of this file, and call it at start -up, we need to specify the following in the [DISPLAY] section of the -.ini file: +up, we need to specify the following in the [DISPLAY] section of the .ini file: ----------------------------- PYVCP = spindle.xml ----------------------------- If the panel should appear at the bottom of the AXIS user interface -then we need to specify the following in the [DISPLAY] section of the -.ini file: +then we need to specify the following in the [DISPLAY] section of the .ini file: ----------------------------- PYVCP_POSITION = BOTTOM @@ -160,27 +157,24 @@ You would use this if you wanted a floating panel or a panel with a GUI other than AXIS. * '-Wn panelname' - - makes HAL wait for the component 'panelname' to finish loading + makes HAL wait for the component 'panelname' to finish loading ('become ready' in HAL speak) before processing more HAL commands. This is important because PyVCP panels export HAL pins, and other HAL components will need them present to connect to them. Note the capital W and lowercase n. If you use the -Wn option you must use the -c option to name the panel. - * 'pyvcp < -g> < -c> panel.xml' - builds the panel with the optional geometry and/or panelname from the xml panel file. The panel.xml can be any name that ends in .xml. The .xml file is the file that describes how to build the panel. You must add the path name if the panel is not in the directory that the HAL script is in. - * '-g <+X+Y>' - specifies the geometry to be used when constructing the panel. The syntax is 'Width x Height + X Anchor + Y Anchor'. You can set the size or position or both. The anchor point is the upper left corner of the panel. An example is -g 250x500+800+0 This sets the panel at 250 pixels wide, 500 pixels tall, and anchors it at X800 Y0. - * '-c panelname' - tells PyVCP what to call the component and also the title of the window. The panelname can be any name without spaces. @@ -280,7 +274,6 @@ evaluated as a Python expression. The examples below show a mix of formats. .Comments - To add a comment use the xml syntax for a comment. [source,xml] @@ -289,13 +282,11 @@ To add a comment use the xml syntax for a comment. ----------------------------- .Editing the XML file - Edit the XML file with a text editor. In most cases you can right click on the file and select 'open with text editor' or similar. [[pyvcp-colors]] .Colors - Colors can be specified using the X11 rgb colors by name 'gray75' or hex '#0000ff'. A complete list is located here http://sedition.com/perl/rgb.html[http://sedition.com/perl/rgb.html]. @@ -313,7 +304,6 @@ Common Colors (colors with numbers indicate shades of that color) - gray and gray0 - 100 .HAL Pins - HAL pins provide a means to 'connect' the widget to something. Once you create a HAL pin for your widget you can 'connect' it to another HAL pin with a 'net' command in a .hal file. For more information on @@ -324,20 +314,14 @@ the 'net' command see the <> section. A label is a way to add text to your panel. * '' - creates a label - * '"text"' - the text to put in your label, a blank label can be used as a spacer to align other objects. - * '("Helvetica",20)' - specify the font and size of the text - * 'FLAT' - specify the border around the label ('FLAT', 'RAISED', 'SUNKEN') default is 'FLAT' - * 'n' - where 'n' is the border width when 'RAISED' or 'SUNKEN' borders are used. - * 'n' - where 'n' is the amount of extra horizontal extra space. - * 'n' - where 'n' is the amount of extra vertical extra space. The label has an optional disable pin that is created when you add @@ -401,26 +385,17 @@ A LED is used to indicate the status of a 'bit' halpin. The LED color will be on_color when the halpin is true, and off_color otherwise. * '' - makes a round LED - * '' - makes a rectangle LED - * 'name' - 'name' of the pin, default is 'led.n', where n is an integer that is incremented for each LED. - * 'n' - 'n' is the size of the led in pixels, default is 20 - * 'color' - sets the color of the LED when the pin is true. default is 'green'. See <> for more info. - * 'color' - sets the color of the LED when the pin is false. default is 'red' - * 'n' - sets the height of the LED in pixels - * 'n' - sets the width of the LED in pixels - * 'false' - when true adds a disable pin to the led. - * 'color' - sets the color of the LED when the pin is disabled. @@ -441,7 +416,6 @@ The above code produced this example. image::images/pyvcp_led.png[] .Rectangle LED - This is a variant of the 'led' widget. [source,xml] @@ -471,19 +445,13 @@ the button is pressed and held down, and will be set False when the button is released. Buttons can use the following optional options. * 'n' - where 'n' is the amount of extra horizontal extra space. - * 'n' - where 'n' is the amount of extra vertical extra space. - * '"color"' - the cursor over color. - * ' "color"' - the foreground color. - * '"color"' - the background color. - * 'True' - disable pin. .Text Button - A text button controls a 'bit' halpin. The halpin is false until the button is pressed then it is true. The button is a momentary button. @@ -507,7 +475,6 @@ The above code produced this example. image::images/pyvcp_button.png[] .Checkbutton - A checkbutton controls a bit halpin. The halpin will be set True when the button is checked, and false when the button is unchecked. The checkbutton is a toggle type button. The Checkbuttons may be set initially as TRUE or FALSE the @@ -537,7 +504,6 @@ to keep the checkbuttons aligned. image::images/pyvcp_checkbutton.png[] .Radiobutton - A radiobutton will set one of the halpins true. The other pins are set false. The initval field may be set to choose the default selection when the panel displays. Only one radio button may be set to TRUE (1) or only the highest @@ -572,7 +538,6 @@ Number displays can use the following formatting options * n where 'n' is the amount of extra vertical extra space .Number - The number widget displays the value of a float signal. [source,xml] @@ -589,8 +554,8 @@ The above code produced this example. image::images/pyvcp_number.png[] * '' - is a Tkinter font type and size specification. One font that -will show up to at least size 200 is 'courier 10 pitch', so for a -really big Number widget you could specify: + will show up to at least size 200 is 'courier 10 pitch', so for a + really big Number widget you could specify: [source,xml] ------------------------------------------------- @@ -598,10 +563,9 @@ really big Number widget you could specify: ------------------------------------------------- * '' - is a 'C-style' format specified that determines how -the number is displayed. + the number is displayed. .s32 Number - The s32 number widget displays the value of a s32 number. The syntax is the same as 'number' except the name which is . Make sure the width is wide enough to cover the largest number you expect to use. @@ -621,12 +585,10 @@ The above code produced this example. image::images/pyvcp_s32.png[] .u32 Number - The u32 number widget displays the value of a u32 number. The syntax is the same as 'number' except the name which is . .Bar - A bar widget displays the value of a FLOAT signal both graphically using a bar display and numerically. The color of the bar can be set as one color throughout its range (default @@ -678,7 +640,6 @@ The above code produced this example. image::images/pyvcp_bar.png[] .Meter - Meter displays the value of a FLOAT signal using a traditional dial indicator. [source,xml] @@ -705,7 +666,6 @@ image::images/pyvcp_meter.png[] === Number Inputs .Spinbox - Spinbox controls a FLOAT pin. You increase or decrease the value of the pin by either pressing on the arrows, or pointing at the spinbox and rolling your mouse-wheel. If the param_pin field is set TRUE(1), a pin will be created that @@ -731,7 +691,6 @@ The above code produced this example. image::images/pyvcp_spinbox.png[] .Scale - Scale controls a float or a s32 pin. You increase or decrease the value of the pin be either dragging the slider, or pointing at the scale and rolling your mouse-wheel. The 'halpin' will have both '-f' @@ -772,7 +731,6 @@ The above code produced this example. image::images/pyvcp_scale.png[] .Dial - The Dial outputs a HAL float and reacts to both mouse wheel and dragging. Double left click to increase the resolution and double right click to reduce the resolution by one digit. The output is capped by @@ -804,7 +762,6 @@ The above code produced this example. image::images/pyvcp_dial.png[] .Jogwheel - Jogwheel mimics a real jogwheel by outputting a FLOAT pin which counts up or down as the wheel is turned, either by dragging in a circular motion, or by rolling the mouse-wheel. Optional tags @@ -835,7 +792,6 @@ file (or in the current directory if running from the command line with halrun/halcmd). .Image Bit - The 'image_bit' toggles between two images by setting the halpin to true or false. @@ -856,7 +812,6 @@ and REV is displayed when 'selectimage' is true. image:images/pyvcp_image01.png[] image:images/pyvcp_image02.png[] .Image u32 - The 'image_u32' is the same as 'image_bit' except you have essentially an unlimited number of images and you 'select' the image by setting the halpin to a integer value with 0 for the first image in the images list @@ -888,14 +843,12 @@ Containers are widgets that contain other widgets. Containers are used to group other widgets. .Borders - Container borders are specified with two tags used together. The tag specifies the type of border and the specifies the width of the border. * 'type' - Where 'type' is FLAT, SUNKEN, RAISED, GROOVE, or RIDGE - * 'n' - Where 'n' is the width of the border. @@ -934,35 +887,30 @@ The above code produced this example. image::images/pyvcp_borders.png[] - .Fill - Container fill are specified with the '' tag. Valid entries are none, x, y and both. The x fill is a horizontal fill and the y fill is a vertical fill * '' - - Where 'style' is none, x, y, or both. Default is x for Vbox and y for Hbox. + where 'style' is none, x, y, or both. Default is x for Vbox and y for Hbox. .Anchor - Container anchors are specified with the tag. The anchor specifies where to position each slave in its parcel. Valid entries are center, n, s, e, w, for center, north, south, east and west. Combinations like sw, se, nw and ne are also valid. * '' - - Where 'position' is center, n, s, e, w, ne, nw, se or sw. Default is center. + where 'position' is center, n, s, e, w, ne, nw, se or sw. Default is center. .Expand - Container expand is specified with the boolean tag. Valid entries are yes, no. * '' - Where 'boolean' is either yes or no. Default is yes. .Hbox - Use an Hbox when you want to stack widgets horizontally next to each other. @@ -988,7 +936,6 @@ the window is re-sized.The default is 'fill="y"', 'anchor="center"', 'expand="ye for a Hbox. .Vbox - Use a Vbox when you want to stack widgets vertically on top of each other. @@ -1014,7 +961,6 @@ when the window is re-sized. The default is 'fill="x"', 'anchor="center"', 'expand="yes"' for a Hbox. .Labelframe - A labelframe is a frame with a groove and a label at the upper-left corner. @@ -1034,7 +980,6 @@ The above code produced this example. image::images/pyvcp_labelframe.png[] .Table - A table is a container that allows layout in a grid of rows and columns. Each row is started by a '' tag. A contained widget may span rows or columns through the use of @@ -1077,7 +1022,6 @@ The above code produced this example. image::images/pyvcp_table.png[] .Tabs - A tabbed interface can save quite a bit of space. [source,xml] @@ -1117,3 +1061,4 @@ image::images/pyvcp_tabs2.png[] image::images/pyvcp_tabs3.png[] +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/pyvcp_es.adoc b/docs/src/gui/pyvcp_es.adoc deleted file mode 100644 index cab5decef1..0000000000 --- a/docs/src/gui/pyvcp_es.adoc +++ /dev/null @@ -1,1115 +0,0 @@ -[[cha:pyvcp]] - -= Python Virtual Control Panel - -== Introduction - -.Python Virtual Control Panel - -The PyVCP (Python Virtual Control Panel) is designed to give the -integrator the ability to customize the AXIS interface with buttons and -indicators to do special tasks. - -Hardware machine control panels can use up a lot of I/O pins and can -be expensive. That is where Virtual Control Panels have the advantage -as well as it cost nothing to build a PyVCP. - -Virtual Control Panels can be used for testing or monitoring things to -temporarily replace real I/O devices while debugging ladder logic, or -to simulate a physical panel before you build it and wire it to an I/O -board. - -The following graphic displays many of the PyVCP widgets. - -image::images/pyvcp_group.png[] - -== Panel Construction - -The layout of a PyVCP panel is specified with an XML file that -contains widget tags between and . For example: - -[source,xml] -------------------------------------------------- - - -------------------------------------------------- - -image::images/pyvcp_mypanel.png[] - -If you place this text in a file called tiny.xml, and run - ----------------------------------------------- -halcmd loadusr pyvcp -c mypanel tiny.xml ----------------------------------------------- - -PyVCP will create the panel for you, which includes two widgets, a -Label with the text 'This is a LED indicator', and a LED, used for -displaying the state of a HAL BIT signal. It will also create a HAL -component named 'mypanel' (all widgets in this panel are connected to -pins that start with 'mypanel.'). Since no tag was present -inside the tag, PyVCP will automatically name the HAL pin for the -LED widget mypanel.led.0 - -For a list of widgets and their tags and options, see the widget -reference below. - -Once you have created your panel, connecting HAL signals to and from -the PyVCP pins is done with the halcmd: - ------------------------------------------------------------------------ -net signal-name ------------------------------------------------------------------------ - -If you are new to HAL, the HAL basics chapter in the Integrator -Manual is a good place to start. - -== Security - -Parts of PyVCP files are evaluated as Python code, and can take any -action available to Python programs. Only use PyVCP .xml files from a -source that you trust. - -[[sec:pyvcp-with-axis]] - -== AXIS - -Since AXIS uses the same GUI toolkit (Tkinter) as PyVCP, it is -possible to include a PyVCP panel at either the right side or the bottom -of the AXIS user interface. A typical example is explained below. - -Place your PyVCP XML file describing the panel in the same directory -where your .ini file is. Say we we want to display the current spindle -speed using a Bar widget. Place the following in a file called -spindle.xml: - -[source,xml] -------------------------------------------------- - - - - "spindle-speed" - 5000 - - -------------------------------------------------- - -Here we've made a panel with a Label and a Bar widget, specified that -the HAL pin connected to the Bar should be named 'spindle-speed', and -set the maximum value of the bar to 5000 (see widget reference below -for all options). To make AXIS aware of this file, and call it at start -up, we need to specify the following in the [DISPLAY] section of the -.ini file: - ------------------------------ -PYVCP = spindle.xml ------------------------------ - -If the panel should appear at the bottom of the AXIS user interface -then we need to specify the following in the [DISPLAY] section of the -.ini file: - ------------------------------ -PYVCP_POSITION = BOTTOM ------------------------------ - -Anything other than BOTTOM or omitting this variable will place the -PYVCP panel at the right. - -To make our widget actually display the spindle-speed it needs to be -hooked up to the appropriate HAL signal. A .hal file that will be run -once AXIS and PyVCP have started can be specified in the [HAL] section -of the .ini file: - ---------------------------------------- -POSTGUI_HALFILE = spindle_to_pyvcp.hal ---------------------------------------- - -This change will run the HAL commands specified in -'spindle_to_pyvcp.hal'. In our example the contents could look like -this: - -------------------------------------------------- -net spindle-rpm-filtered => pyvcp.spindle-speed -------------------------------------------------- - -assuming that a signal called 'spindle-rpm-filtered' already exists. -Note that when running together with AXIS, all PyVCP widget HAL pins -have names that start with 'pyvcp.'. - -image::images/pyvcp_axis_lathe.png[] - -This is what the newly created PyVCP panel should look like in AXIS. -The 'sim/lathe' configuration is already configured this way. - -== Stand Alone - -This section describes how PyVCP panels can be displayed on their own -with or without LinuxCNC's machine controller. - -To load a stand alone PyVCP panel with LinuxCNC use these commands: - ------------------------------------------------------------------------ -loadusr -Wn mypanel pyvcp -g WxH+X+Y -c mypanel panel_file.xml ------------------------------------------------------------------------ - -You would use this if you wanted a floating panel or a panel with a -GUI other than AXIS. - -* '-Wn panelname' - - makes HAL wait for the component 'panelname' to finish loading - ('become ready' in HAL speak) before processing more HAL commands. This - is important because PyVCP panels export HAL pins, and other HAL - components will need them present to connect to them. Note the capital - W and lowercase n. If you use the -Wn option you must use the -c option - to name the panel. - -* 'pyvcp < -g> < -c> panel.xml' - - builds the panel with the optional geometry and/or panelname from the - xml panel file. The panel.xml can be any name that ends in .xml. The - .xml file is the file that describes how to build the panel. You must - add the path name if the panel is not in the directory that the HAL - script is in. - -* '-g <+X+Y>' - - specifies the geometry to be used when constructing the panel. The - syntax is 'Width x Height + X Anchor + Y Anchor'. You can set the size - or position or both. The anchor point is the upper left corner of the - panel. An example is -g 250x500+800+0 This sets the panel at 250 pixels - wide, 500 pixels tall, and anchors it at X800 Y0. - -* '-c panelname' - - tells PyVCP what to call the component and also the title of the - window. The panelname can be any name without spaces. - -To load a 'stand alone' PyVCP panel without LinuxCNC use this command: - ------------------------------------------------------------------------ -loadusr -Wn mypanel pyvcp -g 250x500+800+0 -c mypanel mypanel.xml ------------------------------------------------------------------------ - -The minimum command to load a pyvcp panel is: - ------------------------------ -loadusr pyvcp mypanel.xml ------------------------------ - -You would use this if you want a panel without LinuxCNC's machine -controller such as for testing or a standalone DRO. - -The loadusr command is used when you also load a component that will -stop HAL from closing until it's done. If you loaded a panel and then -loaded Classic Ladder using 'loadusr -w classicladder', -CL would hold HAL open (and the panel)  until you closed CL. -The '-Wn' above means wait for the component '-Wn "name"' to become ready. -('name' can be any name. Note the capital W and lowercase n.) -The -c tells PyVCP to build a panel with the -name 'panelname' using the info in 'panel_file_name.xml'. -The name 'panel_file_name.xml' can be any name but must end in .xml - it is the -file that describes how to build the panel. You must add the path name -if the panel is not in the directory that the HAL script is in. - -An optional command to use if you want the panel to stop HAL from -continuing commands / shutting down. After loading any other components -you want the last HAL command to be: - ------------------------------ -waituser panelname ------------------------------ - -This tells HAL to wait for component 'panelname' to close before -continuing HAL commands. This is usually set as the last command so that -HAL shuts down when the panel is closed. - -== Widgets - -HAL signals come in two variants, bits and numbers. Bits are off/on -signals. Numbers can be 'float', 's32' or 'u32'. For more information on HAL -data types see the <> section. The PyVCP widget -can either display the value of the signal with an indicator widget, or -modify the signal value with a control widget. Thus there are four -classes of PyVCP widgets that you can connect to a HAL signal. A fifth -class of helper widgets allow you to organize and label your panel. - - . Widgets for indicating 'bit' signals: led, rectled - . Widgets for controlling 'bit' signals: button, checkbutton, radiobutton - . Widgets for indicating 'number' signals: number, s32, u32, bar, meter - . Widgets for controlling 'number' signals: spinbox, scale, jogwheel - . Helper widgets: hbox, vbox, table, label, labelframe - -=== Syntax - -Each widget is described briefly, followed by the markup used, and a -screen shot. All tags inside the main widget tag are optional. - -=== General Notes - -At the present time, both a tag-based and an attribute-based syntax -are supported. For instance, the following XML fragments are treated -identically: - -[source,xml] ---------------------------------------- - ---------------------------------------- - -and - -[source,xml] ---------------------------------------- -"my-led" ---------------------------------------- - -When the attribute-based syntax is used, the following rules are used -to turn the attributes value into a Python value: - - . If the first character of the attribute is one of the following, it is - evaluated as a Python expression: '{(["'' - . If the string is accepted by int(), the value is treated as an integer - . If the string is accepted by float(), the value is treated as - floating-point - . Otherwise, the string is accepted as a string. - -When the tag-based syntax is used, the text within the tag is always -evaluated as a Python expression. - -The examples below show a mix of formats. - -.Comments - -To add a comment use the xml syntax for a comment. - -[source,xml] ------------------------------ - ------------------------------ - -.Editing the XML file - -Edit the XML file with a text editor. In most cases you can right -click on the file and select 'open with text editor' or similar. - -[[pyvcp-colors]] -.Colors - -Colors can be specified using the X11 rgb colors by name 'gray75' or -hex '#0000ff'. A complete list is located here -http://sedition.com/perl/rgb.html[http://sedition.com/perl/rgb.html]. - -Common Colors (colors with numbers indicate shades of that color) - - - white - - black - - blue and blue1 - 4 - - cyan and cyan1 - 4 - - green and green1 - 4 - - yellow and yellow1 - 4 - - red and red1 - 4 - - purple and purple1 - 4 - - gray and gray0 - 100 - -.HAL Pins - -HAL pins provide a means to 'connect' the widget to something. Once -you create a HAL pin for your widget you can 'connect' it to another -HAL pin with a 'net' command in a .hal file. For more information on -the 'net' command see the <> section. - -=== Label - -A label is a way to add text to your panel. - -* '' - creates a label - -* '"text"' - the text to put in your label, a blank label can be - used as a spacer to align other objects. - -* '("Helvetica",20)' - specificy the font and size of the text - -* 'FLAT' - specificy the border around the label ('FLAT', - 'RAISED', 'SUNKEN') default is 'FLAT' - -* 'n' - where 'n' is the border width when 'RAISED' or 'SUNKEN' borders - are used. - -* 'n' - where 'n' is the amount of extra horizontal extra space. - -* 'n' - where 'n' is the amount of extra vertical extra space. - -The label has an optional disable pin that is created when you add -'True'. - -[source,xml] -------------------------------------------------- - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_label.png[] - -=== Multi_Label - -An extention of the text label. - -Selectable text label, can display up to 6 label legends when associated bit pin -is activated. - -Attach each legend pin to a signal and get a descriptive label when the signal -is TRUE. - -If more than one legend pin is TRUE, the highest numbered 'TRUE' legend will be -displayed. - -If a disable pin is created with 'True' and that pin -is set to true the lable changes to a grayed out state. - -[source,xml] ----- - - ["Label1", "Label2", "Label3", "Label4", "Label5", "Label6"] - ("Helvetica",20) - True - ----- - -The above example would create the following pins. - ----- -pyvcp.multilabel.0.disable -pyvcp.multilabel.0.legend0 -pyvcp.multilabel.0.legend1 -pyvcp.multilabel.0.legend2 -pyvcp.multilabel.0.legend3 -pyvcp.multilabel.0.legend4 -pyvcp.multilabel.0.legend5 ----- - -If you have more than one multilabel the pins created would increment the number -like this 'pyvcp.multilabel.1.legend1'. - -=== LEDs - -A LED is used to indicate the status of a 'bit' halpin. The LED color -will be on_color when the halpin is true, and off_color otherwise. - -* '' - makes a round LED - -* '' - makes a rectangle LED - -* 'name' - 'name' of the pin, default is 'led.n', where - n is an integer that is incremented for each LED. - -* 'n' - 'n' is the size of the led in pixels, default is 20 - -* 'color' - sets the color of the LED when the pin is true. - default is 'green'. See <> for more info. - -* 'color' - sets the color of the LED when the pin is - false. default is 'red' - -* 'n' - sets the height of the LED in pixels - -* 'n' - sets the width of the LED in pixels - -* 'false' - when true adds a disable pin to the led. - -* 'color' - sets the color of the LED when the - pin is disabled. - -.Round LED - -[source,xml] ---------------------------------------- - - "my-led" - 50 - "green" - "red" - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_led.png[] - -.Rectangle LED - -This is a variant of the 'led' widget. - -[source,xml] -------------------------------------------------- - - RIDGE - 6 - - "my-led" - "50" - "100" - "green" - "red" - - -------------------------------------------------- - -The above code produced this example. -Also showing a vertical box with relief. - -image::images/pyvcp_rectled.png[] - -=== Buttons - -A button is used to control a BIT pin. The pin will be set True when -the button is pressed and held down, and will be set False when the -button is released. Buttons can use the following optional options. - -* 'n' - where 'n' is the amount of extra horizontal extra space. - -* 'n' - where 'n' is the amount of extra vertical extra space. - -* '"color"' - the cursor over color. - -* ' "color"' - the forground color. - -* '"color"' - the background color. - -* 'True' - disable pin. - -.Text Button - -A text button controls a 'bit' halpin. The halpin is false until the -button is pressed then it is true. The button is a momentary button. - -The text button has an optional disable pin that is created when you -add True. - -[source,xml] ---------------------------------------- - - - "coolant-chkbtn" - "Coolant" - 1 - - - "chip-chkbtn" - "Chips " - 0 - ---------------------------------------- - -The above code produced this example. -The coolant checkbutton is checked. -Notice the extra spaces in the Chips text -to keep the checkbuttons aligned. - -image::images/pyvcp_checkbutton.png[] - -.Radiobutton - -A radiobutton will set one of the halpins true. The other pins are set false. -The initval field may be set to choose the default selection when the panel -displays. Only one radio button may be set to TRUE (1) or only the highest -number pin set TRUE will have that value. - -[source,xml] -------------------------------------------------- - - ["one","two","three"] - "my-radio" - 0 - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_radiobutton.png[] - -Note that the HAL pins in the example above will be named -my-radio.one, my-radio.two, and my-radio.three. In the image above, -'one' is the selected value. -Use this tag 'HORIZONTAL' to display horizontally. - -=== Number Displays - -Number displays can use the following formatting options - -* ("Font Name",n) where 'n' is the font size -* n where 'n' is the overall width of the space used -* pos where 'pos' is LEFT, CENTER, or RIGHT (doesn't work) -* n where 'n' is the amount of extra horizontal extra space -* n where 'n' is the amount of extra vertical extra space - -.Number - -The number widget displays the value of a float signal. - -[source,xml] ---------------------------------------- - - "my-number" - ("Helvetica",24) - "+4.4f" - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_number.png[] - -* '' - is a Tkinter font type and size specification. One font that -will show up to at least size 200 is 'courier 10 pitch', so for a -really big Number widget you could specify: - -[source,xml] -------------------------------------------------- -("courier 10 pitch",100) -------------------------------------------------- - -* '' - is a 'C-style' format specified that determines how -the number is displayed. - -.s32 Number - -The s32 number widget displays the value of a s32 number. The syntax -is the same as 'number' except the name which is . Make sure the -width is wide enough to cover the largest number you expect to use. - -[source,xml] -------------------------------------------------- - - "my-number" - ("Helvetica",24) - "6d" - 6 - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_s32.png[] - -.u32 Number - -The u32 number widget displays the value of a u32 number. The syntax -is the same as 'number' except the name which is . - -.Bar - -A bar widget displays the value of a FLOAT signal both graphically -using a bar display and numerically. -The color of the bar can be set as one color throughout its range (default -using fillcolor) or set to change color dependent upon the value of the halpin -(range1, range2 range3 must all be set, if you only want 2 ranges, set 2 of -them to the same color). - -* "my-bar" text, sets the pin name, pyvcp.my-bar -* 0 number, sets the minimum scale -* 140 number, sets the maximum scale -* "3.1f" text, sets the number format using python number - formatting -* "grey" text, sets the background color -* "red" text, sets the fill color -* 0,100,"green" number, number, text, sets the first range and - color -* 101,135,"orange" number, number, text, sets the first range - and color -* 136, 150,"red" number, number, text, sets the first range and - color -* 200 number, sets the overall width -* 50 number, sets the overall height -* 30 number, sets the bar height, must be less than - canvas_height -* 150 number, sets the bar width, must be less than - canvas_width - -[source,xml] ---------------------------------------- - - "my-bar" - 0 - 123 - "3.1f" - "grey" - "red" - 0,100,"green" - 101,135,"orange" - 136, 150,"red" - 200 - 50 - 30 - 150 - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_bar.png[] - -.Meter - -Meter displays the value of a FLOAT signal using a traditional dial indicator. - -[source,xml] -------------------------------------------------- - - "mymeter" - "Battery" - "Volts" - 250 - 0 - 15.5 - 1 - 0.2 - (14.5,15.5,"yellow") - (12,14.5,"green") - (0,12,"red") - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_meter.png[] - -=== Number Inputs - -.Spinbox - -Spinbox controls a FLOAT pin. You increase or decrease the value of the pin by -either pressing on the arrows, or pointing at the spinbox and rolling your -mouse-wheel. If the param_pin field is set TRUE(1), a pin will be created that -can be used to set the spinbox to an initial value and to remotely alter its -value without HID input. - -[source,xml] ---------------------------------------- - - "my-spinbox" - -12 - 33 - 0 - 0.1 - "2.3f" - ("Arial",30) - 1 - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_spinbox.png[] - -.Scale - -Scale controls a float or a s32 pin. You increase or decrease the -value of the pin be either dragging the slider, or pointing at the -scale and rolling your mouse-wheel. The 'halpin' will have both '-f' -and '-i' added to it to form the float and s32 pins. Width is the width -of the slider in vertical and the height of the slider in horizontal -orientation. If the param_pin field is set TRUE(1), a pin will be created that -can be used to set the spinbox to an initial value and to remotely alter its -value without HID input. - - -[source,xml] ---------------------------------------- - - ("Helvetica",16) - "25" - "my-hscale" - 0.1 - HORIZONTAL - -15 - -33 - 26 - 1 - - - ("Helvetica",16) - "50" - "my-vscale" - 1 - VERTICAL - 100 - 0 - 1 - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_scale.png[] - -.Dial - -The Dial outputs a HAL float and reacts to both mouse wheel and -dragging. Double left click to increase the resolution and double right -click to reduce the resolution by one digit. The output is capped by -the min and max values. The is how many tick marks are on the -outside of the ring (beware of high numbers). If the param_pin field is set -TRUE(1), a pin will be created that can be used to set the spinbox to -an initial value and to remotely alter its value without HID input. - -[source,xml] ---------------------------------------- - - 200 - 100 - -15 - 15 - "Dial" - 0 - 0.001 - "anaout" - "yellow" - "green" - "black" - 1 - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_dial.png[] - -.Jogwheel - -Jogwheel mimics a real jogwheel by outputting a FLOAT pin which counts -up or down as the wheel is turned, either by dragging in a circular -motion, or by rolling the mouse-wheel. - -[source,xml] ---------------------------------------- - - "my-wheel" - 45 - 250 - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_jogwheel.png[] - -=== Images - -Image displays use only .gif image format. All of the images must be -the same size. The images must be in the same directory as your ini -file (or in the current directory if running from the command line with -halrun/halcmd). - -.Image Bit - -The 'image_bit' toggles between two images by setting the halpin to -true or false. - -[source,xml] ------------------------------------------------------------ - - - - - ------------------------------------------------------------ - -This example was produced from the above code. -Using the two image files fwd.gif and rev.gif. -FWD is displayed when 'selectimage' is false -and REV is displayed when 'selectimage' is true. - -image:images/pyvcp_image01.png[] image:images/pyvcp_image02.png[] - -.Image u32 - -The 'image_u32' is the same as 'image_bit' except you have essentially -an unlimited number of images and you 'select' the image by setting the -halpin to a integer value with 0 for the first image in the images list -and 1 for the second image etc. - -[source,xml] ---------------------------------------------------------------------- - - - - - - ---------------------------------------------------------------------- - -The above code produced the following example -by adding the stb.gif image. - -image:images/pyvcp_image_u32_01.png[] -image:images/pyvcp_image01.png[] -image:images/pyvcp_image02.png[] - -Notice that the default is the min even though it is set higher than -max unless there is a negative min. - -=== Containers - -Containers are widgets that contain other widgets. Containers are used -to group other widgets. - -.Borders - -Container borders are specified with two tags used together. The - tag specifies the type of border and the specifies the -width of the border. - -* 'type' - - Where 'type' is FLAT, SUNKEN, RAISED, GROOVE, or RIDGE - -* 'n' - - Where 'n' is the width of the border. - -[source,xml] ----- - - - - - - - ----- - -The above code produced this example. - -image::images/pyvcp_borders.png[] - - -.Fill - -Container fill are specified with the '' tag. Valid entries -are none, x, y and both. The x fill is a horizontal fill and the y fill is a -vertical fill - -* '' - - Where 'style' is none, x, y, or both. Default is x for Vbox and y for Hbox. - -.Anchor - -Container anchors are specificed with the tag. The anchor -specifies where to position each slave in its parcel. Valid entries are center, -n, s, e, w, for center, north, south, east and west. Combinations like sw, se, -nw and ne are also valid. - -* '' - - Where 'position' is center, n, s, e, w, ne, nw, se or sw. Default is center. - -.Expand - -Container expand is specificed with the boolean tag. -Valid entries are yes, no. - -* '' - - Where 'boolean' is either yes or no. Default is yes. - -.Hbox - -Use an Hbox when you want to stack widgets horizontally -next to each other. - -[source,xml] -------------------------------------------------- - - RIDGE - 6 - - - - - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_hbox.png[] - -Inside an Hbox, you can use the '', '' -, and '' tags to choose how items in the box behave when -the window is re-sized.The default is 'fill="y"', 'anchor="center"', 'expand="yes"' -for a Hbox. - -.Vbox - -Use a Vbox when you want to stack widgets vertically on top of each -other. - -[source,xml] -------------------------------------------------- - - RIDGE - 6 - - - - - -------------------------------------------------- - -The above code produced this example. - -image::images/pyvcp_vbox.png[] - -Inside a Vbox, you can use the '', '' -, and '' tags to choose how items in the box behave -when the window is re-sized. The default is 'fill="x"', 'anchor="center"', -'expand="yes"' for a Hbox. - -.Labelframe - -A labelframe is a frame with a groove and a label at the upper-left -corner. - -[source,xml] ---------------------------------------- - - ("Helvetica",16) - - - - - ---------------------------------------- - -The above code produced this example. - -image::images/pyvcp_labelframe.png[] - -.Table - -A table is a container that allows layout in a grid of rows and -columns. Each row is started by a '' tag. A contained -widget may span rows or columns through the use of -the '' tag. The sides of the cells to which -the contained widgets “stick” -may be set through the use of the '' tag. A -table expands on its flexible rows and columns. - -Example: -[source,xml] ------------------------------------------------------------ - - - - -
------------------------------------------------------------ - -The above code produced this example. - -image::images/pyvcp_table.png[] - -.Tabs - -A tabbed interface can save quite a bit of space. - -[source,xml] ------------------------------------------------------------ - - ["spindle","green eggs"] - - - ["Spindle", "Green Eggs", "Ham"] - - - - "spindle-speed" - 5000 - - - - - - - - - ------------------------------------------------------------ - -The above code produced this example showing each tab selected. - -image::images/pyvcp_tabs1.png[] - -image::images/pyvcp_tabs2.png[] - -image::images/pyvcp_tabs3.png[] - - diff --git a/docs/src/gui/pyvcp_fr.adoc b/docs/src/gui/pyvcp_fr.adoc index cdfe9ac2a3..76bbbdd5d5 100644 --- a/docs/src/gui/pyvcp_fr.adoc +++ b/docs/src/gui/pyvcp_fr.adoc @@ -60,7 +60,7 @@ aucune balise n'était présente à l'intérieur de la balise panneau.led.0 Pour obtenir la liste des widgets, leurs balises et options, consultez -<>. +<>. Un fois que vous avez créé votre panneau, connectez lui les signaux HAL, vers et à partir des pins pyVCP et avec la commande habituelle: @@ -69,8 +69,9 @@ et à partir des pins pyVCP et avec la commande habituelle: net signal-name ---- -Si vous débutez avec HAL, <> est -vivement recommandé. +//<> - no idea why this fails, should not +Si vous débutez avec HAL, le tutoriel de HAL +est vivement recommandé. == Sécurité avec pyVCP @@ -80,8 +81,7 @@ programmes Python. N'utilisez que des fichiers pyVCP en .xml à partir d'une source de confiance.tag [[sec:pyvcp-avec-axis]] -== Utiliser pyVCP avec AXIS -(((PyVCP avec Axis))) +== Utiliser pyVCP avec AXIS(((PyVCP avec Axis))) Puisque AXIS utilise le même environnement graphique et les même outils (Tkinter) que pyVCP, il est possible d'inclure un panneau pyVCP @@ -110,7 +110,7 @@ Ici nous avons fait un panneau avec un label _Vitesse broche:_ et un widget barre de progression. Nous avons spécifié que la pin HAL connectée à la barre de progression devait s'appeler _spindle-speed_ et régler la valeur maximum de la barre à 5000 (se reporter à la -<>, pour toutes +<>, pour toutes les options disponibles). Pour faire connaître ce fichier à AXIS et qu'il l'appelle au démarrage, nous devons préciser ce qui suit dans la section [DISPLAY] du fichier .ini: @@ -233,7 +233,8 @@ fermé avant de continuer avec d'autres commandes. C'est généralement défini comme étant la dernière commande, de sorte que HAL s'arrêtera si le panneau est fermé. -== Documentation des widgets de pyVCP[[sec:Documentation-des-widgets]](((Documentation des widgets))) +[[sec:Documentation-des-widgets]] +== Documentation des widgets de pyVCP(((Documentation des widgets))) Les signaux de HAL existent en deux variantes, BIT et FLOAT. pyVCP peut afficher la valeur d'un signal avec un widget indicateur, ou diff --git a/docs/src/gui/qtdragon.adoc b/docs/src/gui/qtdragon.adoc index e01c6f652a..8d2d7b5c66 100644 --- a/docs/src/gui/qtdragon.adoc +++ b/docs/src/gui/qtdragon.adoc @@ -7,16 +7,17 @@ :hal: {basebackend@docbook:'':hal} == Introduction -QtDragon and QtDragon_hd are built with the QTVCP framework. + -It is the creative vision of forum personality Persei8. + -Much of it is based on the excellent work of others in the LinuxCNC community. + -linuxcnc's version is adapted from Persei8's Github versions. + -It is primarily meant for 3/4 axes machines such as mills or routers. + -It works well with a touchscreen and/or mouse. + -QtDragon supports multiple ways to touch off tools and probing work pieces. + -You can use linuxcnc's external offsets capability to automatically raise the spindle + + +QtDragon and QtDragon_hd are built with the QTVCP framework. +It is the creative vision of forum personality Persei8. +Much of it is based on the excellent work of others in the LinuxCNC community. +linuxcnc's version is adapted from Persei8's Github versions. +It is primarily meant for 3/4 axes machines such as mills or routers. +It works well with a touchscreen and/or mouse. +QtDragon supports multiple ways to touch off tools and probing work pieces. +You can use linuxcnc's external offsets capability to automatically raise the spindle during a pause. -If you the VersaProbe option and remap code you can add auto tool length probing + +If you the VersaProbe option and remap code you can add auto tool length probing at tool changes. [NOTE] @@ -33,15 +34,16 @@ image::images/qtdragon_hd.png["QTDragon_hd",scale="25%"] == Getting Started If your configuration is not currently set up to use QtDragon, -you can change it by editing the INI file. + -This is not an exhaustive list of options. + +you can change it by editing the INI file. +This is not an exhaustive list of options. <> === Display -In the section '[DISPLAY]' change the 'DISPLAY' line to read: + -'qtdragon' for a small version + -'qtdradon_hd' for the large version. + -you can add '-c-' or '-v' for debug output to the terminal. + + +In the section '[DISPLAY]' change the 'DISPLAY' line to read: +'qtdragon' for a small version +'qtdradon_hd' for the large version. +you can add '-c-' or '-v' for debug output to the terminal. [source,{ini}] ---- @@ -50,10 +52,11 @@ DISPLAY = qtvcp qtdragon ---- === Preference -To keep track of preferences, qtdragon looks for a preference text file. + -add the following entry under the '[DISPLAY]' heading. + -This will save the file in the config folder of the launch screen. + -(other options are possible see the qtvcp's screenoption widget docs.) + + +To keep track of preferences, qtdragon looks for a preference text file. +add the following entry under the '[DISPLAY]' heading. +This will save the file in the config folder of the launch screen. +(other options are possible see the qtvcp's screenoption widget docs.) [source,{ini}] ---- @@ -62,8 +65,9 @@ PREFERENCE_FILE_PATH = WORKINGFOLDER/qtdragon.pref ---- === Logging -You can specify where to save history/logs. + -In the section '[DISPLAY]' add: + + +You can specify where to save history/logs. +In the section '[DISPLAY]' add: [source,{ini}] ---- @@ -74,7 +78,9 @@ LOG_FILE = qtdragon.log ---- === Override controls + set override controls (1.0 = 100 percent): + [source,{ini}] ---- [DISPLAY] @@ -84,7 +90,9 @@ MAX_FEED_OVERRIDE = 1.2 ---- === Spindle controls + Spindle control settings (in rpm and watts): + [source,{ini}] ---- [DISPLAY] @@ -96,7 +104,9 @@ MAX_SPINDLE_POWER = 1500 ---- === Jogging increments + Set selectable jogging increments + [source,{ini}] ---- [DISPLAY] @@ -105,7 +115,9 @@ ANGULAR_INCREMENTS = 1, 5, 10, 30, 45, 90, 180, 360 ---- === Jog speed + Set jog speed controls (in units per minute) + [source,{ini}] ---- [DISPLAY] @@ -115,8 +127,9 @@ DEFAULT_LINEAR_VELOCITY = 50.0 ---- === User message dialog system -Popup Message dialogs, controlled by HAL pins + -MESSAGE_TYPE can be 'okdialog' or 'yesnodialog' + +Popup Message dialogs, controlled by HAL pins. +MESSAGE_TYPE can be 'okdialog' or 'yesnodialog'. + [source,{ini}] ---- [DISPLAY] @@ -129,9 +142,9 @@ MESSAGE_PINNAME = oktest === Program Extensions/Filters -You can control what programs are displayed in the filemanager window with program extensions: + -Create a line with the . endings you wish to use separated by commas, then a space and the description. + -You can add multiple lines for different selections in the combo box + +You can control what programs are displayed in the filemanager window with program extensions: +Create a line with the . endings you wish to use separated by commas, then a space and the description. +You can add multiple lines for different selections in the combo box [source,{ini}] ---- @@ -139,20 +152,20 @@ You can add multiple lines for different selections in the combo box + PROGRAM_EXTENSION = .ngc,.nc,.tap G-Code File (*.ngc,*.nc,*.tap) ---- -Qtdragon has the ability to send loaded files through a 'filter program'. + -This filter can do any desired task: Something as simple as making sure + -the file ends with 'M2', or something as complicated as generating + -G-Code from an image. + +Qtdragon has the ability to send loaded files through a 'filter program'. +This filter can do any desired task: Something as simple as making sure +the file ends with 'M2', or something as complicated as generating +G-Code from an image. -The '[FILTER]' section of the ini file controls how filters work. + -First, for each type of file, write a 'PROGRAM_EXTENSION' line. + -Then, specify the program to execute for each type of file. + -This program is given the name of the input file as its first argument, + -and must write rs274ngc code to standard output. This output is what + -will be displayed in the text area, previewed in the display area, and + -executed by LinuxCNC when 'Run'. The following lines add support for the + -'image-to-gcode' converter included with LinuxCNC and running python based + -filter programs: + +The '[FILTER]' section of the ini file controls how filters work. +First, for each type of file, write a 'PROGRAM_EXTENSION' line. +Then, specify the program to execute for each type of file. +This program is given the name of the input file as its first argument, +and must write rs274ngc code to standard output. This output is what +will be displayed in the text area, previewed in the display area, and +executed by LinuxCNC when 'Run'. The following lines add support for the +'image-to-gcode' converter included with LinuxCNC and running python based +filter programs: [source,{ini}] ---- @@ -165,7 +178,8 @@ jpg = image-to-gcode py = python ---- -QtDragon has custom INI entries: + +QtDragon has custom INI entries: + [source,{ini}] ---- [TOOLSENSOR] @@ -180,6 +194,7 @@ Y = -16.85 ---- QtDragon has two optional probing tab screens: + [source,{ini}] ---- [PROBE] @@ -187,10 +202,10 @@ QtDragon has two optional probing tab screens: USE_PROBE = basicprobe ---- -QtDragon has two convenience buttons for moving between + -current user system origin (zero point) and Machine system origin + -These could also call OWord routines if desired. + -user origin is the first MDI command in the list, machine origin is the second. + +QtDragon has two convenience buttons for moving between +current user system origin (zero point) and Machine system origin +These could also call OWord routines if desired. +user origin is the first MDI command in the list, machine origin is the second. This example shows how to move Z axis up first. the commands are separated by the ; [source,{ini}] @@ -201,13 +216,15 @@ MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0 ---- The sample configuration -'sim/qtvcp_screens/qtdragon/qtdragon_xyza.ini' is already configured to use QtDragon as its front-end. + +'sim/qtvcp_screens/qtdragon/qtdragon_xyza.ini' is already configured to use QtDragon as its front-end. There are several others, to demonstrate different machine configurations. == Key Bindings -QtDragon is not intended to primarily use a keyboard for machine control. + -It lacks many keyboatd short cuts that for instance AXIS has - but you can use a mouse. + -There are several key presses that will control the machine for convenience. + + +QtDragon is not intended to primarily use a keyboard for machine control. +It lacks many keyboatd short cuts that for instance AXIS has - but you can use a mouse. +There are several key presses that will control the machine for convenience. + ---- F1 - Estop on/off F2 - Machine on/off @@ -222,22 +239,25 @@ Pause -Pause Machine Movement Buttons that are checkable will change their text colour when checked. == Virtual Keyboard -QtDragon includes a virtual keyboard for use with touchscreens. + -To enable the keyboard, check the Use Virtual Keyboard checkbox in the Settings page. + -Clicking on any input field, such as probe parameters or tool table entries, will show the keyboard. + -It can also be shown by clicking the KEYBD button on the top of the screen, + -unless the machine is in AUTO mode. To hide the keyboard, do one of the following: + - - click the MAIN page button + - - click the KEYBD button - - go into AUTO mode + -It should be noted that keyboard jogging is disabled when using the virtual keyboard. + +QtDragon includes a virtual keyboard for use with touchscreens. +To enable the keyboard, check the Use Virtual Keyboard checkbox in the Settings page. +Clicking on any input field, such as probe parameters or tool table entries, will show the keyboard. +It can also be shown by clicking the KEYBD button on the top of the screen, +unless the machine is in AUTO mode. To hide the keyboard, do one of the following: + - click the MAIN page button + - click the KEYBD button + - go into AUTO mode + +It should be noted that keyboard jogging is disabled when using the virtual keyboard. == HAL Pins -These pins are specific to the QtDragon screen, There are of course are many more HAL pins + -that must be connected for linuxcnc to function. + + +These pins are specific to the QtDragon screen, There are of course are many more HAL pins +that must be connected for linuxcnc to function. If you need a manual tool change prompt, add these lines in your postgui file. + [source,{hal}] ---- net tool-change hal_manualtoolchange.change <= iocontrol.0.tool-change @@ -246,6 +266,7 @@ net tool-prep-number hal_manualtoolchange.number <= iocontrol.0.tool-prep-num ---- This input pin should be connected to indicate probe state: + [source,{hal}] ---- qtdragon.led-probe @@ -255,6 +276,7 @@ qtdragon.led-probe These pins are inputs related to spindle VFD indicating: The volt and amp pins are used to calculate spindle power. (You must also set the MAX_SPINDLE_POWER in the INI) + [source,{hal}] ---- qtdragon.spindle-modbus-errors @@ -263,26 +285,30 @@ qtdragon.spindle-fault qtdragon.spindle-volts ---- -This bit pin is an output to the spindle control to pause it: + +This bit pin is an output to the spindle control to pause it: You would connect it to spindle.0.inhibit. + [source,{hal}] ---- qtdragon.spindle-inhibit ---- This bit output pin can be connected to turn on a laser: + [source,{hal}] ---- qtdragon.btn-laser-on ---- This float output pin indicates the camera rotation in degrees: + [source,{hal}] ---- qtdragon.cam-rotation ---- These bit/s32 pins are related to external offsets if they are used: + [source,{hal}] ---- qtdragon.eoffset-clear @@ -292,6 +318,7 @@ qtdragon.eoffset-value ---- These float output pins reflect the current slider jograte (in machine units): + [source,{hal}] ---- qtdragon.slider-jogspeed-linear @@ -299,6 +326,7 @@ qtdragon.slider-jogspeed-angular ---- These float output pins reflect the current slider override rates: + [source,{hal}] ---- qtdragon.slider-override-feed @@ -307,8 +335,9 @@ qtdragon.slider-override-rapid qtdragon.slider-override-spindle ---- -These pins are available when setting the Versa Probe INI option. + -They can be used for auto-tool-length-probe at tool change - with added remap code. + +These pins are available when setting the Versa Probe INI option. +They can be used for auto-tool-length-probe at tool change - with added remap code. + [source,{hal}] ---- qtdragon.versaprobe-blockheight @@ -323,9 +352,11 @@ The HAL files supplied are for simulation only. A real machine needs its own cus works with 3 or 4 axes with one joint per axis or 3 or 4 axes in a gantry configuration. (2 joints on 1 axis) == Manual Tool Changes -If your machine requires manual tool changes, QtDragon can pop a message box to direct you. + + +If your machine requires manual tool changes, QtDragon can pop a message box to direct you. You must connect the proper HAL pin in the postgui HAL file. For example: + [source,{hal}] ---- net tool-change hal_manualtoolchange.change <= iocontrol.0.tool-change @@ -341,13 +372,14 @@ to his own machine setup. == Auto Raise Z Axis -QtDragon can be set up to automatically raise and lower the Z axis when the spindle is paused. + -When a program is paused, then you press the 'Spindle Pause' button to stop the spindle and raise it in Z. + -Press the button again to start spindle and lower it, then unpause program. + -The amount to raise and lower is set in the 'Settings' tab under the heading 'Z Ext Offset'. + -This requires additions to the INI and the qtdragon_post_gui file. + +QtDragon can be set up to automatically raise and lower the Z axis when the spindle is paused. +When a program is paused, then you press the 'Spindle Pause' button to stop the spindle and raise it in Z. +Press the button again to start spindle and lower it, then unpause program. +The amount to raise and lower is set in the 'Settings' tab under the heading 'Z Ext Offset'. +This requires additions to the INI and the qtdragon_post_gui file. + +In the INI, under the AXIS_Z heading. -In the INI, under the AXIS_Z heading. + ---- [AXIS_Z] OFFSET_AV_RATIO = 0.2 @@ -371,10 +403,10 @@ setp axis.z.eoffset-scale 1.0 == Probing -The probe screen has been through basic testing but there could still be some minor bugs. + -When running probing routines, use extreme caution until you are familiar with how everything works. + -Probe routines run without blocking the main GUI. This gives the operator the opportunity + -to watch the DROs and stop the routine at any time. + +The probe screen has been through basic testing but there could still be some minor bugs. +When running probing routines, use extreme caution until you are familiar with how everything works. +Probe routines run without blocking the main GUI. This gives the operator the opportunity +to watch the DROs and stop the routine at any time. [NOTE] Probing is very unforgiving to mistakes; be sure to check settings before using. @@ -382,42 +414,43 @@ Probing is very unforgiving to mistakes; be sure to check settings before using. .qtdragon - Probe Sample image::images/silverdragon_probe.png["QtDragon Probe",scale="25%"] -QtDragon has 2 possible methods for setting Z0. The first is a touchplate, where a metal plate of known thickness is placed on top of the workpiece and then the tool is lowered until it touches the plate, triggering the probe signal. Z0 is set to probe height - plate thickness. + +QtDragon has 2 possible methods for setting Z0. The first is a touchplate, where a metal plate of known thickness is placed on top of the workpiece and then the tool is lowered until it touches the plate, triggering the probe signal. Z0 is set to probe height - plate thickness. The second method uses a tool setter in a fixed position and a known height above the table where the probe signal will be triggered. In order to set Z0 to the top of the workpiece, it has to know how far above the table the probe trigger point is (tool setter height) and how far above the table the top of the workpiece is. This operation has to be done every time the tool is changed as the tool length is not saved. For touching off with a touch probe, whether you use the touchplate operation with thickness set to 0 or use a probing routine, the height from table to top of workpiece parameter is not taken into account and can be ignored. It is only for the tool setter. == Touch plate + .qtdragon - Touch Plate image::images/qtdragon_touchplate.png["QtDragon Touch Plate",scale="25%"] -You can use a conductive touch plate or equivalent to auto touch off (zero the user coordinate) for the Z position of a tool. + -There must be a tool loaded prior to probing. + -In the tool tab or settings tab, set the touch plate height, search and probe velocity and Max probing distance. + +You can use a conductive touch plate or equivalent to auto touch off (zero the user coordinate) for the Z position of a tool. +There must be a tool loaded prior to probing. +In the tool tab or settings tab, set the touch plate height, search and probe velocity and Max probing distance. [NOTE] -When using a conductive plate the search and probe velocity should be the same and slow. + -If using a tool setter that has spring loaded travel then you can set search velocity faster. + -Linuxcnc ramps speed down at the maximum acceleration rate, so there can be travel after the probe trip + +When using a conductive plate the search and probe velocity should be the same and slow. +If using a tool setter that has spring loaded travel then you can set search velocity faster. +Linuxcnc ramps speed down at the maximum acceleration rate, so there can be travel after the probe trip if the speed is set to high. -Place the plate on top of the surface you wish to zero Z on. + -Connect the probe input wire to the tool (if using a conductive plate) + -There is a LED to confirm the probe connection is reliable prior to probing. + -Move the tool manually within the max probe distance. + -Press the 'Touch Plate' button. + -The machine will probe down twice and the current user offset (G5X) will be zeroed at the bottom of the + -plate by calculation from the touchplate height setting. + +Place the plate on top of the surface you wish to zero Z on. +Connect the probe input wire to the tool (if using a conductive plate) +There is a LED to confirm the probe connection is reliable prior to probing. +Move the tool manually within the max probe distance. +Press the 'Touch Plate' button. +The machine will probe down twice and the current user offset (G5X) will be zeroed at the bottom of the +plate by calculation from the touchplate height setting. == Auto Tool Measurement -QtDragon can be setup to do integrated auto tool measurement using the Versa Probe widget. + -To use this feature, you will need to do some additional settings and you may want to use the + -offered hal pin to get values in your own ngc remap procedure. + +QtDragon can be setup to do integrated auto tool measurement using the Versa Probe widget. +To use this feature, you will need to do some additional settings and you may want to use the +offered hal pin to get values in your own ngc remap procedure. -[IMPORTANT] Before starting the first test, do not forget to enter the probe + -height and probe velocities on the versa probe settings page. + +[IMPORTANT] Before starting the first test, do not forget to enter the probe +height and probe velocities on the versa probe settings page. Tool Measurement in QtDragon is done with the following steps: @@ -429,29 +462,29 @@ Tool Measurement in QtDragon is done with the following steps: * Go to auto mode and start your program [NOTE] -When fist setting up auto tool measurement, please use caution until you confirm + -tool change and probe locations - it's easy to break a tool/probe. Abort will be honoured + +When fist setting up auto tool measurement, please use caution until you confirm +tool change and probe locations - it's easy to break a tool/probe. Abort will be honoured while the probe is in motion. Here is a diagram: image::images/sketch_auto_tool_measurement.png[align="left"] -With the first given tool change the tool will be measured and the offset will + -be set automatically to fit the block height. + -The advantage of this way is, that you do not need a reference tool. + +With the first given tool change the tool will be measured and the offset will +be set automatically to fit the block height. +The advantage of this way is, that you do not need a reference tool. [NOTE] -Your program must contain a tool change at the beginning. + -The tool will be measured, even it has been used before, so there is no danger + -if the block height has changed. + -There are several videos on you tube that demonstrate the technique using Gmoccapy. + +Your program must contain a tool change at the beginning. +The tool will be measured, even it has been used before, so there is no danger +if the block height has changed. +There are several videos on you tube that demonstrate the technique using Gmoccapy. The Gmoccapy screen pioneered the technique. === Tool Measurement Pins -Versaprobe offers 5 pins for tool measurement purpose. The pins are used + -to be read from a remap G-code subroutine, so the code can react to different values. + +Versaprobe offers 5 pins for tool measurement purpose. The pins are used +to be read from a remap G-code subroutine, so the code can react to different values. * qtversaprobe.toolmeasurement HAL_BIT enable or not tool measurement * qtversaprobe.blockheight HAL_FLOAT the measured value of the top face of the @@ -466,7 +499,7 @@ Modify your INI File to include the following: . The PROBE section -QtDragon allows you to select one of two styles of touch probe routines. + +QtDragon allows you to select one of two styles of touch probe routines. Versa probe works with a M6 remap to add auto tool probing. [source,{ini}] ---- @@ -492,9 +525,8 @@ REMAP=M6 modalgroup=6 prolog=change_prolog ngc=qt_auto_tool_probe epilog=change ---- .The Tool Sensor Section - -The position of the tool sensor and the start position of the probing movement, + -all values are absolute (G53) coordinates, except MAXPROBE, what must be given in + +The position of the tool sensor and the start position of the probing movement, +all values are absolute (G53) coordinates, except MAXPROBE, what must be given in relative movement. All values are in machine native units @@ -540,28 +572,28 @@ TOPLEVEL = python/toplevel.py You must copy the following files to your config directory -First create a directory named 'python' in your machine's configuration folder. + -From 'YOUR_LINUXCNC_DIRECTORY/configs/sim/QtDragon/python', copy 'toplevel.py' and + -'remap.py' to your configuration's new 'python' folder. + -Make a system link or copy the following files into the 'python' folder described above. + +First create a directory named 'python' in your machine's configuration folder. +From 'YOUR_LINUXCNC_DIRECTORY/configs/sim/QtDragon/python', copy 'toplevel.py' and +'remap.py' to your configuration's new 'python' folder. +Make a system link or copy the following files into the 'python' folder described above. -In '~/linuxcnc/nc_files/remap_subroutine/' folder + -make sure 'on_abort.ngc' and 'qt_auto_tool_probe.ngc' are present + +In '~/linuxcnc/nc_files/remap_subroutine/' folder +make sure 'on_abort.ngc' and 'qt_auto_tool_probe.ngc' are present -In '~/linuxcnc/nc_files/remap_lib/python_stdglue/' folder + +In '~/linuxcnc/nc_files/remap_lib/python_stdglue/' folder make sure 'stdglue.py' is present. [NOTE] -These file names and location could be different depending on installed verses development (RIP) + -version of linuxcnc. You could use customized versions of the same files or name them differently. + -The entries in the '[RS274NGC]' section dictate to linuxcnc what and where to look. + -The names and location quoted should be available in either system by default. + +These file names and location could be different depending on installed verses development (RIP) +version of linuxcnc. You could use customized versions of the same files or name them differently. +The entries in the '[RS274NGC]' section dictate to linuxcnc what and where to look. +The names and location quoted should be available in either system by default. === Needed Hal Connections -Make sure to connect the tool probe input in your hal file: + -If connected properly, you should be able to toggle the probe LED in qtdragon + -if you press the probe stylus. + +Make sure to connect the tool probe input in your hal file: +If connected properly, you should be able to toggle the probe LED in qtdragon +if you press the probe stylus. [source,{hal}] ---- @@ -570,26 +602,27 @@ net probe motion.probe-input <= == Run from Line -A G-code program can be started at any line by clicking on the desired line in the G-code display while in AUTO mode. + -It is the operator's responsibility to ensure the machine is in the desired operational mode. + -A dialog will be shown allowing the spindle direction and speed to be preset. + -The start line is indicated in the box labelled LINE, next to the CYCLE START button. + +A G-code program can be started at any line by clicking on the desired line in the G-code display while in AUTO mode. +It is the operator's responsibility to ensure the machine is in the desired operational mode. +A dialog will be shown allowing the spindle direction and speed to be preset. +The start line is indicated in the box labelled LINE, next to the CYCLE START button. The run from line feature can be disabled in the settings page. [NOTE] -Linuxcnc's run-from-line is not very user friendly. eg. It does not start the spindle or confirm the proper tool. + +Linuxcnc's run-from-line is not very user friendly. eg. It does not start the spindle or confirm the proper tool. It does not handle subroutines well. If used it is best to start on a rapid move. == Laser buttons -The LASER ON/OFF button in intended to turn an output on or off which is connected to a small laser crosshair projector. + -When the crosshair is positioned over a desired reference point on the workpiece, the REF LASER button can be pushed which then sets + -the X and Y offsets to the values indicated by the LASER OFFSET fields in the Settings page and the INI file. + +The LASER ON/OFF button in intended to turn an output on or off which is connected to a small laser crosshair projector. +When the crosshair is positioned over a desired reference point on the workpiece, the REF LASER button can be pushed which then sets +the X and Y offsets to the values indicated by the LASER OFFSET fields in the Settings page and the INI file. == Setup Tab -It's possible to load Html or PDF file (.html ending) with setup notes. + -HTML docs will be displayed in the setup tab and PDF will launch the system PDF Viewer. + -Some program, such as Fusion and Aspire will create this files for you. + + +It's possible to load Html or PDF file (.html ending) with setup notes. +HTML docs will be displayed in the setup tab and PDF will launch the system PDF Viewer. +Some program, such as Fusion and Aspire will create this files for you. If you load a G-code program and there is an HTML/PDF file of the same name, it will load automatically. .qtdragon - Setup Tab Sample @@ -606,18 +639,19 @@ image::images/style-comparison.png["QtDragon styles",scale="25%"] == Screen resolution -This GUI was initially developed for a screen with 1440 x 900 resolution. + -QtDragon_hd has a resolution of 1920 x 1056. + -They are not resizable. They will work in window mode on + -any monitor with higher resolution but not on monitors with lower resolution. + +This GUI was initially developed for a screen with 1440 x 900 resolution. +QtDragon_hd has a resolution of 1920 x 1056. +They are not resizable. They will work in window mode on +any monitor with higher resolution but not on monitors with lower resolution. == Customization === Stylesheets -Stylesheets can be leveraged to do a fair amount of customization, but you usually need to know a bit about the widget names. + -Pressing F12 will display a stylesheet editor dialog to load/test/save modification. + -For instance: + + +Stylesheets can be leveraged to do a fair amount of customization, but you usually need to know a bit about the widget names. +Pressing F12 will display a stylesheet editor dialog to load/test/save modification. +For instance: To change the DRO font (look for this entry and change the font name): @@ -642,10 +676,11 @@ qproperty-false_state_string: "Air\\nOff"; ---- === QtDesigner and python code -All aspects of the GUI are fully customization through Qt Designer and/or python code. + -This capability is included with the Qtvcp development environment. + -The extensive use of Qtvcp widgets keeps the amount of required python code to a minimum, allowing relatively easy modifications. + -The LinuxCNC website has extensive documentation on the installation and use of Qtvcp libraries. + + +All aspects of the GUI are fully customization through Qt Designer and/or python code. +This capability is included with the Qtvcp development environment. +The extensive use of Qtvcp widgets keeps the amount of required python code to a minimum, allowing relatively easy modifications. +The LinuxCNC website has extensive documentation on the installation and use of Qtvcp libraries. <> for more information .qtdragon - Customized QtDragon diff --git a/docs/src/gui/qtdragon_es.adoc b/docs/src/gui/qtdragon_es.adoc index a96a171fd2..6e1150f148 100644 --- a/docs/src/gui/qtdragon_es.adoc +++ b/docs/src/gui/qtdragon_es.adoc @@ -1,12 +1,13 @@ :lang: es -[[cha:qtdragon-gui]](((SilverDragon))) -= GUI SilverDragon +[[cha:qtdragon-gui]] += GUI SilverDragon(((SilverDragon))) :ini: {basebackend@docbook:'':ini} :hal: {basebackend@docbook:'':hal} == Introducción + SilverDragon está construido con el marco QTVCP. Gran parte se basa en el excelente trabajo de otros en la comunidad LinuxCNC. @@ -158,6 +159,7 @@ qtdragon.hal_led_probe ---- Estos pines se pueden conectar para indicar estados del interruptor de inicio: + [source,{hal}] ---- qtdragon.hal_led_home_x @@ -166,6 +168,7 @@ qtdragon.hal_led_home_z ---- Estos pines son entradas relacionadas con el VFD del husillo que indican: + [source,{hal}] ---- qtdragon.modbus-errors @@ -175,6 +178,7 @@ qtdragon.spindle_volts ---- Este pin es una salida al control del husillo para pausarlo: + [source,{hal}] ---- qtdragon.spindle_pause @@ -305,3 +309,4 @@ El sitio web LinuxCNC tiene una extensa documentación sobre la instalación y e .qtdragon - Silverdragon personalizado image::images/silverdragon_custom.png["QTDragon customized",scale=25] +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/qtvcp-code-snippets_es.adoc b/docs/src/gui/qtvcp-code-snippets_es.adoc deleted file mode 100644 index e620af1f84..0000000000 --- a/docs/src/gui/qtvcp-code-snippets_es.adoc +++ /dev/null @@ -1,614 +0,0 @@ -[[cha:qtvcp-code]] - -= QTvcp Handler file code snippets - -Here are bits of ideas to put in the handler file. + - -== Preference file loading/saving -Here is how to load and save at closing time a number and some text: + -You must have included a preference file option in the screenoptions widget. + - -under the 'def initialized__(self):' function add: -[source,python] ----- - if self.w.PREFS_: - # variable name (entry name, default value, type, section name) - self.int_value = self.w.PREFS_.getpref('Integer_value', 75, int, 'CUSTOM_FORM_ENTRIES') - self.string_value = self.w.PREFS_.getpref('String_value', 'on', str, 'CUSTOM_FORM_ENTRIES') ----- - -under the 'def closing_cleanup__(self):' function add: -[source,python] ----- - if self.w.PREFS_: - # entry name, variable name, type, section name) - self.w.PREFS_.putpref('Integer_value', self.integer_value, int, 'CUSTOM_FORM_ENTRIES') - self.w.PREFS_.putpref('String_value', self.string_value, str, 'CUSTOM_FORM_ENTRIES') - ----- - -== Add a basic style editor -Being able to edit a style on a running screen is convienant. + - -In the 'IMPORT SECTION': + -[source,python] ----- -from qtvcp.widgets.stylesheeteditor import StyleSheetEditor as SSE ----- - -In the 'INITIALIZE SECTION' -Under the '\_\_init__.(self, halcomp, widgets, paths):' function + -[source,python] ----- - self.STYLEEDITOR = SSE(widgets,paths) - KEYBIND.add_call('Key_F12','on_keycall_F12') ----- - -Finally lets make f12 launch it. + -In the 'KEYBINDING SECTION' add: + -[source,python] ----- - def on_keycall_F12(self,event,state,shift,cntrl): - if state: - self.STYLEEDITOR.load_dialog() ----- - -== Request Dialog Entry -Qtvcp uses STATUS messages to pop up and return information from dialogs. + -prebuilt dialogs keep track of their last position and include options for focus shading and sound. + -To get information back from the dialog requires using a STATUS general message. + - -In the 'IMPORT SECTION' make sure there is an entry similar to this: + -[source,python] ----- -from qtvcp.core import Status -STATUS = Status() ----- -This loads and initializes the STATUS library. + - -In the 'INITIALIZE SECTION' -Under the '\_\_init__.(self, halcomp, widgets, paths):' function + -[source,python] ----- - STATUS.connect('general',self.return_value) ----- -This registers STATUS to call the function 'self.return_value' when a general message is sent. + - -In the 'GENERAL FUNCTIONS SECTION' -[source,python] ----- - def request_number(self): - mess = {'NAME':'ENTRY','ID':'FORM__NUMBER', 'TITLE':'Set Tool Offset'} - STATUS.emit('dialog-request', mess) ----- -This is the function to request an entry dialog. + -NAME needs to be set to the dialogs unique launch name. + -ID needs to be set to a unique name that the function supplies + -It creates a python dict. The NAME sets which dialog to request - 'ENTRY' or 'CALCULATOR' allows entering numbers. + -The ID should be a unique key. TITLE sets the dialog title. You can also add arbitrary data to the dict -+ -the dialog will ignore them but send them back to the return code. + - -In the 'CALLBACKS FROM STATUS SECTION' -[source,python] ----- - # process the STATUS return message from set-tool-offset - def return_value(self, w, message): - num = message.get('RETURN') - id_code = bool(message.get('ID') == 'FORM__NUMBER') - name = bool(message.get('NAME') == 'ENTRY') - if id_code and name and num is not None: - print 'The {} number from {} was: {}'.format(name, id_code, num) ----- -This catches all general messages so must check the dialog type and id code to confirm it's our dialog. + -In this case we had requested an 'ENTRY' dialog and our unique id was 'ENTRY_NUMBER', so now we know the message is for us. + -Entry or Calculator dialogs return a float number. + - -== Speak a Startup Greeting -This requires the 'espeak' library installed on the system. + - -In the 'IMPORT SECTION' make sure there is an entry similar to this: + -[source,python] ----- -from qtvcp.core import Status -STATUS = Status() ----- - -In the 'INITIALIZE SECTION' -Under the '\_\_init__.(self, halcomp, widgets, paths):' function + -[source,python] ----- - STATUS.emit('play-alert','SPEAK Please remember to oil the ways.') ----- -'SPEAK' is a key work, everything after it will be pronounced - -== ToolBar Functions. -Toolbar buttons and submenus are added in Designer but the code to make them do something is added in the handler file. + -In this example we assume you added a tool bar with one submenu and three actions. + -These will be configure to creat a recent file selection menu, an about pop up dialog action, a quit program action and + -a user defined function action. + -You can add submenus in designer by adding an qaction (by typing in the toolbar column) then clicking the 'plus' icon on the right. + -This will ad a sub column that you need to type a name into. Now the original Qaction will be a Qmenu instead. + -Now erase the Qaction you added to that Qmenu - the menu will stay as a menu. + - -The objectName of the toolbar button is used to identify the button when configuring it - descriptive names help. + -Using the action editor menu, right click and select edit. Edit the object name, text, and button type for an appropriate action. + -In this example the submenu name must be : 'menuRecent'. The actions must be 'actionAbout', 'actionQuit', 'actionMyFunction' + - -In the 'IMPORT SECTION' add: + -[source,python] ----- -from qtvcp.lib.toolbar_actions import ToolBarActions ----- -Loads the toolbar library. - -in the 'INSTANTIATE LIBRARY' Section add: -[source,python] ----- -TOOLBAR = ToolBarActions() ----- -In the 'SPECIAL FUNCTIONS SECTION' -Under the 'def initialized__(self):' function add: + -[source,python] ----- - TOOLBAR.configure_submenu(self.w.menuRecent, 'recent_submenu') - TOOLBAR.configure_action(self.w.actionAbout, 'about') - TOOLBAR.configure_action(self.w.actionQuit, 'Quit', lambda d:self.w.close()) - TOOLBAR.configure_action(self.w.actionMyFunction, 'My Function', self.my_function) ----- -Configures the action. - -In the 'GENERAL FUNCTIONS SECTION' ADD: + -[source,python] ----- - def my_function(self, widget, state): - print 'My function State = ()'.format(state) ----- -The function to be called if the actionMyFunction button is pressed. - -== Add HAL Pins that call functions -In this way you don't need to poll the state of input pins. + -under the initialised__ function, make sure there is an entry similar to this: + -[source,python] ----- - ########################################## - # Special Functions called from QTVCP - ########################################## - - # at this point: - # the widgets are instantiated. - # the HAL pins are built but HAL is not set ready - def initialized__(self): - self.pin_cycle_start_in = self.hal.newpin('cycle-start-in',hal.HAL_BIT, hal.HAL_IN) - self.pin_cycle_start_in.value_changed.connect(lambda s: self.cycleStart(s)) ----- - -Add a function that gets called when the pin state changes. + -This function assumes there is a Tab widget named 'mainTab' + -that has tabs with the names 'tab_auto', 'tab_graphics', + -'tab_filemanager' and 'tab_mdi'. In this way the cycle start + -button works differently depending on what tab is showing. + -This is simplified - checking state and error trapping might + -be helpful. + - -In the 'GENERAL FUNCTIONS SECTION' add: -[source,python] ----- - ##################### - # general functions # - ##################### - - def cycleStart(self, state): - if state: - tab = self.w.mainTab.currentWidget() - if tab in( self.w.tab_auto, self.w.tab_graphics): - ACTION.RUN(line=0) - elif tab == self.w.tab_files: - self.w.filemanager.load() - elif tab == self.w.tab_mdi: - self.w.mditouchy.run_command() ----- - -== Add a special Max Velocity Slider based on percent -Some times you want to build a widget to do something not built in. + -The built in Max velocity slider acts on units per minute, here we show how to do percent: + -The STATUS command makes sure the slider adjusts if linuxcnc changes the current max velocity. + -valueChanged.connect() calls a function when the slider is moved. + - -In Designer add a QSlider widget called 'mvPercent' -Then add the code to the handler file. -[source,python] ----- - ############################# - # SPECIAL FUNCTIONS SECTION # - ############################# - - def initialized__(self): - self.w.mvPercent.setMaximum(100) - STATUS.connect('max-velocity-override-changed', lambda w, data: self.w.mvPercent.setValue((data / INFO.MAX_TRAJ_VELOCITY)*100)) - self.w.mvPercent.valueChanged.connect(self.setMVPercentValue) - - ##################### - # GENERAL FUNCTIONS # - ##################### - - def setMVPercentValue(self, value): - ACTION.SET_MAX_VELOCITY_RATE(INFO.MAX_TRAJ_VELOCITY * (value/100.0)) - ----- -== Class Patch the file manager widget - -[NOTE] -Class patching (monkey patching) is a little like black magic - so use it only if needed. + - -The File manager widget is designed to load a selected program in linuxcnc. + -But maybe you want to print the file name first. + -We can 'class patch' the library to redirect the function call. + - -In the 'IMPORT SECTION' add: + -[source,python] ----- -from qtvcp.widgets.file_manager import FileManager as FM ----- - -Here we are going to keep a reference to the original function, so we can still call it + -Then we redirect the class to call our custom function in the handler file instead. + -[source,python] ----- - ########################################## - # Special Functions called from QTVCP - ########################################## - - # For changing functions in widgets we can 'class patch'. - # class patching must be done before the class is instantiated. - def class_patch__(self): - self.old_load = FM.load # keep a reference of the old function - FM.load = self.our_load # redirect function to our handle file function ----- - -Ok Now we write a custom function to replace the original. + -This function must have the same signature as the original function. + -In this example we are still going to call the original function by using the + -reference to it we recorded earlier. It requires the first argument to be the widget instance + -which in this case is self.w.filemanager (the name given in the designer editor) + - -[source,python] ----- - ##################### - # GENERAL FUNCTIONS # - ##################### - - def our_load(self,fname): - print fname - self.old_load(self.w.filemanager,fname) ----- - -Now our custom function will print the file path to the terminal before loading the file. + -Obviously boring but shows the principle. + - -There is another slightly different way to do this that can have advantages. + -You can store the reference to the original function in the original class. + -the trick here is to make sure the function name you use to store it, is not already + -used in the class. 'super__' added to the function name would be a good choice + -We won't use that in built in qtvcp widgets. + - -[source,python] ----- - ########################################## - # Special Functions called from QTVCP - ########################################## - - # For changing functions in widgets we can 'class patch'. - # class patching must be done before the class is instantiated. - def class_patch__(self): - FM.super__load = FM.load # keep a reference of the old function in the original class - FM.load = self.our_load # redirect function to our handle file function - - ##################### - # GENERAL FUNCTIONS # - ##################### - - def our_load(self,fname): - print fname - self.w.filemanager.super__load(fname) ----- - -== Adding widgets Programmatically - -In some situation it is only possible to add widgets with python code rather then using the Designer editor. + -When adding Qtvcp widgets programmatically, sometimes there are extra steps to be taken. + -Here we are going to add a spindle speed indicator bar and up-to-speed LED to a tab widget corner. + -Designer does not support adding corner widgets to tabs but PyQt does. + -This is a cut down example from Qtaxis screen's handler file. + - -First we must import the libraries we need. + -often these libraries are already imported in the handler file. + -QtWidgets gives us access to the QProgress bar + -QColor is for the LED color + -StateLED is the Qtvcp library used to create the spindle-at-speed LED + -Status is used to catch linuxcnc status information. + -Info gives us information about the machine configuration. + - -[source,python] ----- -############################ -# **** IMPORT SECTION **** # -############################ - -from PyQt5 import QtWidgets -from PyQt5.QtGui import QColor -from qtvcp.widgets.state_led import StateLED as LED -from qtvcp.core import Status, Info ----- - -STATUS and INFO are initialized outside the handler class so as to be a global reference (no self. in front) + - -[source,python] ----- -########################################## -# **** instantiate libraries section **** # -########################################### - -STATUS = Status() -INFO = Info() ----- - -For the spindle speed indicator we need to know the current spindle speed: + -We register with STATUS to catch the 'actual-spindle-speed-changed' signal to call + -a function named: 'self.update_spindle()' + - -[source,python] ----- - ######################## - # **** INITIALIZE **** # - ######################## - # widgets allows access to widgets from the qtvcp files - # at this point the widgets and hal pins are not instantiated - def __init__(self, halcomp,widgets,paths): - self.hal = halcomp - self.w = widgets - self.PATHS = paths - - STATUS.connect('actual-spindle-speed-changed', lambda w,speed: self.update_spindle(speed)) ----- - -We need to make sure the Designer widgets are already built before we try to add to them. + -We add a function call 'self.make_corner_widgets()' to build our extra widgets at the right time. + - -[source,python] ----- - ########################################## - # Special Functions called from QTSCREEN - ########################################## - - # at this point: - # the widgets are instantiated. - # the HAL pins are built but HAL is not set ready - def initialized__(self): - self.make_corner_widgets() ----- - -Ok let's code the function to build the widgets and add them in the tab widget. + -We are assuming there is a tab widget built with Designer called 'rightTab'. + - -'self.w.led = LED()' - this initializes the basic StateLed widget and uses self.w.led as the reference from then on. + -'self.w.led.setProperty("is_spindle_at_speed_status",True)' - since the stateLED can be used for many indications + -we must set the property that designates it as a spindle-at-speed LED. + -'self.w.led.setProperty("color",QColor(0,255,0,255))' this sets it as green when on. + -'self.w.led.hal_init(HAL_NAME = "spindle_is_at_speed")' - this is the extra function call required with some Qtvcp widgets. + -If HAL_NAME is omitted it will use the widget objectName if there is one. + -It gives the special widgets reference to: + - -* self.HAL_GCOMP_ - The HAL component wrapped in qtvcp's core QComponent -* self.HAL_NAME_ -The HAL widget name -* self.QT_OBJECT_ -the actual object -* self.QTVCP_INSTANCE_- The window object -* self.PATHS_ -the path library -* self.PREFS_ -the preference object. - -'self.w.rpm_bar = QtWidgets.QProgressBar()' - initialize a PyQt5 QProgress bar. + -'self.w.rpm_bar.setRange(0, INFO.MAX_SPINDLE_SPEED)' - set the max range of the Progress bar to the max specified in the INI. + - - -Since you can only add one widget to the tab corner and we have two we want there, we must add the two into a container. + -We create a QWidget and add a QHBoxLayout to the QWidget. + -The we add our QProgress bar and LED to the layout. + - - -'self.w.rightTab.setCornerWidget(w)' - finally we add the QWidget (with our QProgress bar and LED in it) to the tab widget's corner. + - -[source,python] ----- - ##################### - # general functions # - ##################### - - def make_corner_widgets(self): - # make a spindle-at-speed green LED - self.w.led = LED() - self.w.led.setProperty('is_spindle_at_speed_status',True) - self.w.led.setProperty('color',QColor(0,255,0,255)) - self.w.led.hal_init(HAL_NAME = 'spindle_is_at_speed') - - # make a spindle speed bar - self.w.rpm_bar = QtWidgets.QProgressBar() - self.w.rpm_bar.setRange(0, INFO.MAX_SPINDLE_SPEED) - - # container - w = QtWidgets.QWidget() - w.setContentsMargins(0,0,0,6) - w.setMinimumHeight(40) - - # layout - hbox = QtWidgets.QHBoxLayout() - hbox.addWidget(self.w.rpm_bar) - hbox.addWidget(self.w.led) - w.setLayout(hbox) - - # add the container to the corner of the right tab widget - self.w.rightTab.setCornerWidget(w) ----- - -Now we build the function to actually update out QProgressBar when STATUS updates the spindle speed. + -'self.w.rpm_bar.setInvertedAppearance()' - In this case we chose to display left-to-right or right-to-left depending if we are turning clockwise or anticlockwise. + -'self.w.rpm_bar.setFormat()' - This formats the writing in the bar. + -'self.w.rpm_bar.setValue()' - This sets the length of the colored bar. + -[source,python] ----- - ######################## - # callbacks from STATUS # - ######################## - def update_spindle(self, data): - self.w.rpm_bar.setInvertedAppearance(bool(data<0)) - self.w.rpm_bar.setFormat('{0:d} RPM'.format(int(data))) - self.w.rpm_bar.setValue(abs(data)) ----- - -== external control with ZMQ messaging reading - -Sometimes you want to control the screen with a separate program. + -Qtvcp can automatically set up ZMQ messaging to send and/or receive remote messages. + -It uses ZMQ's publish/subscribe pattern of messages. + -As always consider security before letting programs interface though messaging. + -In the screenoptions widget, you can select the property 'use_receive_zmq_option' + -You could also set this property directly in the handler file (as in this sample). + -We assume the screenoption widget is called 'screen_options' in designer: + - -[source,python] ----- - ######################## - # **** INITIALIZE **** # - ######################## - # widgets allows access to widgets from the qtvcp files - # at this point the widgets and hal pins are not instantiated - def __init__(self, halcomp,widgets,paths): - # directly select ZMQ message receiving - self.w.screen_options.setProperty('use_receive_zmq_option',True) ----- - -This allows an external program to call functions in the handler file. + -Let's add a specific function for testing. + -You will need to run linuxcnc from a terminal to see the printed text. + - -[source,python] ----- - ##################### - # general functions # - ##################### - def test_zmq_function(self, arg1, arg2): - print 'zmq test function called:',arg1, arg2 ----- - -Here is a sample program to call a function. + -It alternates between two data sets every second. + -Run this in a separate terminal from linuxcnc to see the sent messages. + - -[source,python] ----- -#!/usr/bin/env python3 -from time import sleep - -import zmq -import json - -context = zmq.Context() -socket = context.socket(zmq.PUB) -socket.bind("tcp://127.0.0.1:5690") -topic = b'Qtvcp' - -# prebuild message 1 -# makes a dict of function to call plus any arguments -x = { - "FUNCTION": "test_zmq_function", - "ARGS": [True,200] -} -# convert to json object -m1 = json.dumps(x) - -# prebuild message 2 -x = { - "FUNCTION": "test_zmq_function", - "ARGS": [False,0], -} -# convert to json object -m2 = json.dumps(x) - -if __name__ == '__main__': - while True: - print 'send message 1' - socket.send_multipart([topic, bytes((m1).encode('utf-8'))]) - sleep(ms(1000)) - - print 'send message 2' - socket.send_multipart([topic, bytes((m2).encode('utf-8'))]) - sleep(ms(1000)) ----- -Note the line 'x = {"FUNCTION": "test_zmq_function", "ARGS": [True,200]}' sets + -the function to call and the arguments to send to that function. + -you will need to know the signature of the function you wish to call. + -Also note that the message is converted to a json object. + -This is because ZMQ sends byte messages not python objects. + -json converts python to bytes and will be converted back when received. + - -== external control with ZMQ messaging writing - -You also my want to communicate with a separate program from the screen. + -Qtvcp can automatically set up ZMQ messaging to send and/or receive remote messages. + -It uses ZMQ's publish/subscribe pattern of messages. + -As always consider security before letting programs interface though messaging. + -In the screenoptions widget, you can select the property 'use_send_zmq_message' + -You could also set this property directly in the handler file (as in this sample). + -We assume the screenoption widget is called 'screen_options' in designer: + - -[source,python] ----- - ######################## - # **** INITIALIZE **** # - ######################## - # widgets allows access to widgets from the qtvcp files - # at this point the widgets and hal pins are not instantiated - def __init__(self, halcomp,widgets,paths): - # directly select ZMQ message sending - self.w.screen_options.setProperty('use_send_zmq_option',True) ----- - -This allows sending messages to a separate program. + -The message sent will depend on what the external program is expecting. + -Let's add a specific function for testing. + -You will need to run linuxcnc from a terminal to see the printed text. + -We assume the screenoption widget is called 'screen_options' in designer: + -You need to add something to call this function, such as a button click. + - -[source,python] ----- - ##################### - # general functions # - ##################### - def send_zmq_message(self): - # This could be any python object json can convert - message = {"name": "John", "age": 30} - self.w.screen_options.send_zmq_message(message) ----- - -Here is a sample program that will receive the message and print it to the terminal. + - -[source,python] ----- -import zmq -import json - -# ZeroMQ Context -context = zmq.Context() - -# Define the socket using the "Context" -sock = context.socket(zmq.SUB) - -# Define subscription and messages with topic to accept. -topic = "" # all topics -sock.setsockopt(zmq.SUBSCRIBE, topic) -sock.connect("tcp://127.0.0.1:5690") - -while True: - topic, message = sock.recv_multipart() - print '{} sent message:{}'.format(topic,json.loads(message)) - ----- diff --git a/docs/src/gui/qtvcp-custom-widgets_es.adoc b/docs/src/gui/qtvcp-custom-widgets_es.adoc deleted file mode 100644 index 84ff5c003d..0000000000 --- a/docs/src/gui/qtvcp-custom-widgets_es.adoc +++ /dev/null @@ -1,644 +0,0 @@ -[[cha:qtvcp-custom-widgets]] - -= QTvcp Building Custom Widgets - -== Overview -Building custom widgets allows one to use the Qt Designer editor to place + -a custom widget rather then doing it manually in a handler file. + -A useful custom widgets would be a great way to contribute back to linuxcnc. + - -=== Widgets - -Widget is the general name for the UI objects such as buttons and labels in pyQT. + -There are also special widgets made for linuxcnc that make integration easier. + -This widgets can be placed with qt Designer editor - allowing one to see the result + -before actually loading the panel in linuxcnc. + - -=== Designer -Qt Designer is a What You See is What You Get editor for placing pyQT widgets. + -It's original intend was for building the graphic widgets for programs. + -We leverage it to build screens and panels for linuxcnc. + -In Qt Designer linuxcnc widgets are split in three heading on the left side of the editor. + -One is for HAL only widgets. + -One is for Linuxcnc controller widgets + -And one is for dialog widgets. + - + -For Designer to add custom widgets to it's editor it must have a plugin added to the right folder. + - -== Custom Hal Widgets -Hal widgets are the simplest to show example of. + -qtvcp/widgets/simple_widgets.py holds many HAL only widgets. + -Lets look at a snippet of simple_widgets.py. + - -[source,python] ----- -#!/usr/bin/env python3 - -############################### -# Imports -############################### -from PyQt5 import QtWidgets -from qtvcp.widgets.widget_baseclass import _HalWidgetBase, _HalSensitiveBase -import hal - -###################### -# WIDGET -###################### - -class Lcnc_GridLayout(QtWidgets.QWidget, _HalSensitiveBase): - def __init__(self, parent = None): - super(GridLayout, self).__init__(parent) ----- - -=== In the 'Imports' section - -This is where we import libraries that our widget class needs. + -In this case we need access to pyqt's QtWidgets library, linuxcnc's hal library + -and qtvcp's widget baseclass _HalSensitiveBase for automatic HAL pin setup and + -to disable/enable the widget (also known as input sensitivity) + -There is also _HalToggleBase, and _HalScaleBase functions available in the library. + - -=== In the 'WIDGET' section -Ok here is our custom widget based on pyQT's QGridLayout widget. + -grid layout allows one to place objects in a grid fashion. + -But this grid_layout also will enable and disable all widgets inside it + -based on the state of a HAL pin. + -Line by Line: + -[source,python] ----- -class Lcnc_GridLayout(QtWidgets.QWidget, _HalSensitiveBase): ----- -This defines the class name and the libraries in inherits from. + -this class named Lcnc_GridLayout inheriets the functions of QWidget and _HalSensitiveBase. + -_HalSensitiveBase is 'subclass' of _HalWidgetBase, The base class of most Qtvcp widgets + -meaning it has all the functions of _HalWidgetBase plus the functions of _HalSensitiveBase. + -It adds the function to make the widget be enabled or disabled based on a HAL input BIT pin. + -[source,python] ----- -def __init__(self, parent = None): ----- -This is the function called when the widget is first made (said instantiated)- this is pretty standard. + -[source,python] ----- -super(GridLayout, self).__init__(parent) ----- -This function initializes our widget's 'Super' classes. + -'Super' just means the inherited baseclasses; QWidget and _HalSensitiveBase + -Pretty standard other the the widget name will change + - -== Custom Controller Widgets using STATUS -Widget that interact with linuxcnc's controller are only a little more complicated + -they require some extra libraries. + -In this cut down example we will add properties that can be changed in Designer. + -This LED indicator widget will respond to selectable linuxcnc controller states. + - -[source,python] ----- -#!/usr/bin/env python3 - -############################### -# Imports -############################### -from PyQt5.QtCore import pyqtProperty -from qtvcp.widgets.led_widget import LED -from qtvcp.core import Status - -########################################### -# **** instantiate libraries section **** # -########################################### -STATUS = Status() - -########################################## -# custom widget class definition -########################################## -class StateLED(LED): - def __init__(self, parent=None): - super(StateLED, self).__init__(parent) - self.has_hal_pins = False - self.setState(False) - self.is_estopped = False - self.is_on = False - self.invert_state = False - - def _hal_init(self): - if self.is_estopped: - STATUS.connect('state-estop', lambda w:self._flip_state(True)) - STATUS.connect('state-estop-reset', lambda w:self._flip_state(False)) - elif self.is_on: - STATUS.connect('state-on', lambda w:self._flip_state(True)) - STATUS.connect('state-off', lambda w:self._flip_state(False)) - - def _flip_state(self, data): - if self.invert_state: - data = not data - self.change_state(data) - - ######################################################################### - # Designer properties setter/getters/resetters - ######################################################################## - - # invert status - def set_invert_state(self, data): - self.invert_state = data - def get_invert_state(self): - return self.invert_state - def reset_invert_state(self): - self.invert_state = False - - # machine is estopped status - def set_is_estopped(self, data): - self.is_estopped = data - def get_is_estopped(self): - return self.is_estopped - def reset_is_estopped(self): - self.is_estopped = False - - # machine is on status - def set_is_on(self, data): - self.is_on = data - def get_is_on(self): - return self.is_on - def reset_is_on(self): - self.is_on = False - - ####################################### - # Designer properties - ####################################### - invert_state_status = pyqtProperty(bool, get_invert_state, set_invert_state, reset_invert_state) - is_estopped_status = pyqtProperty(bool, get_is_estopped, set_is_estopped, reset_is_estopped) - is_on_status = pyqtProperty(bool, get_is_on, set_is_on, reset_is_on) ----- - -=== In the 'Imports' section - -This is where we import libraries that our widget class needs. + -We import pyqtProperty so we can interact with the Designer editor. + -we import LED because our custom widget is based on it. + -We import Status because it gives us status messages from linuxcnc. + - -=== In the 'Instantiate Libraries' section -Typically we instantiated the libraries outside of the widget class so that the + -reference to it is global - meaning you don't need to use self. in front of it. + -By convention we use all capital letters in the name. + - -=== In the 'custom widget class definition' section -This is the meat and potatoes of our custom widget. + -[source,python] ----- -class StateLed(LED): - def __init__(self, parent=None): - super(StateLed, self).__init__(parent) - self.has_hal_pins = False - self.setState(False) - self.is_estopped = False - self.is_on = False - self.invert_state = False ----- -This defines the name of our custom widget and what other class it inherits from, in this case + -we inherit LED - a Qtvcp widget that represents a status light. + -The __init__ is typical of most widgets, it is called when the widget is first made. + -the super line is typical of most widgets - it calls the parent (super) widget's initialization code. + -then we set some attributes. + -self.has_hal_pins is an attribute inherited from Lcnc_Led - we set it here so no HAL Pins are made. + -self.setState is inherited from Lcnc_led - we set it to make sure the LED is off. + -the other attributes are for the selectable options of our widget. + -[source,python] ----- - def _hal_init(self): - if self.is_estopped: - STATUS.connect('state-estop', lambda w:self._flip_state(True)) - STATUS.connect('state-estop-reset', lambda w:self._flip_state(False)) - elif self.is_on: - STATUS.connect('state-on', lambda w:self._flip_state(True)) - STATUS.connect('state-off', lambda w:self._flip_state(False)) ----- -This function connects STATUS (linuxcnc status message library) to our widget so that the LED will on or off based on + -the selected state of the controller. We have two states we can choose from is_estopped or is_on + -Depending on which is active our widget get connected to the appropriate STATUS messages. + -_hal_int() is called on each widget that inherited _HalWidgetBase, when Qtvcp first builds the screen. + -You might wonder why it's called on this widget since we didn't have _HalWidgetBase in our class + -definition (class Lcnc_State_Led(Lcnc_Led):) - it's called because Lcnc_Led inherits _HalWidgetBase + - + -in this function you have access to some extra information. (though we don't use them in this example) + -[source,python] ----- - self.HAL_GCOMP = the HAL component instance - self.HAL_NAME = This widgets name as a string - self.QT_OBJECT_ = This widgets pyQt object instance - self.QTVCP_INSTANCE_ = The very toplevel Parent Of the screen - self.PATHS_ = The instance of Qtvcp's path library - self.PREFS_ = the isnstance of an optional preference file ----- -We could use this information to create HAL pins or look up image paths etc. + -[source,python] ----- - STATUS.connect('state-estop', lambda w:self._flip_state(True)) ----- -lets look at this line more closely. STATUS is very common theme is widget building. + -STATUS use GObject message system to send messages to widgets that register to it. + -This line is the register process. + -'state-estop' is the message we wish to act on. there are many messages available. + -'lambda w:self._flip_state(True)' is what happens when the message is caught. + -the lambda function accepts the widget instance (w) that GObject sends it and then calls the function + -self._flip_state(True) + -Lambda was used to strip the (w) object before calling the self._flip_state function. + -It also allowed use to send self._flip_state() the True state. + - -[source,python] ----- - def _flip_state(self, data): - if self.invert_state: - data = not data - self.change_state(data) ----- -This is the function that actually flips the state of the LED. + -It is what gets called when the appropriate STATUS message is accepted. + - + -You will also see code like this (no lambda): -[source,python] ----- -STATUS.connect('current-feed-rate', self._set_feedrate_text) ----- -and the function called looks like this: -[source,python] ----- - def _set_feedrate_text(self, widget, data): ----- -in which the widget and any data must be accepted by the function. + - -==== In the 'Designer properties setter/getters/resetters' section -This is how Designer sets the attributes of the widget. + -This can also be called directly in the widget. + - -==== In the 'Designer properties' section -This is the registering of properties in Designer. + -The property name is the text that is used in Designer. + -These property names cannot be the same as the attributes they represent. + -These properties show in Designer in the order they appear here. + - -== Custom Controller Widgets with actions -Here is an example of a widget that sets the user reference system. + -It changes the machine controller state with the ACTION library. + -It also uses the STATUS library to set whether the button can be clicked + -or not. + - -[source,python] ----- -import os -import hal - -from PyQt5.QtWidgets import QWidget, QToolButton, QMenu, QAction -from PyQt5.QtCore import Qt, QEvent, pyqtProperty, QBasicTimer, pyqtSignal -from PyQt5.QtGui import QIcon - -from qtvcp.widgets.widget_baseclass import _HalWidgetBase -from qtvcp.widgets.dialog_widget import EntryDialog -from qtvcp.core import Status, Action, Info - -# Instiniate the libraries with global reference -# STATUS gives us status messages from linuxcnc -# INFO holds ini details -# ACTION gives commands to linuxcnc -STATUS = Status() -INFO = Info() -ACTION = Action() - -class SystemToolButton(QToolButton, _HalWidgetBase): - def __init__(self, parent=None): - super(SystemToolButton, self).__init__(parent) - self._joint = 0 - self._last = 0 - self._block_signal = False - self._auto_label_flag = True - SettingMenu = QMenu() - for system in('G54', 'G55', 'G56', 'G57', 'G58', 'G59', 'G59.1', 'G59.2', 'G59.3'): - - Button = QAction(QIcon('exit24.png'), system, self) - Button.triggered.connect(self[system.replace('.','_')]) - SettingMenu.addAction(Button) - - self.setMenu(SettingMenu) - self.dialog = EntryDialog() - - def _hal_init(self): - if not self.text() == '': - self._auto_label_flag = False - def homed_on_test(): - return (STATUS.machine_is_on() - and (STATUS.is_all_homed() or INFO.NO_HOME_REQUIRED)) - - STATUS.connect('state-off', lambda w: self.setEnabled(False)) - STATUS.connect('state-estop', lambda w: self.setEnabled(False)) - STATUS.connect('interp-idle', lambda w: self.setEnabled(homed_on_test())) - STATUS.connect('interp-run', lambda w: self.setEnabled(False)) - STATUS.connect('all-homed', lambda w: self.setEnabled(True)) - STATUS.connect('not-all-homed', lambda w, data: self.setEnabled(False)) - STATUS.connect('interp-paused', lambda w: self.setEnabled(True)) - STATUS.connect('user-system-changed', self._set_user_system_text) - - def G54(self): - ACTION.SET_USER_SYSTEM('54') - - def G55(self): - ACTION.SET_USER_SYSTEM('55') - - def G56(self): - ACTION.SET_USER_SYSTEM('56') - - def G57(self): - ACTION.SET_USER_SYSTEM('57') - - def G58(self): - ACTION.SET_USER_SYSTEM('58') - - def G59(self): - ACTION.SET_USER_SYSTEM('59') - - def G59_1(self): - ACTION.SET_USER_SYSTEM('59.1') - - def G59_2(self): - ACTION.SET_USER_SYSTEM('59.2') - - def G59_3(self): - ACTION.SET_USER_SYSTEM('59.3') - - def _set_user_system_text(self, w, data): - convert = { 1:"G54", 2:"G55", 3:"G56", 4:"G57", 5:"G58", 6:"G59", 7:"G59.1", 8:"G59.2", 9:"G59.3"} - if self._auto_label_flag: - self.setText(convert[int(data)]) - - def ChangeState(self, joint): - if int(joint) != self._joint: - self._block_signal = True - self.setChecked(False) - self._block_signal = False - self.hal_pin.set(False) - - ############################## - # required class boiler code # - ############################## - - def __getitem__(self, item): - return getattr(self, item) - def __setitem__(self, item, value): - return setattr(self, item, value) - ----- -== Widget Plugins -We must register our custom widget for Designer to use them. + -Here is a typical samples + -they would need to be added to qtvcp/plugins/ + -Then qtvcp/plugins/qtvcp_plugin.py would need to be adjusted + -to import them. + - -=== Gridlayout example - -[source,python] ----- -#!/usr/bin/env python3 - -from PyQt5 import QtCore, QtGui -from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin -from qtvcp.widgets.simple_widgets import Lcnc_GridLayout -from qtvcp.widgets.qtvcp_icons import Icon -ICON = Icon() - -#################################### -# GridLayout -#################################### -class LcncGridLayoutPlugin(QPyDesignerCustomWidgetPlugin): - def __init__(self, parent = None): - QPyDesignerCustomWidgetPlugin.__init__(self) - self.initialized = False - def initialize(self, formEditor): - if self.initialized: - return - self.initialized = True - def isInitialized(self): - return self.initialized - def createWidget(self, parent): - return Lcnc_GridLayout(parent) - def name(self): - return "Lcnc_GridLayout" - def group(self): - return "Linuxcnc - HAL" - def icon(self): - return QtGui.QIcon(QtGui.QPixmap(ICON.get_path('lcnc_gridlayout'))) - def toolTip(self): - return "HAL enable/disable GridLayout widget" - def whatsThis(self): - return "" - def isContainer(self): - return True - def domXml(self): - return '\n' - def includeFile(self): - return "qtvcp.widgets.simple_widgets" ----- - -=== SystemToolbutton example - -[source,python] ----- -#!/usr/bin/env python3 - -from PyQt5 import QtCore, QtGui -from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin -from qtvcp.widgets.system_tool_button import SystemToolButton -from qtvcp.widgets.qtvcp_icons import Icon -ICON = Icon() - -#################################### -# SystemToolButton -#################################### -class SystemToolButtonPlugin(QPyDesignerCustomWidgetPlugin): - def __init__(self, parent = None): - super(SystemToolButtonPlugin, self).__init__(parent) - self.initialized = False - def initialize(self, formEditor): - if self.initialized: - return - self.initialized = True - def isInitialized(self): - return self.initialized - def createWidget(self, parent): - return SystemToolButton(parent) - def name(self): - return "SystemToolButton" - def group(self): - return "Linuxcnc - Controller" - def icon(self): - return QtGui.QIcon(QtGui.QPixmap(ICON.get_path('systemtoolbutton'))) - def toolTip(self): - return "Button for selecting a User Co-ordinate System" - def whatsThis(self): - return "" - def isContainer(self): - return False - def domXml(self): - return '\n' - def includeFile(self): - return "qtvcp.widgets.system_tool_button" ----- - -=== Making a plugin with a MenuEntry dialog box -It possible to add an entry to the dialog that pops up when you right + -click the widget in the layout. This can do such things as select options + -in a more convenient way. This is the plugin used for action buttons. + - -[source,python] ----- -#!/usr/bin/env python3 - -import sip -from PyQt5 import QtCore, QtGui, QtWidgets -from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin, \ - QPyDesignerTaskMenuExtension, QExtensionFactory, \ - QDesignerFormWindowInterface, QPyDesignerMemberSheetExtension -from qtvcp.widgets.action_button import ActionButton -from qtvcp.widgets.qtvcp_icons import Icon -ICON = Icon() - -Q_TYPEID = { - 'QDesignerContainerExtension': 'org.qt-project.Qt.Designer.Container', - 'QDesignerPropertySheetExtension': 'org.qt-project.Qt.Designer.PropertySheet', - 'QDesignerTaskMenuExtension': 'org.qt-project.Qt.Designer.TaskMenu', - 'QDesignerMemberSheetExtension': 'org.qt-project.Qt.Designer.MemberSheet' -} - -#################################### -# ActionBUTTON -#################################### -class ActionButtonPlugin(QPyDesignerCustomWidgetPlugin): - - # The __init__() method is only used to set up the plugin and define its - # initialized variable. - def __init__(self, parent=None): - super(ActionButtonPlugin, self).__init__(parent) - self.initialized = False - - # The initialize() and isInitialized() methods allow the plugin to set up - # any required resources, ensuring that this can only happen once for each - # plugin. - def initialize(self, formEditor): - - if self.initialized: - return - manager = formEditor.extensionManager() - if manager: - self.factory = ActionButtonTaskMenuFactory(manager) - manager.registerExtensions(self.factory, Q_TYPEID['QDesignerTaskMenuExtension']) - self.initialized = True - - def isInitialized(self): - return self.initialized - - # This factory method creates new instances of our custom widget - def createWidget(self, parent): - return ActionButton(parent) - - # This method returns the name of the custom widget class - def name(self): - return "ActionButton" - - # Returns the name of the group in Qt Designer's widget box - def group(self): - return "Linuxcnc - Controller" - - # Returns the icon - def icon(self): - return QtGui.QIcon(QtGui.QPixmap(ICON.get_path('actionbutton'))) - - # Returns a tool tip short description - def toolTip(self): - return "Action button widget" - - # Returns a short description of the custom widget for use in a "What's - # This?" help message for the widget. - def whatsThis(self): - return "" - - # Returns True if the custom widget acts as a container for other widgets; - def isContainer(self): - return False - - # Returns an XML description of a custom widget instance that describes - # default values for its properties. - def domXml(self): - return '\n' - - # Returns the module containing the custom widget class. It may include - # a module path. - def includeFile(self): - return "qtvcp.widgets.action_button" - - -class ActionButtonDialog(QtWidgets.QDialog): - - def __init__(self, widget, parent = None): - - QtWidgets.QDialog.__init__(self, parent) - - self.widget = widget - - self.previewWidget = ActionButton() - - buttonBox = QtWidgets.QDialogButtonBox() - okButton = buttonBox.addButton(buttonBox.Ok) - cancelButton = buttonBox.addButton(buttonBox.Cancel) - - okButton.clicked.connect(self.updateWidget) - cancelButton.clicked.connect(self.reject) - - layout = QtWidgets.QGridLayout() - self.c_estop = QtWidgets.QCheckBox("Estop Action") - self.c_estop.setChecked(widget.estop ) - layout.addWidget(self.c_estop) - - layout.addWidget(buttonBox, 5, 0, 1, 2) - self.setLayout(layout) - - self.setWindowTitle(self.tr("Set Options")) - - def updateWidget(self): - - formWindow = QDesignerFormWindowInterface.findFormWindow(self.widget) - if formWindow: - formWindow.cursor().setProperty("estop_action", - QtCore.QVariant(self.c_estop.isChecked())) - self.accept() - -class ActionButtonMenuEntry(QPyDesignerTaskMenuExtension): - - def __init__(self, widget, parent): - super(QPyDesignerTaskMenuExtension, self).__init__(parent) - self.widget = widget - self.editStateAction = QtWidgets.QAction( - self.tr("Set Options..."), self) - self.editStateAction.triggered.connect(self.updateOptions) - - def preferredEditAction(self): - return self.editStateAction - - def taskActions(self): - return [self.editStateAction] - - def updateOptions(self): - dialog = ActionButtonDialog(self.widget) - dialog.exec_() - -class ActionButtonTaskMenuFactory(QExtensionFactory): - def __init__(self, parent = None): - QExtensionFactory.__init__(self, parent) - - def createExtension(self, obj, iid, parent): - - if not isinstance(obj, ActionButton): - return None - if iid == Q_TYPEID['QDesignerTaskMenuExtension']: - return ActionButtonMenuEntry(obj, parent) - elif iid == Q_TYPEID['QDesignerMemberSheetExtension']: - return ActionButtonMemberSheet(obj, parent) - return None ----- diff --git a/docs/src/gui/qtvcp-development.adoc b/docs/src/gui/qtvcp-development.adoc index a45f457b83..c3794220db 100644 --- a/docs/src/gui/qtvcp-development.adoc +++ b/docs/src/gui/qtvcp-development.adoc @@ -3,76 +3,76 @@ [[cha:qtvcp-development]] = QTvcp Development -The intention of QtVCP is to supply an infrastructure to support + -screen and VCP panel building for linuxcnc. By supplying a diverse + -widget set and supporting custom coding, QtVCP hopes that development + -energy will be expended in one toolkit rather then continuous re-invention. + -By using the same toolkit across many screens/panels users should have an easier + -time customizing/creating and developers should find it easier to help + -trouble shoot with less effort. + +The intention of QtVCP is to supply an infrastructure to support +screen and VCP panel building for linuxcnc. By supplying a diverse +widget set and supporting custom coding, QtVCP hopes that development +energy will be expended in one toolkit rather then continuous re-invention. +By using the same toolkit across many screens/panels users should have an easier +time customizing/creating and developers should find it easier to help +trouble shoot with less effort. == Overview -QtVCP uses a QT Designer built .ui file and a python handler file + -to load and control a screen/panel that displays QT widgets to control + -linuxcnc's motion controller or HAL pins. + -There are builtin screens and panels, easily loaded by a user or + -A user can build/modify one of their own. + -QtVCP uses libraries and custom widgets to hide some of the complexity + -of interfacing to linuxcnc. By using QtVCP's library rather then linuxcnc's, + -We can mitigate minor linuxcnc code changes. + +QtVCP uses a QT Designer built .ui file and a python handler file +to load and control a screen/panel that displays QT widgets to control +linuxcnc's motion controller or HAL pins. +There are builtin screens and panels, easily loaded by a user or +A user can build/modify one of their own. +QtVCP uses libraries and custom widgets to hide some of the complexity +of interfacing to linuxcnc. By using QtVCP's library rather then linuxcnc's, +We can mitigate minor linuxcnc code changes. == Builtin locations -Builtin screens and panels are stored in separate folders. + +Builtin screens and panels are stored in separate folders. - * screens in share/qtvcp/screens + - * panels in share/qtvcp/panels + - * Stock images are in share/qtvcp/images + + * screens in share/qtvcp/screens + * panels in share/qtvcp/panels + * Stock images are in share/qtvcp/images -screens and panels are sorted by their folder name, which is + -also the name used to load them. + -Inside the folder would be the .ui file, the handler file and + -possibly the .qss theme file. + +screens and panels are sorted by their folder name, which is +also the name used to load them. +Inside the folder would be the .ui file, the handler file and +possibly the .qss theme file. == QtVCP startup to shutdown -QtVCP source is located in src/emc/usr_intf/qtvcp + - - * When QtVCP first starts, it must decide if this object is a screen + -or a panel. Then it searches for and collects information about + -paths of required files and useful folders. + - * Next, it builds the HAL component, loads the window instance, + -adds handler extensions and installs an event filter. + - * Now the window/widgets are instantiated, the HAL pins are built, + -which also initiates the '_init_hal()' function of the widgets. + - * The handler function 'initialized__()' is called and then the STATUS + -library is forced to update. Hal component is set ready at this point. + - * A variety of optional switch arguments are set, including calling a + -POSTGUI HAL file (if a screen). Terminate signals are trapped and + -QtVCP now polls for events. + - * Finally when QtVCP is asked to shutdown, it calls shutdown functions + -in the handler file, shuts down STATUS monitoring and kills the HAL + -component. + +QtVCP source is located in src/emc/usr_intf/qtvcp + + * When QtVCP first starts, it must decide if this object is a screen + or a panel. Then it searches for and collects information about + paths of required files and useful folders. + * Next, it builds the HAL component, loads the window instance, + adds handler extensions and installs an event filter. + * Now the window/widgets are instantiated, the HAL pins are built, + which also initiates the '_init_hal()' function of the widgets. + * The handler function 'initialized__()' is called and then the STATUS + library is forced to update. Hal component is set ready at this point. + * A variety of optional switch arguments are set, including calling a + POSTGUI HAL file (if a screen). Terminate signals are trapped and + QtVCP now polls for events. + * Finally when QtVCP is asked to shutdown, it calls shutdown functions + in the handler file, shuts down STATUS monitoring and kills the HAL + component. == Path information -When QtVCP loads it collects Path information: + -This is available in the handler file's '__init__()' function + -as 'path' + +When QtVCP loads it collects Path information: +This is available in the handler file's '__init__()' function +as 'path' - * IMAGEDIR = Path of builtin images + + * IMAGEDIR = Path of builtin images * SCREENDIR = Path of builtin motion controller screens + - * PANELDIR = Path of builtin accessory panels + - * WORKINGDIR = Path of where QtVCP was launched from + - * CONFIGPATH = Path of the launched configuration + - * BASEDIR = general path, used to derive all paths + + * PANELDIR = Path of builtin accessory panels + * WORKINGDIR = Path of where QtVCP was launched from + * CONFIGPATH = Path of the launched configuration + * BASEDIR = general path, used to derive all paths * BASENAME = Generic name used to derive all paths + - * LIBDIR = Path of QtVCP's python library + - * HANDLER = Path of handler file + - * XML = Path of .ui file + - * DOMAIN = Path of translation + - * IS_SCREEN = screen/panel switch + + * LIBDIR = Path of QtVCP's python library + * HANDLER = Path of handler file + * XML = Path of .ui file + * DOMAIN = Path of translation + * IS_SCREEN = screen/panel switch == Idiosyncrasies @@ -80,80 +80,80 @@ These try to cover non-obvious situations. === Error code collecting -Linuxcnc's error code collecting can only be read from one place. + -When read , it is 'consumed' - no other object can read it. + -In QtVCP screens, it is recommended to use the ScreenOptionss widget to + -set up error reading. They are then sent to other objects via STATUS + +Linuxcnc's error code collecting can only be read from one place. +When read , it is 'consumed' - no other object can read it. +In QtVCP screens, it is recommended to use the ScreenOptionss widget to +set up error reading. They are then sent to other objects via STATUS signals. === Jog rate -Linuxcnc has no internal record of jog rate - you must specify it at the + -time of jogging. + -QtVCP uses the STATUS library to keep track of the latest linear and + -angular jog rate. It is always specified in machine units per minute, so must be + -converted when in non-machine units mode. + -So if your machine is imperial based but you are in metric mode + -changes to jog rate sent to ACTION functions must be converted to imperial. + -at the same time if the machine is metric based and you are in imperial mode, + - changes to jog rate must be sent to ACTION functions in metric units. + -Angular jog rates the units don't change in metric/imperial + -mode so you can send them to ACTION functions without conversion. + -While you are free to ignore this jogging record while building screens, + -Anyone modifying your screen and using the builtin jog rate widgets would + -not get the desired results. The ACTION library's 'DO_JOG' function, gets + -it's jog rate from the STATUS library. + +Linuxcnc has no internal record of jog rate - you must specify it at the +time of jogging. +QtVCP uses the STATUS library to keep track of the latest linear and +angular jog rate. It is always specified in machine units per minute, so must be +converted when in non-machine units mode. +So if your machine is imperial based but you are in metric mode +changes to jog rate sent to ACTION functions must be converted to imperial. +at the same time if the machine is metric based and you are in imperial mode, + changes to jog rate must be sent to ACTION functions in metric units. +Angular jog rates the units don't change in metric/imperial +mode so you can send them to ACTION functions without conversion. +While you are free to ignore this jogging record while building screens, +Anyone modifying your screen and using the builtin jog rate widgets would +not get the desired results. The ACTION library's 'DO_JOG' function, gets +it's jog rate from the STATUS library. === Keybinding -Keybinding is always a difficult-to-get-right-in-all-cases affair. + -Custom keybinding functions are to be defined in the handler file. + -Most importantly widgets that require regular key input and not jogging, + -should be checked for in the 'processed_key_event__' function. + +Keybinding is always a difficult-to-get-right-in-all-cases affair. +Custom keybinding functions are to be defined in the handler file. +Most importantly widgets that require regular key input and not jogging, +should be checked for in the 'processed_key_event__' function. === Preference file -Some QtVCP widget use the preference file to record important information. + -This requires The preference file to be set up early in the widget + -initialization process. The easiest way to do this is to use the + +Some QtVCP widget use the preference file to record important information. +This requires The preference file to be set up early in the widget +initialization process. The easiest way to do this is to use the ScreenOptions widget. === Widget special setup functions -QtVCP looks for and calls the '_hal_init' function, when the widget + -is first loaded. It is not called when using Designer editor. + -After this function is called the widget has access to some special + -variables: + +QtVCP looks for and calls the '_hal_init' function, when the widget +is first loaded. It is not called when using Designer editor. +After this function is called the widget has access to some special +variables: [source,python] ---- - self.HAL_GCOMP = the HAL component instance - self.HAL_NAME = This widgets name as a string - self.QT_OBJECT_ = This widgets pyQt object instance - self.QTVCP_INSTANCE_ = The very toplevel Parent Of the screen - self.PATHS_ = The instance of QtVCP's path library - self.PREFS_ = the instance of an optional preference file - self.SETTINGS_ = the Qsettings object +self.HAL_GCOMP = the HAL component instance +self.HAL_NAME = This widgets name as a string +self.QT_OBJECT_ = This widgets pyQt object instance +self.QTVCP_INSTANCE_ = The very toplevel Parent Of the screen +self.PATHS_ = The instance of QtVCP's path library +self.PREFS_ = the instance of an optional preference file +self.SETTINGS_ = the Qsettings object ---- -When making a custom widget, import and sub class the + +When making a custom widget, import and sub class the '_HalWidgetBase' class for this behaivor: === Dialogs -Dialogs (AKA pop up windows) are best loaded with the screenoptions widget, + -but they can be placed on the screen in Designer. + -It doesn't matter where on the layout but to make them hidden, + -cycle the 'state' property to true then false. + - + -By default, if there is a preference file, the dialogs will + -remember their last size/placement. It is possible to override + -this so they open in the same location each time. + +Dialogs (AKA pop up windows) are best loaded with the screenoptions widget, +but they can be placed on the screen in Designer. +It doesn't matter where on the layout but to make them hidden, +cycle the 'state' property to true then false. + +By default, if there is a preference file, the dialogs will +remember their last size/placement. It is possible to override +this so they open in the same location each time. === Styles (Themes) -While it is possible to set styles in designer, it is more + -convenient to change them later if they are all set in a + -separate .qss file. The file should be put in the same + -location as the handler file. + +While it is possible to set styles in designer, it is more +convenient to change them later if they are all set in a +separate .qss file. The file should be put in the same +location as the handler file. diff --git a/docs/src/gui/qtvcp-development_es.adoc b/docs/src/gui/qtvcp-development_es.adoc deleted file mode 100644 index 6afb65804e..0000000000 --- a/docs/src/gui/qtvcp-development_es.adoc +++ /dev/null @@ -1,155 +0,0 @@ -[[cha:qtvcp-development]] - -= QTvcp Development - -The intention of QtVCP is to supply an infrastructure to support + -screen and VCP panel building for linuxcnc. By supplying a diverse + -widget set and supporting custom coding, QtVCP hopes that development + -energy will be expended in one toolkit rather then continuous re-invention. + -By using the same toolkit across many screens/panels users should have an easier + -time customizing/creating and developers should find it easier to help + -trouble shoot with less effort. + - -== Overview - -QtVCP uses a QT Designer built .ui file and a python handler file + -to load and control a screen/panel that displays QT widgets to control + -linuxcnc's motion controller or HAL pins. + -There are builtin screens and panels, easily loaded by a user or + -A user can build/modify one of their own. + -QtVCP uses libraries and custom widgets to hide some of the complexity + -of interfacing to linuxcnc. By using QtVCP's library rather then linuxcnc's, + -We can mitigate minor linuxcnc code changes. + - -== Builtin locations - -Builtin screens and panels are stored in separate folders. + - - * screens in share/qtvcp/screens + - * panels in share/qtvcp/panels + - * Stock images are in share/qtvcp/images + - -screens and panels are sorted by their folder name, which is + -also the name used to load them. + -Inside the folder would be the .ui file, the handler file and + -possibly the .qss theme file. + - -== QtVCP startup to shutdown - -QtVCP source is located in src/emc/usr_intf/qtvcp + - - * When QtVCP first starts, it must decide if this object is a screen + -or a panel. Then it searches for and collects information about + -paths of required files and useful folders. + - * Next, it builds the HAL component, loads the window instance, + -adds handler extensions and installs an event filter. + - * Now the window/widgets are instantiated, the HAL pins are built, + -which also initiates the '_init_hal()' function of the widgets. + - * The handler function 'initialized__()' is called and then the STATUS + -library is forced to update. Hal component is set ready at this point. + - * A variety of optional switch arguments are set, including calling a + -POSTGUI HAL file (if a screen). Terminate signals are trapped and + -QtVCP now polls for events. + - * Finally when QtVCP is asked to shutdown, it calls shutdown functions + -in the handler file, shuts down STATUS monitoring and kills teh HAL + -component. + - -== Path information - -When QtVCP loads it collects Path information: + -This is available in the handler file's '__init__()' function + -as 'path' + - - * IMAGEDIR = Path of builtin images + - * SCREENDIR = Path of builtin motion controller screens + - * PANELDIR = Path of builtin accessory panels + - * WORKINGDIR = Path of where QtVCP was launched from + - * CONFIGPATH = Path of the launched configuration + - * BASEDIR = general path, used to derive all paths + - * BASENAME = Generic name used to derive all paths + - * LIBDIR = Path of QtVCP's python library + - * HANDLER = Path of handler file + - * XML = Path of .ui file + - * DOMAIN = Path of translation + - * IS_SCREEN = screen/panel switch + - -== Idiosyncrasies - -These try to cover non-obvious situations. - -=== Error code collecting - -Linuxcnc's error code collecting can only be read from one place. + -When read , it is 'consumed' - no other object can read it. + -In QtVCP screens, it is recommended to use the ScreenOptionss widget to + -set up error reading. They are then sent to other objects via STATUS + -signals. - -=== Jog rate - -Linuxcnc has no internal record of jog rate - you must specify it at the + -time of jogging. + -QtVCP uses the STATUS library to keep track of the latest linear and + -angular jog rate. It is always specified in machine units per minute, so must be + -converted when in non-machine units mode. + -So if your machine is imperial based but you are in metric mode + -changes to jog rate sent to ACTION functions must be converted to imperial. + -at the same time if the machine is metric based and you are in imperial mode, + - changes to jog rate must be sent to ACTION functions in metric units. + -Angular jog rates the units don't change in metric/imperial + -mode so you can send them to ACTION functions without conversion. + -While you are free to ignore this jogging record while building screens, + -Anyone modifying your screen and using the builtin jog rate widgets would + -not get the desired results. The ACTION library's 'DO_JOG' function, gets + -it's jog rate from the STATUS library. + - -=== Keybinding - -Keybinding is always a difficult-to-get-right-in-all-cases affair. + -Custom keybinding functions are to be defined in the handler file. + -Most importantly widgets that require regular key input and not jogging, + -should be checked for in the 'processed_key_event__' function. + - -=== Preference file - -Some QtVCP widget use the preference file to record important information. + -This requires The preference file to be set up early in the widget + -initialization process. The easiest way to do this is to use the + -ScreenOptions widget. - -=== Widget special setup functions - -QtVCP looks for and calls the '_hal_init' function, when the widget + -is first loaded. It is not called when using Designer. + -After this function is called the widget has access to some special + -variables: + - -[source,python] ----- - self.HAL_GCOMP = the HAL component instance - self.HAL_NAME = This widgets name as a string - self.QT_OBJECT_ = This widgets pyQt object instance - self.QTVCP_INSTANCE_ = The very toplevel Parent Of the screen - self.PATHS_ = The instance of QtVCP's path library - self.PREFS_ = the instance of an optional preference file ----- - -When making a custom widget, import and sub class the + -'_HalWidgetBase' class: - -=== Dialogs - -Dialogs (AKA pop up windows) are placed on the screen in Designer. + -It doesn't matter where on the layout but to make them hidden, + -cycle the 'state' property to true then false. + -By default, if there is a preference file, the dialogs will + -remember their last size/placement. It is possible to override + -this so they open in the same location each time. + - -=== Styles (Themes) - -While it is possible to set styles in designer, it is more + -convenient to change them later if they are all set in a + -separate .qss file. The file should be put in the same + -location as the handler file. + - diff --git a/docs/src/gui/qtvcp-widgets_es.adoc b/docs/src/gui/qtvcp-widgets_es.adoc deleted file mode 100644 index 4d6c76e622..0000000000 --- a/docs/src/gui/qtvcp-widgets_es.adoc +++ /dev/null @@ -1,1238 +0,0 @@ -[[cha:qtvcp-widgets]] - -= QTvcp Widgets - -Qtscreen uses QTvcp widgets for linuxcnc integration. + -Widget is the general name for the UI objects such as buttons and labels in QTpy. + -You are free to use any available widgets in the QTDesigner editor. + -There are also special widgets made for linuxcnc that make integration easier. + -This are split in two heading on the right side of the editor. + -One is for HAL only widgets. + -The other is for cnc control widgets. + -you are free to mix them in any way on your panel. + - -[NOTE] - -This description of widget properties can easily be out of date due to further development and + -lack of people to write docs (A good way to give back to the project). + -The definitive descriptions are found by looking in the source code. + - -== HAL Only Widgets - -These Widgets usually have HAL pins and don't react to the machine Controller - -=== XEmbed Widget - -Allows one to embed program into the widget. + -only programs that utilize the xembed protocol will work such as: + - -* gladevcp virtual control panels -* Onboard virtual keyboard -* qtvcp virtual control panels -* mplayer video player - -=== Slider Widget - -Allows one to adjust a HAL pins using a sliding pointer. + - -=== LED Widget - -.LED -image::images/qtvcp_ledWidget.png["QTvcp led",scale="25%"] - -An indicator that optionally follows a HAL pin's logic. + - -* halpin_option -selects if the LED follows an input HAL pin or program state. -* diameter -diameter of the LED -* color - Color of the LED when on. -* off_color - Color of the LED when off. -* alignment - Qt Alignment hint. -* state -current state of LED -* flashing -turns flashing option on and off. -* flashRate -sets the flash rate. - -The LED properties can be defined in a stylesheet with the following code added to the .qss file. + -The name_of_led would be the name defined Designer's editor. + - ----- -LED #name_0f_led{ -qproperty-color: red; -qproperty-diameter: 20; -qproperty-flashRate: 150; -} ----- - -=== Checkbox Widget - -This widget allows the user to check a box to set a HAL pin true or false. + - -It is based on pyQT's QCheckButton - -=== Radio Button Widget - -This widget allows a user to set HAL pins true or false. + -Only one widget of a group can be true at a time. + - -It is based on pyQT's QRadioButton - -=== Push Button Widget - -This widget allows a user to set a HAL pin true or false. + -as an option it can be a toggle button. + -It also has other options: + - -==== LED indicator option - -.Indicated Action Button -image::images/qtvcp_actionButton.png["QTvcp led Action Button",scale="25%"] - -Indicator_option puts a 'LED' on the top of the button. + -It can be a triangle, circle, top bar or side bar. + -The size and position can be adjusted + -It will indicated the current state of the button, the state of a HAL pin or linuxcnc status. + -Use properties to customized the indicator (not all are applicable to every LED shape). + - ----- -on_color -off_color -indicator_size -circle_diameter -shape_option -right_edge_offset -top_edge_offset -height_fraction -width_fraction -corner_radius ----- - -The LED indicator color can be defined in a stylesheet with the following code added to the .qss file. + - ----- -Indicated_PushButton{ -qproperty-on_color: #000; -qproperty-off_color: #444; -} ----- - -or for a particular button: ----- -Indicated_PushButton #button_estop{ -qproperty-on_color: black; -qproperty-off_color: yellow; -} ----- - -Indicated PushButtons have exclusive options: + - -* indicator_HAL_pin_option -* indicator_status_option - -Indicator_HAL_pin_option will add a halpin, using the button name + '-led', that controls the + -button indicator state. + - -indicator_status_option will make the LED indicate the state of these selectable linuxcnc status: + ----- -Is Estopped -Is On -All Homed -Is Joint Homed -Idle -Paused -Flood -Mist -Block Delete -Optional Stop -Manual -MDI -Auto -Spindle Stopped -Spindle Fwd -Spindle Reverse -On Limits ----- -==== Text changes on state - -Choosing the checked_state_text_option allows a 'checkable' button to change the text based + -on it's checked state. It uses the properties 'true_state_string' and 'false_state_string' + -to specify the text for each state. + - -==== Call python commands on state - -The python_command_option allow small snippets of python code to be run from the push of a button, + -with out having to edit the handler file. (though it can call functions in the handler file) + -When using the command_string properties. + -'true_python_cmd_string' - a python command that will be called when the button is toggled true + -'false_python_cmd_string' - a python command that will be called when the button is toggled false + - + -The capitalized word 'INSTANCE' will give access to the widgets instances and handler functions. + -eg. 'INSTANCE.my_handler_function_call(True)' + -The capitalized word 'ACTION' will give access to qtvcp's ACTION library. + -eg. 'ACTION.TOGGLE_FLOOD()' + -The capitalized word 'PROGRAM_LOADER' will give access to qtvcp's PROGRAM_LOADER library. + -eg. 'PROGRAM_LOADER.load_halshow()' + -The capitalized word 'HAL' will give access to HAL's python module. + -eg. 'HAL.set_p('motion.probe-input','1')' + - -It is based on pyQT's QpushButton - -=== Focus Overlay Widget - -.Focus overlay example for confirm close prompt -image::images/qtvcp_focusOverlay.png["QTvcp foucus overlay",scale="25%"] - -This widget places a coloured overlay over the screen usually while a dialog is showing. + -Used to create a 'focused' feel and to draw attention to critical information. + -It can also show a translucent image. + -It can also display message text and buttons. + -This widget can be controller with STATUS messages. + - -=== Grid Layout Widget - -This widget controls if the widgets inside it are enabled or disabled. + -disabled widgets are typically a different colour and do not respond to actions. + - -It is based on pyQT's QGridLayout - -=== LCD Number Widget - -This widget displays HAL float values in a LCD looking way. + - -It is based on pyQT's QLCDNumber - -=== CamView Widget - -This widget displays a image from a web camera. + -It overlays an adjustable circular and cross hair target over the image. + -Camview was built with precise visual positioning in mind. + - -=== GeneralHALInput Widget - -This widget is used to connect an arbitrary QT widget to HAL using signals/slots. + -It is used for widgets that should respond to HAL pin changes. + - -=== GeneralHALOutput Widget - -This widget is used to connect an arbitrary QT widget to HAL using signals/slots. + -It is used for widgets that should control HAL pins. + - -=== WidgetSwitcher Widget - -This is used to switch the view of a multi-widget layout to show just one widget. + -This might be used to flip between a large view of a widget or a smaller multi widget view. + -I'ts different from a stacked widget as it can pull a widget from anywhere in the screen and + -place it in it's page with a different layout then it originally had. + -The original widget must be in a layout for switcher to put it back. + - + -In Designer you will add the widgetswitcher widget on screen. + -Right click the widgetswitcher and add a page, + -then populate it with widgets/layouts you wish to see in a default form. + -Then add as many pages as there are views to switch to. + -on each page add a layout widget. + -After adding the layout you must right click the widget switcher again + -and set the layout option. + -click on the widgetswitcher widget and then scroll to the bottom of the property editor. + -you are looking for the dynamic property 'widget_list'. + -double click the to the right of the widget_list property. + -A dialog will pop up allowing you to add the names of the widgets to move to the pages you added to the widgetswitcher. + - + -There are function calls to display specific widgets: + - - * [WidgetSwitcherName].show_id_widget(number) - * [WidgetSwitcherName].show_named_widget(widget_name) - * [WidgetSwitcherName].show_default() - * [WidgetSwitcherName].show_next() - -By calling one of these functions, you control what widget + -is currently displayed. show_default() shows the page 0 + -layout, and puts all other widgets back to where they were as initially built in Designer. + - - - -It is based on the QStack widget. + - -== Machine Controller Widgets - -These widgets interact to the Machine Controller state. - -=== Action Button Widget - -These buttons are used to control action of the machine controller. + -They are built on top of indicator_buttons so can have LEDs overlaid. + - -[NOTE] -If you left double click on this widget you can launch a dialog + -to set any of these action. The dialogs will help to set the + -right related data to the selected action. + -You can also change these properties directly in the property editor. + - -You can select one of these actions: + -'Estop' + -'Machine On' + -'Auto' + -'mdi' + -'manual' + -'run' + -'run_from_line status' (gets line number from STATUS message gcode-line-selected) + -'run_from_line slot' (gets line number from designer int/str slot setRunFromLine) + -'abort' + -'pause' + -'load dialog' (requires a dialog widget present) + -'Camview dialog' (requires camview dialog widget present) + -'origin offset dialog' (requires origin offset dialog widget present) + -'macro dialog' (requires macro dialog widget present) + -'Launch Halmeter' + -'Launch Status' + -'Launch Halshow' + -'Home' (set the joint number to -1 for all-home) + -'Unhome' (set the joint number to -1 for all-unhome) + -'Home Selected' Homes the joint/axis selected by STATUS + -'Unhome Selected' Unhomes the joint/axis selected by STATUS + -'zero axis' + -'zero G5X' zeros the current user coordinate system offsets + -'zero G92' zeros the optional G92 offsets + -'zero Z rotational' zeros the rotation offset + -'jog joint positive' (set the joint number) + -'jog joint negative' (set the joint number) + -'jog selected positive' (selected with a different widget or STATUS) + -'jog selected negative' (selected with a different widget or STATUS) + -'jog increment' (set metric/imperial/angular numbers) + -'jog rate' (set the float/alt float number) + -'feed override' (set the float/alt float number) + -'rapid override' (set the float/alt float number) + -'spindle override' (set the float/alt float number) + -'spindle fwd' + -'spindle backward' + -'spindle stop' + -'spindle up' + -'spindle down' + -'view change' (set view_type_string) + -'limits override' + -'flood' + -'mist' + -'block delete' + -'optional stop' + -'mdi command' (set command_string) + -'INI mdi number' (set ini_mdi_number) + -'dro absolute' + -'dro relative' + -'dro dtg' + -'exit screen' Closes down linuxcnc + -'Override limits' Temporarily override hard limits + -'launch dialogs' pops up dialogs if they are included in ui file. + -'set DRO to relative' + -'set DRO to absolute' + -'set DRO to distance-to-go' + - -These set attributes of the selected action. Availability depends on the widget. + - + -'toggle float option' - allows jog rate and overrides to toggle between two rates + -'joint number' - selects the joint/axis that the button controls + -'incr imperial number' - sets the imperial jog increment (set negative to ignore) + -'incr mm number' -sets the metric jog increment (set negative to ignore) + -'incr angular number' -sets the angular jog increment (set negative to ignore) + -'float number' - used for jograte and overrides + -'float alternate number' -for jograte and overrides that can toggle between two float numbers + -'view type string' - can be p, x, y, y2, z, z2, clear, zoom-in, zoom-out, pan-up, pan-down, + - pan-left, pan-right, rotate-up, rotate-down, rotate-cw, rotate-ccw + -'command string' - MDI command string that will be invoked if the MDI command action is selected. + -'ini_mdi_number' - a reference to the INI file [MDI_COMMAND_LIST] section. + -Set an integer of select one line under the INI's MDI_COMMAND line starting at 0. + -Then in the INI file, under the heading '[MDI_COMMAND_LIST]' add a line: + -'MDI_COMMAND=' + - -Action buttons are subclasssed from indicated_PushButton + - -==== LED indicator option -Indicator_option puts a 'LED' on the top of the button. + -It can be a triangle, circle, top bar or side bar. + -The size and position can be adjusted + -It will indicated the current state of the button, the state of a HAL pin or linuxcnc status. + -Use properties to customized the indicator (not all are applicable to every LED shape). + - ----- -on_color -off_color -indicator_size -circle_diameter -shape_option -right_edge_offset -top_edge_offset -height_fraction -width_fraction -corner_radius ----- - -The LED indicator color can be defined in a stylesheet with the following code added to the .qss file. + - ----- -Indicated_PushButton{ -qproperty-on_color: #000; -qproperty-off_color: #444; -} ----- - -or for a particular button: ----- -Indicated_PushButton #button_estop{ -qproperty-on_color: black; -qproperty-off_color: yellow; -} ----- - -Indicated PushButtons have exclusive options: + - -* indicator_HAL_pin_option -* indicator_status_option - -Indicator_HAL_pin_option will add a halpin, using the button name + '-led', that controls the + -button indicator state. + - -indicator_status_option will make the LED indicate the state of these selectable linuxcnc status: + ----- -Is Estopped -Is On -All Homed -Is Joint Homed -Idle -Paused -Flood -Mist -Block Delete -Optional Stop -Manual -MDI -Auto -Spindle Stopped -Spindle Fwd -Spindle Reverse -On Limits ----- -==== Text changes on state - -Choosing the checked_state_text_option allows a 'checkable' button to change the text based + -on it's checked state. It uses the properties 'true_state_string' and 'false_state_string' + -to specify the text for each state. + - -==== Call python commands on state - -The python_command_option allow small snippets of python code to be run from the push of a button, + -with out having to edit the handler file. (though it can call functions in the handler file) + -When using the command_string properties. + -'true_python_cmd_string' - a python command that will be called when the button is toggled true + -'false_python_cmd_string' - a python command that will be called when the button is toggled false + - + -The capitalized word 'INSTANCE' will give access to the widgets instances and handler functions. + -eg. 'INSTANCE.my_handler_function_call(True)' + -The capitalized word 'ACTION' will give access to qtvcp's ACTION library. + -eg. 'ACTION.TOGGLE_FLOOD()' + -The capitalized word 'PROGRAM_LOADER' will give access to qtvcp's PROGRAM_LOADER library. + -eg. 'PROGRAM_LOADER.load_halshow()' + -The capitalized word 'HAL' will give access to HAL's python module. + -eg. 'HAL.set_p('motion.probe-input','1')' + -Indicated PushButtons and Actionbuttons are based on pyQT's QPushButton - -=== RoundButton - -Round buttons work the same as ActionButtons other then the button is cropped round. + -They are intended only to be visually different. + -They have two path properties for displaying images on true and false. + - -=== Axis Tool Button -This allows one to select and set an AXIS. -If the button is set checkable, it will indicate which axis is selected. + -If you press and hold the button a pop up menu will show allowing one to: + - -* Zero the axis -* divide the axis by 2 -* set the axis arbitrarily -* reset the axis to the last number recorded - -You select the axis by setting the joint number + -You can select a halpin option that is set true when the axis is selected + - -It is based on pyQT's QToolButton - -=== Camview Widget -This is used to align the work piece or zero part features using a webcam. + -It uses opencv vision library. + - -=== DRO Widget -This will display the current position of an axis. + -Qjoint_number -Qreference_type -metric_template -imperial_template -angular_template - - -It is based on pyQT's QLabel - -=== GcodeDisplay - -It is based on pyQT's - -=== GcodeEditor Widget -This displays Gcode in text form. It will highlight the currently running line. + -This can also display MDI history when linuxcnc is in MDI mode. + -This can also display log entries when linuxcnc is in MANUAL mode. + -This will also display preference file entries if you enter 'PREFERENCE' in capitals + -into the MDILine widget. + -It has a signal percentDone(int) that that can be connected to a slot (such as a + -progressBar to display percent run) - -It is based on pyQT's QsciScintilla + - -=== GCodeGraphics Widget - -.Graphics Display -image::images/qtvcp_gcodeGraphics.png["QTvcp Gcode Graphics",scale="25%"] - -This Displays the current Gcode in a graphical form. + - -_view -_dro -_dtg -_metric -overlay -_offsets -background_color - -==== ACTION functions -The ACTION library can control the gcode graphics widget. + -'ACTION.RELOAD_DISPLAY()' -reload the current program which recalculates the origin/offsets. + -'ACTION.SET_GRAPHICS_VIEW(view)' The following commands can be sent: ----- -clear -zoom-in -zoom-out -pan-up -pan-down -pan-right -pan-left -rotate-cw -rotate-ccw -rotate-up -rotate-down -overlay-dro-on -overlay-dro-off -overlay-offsets-on -overlay-offsets-off -alpha-mode-on -alpha-mode-off -inhibit-selection-on -inhibit-selection-off -grid-size -P -X -Y -Y2 -Z -Z2 ----- -'ACTION.ADJUST_PAN(X,Y)' -directly set the relative pan of view in x and y direction - -'ACTION.ADJUST_ROTATE(X,Y)' -directly set the relative rotation of view in x and y direction - -It is based on pyQT's opengl widget. + - -=== StateLabel Widget -This will display a label based on true/false states of the machine controller. + -You can select different text based on true or false. + -You can use Rich text for different fonts/colours etc. + -These states are selectable: + -CSS Mode + -Diameter Mode + -FPR Mode + -Metric Mode + - -It is based on pyQT's QLabel - -=== StatusLabel Widget -This will display a label based on variable states of the machine controller. + -You can change how the state will be display by substituting + -You can use Rich text for different fonts/colors etc. + -These states are selectable: + -CSS Mode + -Feed Override + -Rapid Override + -Spindle Override + -Jograte + -Jogincr + -Tool Number + -Current Feedrate + -Requested Spindle Speed + -User System + - -It is based on pyQT's QLabel - -=== StatusImageSwicher Widget -Status image switcher will switch between images based on linuxcnc states. + -'watch spindle' would toggle between 3 images ( stop, fwd, revs) + -'watch axis homed' would toggle between 2 images ( axis not homed, axis homed) + -'watch all homed' would toggle between 2 images ( not all homed, all homed) + -'watch hard limits' would toggle between 2 images or one per joint + - -Here is an example of using it to display an icon of Z axis homing state: + - -image::images/statusImageSwitcher.png["QTvcp Status Image Switcher",scale="25%"] - -In the properties section notice that: + -'watch axis homed' is checked + -'axis letter' is set to Z + - -If you double click the 'image list' a dialog will show and allow you to add image paths to. + -If you have one image as an icon and one clear image then that will look like it shows and hides the icon. + - -Selecting image paths can be done by selecting the 'pixmap' property and selecting an image. + -Note: The pixmap setting is for test display only and will be ignored outside of Designer. + -Right click the image name and you should see 'copy path' + -Click 'copy path' + -Now double click the 'image list' property so the dialog shows. + -Click the 'New' button + -Paste the image path in the entry box + -Do that again for the next image - use a clear image to represent a hidden icon. + - -You can test display the images from the image list by changing the 'image number' + -In this case 0 is unhomed 1 would be homed + -This is for test display only and will be ignored outside of Designer. + - -=== StatusStacked -This widget displays one of three panels based on linuxcnc's mode. + -This allows you to automatically display different widgets on Manual, MDI and Auto modes. + - -todo + -It is based on pyQT's QStacked widget. - -=== Jog Increments Widget - -This widget allows the user to select jog increment values for jogging. + -The jogging values come from the INI file under: '[DISPLAY]', 'INCREMENTS' + -or '[DISPLAY]', 'ANGULAR_INCREMENTS' + -This will be available to all widgets through STATUS. + -You can select linear or angular increments by the property 'linear_option' + -in Designer property editor. + - -It is based on pyQT's combobox - -=== ScreenOption widget - -This widget doesn't add anything visually to a screen but sets up important + -options. This is the preferred way to use these options + - -.These include: - -* 'notify_option': -Hooking into the desktop notification bubbles for error and messages - -* 'catch_close_option': -catching the close event to pop up a 'are you sure' prompt - -* 'catch_error_option': -monitoring the linuxcnc error channel. This also sends the message + -through STATUS to anything that registers - -* 'play_sounds_option': -playing sounds using 'beep', 'espeak' and the system sound - -* 'use_pref_file_option': -setting up a preference filepath + -Using the magic word 'WORKINGFOLDER' in the preference file path will be replaced with + -the launched configuration path ie. WORKINFOLDER/my_preferences - -* 'embedded_program_option': -Embed programs defined in the INI. There is a property for a default + -location. + - -* 'focusOverlay_option': -Focus_overlay will put an image or colored panel over the main + -screen to emphasize focus to an external event - typically a dialog. + - -* 'messageDialog_option': -sets up the message dialog - used for general messages - -* 'closeDialog_option': -sets up the standard close screen prompt dialog - -* 'entryDiallog_option': -sets up the numerical entry dialog - -* 'toolDialog_option': -sets up the manual tool change dialog, including HAL pin. - -* 'fileDialog_option': -sets up the file choosing dialog. - -* 'vesaProbe_option': -sets up the vera style probe dialog - -* 'macroTabeDialog_option': -sets up the macro selection dialog - -* 'camViewDialog_option': -sets up the camera alignment dialog - -* 'toolOffset_option': -sets up the tool offset display/editor dialog - -* 'originOffset_option': -sets up the origin display/editor dialog - -* 'calculatorDialog_option': -sets up the calcylatory entry dialog - -* 'machineLogDialog_option': -sets up a dialog to display logs from the machine and qtvcp - -=== StatusSlider Widget - -This widget allow the user to adjust linuxcnc setting via a slide. + - -.The widget can adjust: -* Jog rate -* Angular jog rate -* Feed rate -* spindle override rate -* Rapid override rate - -It is based on pyQT's QSlider - -=== State LED Widget - -This widget gives status on the selected linuxcnc state. + - -The state options are: + - -* is_paused_status -* is_estopped_status -* is_on_status -* is_idle_status_ -* is_homed_status -* is_flood_status -* is_mist_status -* is_block_delete_status -* is_optional_stop_status -* is_joint_homed_status -* is_limits_overridden_status -* is_manual_status -* is_mdi_status -* is_auto_status -* is_spindle_stopped_status -* is_spindle_fwd_status -* is_spindle_rev_status -* is_spindle_at_speed_status - -There are properties that can be changed: - -* halpin_option - Adds an output pin that reflects selected state -* invert_state_status - Invert the LED state compared to the linuxcnc state. -* diameter -Diameter of the LED -* color - Color of the LED when on. -* off_color - Color of the LED when off. -* alignment - Qt Aliment hint. -* state - Current state of LED (for testing in designer) -* flashing - Turns flashing option on and off. -* flashRate - Sets the flash rate. - -The LED properties can be defined in a stylesheet with the following code added to the .qss file. + -The name_of_led would be the name defined Designer's editor. + - ----- -State_LED #name_0f_led{ -qproperty-color: red; -qproperty-diameter: 20; -qproperty-flashRate: 150; -} ----- - -It is based on the LED widget - -=== StatusAdjustmentBar - -This widget allows setting values using buttons while displaying a bar. + -It also has an optional hi/low toggle button that can be held down to set the + -levels. - -.The widget can adjust: -* Jog rate -* angular jog rate -* Feed rate -* Spindle override rate -* Rapid override rate - -It is based on pyQT's QProgressBar - -=== SystemToolButton -This widget allows you to manually select a user system by pressing and holding. + -If you don't set the button text it will automatically update to the current system. + - -It is based on pyQT's QToolButton - -=== MacroTab Widget - -.Macrotab -image::images/qtvcp_macro.png["QTvcp led",scale="25%"] - -This Widget allows a user to select and adjust special macro programs for -doing small jobs. + -It uses images for visual representation of the macro and for an icon. + -It searches for special macros using the INI definition: + -[source,INI] ----- -[RS274NGC] -SUBROUTINE_PATH = ----- -The macros are Oword subroutine with special comments to work with the launcher. + -The first three lines must have the keywords: (The forth is optional) + -Here is a sample for the first four lines in an Oword file: + ----- -; MACROCOMMAND=Entry1,Entry2 -; MACRODEFAULTS=0,true -; MACROIMAGE=my_image.svg,Icon layer number, Macro layer number -; MACROOPTIONS=load:yes,save:yes,default:default.txt,path:~/macros ----- - -==== MACROCOMMAND - -This is the first line in the Oword file. + -It is a comma separated list of text to display above an entry. + -There will be one for every variable required in the Oword function. + -If the macro does not require variables, only add '; MACROCOMMAND=' - -==== MACRODEFAULT - -This must be the second line in the Oword file. + -It is a comma separated list of the default values for each variable in the Oword function. + -If you use the word 'true' or 'false' in the list, a checkbutton will be shown. - -==== MACROIMAGE - -This must be the third line in the Oword file. + -if using a SVG image file, the must end b .svg + -The image must be added to an svg layer. + -It uses layers to define different images for macro and icon. + -The first entry will be the SVG image file name. + -It is assumed to be in the same folder as the Oword file. + -The second item will be the image layer. + -the optional third entry will be the icon layer. + -If the third entry is missing, the same image will be used for macro and icon. + - -If using a png/jpg image file . + -The first entry is the image filename. + -It is assumed the image file are in the same folder an the macro. + -The optional second entry will be the icon filename. + -If the second entry is missing the same image will be used for macro and image. + - -If the keyword is present but the entries are missing , no images will be used. + - -==== MACRODEFAULT -This optional line must be the forth line in the Oword file. + -It is a comma separated list of keyword and data. + - - * 'LOAD:yes' - show a load button - * 'SAVE:yes' -show a save button - -=== MDILine Widget - -One can enter MDI commands here. A popup keyboard is available + -There are also embedded commands available from this Widget. + -Type, in all capitals, any of these commands to load the respective program: + - -* HALMETER + -* HALSHOW + -* HALSCOPE + -* STATUS + -* CALIBRATION + -* CLASSICLADDER + -* PREFERENCE - Loads the preference file onto the gcodeEditor + - -It is based on pyQT's QLineEdit + - -=== MDIHistory - -Displays a scrollable list of past MDI command. + -A edit line is embedded for MDI commands. + -There are also embedded commands available from this Widget + -Type, in all capitals, any of these commands to load the respective program: + - -* HALMETER + -* HALSHOW + -* HALSCOPE + -* STATUS + -* CALIBRATION + -* CLASSICLADDER + -* PREFERENCE - Loads the preference file onto the gcodeEditor + - -The history is recorded on a file defined in the INI. + -under the heading [DISPLAY] (this shows the default) + - -[source,ini] ----- -MDI_HISTORY_FILE = '~/.axis_mdi_history' ----- - -=== MDITouchy - -.MDI Touchy -image::images/qtvcp_mdiTouchy.png["QTvcp MDI Touchy",scale="25%"] - -This widget display button and entry lines for use with entering MDI commands. + -It is based on Linuxcnc's Touchy screen's MDI entry process. + -It's large buttons are most useful for touch screens. + - + -To use MDITouchy, first press one of the 'G/XY', 'G/RO', 'M' or 'T' button. + -On the left, will show the current line that can be filled out, then press 'Next' for the next line. + -'Calc' will pop up a calculator dialog. + -'Clear' clears th ecurrent entry. + -'Back' allows you to change previous line entries. + - + -The widget requires an explicied call to MDITouchu's python code to actually run the MDI command + -For handler file code: if the widget was named mditouchy in designer, this command would + -run the displayed MDI command. + - -[source,python] ----- -self.w.mditouchy.run_command() ----- - -For action button use: if the widget was named mditouchy in designer, + -use the action button's 'Call python commands' option and enter: + -[source,python] ----- -INSTANCE.mditouchy.run_command() ----- - -The macro button will cycle though macro's defined in the INI heading [DISPLAY] + -add one or more 'MACRO = ' lines. Each should be of the format: + - -[source,ini] ----- -MACRO = increment xinc yinc ----- -In this example, increment is the name of the macro, and it accepts two -parameters, named xinc and yinc. - -Now, place the macro in a file named 'increment.ngc', in the + -'PROGRAM_PREFIX' directory or any directory in the 'SUBROUTINE_PATH'. + -(specified in the INI file) + - -It should look like: + - ----- -O sub -G91 G0 X#1 Y#2 -G90 -O endsub ----- - -Notice the name of the sub matches the file name and macro name exactly, + -including case. + - -When you invoke the macro by pressing the Macro button + -you can enter values for xinc and yinc. These are + -passed to the macro as '#1' and '#2' respectively. Parameters you + -leave empty are passed as value 0. + - -If there are several different macros, press the Macro button + -repeatedly to cycle through them. + - -In this simple example, if you enter -1 for xinc and invoke the running of the + -MDI cycle, a rapid 'G0' move will be invoked, moving one unit to + -the left. + - -This macro capability is useful for edge/hole probing and other setup + -tasks, as well as perhaps hole milling or other simple operations + -that can be done from the panel without requiring specially-written + -gcode programs. + - -=== OriginOffsetView Widget - -This widget allows one to modify User System origin offsets directly + -It will update the table for changes made internally by linuxcnc. + -It is based on pyQT's - -=== State Enable Gridlayout Widgets - -This is a container that other widgets can be placed in. + -It will 'grey-out' (disable) the widgets inside it depending on linuxcnc's current state. + -It can selectably react to: + - -* machine on -* interpreter idle -* estop off -* all-homed - -It is based on pyQT's QGridLayout + - -=== MachineLog - -It is based on pyQT's - -=== JointEnableWidget - -It is based on pyQT's - -=== StatusImageSwitcher -This widget will display images based on linuxcnc status. + -You can watch: + - -* the state of the spindle. -* the state of all homed -* the state of a certain axis homed -* the state of hard limits - -It is based on pyQT's - -=== FileManager -.FileManager -image::images/qtvcp_fileManager.png["QTvcp File Manager Widget",scale="25%"] - -This widget is used to select files to load. + -It has a the ability to scroll the names with hardware such as a MPG. + - -one can class patch the function 'load(self,fname):' to customize file loading. + - -the function 'getCurrentSelected()' will return a python tuple, containing + -the file path and whether it's a file. + - -[source,python] ----- -temp = FILEMANAGER.getCurrentSelected() -print 'filepath={}'.format(temp[0]) -if temp[1]: - print 'Is a file' ----- - -It is based on pyQT's - -=== RadioAxisSelector - -It is based on pyQT's - - -=== BasicProbe - -.BasicProbe -image::images/qtvcp_basicProbe.png["QTvcp basicProbe widget",scale="25%"] - -Widget for probing on a mill. - -requires extra analog motion pins for probe settings. - - -== Dialog Widgets - -Dialogs are used to present or request immediately required information in a focused way. + -The typical used dialogs can be loaded using the screenoptions widget. + -You can also add them directly to the ui - but each dialog must have a unique launch name + -or you will see multiple dialogs displayed, one after another. + -You can show dialogs directly with python code but a safer way is to use STATUS messages to + -request the dialog to launch and to return the gathered information. + - -To set this up first register to catch the 'general' message from STATUS: -[source,python] ----- -STATUS.connect('general',self.return_value) ----- - -Add a function to call a dialog: + -This function must build a message DICT to send to the dialog. + -This message will be passed back in the general message with the addition + -of the RETURN variable. It is possible to add extra user information to the message. + -The dialog will ignore these and pass them back. + -'NAME' = launch code name of dialog to show. + -'ID' = a unique id so we process only a dialog that we requested. + -'TITLE' = the title to use on the dialog - -[source,python] ----- - def show_dialog(self): - mess = {'NAME':'ENTRY','ID':'__test1__', - 'TITLE':'Test Entry'} - ACTION.CALL_DIALOG, mess) ----- - -Add a callback function that processes the general message: + -This function should check the the name and id is the same as + -we sent, then it can extract the return value and any user variables. + -Keep in mind this function will get all general messages so the DICT keynames + -are not guaranteed to be there. Using the .get() function and or using try/except + -is advisable. -[source,python] ----- - # process the STATUS return message - def return_value(self, w, message): - rtn = message.get('RETURN') - code = bool(message.get('ID') == '__test1__') - name = bool(message.get('NAME') == 'ENTRY') - if code and name and not rtn is None: - print ('Entry return value from {} = {}').format(code, rtn) ----- - - -=== Lcnc_Dialog - -This is a general message dialog widget. + -If there is an Focus Overlay widget present, it can signal it to display. + -If the sound library is set up it can play sounds. + -There are options that can be set when requesting a dialog, these would be added to + -the message dict. + - -* 'TITLE':'Attention' -Title of the dialog window -* 'MESSAGE':'your text' -Title message text in bold -* 'MORE':'your more text' - standard text under the heading -* 'DETAILS':'hidden text' - initial hidden text -* 'TYPE':'OK' -type can be 'OK', 'YESNO', 'OKCANCEL' -* 'ICON':'INFO' -icon can be 'QUESTION','INFO','CRITICAL','WARNING' -* 'PINNAME' -not implemented yet -* 'FOCUSTEXT':None -text to display if focus overlay is used. Use None for no text. -* 'FOCUSCOLOR':QColor(0, 0, 0, 150) - color to use if focus overlay is used -* 'PLAYALERT' :'SPEAK alert!'- sound to play if sound is available - -When using STATUS's 'request-dialog' function, the default launch name is 'MESSAGE' + - -It is based on pyQT's QMessagebox - -=== Dialog Tool Change Widget - -.Manual Tool Change -image::images/qtvcp_toolChange.png["QTvcp Manual Tool Change Dialog",scale="25%"] - -This is used as a manual tool change prompt. + -It has HAL pins to connect to the machine controller + -The pins are named the same as the original AXIS manual tool prompt and works the same. + -the tool change dialog can only be launched by HAL pins. + -If there is a Focus Overlay widget present, it will signal it to display. + - -It is based on pyQT's QMessagebox - -=== Dialog File Chooser Widget - -.File Dialog -image::images/qtvcp_fileDialog.png["QTvcp file dialog",scale="25%"] - -This is used to load Gcode files + -If there is a Focus Overlay widget present, it will signal it to display. + -When using STATUS's 'request-dialog' function, the default launch names are 'LOAD' or 'SAVE' + - -There are options that can be set when requesting a dialog, these would be added to + -the message dict. + - -* EXTENSIONS -* FILENAME -* DIRECTORY - -An example python call, for a load dialog: + -[source,python] ----- -mess = {'NAME':'LOAD','ID':'_MY_DIALOG_', - 'TITLE':'Load Some text File', - 'FILENAME':'~/linuxcnc/nc_files/someprogram.txt', - 'EXTENSIONS':'Text Files (*.txt);;ALL Files (*.*)' - } -ACTION.CALL_DIALOG(mess) ----- - -And for saving + -[source,python] ----- -mess = {'NAME':'SAVE','ID':'_MY_DIALOG_', - 'TITLE':'Save Some text File', - 'FILENAME':'~/linuxcnc/nc_files/someprogram.txt', - 'EXTENSIONS':'Text Files (*.txt);;ALL Files (*.*)' - } -ACTION.CALL_DIALOG(mess) ----- -It is based on pyQT's QMessagebox - -=== Dialog Origin Offset Widget - -.Offsets -image::images/qtvcp_offsetpage.png["QTvcp origin Offset Page",scale="25%"] - -This widget allows one to modify User System origin offsets directly + -It is in a dialog form + -If there is an Focus Overlay widget present, it will signal it to display. + -When using STATUS's 'request-dialog' function, the default launch name is 'ORIGINOFFSET' + - -It is based on pyQT's QDialog - -=== Dialog tool Offset Widget - -.Tool Offsets -image::images/qtvcp_toolOffset.png["QTvcp Tool Offset Page",scale="25%"] - -This widget allows one to modify Tool offsets directly + -It is in a dialog form + -If there is an Focus Overlay widget present, it will signal it to display. + -When using STATUS's 'request-dialog' function, the default launch name is 'TOOLOFFSET' + - -It is based on pyQT's QDialog - -=== Dialog MacroTab - -This is a dialog for displaying the macrotab widget. + -Macrotab displays a choice of macro programs to run using icons. + -If there is a Focus Overlay widget present, it will signal it to display. + -When using STATUS's 'request-dialog' function, the default launch name is 'MACROTAB' + - -=== Dialog camview - -This is a dialog to display the camview object for Webcam part alignment. + -When using STATUS's 'request-dialog' function, the default launch name is 'CAMVIEW' + -It is based on pyQT's QDialog - -=== Dialog entry - -This is a dialog to display an edit line for information entry, such as origin offset. + -It returns the entry via STATUS messages using a python DICT. + -The DICT contains at minimum, the name of the dialog requested and an id code. + -When using STATUS's 'request-dialog' function, the default launch name is 'ENTRY' + - + - -It is based on pyQT's QDialog - -=== Dialog Calculator - -.Calculator -image::images/qtvcp_calculator.png["QTvcp Calculator",scale="25%"] - -This is a dialog to display a calculator for numeric entry, such as origin offset. + -It returns the entry via STATUS messages using a python DICT. + -The DICT contains at minimum, the name of the dialog requested and an id code. + -When using STATUS's 'request-dialog' function, the default launch name is 'CALCULATOR' + -It is based on pyQT's QDialog - -=== Dialog Run From Line - -.Run-from-line Dialog -image::images/qtvcp_runFromLine.png["QTvcp Run-from-line",scale="25%"] - -Dialog to preset spindle settings before running a program from a specific line. - -=== Dialog VersaProbe - -.Versa Probe Dialog -image::images/qtvcp_versaProbe.png["QTvcp Versa Probe",scale="25%"] - -This is a dialog to display A probing screen based on Versa Probe. + -It is based on pyQT's QDialog - -=== Dialog MachineLogDialog - -.Machine Log Dialog -image::images/qtvcp_machineLog.png["QTvcp MachineLog Dialog",scale="25%"] - -This is a dialog to display the user machine log and qtvcp's debugging log. + -It is based on pyQT's QDialog - -== Other -Other available widgets - -=== Nurbs Editor - -.Nurbs Editor -image::images/qtvcp_nurbsEditor.png["QTvcp nurbs editor",scale="25%"] - -The Nurbs editor allows you to manipulate a nurbs based geometry on screen and then + -convert this to gcode. you can edit the gcode on screen and then send it to linuxcnc. - diff --git a/docs/src/gui/qtvcp.adoc b/docs/src/gui/qtvcp.adoc index 187d461b2e..a76208e24a 100644 --- a/docs/src/gui/qtvcp.adoc +++ b/docs/src/gui/qtvcp.adoc @@ -3,11 +3,11 @@ [[cha:qtvcp]] = Qtvcp -Qtvcp is an infrastructure to display a custom CNC screen or control panel in LinuxCNC. + -It displays a UI file built with the QTDesigner screen editor or combines this + -with python programming to create a GUI screen for running a CNC machine. + -Qtvcp is completely customizable - you can add different buttons and status LEDs etc. + -or add python code for even finer grain customization. + +Qtvcp is an infrastructure to display a custom CNC screen or control panel in LinuxCNC. +It displays a UI file built with the QTDesigner screen editor or combines this +with python programming to create a GUI screen for running a CNC machine. +Qtvcp is completely customizable - you can add different buttons and status LEDs etc. +or add python code for even finer grain customization. .qtdragon - 3 or 4 Axis Sample image::images/silverdragon.png["QTDragon Router",align="left"] @@ -27,39 +27,39 @@ image::images/test_panel.png["Test Panel",align="left"] [[sec:qtvcp-overview]] == Overview(((QtVcp Overview))) -There are two files that can be used, individually or in combination to add + -customization. + -A UI file that is made with QT's Designer graphical editor. + -A handler file which is a text file with python code. + -Normally qtvcp uses the stock UI and handler file. + -You can specify qtvcp to use 'local' UI and handler files. + -A 'local' file is one that is in the configuration folder that defines the + -rest of the machine's requirements. + -One is not restricted to adding a custom panel on the right or a custom tab. + -qtvcp leverages 'QT Designer' (the editor) and 'PyQT5' (the widget toolkit). + -QTvcp has some special widgets and actions added just for LinuxCNC. + -There are special widgets to bridge third party widgets to HAL pins. + -It's possible to create widget responses by connecting signals to python + -code in the handler file. + +There are two files that can be used, individually or in combination to add +customization. +A UI file that is made with QT's Designer graphical editor. +A handler file which is a text file with python code. +Normally qtvcp uses the stock UI and handler file. +You can specify qtvcp to use 'local' UI and handler files. +A 'local' file is one that is in the configuration folder that defines the +rest of the machine's requirements. +One is not restricted to adding a custom panel on the right or a custom tab. +qtvcp leverages 'QT Designer' (the editor) and 'PyQT5' (the widget toolkit). +QTvcp has some special widgets and actions added just for LinuxCNC. +There are special widgets to bridge third party widgets to HAL pins. +It's possible to create widget responses by connecting signals to python +code in the handler file. === QTvcp Widgets -Qtvcp uses the PyQt5 toolkit's widgets for linuxcnc integration. + -Widget is the general name for objects such as buttons and labels in PyQT5. + -You are free to use any available widgets in the QTDesigner editor. + -There are also special widgets made for linuxcnc that make integration easier. + -This are split in three heading on the left side of the editor. + -One is for HAL only widgets. + -One is for cnc control widgets. + -One is for dialog widgets. + -you are free to mix them in any way on your panel. + -A very important widget for CNC control is the screenoptions widget. + -It does not add anything visually to the screen. + -But allows important details to be selected rather then be coded in the handler file. + +Qtvcp uses the PyQt5 toolkit's widgets for linuxcnc integration. +Widget is the general name for objects such as buttons and labels in PyQT5. +You are free to use any available widgets in the QTDesigner editor. +There are also special widgets made for linuxcnc that make integration easier. +This are split in three heading on the left side of the editor. +One is for HAL only widgets. +One is for cnc control widgets. +One is for dialog widgets. +you are free to mix them in any way on your panel. +A very important widget for CNC control is the screenoptions widget. +It does not add anything visually to the screen. +But allows important details to be selected rather then be coded in the handler file. === INI Settings -If you are using this to make a CNC control screen: + +If you are using this to make a CNC control screen: Under the [DISPLAY] heading: ---- @@ -81,9 +81,10 @@ DISPLAY = qtvcp is the base name of the .ui and _handler.py files. If is missing the default screen will be loaded. ---- -Qtvcp assumes the UI file and the handler file use this same base name. + -Qtvcp will search the LinuxCNC configuration file that was launched first for the files, + -then in the system skin folder. (The skin folders holds standard screens.) + + +Qtvcp assumes the UI file and the handler file use this same base name. +Qtvcp will search the LinuxCNC configuration file that was launched first for the files, +then in the system skin folder. (The skin folders holds standard screens.) ---- [DISPLAY] @@ -92,33 +93,34 @@ GRAPHICS_CYCLE_TIME = 100 HALPIN_CYCLE = 100 ---- -Adjust the response rate of the GUI updates in milli seconds. Defaults to 100, useable range 50 - 200 + -The widgets, graphics and HAL pin update can be set separately. + -If the update time is not set right the screen can become unresponsive or very jerky. + +Adjust the response rate of the GUI updates in milli seconds. Defaults to 100, useable range 50 - 200 +The widgets, graphics and HAL pin update can be set separately. +If the update time is not set right the screen can become unresponsive or very jerky. === QTDesigner UI File -A designer file is a text file organized in the XML standard that describes the + -layout and the widgets of the screen. Pyqt5 uses this file to build the display + -and react to those widgets. The QTDesigner editor makes it relatively easy to build + -and edit this file. + +A designer file is a text file organized in the XML standard that describes the +layout and the widgets of the screen. Pyqt5 uses this file to build the display +and react to those widgets. The QTDesigner editor makes it relatively easy to build +and edit this file. === Handler Files -A handler file is a file containing python code, which qtvcp adds to it's + -default routines. A handler file allows one to modify defaults, or add logic + -to a qtvcp skin without having to modify qtvcp's core code. + -In this way you can have custom behaviour. + -If present a handler file will be loaded. + -Only one file is allowed. + +A handler file is a file containing python code, which qtvcp adds to it's +default routines. A handler file allows one to modify defaults, or add logic +to a qtvcp skin without having to modify qtvcp's core code. +In this way you can have custom behaviour. +If present a handler file will be loaded. +Only one file is allowed. === Libraries modules -Qtvcp as built does little more then display the screen and react to widgets. + -For more prebuilt behaviours there are available libraries. + -(found in lib/python/qtvcp/lib in RIP linuxcnc install) + -libraries are prebuilt python modules that give added features to Qtvcp. + -In this way you can select what features you want - yet don't have to build common ones yourself. + -Such libraries include: + + +Qtvcp as built does little more then display the screen and react to widgets. +For more prebuilt behaviours there are available libraries. +(found in lib/python/qtvcp/lib in RIP linuxcnc install) +libraries are prebuilt python modules that give added features to Qtvcp. +In this way you can select what features you want - yet don't have to build common ones yourself. +Such libraries include: audio_player + aux_program_loader + @@ -127,34 +129,35 @@ message + preferences + notify + virtual_keyboard + -machine_log + - +machine_log === Themes -Themes are a way to modify the look and feel of the widgets on the screen. + +Themes are a way to modify the look and feel of the widgets on the screen. For instance the color or size of buttons and sliders can be changed using -themes. + -The Windows theme is default for screens. System theme is default for panels. + -to see available themes load qtvcp with -d -t SHOWTHEMES + +themes. +The Windows theme is default for screens. System theme is default for panels. +to see available themes load qtvcp with -d -t SHOWTHEMES . -qtvcp can also be customized with Qt stylesheets using css. + +qtvcp can also be customized with Qt stylesheets using css. === Local Files -If present, local UI files in the configuration folder will be loaded instead + -of the stock UI files. Local UI files allow you to use your customized + -designs rather then the default screens. + -QTVCP will look for a folder name MYNAME (in the launched configuration folder that holds the INI file). + -In that folder QTVCP will load any of the available files; MYNAME.ui, MYNAME_handler.py and MYNAME.qss. + +If present, local UI files in the configuration folder will be loaded instead +of the stock UI files. Local UI files allow you to use your customized +designs rather then the default screens. +QTVCP will look for a folder name MYNAME (in the launched configuration folder that holds the INI file). +In that folder QTVCP will load any of the available files; MYNAME.ui, MYNAME_handler.py and MYNAME.qss. === Modifying Stock Screens -Ther are three ways to customize a screen/panel. + -.Minor StyleSheet changes: + -StyleSheets can be used to set Qt properties. + -If a widget uses properties they usually can be modified by stylesheets. + -ie: + +Ther are three ways to customize a screen/panel. + +.Minor StyleSheet changes: +StyleSheets can be used to set Qt properties. +If a widget uses properties they usually can be modified by stylesheets. +ie: + ---- State_LED #name_0f_led{ qproperty-color: red; @@ -163,26 +166,28 @@ qproperty-flashRate: 150; } ---- -.Minor python code changes: + -A file can be added to add commands to the screen, after the handlerfile is parsed. + -In the INI file under the [DISPLAY] heading add USER_COMMAND_FILE = _PATH_ + -_PATH_ can be any valid path, it can use '~' for home directory or 'WORKINGDIRECTORY' or + -'CONFIGDIRECTORY' to represent Qtvcp's idea of those directories. + -ie: + +.Minor python code changes: +A file can be added to add commands to the screen, after the handlerfile is parsed. +In the INI file under the [DISPLAY] heading add USER_COMMAND_FILE = _PATH_ +_PATH_ can be any valid path, it can use '~' for home directory or 'WORKINGDIRECTORY' or +'CONFIGDIRECTORY' to represent Qtvcp's idea of those directories. +ie: + ---- [DISPLAY] USER_COMMAND_FILE = CONFIGDIRECTORY/qtdragon_added_commands ---- -If no entry is found in the INI, Qtvcp will look in the default path. + -The default path is in the configuration directory as a hidden file using the screen basename and rc. + + +If no entry is found in the INI, Qtvcp will look in the default path. +The default path is in the configuration directory as a hidden file using the screen basename and rc. ie: CONFIGDIRECTORY/.qtdragonrc -This file will be read and executed as python code in context of the handler file. + -Only local functions and local attributes can be referenced. + -Global libraries can not be referenced. (usual seen as all capital words with no preceding self.) + -What can be used can vary by screen and development cycle. + +This file will be read and executed as python code in context of the handler file. +Only local functions and local attributes can be referenced. +Global libraries can not be referenced. (usual seen as all capital words with no preceding self.) +What can be used can vary by screen and development cycle. -valid example: + +.valid example: [source,python] ---- self.w.setWindowTitle('My Title Test') @@ -190,21 +195,21 @@ self.w.setWindowTitle('My Title Test') .Full creative control: -If you wish to modify a stock screen with full control, copy it's UI and handler file to your configuration folder. + -There is a QtVCP panel to help with this. + -Open a terminal and type 'qtvcp copy_dialog' and a dialog will show to select the screen and + -destination folder. This will copy all the file - delete the ones you don't wish to modify so + -that the original files will be used. + -It you wish to name your screen differently then the builtin screen's default name - + +If you wish to modify a stock screen with full control, copy it's UI and handler file to your configuration folder. +There is a QtVCP panel to help with this. +Open a terminal and type 'qtvcp copy_dialog' and a dialog will show to select the screen and +destination folder. This will copy all the file - delete the ones you don't wish to modify so +that the original files will be used. +It you wish to name your screen differently then the builtin screen's default name - change the basename in the edit box. == VCP Panels -Qtvcp can be used to create control panels that interface with HAL. + +Qtvcp can be used to create control panels that interface with HAL. === Builtin panels -There are several builtin HAL panels available. + -in a terminal type 'qtvcp' to see a list. + +There are several builtin HAL panels available. +in a terminal type 'qtvcp' to see a list. * test_panel - collect of useful widgets for testing HAL component. Including speech of LED state. * cam_align - a camera display widget for rotational alignment @@ -219,9 +224,9 @@ image::images/qtvismach.png["QtVismach Mill",align="left"] loadusr qtvcp test_panel ---- -You can of course make your own panel and load it. + -If you made a ui file named 'my_panel.ui' and name the following HAL file, 'my_panel.hal' + -You would then load this from a terminal with halrun -I -f my_panel.hal + +You can of course make your own panel and load it. +If you made a ui file named 'my_panel.ui' and name the following HAL file, 'my_panel.hal' +You would then load this from a terminal with halrun -I -f my_panel.hal [source,{hal}] ---- @@ -249,8 +254,8 @@ net s32-in1 test_panel.doublescale_1-s classicladder.0.s32in-00 start ---- -In this case we load qtvcp using -Wn; which waits for the panel to finish loading before + -continuing to run the next HAL command. This is so the HAL pins from the panel are finished + +In this case we load qtvcp using -Wn; which waits for the panel to finish loading before +continuing to run the next HAL command. This is so the HAL pins from the panel are finished in case the are used in the rest of the file. == Build a simple clean-sheet custom screen @@ -260,156 +265,158 @@ image::images/qtvcp_tester.png["QTscreen Mill",align="left"] === Overview -To build a panel or screen use QTDesigner to build a design you like. + -Save this design to your configuration folder with a name of your choice, ending with .ui + -modify the configurations INI file to load qtvcp with your new .ui file. + -Then connect any required HAL pins in a HAL file + +To build a panel or screen use QTDesigner to build a design you like. +Save this design to your configuration folder with a name of your choice, ending with .ui +modify the configurations INI file to load qtvcp with your new .ui file. +Then connect any required HAL pins in a HAL file === Get Designer to include linuxcnc widgets -You must have designer installed; These commands should add it: + -Or use your package manager to install the same: + -'sudo apt-get install qttools5-dev-tools' + -'sudo apt-get install qttools5-dev' + -'sudo apt-get install libpython3-dev' + +You must have designer installed; These commands should add it: +Or use your package manager to install the same: -Then you must add a link to the qtvcp_plugin.py to the folder that designer will search. + +---- +sudo apt-get install qttools5-dev-tools qttools5-dev libpython3-dev +---- + +Then you must add a link to the qtvcp_plugin.py to the folder that designer will search. -In a RIP version of linuxcnc qtvcp_plugin.py will be in: + -'~/LINUXCNC_PROJECT_NAME/lib/python/qtvcp/plugins/qtvcp_plugin.py' + +In a RIP version of linuxcnc qtvcp_plugin.py will be in: +'~/LINUXCNC_PROJECT_NAME/lib/python/qtvcp/plugins/qtvcp_plugin.py' -installed version should be: + -'usr/lib/python2.7/qtvcp/plugins/qtvcp_plugin.py' + -or -'usr/lib/python2.7/dist-packages/qtvcp/plugins/qtvcp_plugin.py' + +installed version should be: +'usr/lib/python2.7/qtvcp/plugins/qtvcp_plugin.py' or +'usr/lib/python2.7/dist-packages/qtvcp/plugins/qtvcp_plugin.py' -make a link file to the above file and move it to one of the places Designer searches: + +make a link file to the above file and move it to one of the places Designer searches: -Designer searches in these two place for links (pick one): + -This can be: + -'/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python' + -or + -'~/.designer/plugins/python' + -You may need to add the plugins/python folders + +Designer searches in these two place for links (pick one): +This can be: +'/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python' or +'~/.designer/plugins/python' +You may need to add the plugins/python folders -To start Designer: + +To start Designer: -for a RIP installed: + -open a terminal, set the environment for linuxcnc with the command: '. scripts/rip-environment' + -then load designer with : 'designer -qt=5' + +for a RIP installed: +open a terminal, set the environment for linuxcnc with the command: '. scripts/rip-environment' +then load designer with : 'designer -qt=5' -otherwise for an installed version, open a terminal and type 'designer -qt=5' + +otherwise for an installed version, open a terminal and type 'designer -qt=5' -If all goes right you will see the selectable linuxcnc widgets on the left hand side + +If all goes right you will see the selectable linuxcnc widgets on the left hand side === build the screen .ui file -When Designer is first started there is a 'New Form' dialog displayed. + -Pick 'Main Window' and press the 'create' button. + -Do not rename this window - Qtvcp requires the name to be 'MainWindow' + - + -A MainWindow widget is Displayed. Grab the corner of the window and resize to + -an appropriate size say 1000x600. right click on the window and click + -set minimum size. Do it again and set maximum size.Our sample widget will + -now not be resizable. + - + -Drag and drop the screenoption widget onto the main window (anywhere). + -This widget doesn't add anything visually but sets up some common options. + -It's recommended to always add this widget before any other. + -Right click on the main window (not the screenoptions widget) + -and set the layout as vertical. The screenoption widget will now be fullsized. + - -On the right hand side there is a panel with tabs for a Property editor and + -an object inspector. On the Object inspector click on the screenoption. then + -switch to the property Editor. Under the heading 'ScreenOptions' toggle + -'filedialog_option'. + - -Drag and drop a GCodeGraphics widget and a GcodeEditor widget. + -Place and resize them as you see fit leaving some room for buttons. + - -Now we will add action buttons. + -Add 7 action buttons on to the main window. If you double click the button, you + -can add text. Edit the button labels for 'Estop', 'Machine On', 'Home', 'Load', + -'Run', 'Pause' and 'stop'. + -Action buttons default to no action so we must change the properties for defined functions. + -You can edit the properties directly in the property editor on the right side of designer. + -A convenient alternating is left double clicking on the button This will launch a Dialog + -that allows selecting actions while only display relevant data to the action. + - + -We will describe the convenient way first: + - - - Right click the 'Machine On' button and select 'Set Actions'. When the Dialog displays, + -use the combobox to navigate to 'MACHINE CONTROLS - Machine On'. In this case there there + -is no option for this action so select ok. Now the button will turn the machine on when pressed + - -And now the direct way with Designer's property editor + - - - Select the 'Machine On' button. Now go to the 'Property Editor' on the right + -side of Designer. Scroll down until you find the 'ActionButton' heading. + -You will see a list of properties and values. find the 'machine on action' and + -click the checkbox. the button will now control machine on/off. + - -Do the same for all the other button with the addition of: + - - - With the 'Home' button we must also change the joint_number property to -1, + -Which tells the controller to home all the axes rather then a specific axis. + - - - With the 'Pause' button under the heading 'Indicated_PushButton' check the + -'indicator_option' and under the 'QAbstactButton' heading check 'checkable' +When Designer is first started there is a 'New Form' dialog displayed. +Pick 'Main Window' and press the 'create' button. +Do not rename this window - Qtvcp requires the name to be 'MainWindow' + +A MainWindow widget is Displayed. Grab the corner of the window and resize to +an appropriate size say 1000x600. right click on the window and click +set minimum size. Do it again and set maximum size.Our sample widget will +now not be resizable. + +Drag and drop the screenoption widget onto the main window (anywhere). +This widget doesn't add anything visually but sets up some common options. +It's recommended to always add this widget before any other. +Right click on the main window (not the screenoptions widget) +and set the layout as vertical. The screenoption widget will now be fullsized. + +On the right hand side there is a panel with tabs for a Property editor and +an object inspector. On the Object inspector click on the screenoption. then +switch to the property Editor. Under the heading 'ScreenOptions' toggle +'filedialog_option'. + +Drag and drop a GCodeGraphics widget and a GcodeEditor widget. +Place and resize them as you see fit leaving some room for buttons. + +Now we will add action buttons. +Add 7 action buttons on to the main window. If you double click the button, you +can add text. Edit the button labels for 'Estop', 'Machine On', 'Home', 'Load', +'Run', 'Pause' and 'stop'. +Action buttons default to no action so we must change the properties for defined functions. +You can edit the properties directly in the property editor on the right side of designer. +A convenient alternating is left double clicking on the button This will launch a Dialog +that allows selecting actions while only display relevant data to the action. + +We will describe the convenient way first: + + - Right click the 'Machine On' button and select 'Set Actions'. When the Dialog displays, +use the combobox to navigate to 'MACHINE CONTROLS - Machine On'. In this case there there +is no option for this action so select ok. Now the button will turn the machine on when pressed + +And now the direct way with Designer's property editor + + - Select the 'Machine On' button. Now go to the 'Property Editor' on the right + side of Designer. Scroll down until you find the 'ActionButton' heading. + You will see a list of properties and values. find the 'machine on action' and + click the checkbox. the button will now control machine on/off. + +Do the same for all the other button with the addition of: + + - With the 'Home' button we must also change the joint_number property to -1, + Which tells the controller to home all the axes rather then a specific axis. + + - With the 'Pause' button under the heading 'Indicated_PushButton' check the + 'indicator_option' and under the 'QAbstactButton' heading check 'checkable' .Qt Designer - Selecting Pause button's properties image::images/designer_button_property.png["designer button property",align="left"] -We then need to save this design as 'tester.ui' in the sim/qtvcp folder + -We are saving it as tester as that is a file name that qtvcp recognizes and + -will use a built in handler file to display it. + +We then need to save this design as 'tester.ui' in the sim/qtvcp folder +We are saving it as tester as that is a file name that qtvcp recognizes and +will use a built in handler file to display it. === Handler file -a handler file is required. It allows customizations to be written in python. + -For instance keyboard controls are usually written in the handler file. + - + -In this example the built in file 'tester_handler.py' is automatically used. + -It does the minimum required to display the tester.ui defined screen and do + -basic keyboard jogging. + + +a handler file is required. It allows customizations to be written in python. +For instance keyboard controls are usually written in the handler file. + +In this example the built in file 'tester_handler.py' is automatically used. +It does the minimum required to display the tester.ui defined screen and do +basic keyboard jogging. === INI -If you are using qtvcp to make a CNC control screen: + -Under the '[DISPLAY]' heading: + - + -'DISPLAY = qtvcp ' + - + -'' is the base name of the .ui and _handler.py files. + +If you are using qtvcp to make a CNC control screen: +Under the '[DISPLAY]' heading: + +'DISPLAY = qtvcp ' -In our example there is already a sim configuration called tester, that we + +'' is the base name of the .ui and _handler.py files. + +In our example there is already a sim configuration called tester, that we will use to display our test screen. === HAL -If your screen used widgets with HAL pins, then you must connect them in a HAL file. + -Qtvcp looks in the INI file, under the heading '[HAL]' for the entry 'POSTGUI_HALFILE=' + -Typically '' would be the screens base name + '_postgui' + '.hal' + -eg. 'qtvcp_postgui.hal', but can be any legal filename. + -These commands are executed after the screen is built, guaranteeing the widget HAL + -pins are available. + -You can have multiple line of 'POSTGUI_HALFILE=' in the INI. + -Each will be run one after the other in the order they appear. + - + -Qtvcp also looks in the INI file, under the heading '[HAL]' for the entry 'POSTGUI_HALCMD=' + -'' would be any valid HAL command. + -These commands are executed after the screen is built, after all the POSTGUI_HALFILEs are run, + -guaranteeing the widget HAL pins are available. + -You can have multiple line of 'POSTGUI_HALCMD=' in the INI. + -Each will be run one after the other in the order they appear. + - + -In our example there are no HAl pins to connect. + +If your screen used widgets with HAL pins, then you must connect them in a HAL file. +Qtvcp looks in the INI file, under the heading '[HAL]' for the entry 'POSTGUI_HALFILE=' +Typically '' would be the screens base name '_postgui' + '.hal' + +eg. 'qtvcp_postgui.hal', but can be any legal filename. +These commands are executed after the screen is built, guaranteeing the widget HAL +pins are available. +You can have multiple line of 'POSTGUI_HALFILE=' in the INI. +Each will be run one after the other in the order they appear. + +Qtvcp also looks in the INI file, under the heading '[HAL]' for the entry 'POSTGUI_HALCMD=' +'' would be any valid HAL command. +These commands are executed after the screen is built, after all the POSTGUI_HALFILEs are run, +guaranteeing the widget HAL pins are available. +You can have multiple line of 'POSTGUI_HALCMD=' in the INI. +Each will be run one after the other in the order they appear. + +In our example there are no HAl pins to connect. == Handler file in detail -handler files are used to create custom controls using python. + + +handler files are used to create custom controls using python. === Overview -Here is a sample handler file. + -It's broken up in sections for ease of discussion. + + +Here is a sample handler file. +It's broken up in sections for ease of discussion. [source,python] ---- @@ -624,101 +631,120 @@ def get_handlers(halcomp,widgets,paths): ---- === IMPORT SECTION -This section is for importing library modules required for your screen. + -It would be typical to import qtvcp's keybinding, Status and action + -libraries. + + +This section is for importing library modules required for your screen. +It would be typical to import qtvcp's keybinding, Status and action +libraries. === INSTANTIATE LIBRARIES SECTION -By instantiating the libraries here we create global reference. + -You can note this by the commands that don't have 'self.' in front of them. + -By convention we capitalize the names of global referenced libraries. + + +By instantiating the libraries here we create global reference. +You can note this by the commands that don't have 'self.' in front of them. +By convention we capitalize the names of global referenced libraries. === HANDLER CLASS section -The custom code is placed in a class so qtvcp can utilize it. + -This is the definitions on the handler class. + + +The custom code is placed in a class so qtvcp can utilize it. +This is the definitions on the handler class. === INITIALIZE section -Like all python libraries the __init__ function is called when the library + -is first instantiated. You can set defaults and reference variables here. + -The widget references are not available at this point. + -The variables halcomp, widgets and paths give access to qtvcp's HAL component, + -widgets, and path info respectably. + -This is where you would set up global variables. + -Widgets are not actually accessible at this point. + + +Like all python libraries the __init__ function is called when the library +is first instantiated. You can set defaults and reference variables here. +The widget references are not available at this point. +The variables halcomp, widgets and paths give access to qtvcp's HAL component, +widgets, and path info respectably. +This is where you would set up global variables. +Widgets are not actually accessible at this point. === SPECIAL FUNCTIONS section -There are several special functions that qtvcp looks for in the handler file. + -If qtvcp finds these it will call them, if not it will silently ignore them. + + +There are several special functions that qtvcp looks for in the handler file. +If qtvcp finds these it will call them, if not it will silently ignore them. ==== initialized__(self): -This function is called after the widgets and HAL pins are built + -You can manipulate the widgets and HAL pins or add more HAL pins here. + -Typically preferences can be checked and set, styles applied to + -widgets or status of linuxcnc be connected to functions. + -This is also where keybindings would be added. + + +This function is called after the widgets and HAL pins are built +You can manipulate the widgets and HAL pins or add more HAL pins here. +Typically preferences can be checked and set, styles applied to +widgets or status of linuxcnc be connected to functions. +This is also where keybindings would be added. ==== class_patch__(self): -Class patching allow you to override function calls in an imported module. + -Class patching must be done before the module is instantiated and it modifies + -all instances made after that. + -An example might be patching button calls from the G-code editor to call functions + -in the handler file instead. + + +Class patching allow you to override function calls in an imported module. +Class patching must be done before the module is instantiated and it modifies +all instances made after that. +An example might be patching button calls from the G-code editor to call functions +in the handler file instead. Class patching is also known as monkey patching. ==== processed_key_event__(self, receiver,event,is_pressed,key,code,shift,cntrl): -This function is called to facilitate keyboard jogging etc. + -By using the keybindings library this can be used to easily add + -functions bound to keypresses. + + +This function is called to facilitate keyboard jogging etc. +By using the keybindings library this can be used to easily add +functions bound to keypresses. ==== keypress_event__(self,receiver, event)): -This function gives raw key press events. It takes presidence over + -the processed_key_event. + + +This function gives raw key press events. It takes presidence over +the processed_key_event. ==== keyrelease_event__(receiver, event): -This function gives raw key release events. It takes presidence over + -the processed_key_event. + + +This function gives raw key release events. It takes presidence over +the processed_key_event. ==== before_loop__(self): -This function is called just before the Qt event loop is entered. + -At the point all widgets/libraries/initialization code has completed and the screen is already displayed. + + +This function is called just before the Qt event loop is entered. +At the point all widgets/libraries/initialization code has completed and the screen is already displayed. ==== system_shutdown_request__(self): -If present, this function overrides the normal function called when a user selects a total system shutdown. + -It could be used to do pre-shutdown housekeeping. The system will not shutdown if using this function, you will + -have to do that yourself. qtvcp/linuxcnc will shutdown without a prompt after this function returns + + +If present, this function overrides the normal function called when a user selects a total system shutdown. +It could be used to do pre-shutdown housekeeping. The system will not shutdown if using this function, you will +have to do that yourself. qtvcp/linuxcnc will shutdown without a prompt after this function returns ==== closing_cleanup__(self): -This function is called just before the screen closes. It can be used + -to do cleanup before closing. + + +This function is called just before the screen closes. It can be used +to do cleanup before closing. === STATUS CALLBACKS section -By convention this is where you would put functions that are callbacks + -from STATUS definitions. + + +By convention this is where you would put functions that are callbacks +from STATUS definitions. === CALLBACKS FROM FORM section -By convention this is where you would put functions that are callbacks + -from the widgets that you have connected to the MainWindow with the + -designer editor. + + +By convention this is where you would put functions that are callbacks +from the widgets that you have connected to the MainWindow with the +designer editor. === GENERAL FUNCTIONS section -By convention this is where you put your general functions + + +By convention this is where you put your general functions === KEY BINDING section -If you are using the keybinding library this is where you place your + -custom key call routines. + -The function signature is: + +If you are using the keybinding library this is where you place your +custom key call routines. +The function signature is: + [source,python] ---- def on_keycall_KEY(self,event,state,shift,cntrl): if state: self.do_something_function() ---- -'KEY' being the code (from the keybindings library) for the desired key. + +'KEY' being the code (from the keybindings library) for the desired key. === CLOSING EVENT section -Putting the close event function here will catch closing events. + -This replaces any predefined closeEvent function from qtvcp + -It's usually better to use the special closing_cleanup__ function. + + +Putting the close event function here will catch closing events. +This replaces any predefined closeEvent function from qtvcp +It's usually better to use the special closing_cleanup__ function. + [source,python] ---- def closeEvent(self, event): @@ -727,48 +753,49 @@ It's usually better to use the special closing_cleanup__ function. + ---- == Connecting widgets to python code -It's possible to connect widgets to python code using signals and slots. + -In this way you can give new functions to linuxcnc widgets or utilize + -standard widgets to control linuxcnc. + +It's possible to connect widgets to python code using signals and slots. +In this way you can give new functions to linuxcnc widgets or utilize +standard widgets to control linuxcnc. === Overview -In the Designer editor you would create user function slots and connect + -them to widgets using signals. + -In the handler file you would create the slot's functions defined in Designer. + +In the Designer editor you would create user function slots and connect +them to widgets using signals. +In the handler file you would create the slot's functions defined in Designer. [[cha:designer-slots]] === Using Designer to add slots -When you have loaded your screen into designer add a plain PushButton to the screen. + -You could change the name of the button to something interesting like 'test_button' + -There are two ways to edit connections - This is the graphical way + -There is a button in the top tool bar of designer for editing signals. + -After pushing it, if you click-and-hold on the button it will show a arrow + -(looks like a ground signal from electrical schematic) + -Slide this arrow to a part of the main window that does not have widgets on it. + -A 'Configure Connections' dialog will pop up. + -The list on the left are the available signals from the widget. + -The list on the right is the available slots on the main window and you can add to it. + - -Pick the signal 'clicked()' - this makes the slots side available. + -click 'edit' on the slots list. + -A 'Slots/Signals of MainWindow' dialog will pop up. + -On the slots list at the top there is a plus icon - click it. + -you can now edit a new slot name. + -Erase the default name 'slot()' and change it to test_button() + -press the ok button. + -You'll be back to the 'Configure Connections' dialog. + -now you can select your new slot in the slot list. + -then press ok and save the file. + +When you have loaded your screen into designer add a plain PushButton to the screen. +You could change the name of the button to something interesting like 'test_button' +There are two ways to edit connections - This is the graphical way +There is a button in the top tool bar of designer for editing signals. +After pushing it, if you click-and-hold on the button it will show a arrow +(looks like a ground signal from electrical schematic) +Slide this arrow to a part of the main window that does not have widgets on it. +A 'Configure Connections' dialog will pop up. +The list on the left are the available signals from the widget. +The list on the right is the available slots on the main window and you can add to it. + +Pick the signal 'clicked()' - this makes the slots side available. +click 'edit' on the slots list. +A 'Slots/Signals of MainWindow' dialog will pop up. +On the slots list at the top there is a plus icon - click it. +you can now edit a new slot name. +Erase the default name 'slot()' and change it to test_button() +press the ok button. +You'll be back to the 'Configure Connections' dialog. +now you can select your new slot in the slot list. +then press ok and save the file. .Designer signal/slot selection image::images/designer_slots.png["QTvcp",align="left"] === Handler file changes -Now you must add the function to the handler file. + -The function signature is 'def slotname(self):' + -We will add some code to print the widget name. + +Now you must add the function to the handler file. +The function signature is 'def slotname(self):' +We will add some code to print the widget name. So for our example: + [source,python] ---- def test_button(self): @@ -783,10 +810,10 @@ Add this code under the section named: ####################### In fact it doesn't matter where in the handler class you put the commands -but by convention this is where to put it. + -Save the handler file. + -Now when you load your screen and press the button it should print the name + -of the button in the terminal. + +but by convention this is where to put it. +Save the handler file. +Now when you load your screen and press the button it should print the name +of the button in the terminal. === More Information diff --git a/docs/src/gui/qtvcp_es.adoc b/docs/src/gui/qtvcp_es.adoc index a5d4a6a8cd..44cac61e7f 100644 --- a/docs/src/gui/qtvcp_es.adoc +++ b/docs/src/gui/qtvcp_es.adoc @@ -1,14 +1,13 @@ :lang: es [[cha:qtvcp]] - = Qtvcp -Qtvcp es una infraestructura para mostrar pantallas CNC personalizada o paneles de control en LinuxCNC. + -Muestra un archivo de interfaz de usuario creado con el editor de pantalla QTDesigner o combina esto + -con programación python para crear una pantalla GUI para manejar una máquina CNC. + +Qtvcp es una infraestructura para mostrar pantallas CNC personalizada o paneles de control en LinuxCNC. +Muestra un archivo de interfaz de usuario creado con el editor de pantalla QTDesigner o combina esto +con programación python para crear una pantalla GUI para manejar una máquina CNC. Qtvcp es completamente personalizable: puede agregar diferentes botones, LED de estado, etc, -o agregar código Python para una personalización aún más fina. + +o agregar código Python para una personalización aún más fina. .qtdragon - Muestra de 3 o 4 ejes image::images/silverdragon.png["QTDragon Router",align="left"] @@ -27,39 +26,39 @@ image::images/qtvcp-cam-align.png["QTscreen x1mill",align="left"] == Descripción general -Hay dos archivos que se pueden usar, individualmente o en combinación, para agregar + -personalización. + -Un archivo de interfaz de usuario que se crea con el editor gráfico Designer de QT y + -un archivo handler que es un archivo de texto con código python. + -Normalmente qtvcp utiliza la interfaz de usuario y el archivo handler. + -Puede especificar que qtvcp use la UI 'local' y los archivos handler. + -Un archivo 'local' es uno de los que estan en la carpeta de configuración que define el + -resto de los requisitos de la máquina. + -Uno no se limita a agregar un panel personalizado a la derecha o una pestaña personalizada. + -qtvcp aprovecha 'QT Designer' (el editor) y 'PyQT5' (el kit de herramientas de widgets). + -QTvcp tiene algunos widgets y acciones especiales agregados solo para LinuxCNC. + -Hay widgets especiales para conectar widgets de terceros a los pines HAL. + -Es posible crear respuestas de widget conectando señales a python + -código en el archivo del controlador. + +Hay dos archivos que se pueden usar, individualmente o en combinación, para agregar +personalización. +Un archivo de interfaz de usuario que se crea con el editor gráfico Designer de QT y +un archivo handler que es un archivo de texto con código python. +Normalmente qtvcp utiliza la interfaz de usuario y el archivo handler. +Puede especificar que qtvcp use la UI 'local' y los archivos handler. +Un archivo 'local' es uno de los que estan en la carpeta de configuración que define el +resto de los requisitos de la máquina. +Uno no se limita a agregar un panel personalizado a la derecha o una pestaña personalizada. +qtvcp aprovecha 'QT Designer' (el editor) y 'PyQT5' (el kit de herramientas de widgets). +QTvcp tiene algunos widgets y acciones especiales agregados solo para LinuxCNC. +Hay widgets especiales para conectar widgets de terceros a los pines HAL. +Es posible crear respuestas de widget conectando señales a python +código en el archivo del controlador. === Widgets QTvcp -Qtvcp utiliza los widgets del kit de herramientas PyQt5 para la integración de linuxcnc. + -Widget es el nombre general de objetos como botones y etiquetas en PyQT5. + -Puede utilizar cualquier widget disponible en el editor QTDesigner. + -También hay widgets especiales para linuxcnc que facilitan la integración. + -Estos se dividen en tres encabezados en el lado izquierdo del editor. + -Uno es para los widgets HAL solamente. + -Uno es para widgets de control cnc. + -Uno es para los widgets de diálogo. + -eres libre de mezclarlos de cualquier manera en tu panel. + -Un widget muy importante para el control de CNC es el widget de opciones de pantalla. + -No agrega nada visualmente a la pantalla. + -Pero permite seleccionar detalles importantes en lugar de codificarlos en el archivo del controlador. + +Qtvcp utiliza los widgets del kit de herramientas PyQt5 para la integración de linuxcnc. +Widget es el nombre general de objetos como botones y etiquetas en PyQT5. +Puede utilizar cualquier widget disponible en el editor QTDesigner. +También hay widgets especiales para linuxcnc que facilitan la integración. +Estos se dividen en tres encabezados en el lado izquierdo del editor. +Uno es para los widgets HAL solamente. +Uno es para widgets de control cnc. +Uno es para los widgets de diálogo. +eres libre de mezclarlos de cualquier manera en tu panel. +Un widget muy importante para el control de CNC es el widget de opciones de pantalla. +No agrega nada visualmente a la pantalla. +Pero permite seleccionar detalles importantes en lugar de codificarlos en el archivo del controlador. === Configuración INI -Si está utilizando esto para hacer una pantalla de control CNC: + +Si está utilizando esto para hacer una pantalla de control CNC: Bajo el encabezado [DISPLAY]: ---- @@ -77,33 +76,35 @@ DISPLAY = qtvcp es el nombre base de los archivos .ui y _handler.py. Si falta , se cargará la pantalla predeterminada. ---- -Qtvcp asume que el archivo UI y el archivo del controlador usan este mismo nombre base. + -Qtvcp buscará el archivo de configuración LinuxCNC que se lanzó primero para los archivos, + -luego en la carpeta de máscara del sistema. Las carpetas de máscaras contienen pantallas estándar. + + +Qtvcp asume que el archivo UI y el archivo del controlador usan este mismo nombre base. +Qtvcp buscará el archivo de configuración LinuxCNC que se lanzó primero para los archivos, +luego en la carpeta de máscara del sistema. Las carpetas de máscaras contienen pantallas estándar. === QTDesigner UI File -Un archivo de diseñador es un archivo de texto organizado en el estándar XML que describe el + -diseño y los widgets de la pantalla. Pyqt5 usa este archivo para construir la pantalla + -y reaccionar a esos widgets. El editor QTDesigner hace que sea relativamente fácil de construir + -y edite este archivo. + +Un archivo de diseñador es un archivo de texto organizado en el estándar XML que describe el +diseño y los widgets de la pantalla. Pyqt5 usa este archivo para construir la pantalla +y reaccionar a esos widgets. El editor QTDesigner hace que sea relativamente fácil de construir +y edite este archivo. === Archivos de controlador -Un archivo de controlador es un archivo que contiene código python, que qtvcp agrega a su + -rutinas predeterminadas. Un archivo de controlador permite modificar valores predeterminados o agregar lógica + -a una máscara qtvcp sin tener que modificar el código central de qtvcp. + -De esta manera puede tener un comportamiento personalizado. + -Si está presente, se cargará un archivo de controlador. + -Solo se permite un archivo. + +Un archivo de controlador es un archivo que contiene código python, que qtvcp agrega a su +rutinas predeterminadas. Un archivo de controlador permite modificar valores predeterminados o agregar lógica +a una máscara qtvcp sin tener que modificar el código central de qtvcp. +De esta manera puede tener un comportamiento personalizado. +Si está presente, se cargará un archivo de controlador. +Solo se permite un archivo. === Módulos de bibliotecas -Qtvcp como está construido hace poco más que mostrar la pantalla y reaccionar a los widgets. + -Para más comportamientos preconstruidos hay bibliotecas disponibles. + -(se encuentra en lib / python / qtvcp / lib en RIP linuxcnc install) + -Las bibliotecas son módulos de Python preconstruidos que le dan características adicionales a Qtvcp. + -De esta manera, puede seleccionar qué características desea, sin embargo, no tiene que crear las comunes usted mismo. + -Dichas bibliotecas incluyen: + + +Qtvcp como está construido hace poco más que mostrar la pantalla y reaccionar a los widgets. +Para más comportamientos preconstruidos hay bibliotecas disponibles. +(se encuentra en lib / python / qtvcp / lib en RIP linuxcnc install) +Las bibliotecas son módulos de Python preconstruidos que le dan características adicionales a Qtvcp. +De esta manera, puede seleccionar qué características desea, sin embargo, no tiene que crear las comunes usted mismo. +Dichas bibliotecas incluyen: audio_player + aux_program_loader + @@ -112,199 +113,199 @@ mensaje + preferencias + notificar + virtual_keyboard + -machine_log + - +machine_log === Temas -Los temas son una forma de modificar la apariencia de los widgets en la pantalla. + +Los temas son una forma de modificar la apariencia de los widgets en la pantalla. Por ejemplo, el color o el tamaño de los botones y controles deslizantes se pueden cambiar usando -temas + -El tema de Windows es el predeterminado para las pantallas. El tema del sistema es el predeterminado para los paneles. + -para ver los temas disponibles, cargue qtvcp con -d -t SHOWTHEMES + +temas. +El tema de Windows es el predeterminado para las pantallas. El tema del sistema es el predeterminado para los paneles. +para ver los temas disponibles, cargue qtvcp con -d -t SHOWTHEMES . -qtvcp también se puede personalizar con hojas de estilo Qt usando css. + +qtvcp también se puede personalizar con hojas de estilo Qt usando css. === Archivos locales -Si está presente, los archivos de la interfaz de usuario local en la carpeta de configuración se cargarán en su lugar + +Si está presente, los archivos de la interfaz de usuario local en la carpeta de configuración se cargarán en su lugar de los archivos de UI de stock. Los archivos de la interfaz de usuario local le permiten usar su + personalizado -diseña en lugar de las pantallas predeterminadas. + -qtvcp buscará MYNAME.ui, MYNAME_handler.py y MYNAME.qss en la carpeta de configuración iniciada. + -Puede colocar estos archivos en una carpeta con nombre arbitrario: qtvcp buscará todas las carpetas en su carpeta de configuración. + +diseña en lugar de las pantallas predeterminadas. +qtvcp buscará MYNAME.ui, MYNAME_handler.py y MYNAME.qss en la carpeta de configuración iniciada. +Puede colocar estos archivos en una carpeta con nombre arbitrario: qtvcp buscará todas las carpetas en su carpeta de configuración. === Modificar pantallas de stock -Si desea modificar una pantalla de archivo, copie su UI y el archivo del controlador en su carpeta de configuración. + +Si desea modificar una pantalla de archivo, copie su UI y el archivo del controlador en su carpeta de configuración. == Construir una pantalla personalizada de hoja limpia simple -Pantalla personalizada fea - +.Pantalla personalizada fea image::images/qtvcp_tester.png["QTscreen Mill",align="left"] === Descripción general -Para construir un panel o pantalla, use QTDesigner para construir un diseño que le guste. + -Guarde este diseño en su carpeta de configuración con el nombre que elija, que termina con .ui + -modifique el archivo INI de configuraciones para cargar qtvcp con su nuevo archivo .ui. + -Luego, conecte los pines HAL necesarios en un archivo HAL + +Para construir un panel o pantalla, use QTDesigner para construir un diseño que le guste. +Guarde este diseño en su carpeta de configuración con el nombre que elija, que termina con .ui +modifique el archivo INI de configuraciones para cargar qtvcp con su nuevo archivo .ui. +Luego, conecte los pines HAL necesarios en un archivo HAL === Consigue que el diseñador incluya widgets de linuxcnc -Debe tener instalado el diseñador; Estos comandos deberían agregarlo: + -O utilice su administrador de paquetes para instalar lo mismo: + -'sudo apt-get install qttools5-dev-tools' + -'sudo apt-get install qttools5.dev' + +Debe tener instalado el diseñador; Estos comandos deberían agregarlo: O utilice su administrador de paquetes para instalar lo mismo: -Luego necesita agregar la biblioteca de carga del módulo python. + -Qtvcp usa QT5 con python2: esta combinación normalmente no está disponible desde + -repositorios Puede compilarlo usted mismo o hay versiones precompiladas + -disponible para sistemas comunes. + -en 'lib / python / qtvcp / designer' hay carpetas basadas en arquitecturas de sistema + -y luego la versión QT. + -Debe elegir la carpeta de arquitectura de la CPU y luego elegir la serie; 5.5, 5.7 o 5.9 de Qt. + -actualmente el estiramiento de Debian usa 5.7, Mint 12 usa 5.5, Mint 19 usa 5.9 + -en caso de duda, verifique la versión de QT5 en el sistema. + +---- +sudo apt-get install qttools5-dev-tools +sudo apt-get install qttools5.dev +---- -Debe descomprimir el archivo y luego copiar esa versión adecuada de + -'libpyqt5_py2.so' a esta carpeta: + -'/ usr / lib / x86_64-linux-gnu / qt5 / plugins / designer' + -(x86_64-linux-gnu podría llamarse algo ligeramente diferente + -en diferentes sistemas) + +Luego necesita agregar la biblioteca de carga del módulo python. +Qtvcp usa QT5 con python2: esta combinación normalmente no está disponible desde +repositorios Puede compilarlo usted mismo o hay versiones precompiladas +disponible para sistemas comunes. +en 'lib / python / qtvcp / designer' hay carpetas basadas en arquitecturas de sistema +y luego la versión QT. +Debe elegir la carpeta de arquitectura de la CPU y luego elegir la serie; 5.5, 5.7 o 5.9 de Qt. +actualmente el estiramiento de Debian usa 5.7, Mint 12 usa 5.5, Mint 19 usa 5.9 +en caso de duda, verifique la versión de QT5 en el sistema. -Necesitará privilegios de superusuario para copiar el archivo en la carpeta. + +Debe descomprimir el archivo y luego copiar esa versión adecuada de +'libpyqt5_py2.so' a esta carpeta: +'/ usr / lib / x86_64-linux-gnu / qt5 / plugins / designer' +(x86_64-linux-gnu podría llamarse algo ligeramente diferente +en diferentes sistemas) -entonces debe agregar un enlace a qtvcp_plugin.py a la carpeta que buscará el diseñador. + +Necesitará privilegios de superusuario para copiar el archivo en la carpeta. -En una versión RIP de linuxcnc qtvcp_plugin.py estará en: + -'~ / LINUXCNC_PROJECT_NAME / lib / python / qtvcp / plugins / qtvcp_plugin.py' + +entonces debe agregar un enlace a qtvcp_plugin.py a la carpeta que buscará el diseñador. -la versión instalada debe ser: + -'usr / lib / python2.7 / qtvcp / plugins / qtvcp_plugin.py' + -o -'usr / lib / python2.7 / dist-packages / qtvcp / plugins / qtvcp_plugin.py' + +En una versión RIP de linuxcnc qtvcp_plugin.py estará en: +'~ / LINUXCNC_PROJECT_NAME / lib / python / qtvcp / plugins / qtvcp_plugin.py' -cree un archivo de enlace al archivo anterior y muévalo a uno de los lugares en los que el Diseñador busca: + +la versión instalada debe ser: +'usr / lib / python2.7 / qtvcp / plugins / qtvcp_plugin.py' o +'usr / lib / python2.7 / dist-packages / qtvcp / plugins / qtvcp_plugin.py' -El diseñador busca enlaces en estos dos lugares (elija uno): + -Esto puede ser: + -'/ usr / lib / x86_64-linux-gnu / qt5 / plugins / designer / python' + -o + -'~ / .designer / plugins / python' + -Es posible que deba agregar los complementos / carpetas de python + +cree un archivo de enlace al archivo anterior y muévalo a uno de los lugares en los que el Diseñador busca: -Para iniciar Designer: + +El diseñador busca enlaces en estos dos lugares (elija uno): +Esto puede ser: +'/ usr / lib / x86_64-linux-gnu / qt5 / plugins / designer / python' o +'~ / .designer / plugins / python' +Es posible que deba agregar los complementos / carpetas de python -para un RIP instalado: + +Para iniciar Designer: + +para un RIP instalado: abra una terminal, configure el entorno para linuxcnc con el comando: '. scripts / rip-environment '+ -luego cargue el diseñador con: 'designer -qt = 5' + +luego cargue el diseñador con: 'designer -qt = 5' -de lo contrario, para una versión instalada, abra una terminal y escriba 'designer -qt = 5' + +de lo contrario, para una versión instalada, abra una terminal y escriba 'designer -qt = 5' -Si todo va bien, verá los widgets linuxcnc seleccionables en el lado izquierdo + +Si todo va bien, verá los widgets linuxcnc seleccionables en el lado izquierdo === construir el archivo .ui de pantalla -Cuando Designer se inicia por primera vez, aparece un cuadro de diálogo 'Nuevo formulario'. + -Elija 'Ventana principal' y presione el botón 'crear'. + -No cambie el nombre de esta ventana: Qtvcp requiere que el nombre sea 'MainWindow' + - + -Se muestra un widget MainWindow. Agarra la esquina de la ventana y cambia el tamaño a + -un tamaño apropiado digamos 1000x600. haga clic derecho en la ventana y haga clic en + -Establecer tamaño mínimo. Hazlo de nuevo y establece el tamaño máximo. Nuestro widget de muestra + -ahora no será redimensionable. + - + -Arrastre y suelte el widget de opción de pantalla en la ventana principal (en cualquier lugar). + -Este widget no agrega nada visualmente, pero configura algunas opciones comunes. + -Se recomienda agregar siempre este widget antes que cualquier otro. + -Haga clic derecho en la ventana principal (no en el widget de opciones de pantalla) + -y establecer el diseño como vertical. El widget de opción de pantalla ahora será de tamaño completo. + - -En el lado derecho hay un panel con pestañas para un editor de propiedades y + -Un inspector de objetos. En el inspector de objetos, haga clic en la opción de pantalla. entonces + -cambiar al editor de propiedades. Bajo el encabezado 'ScreenOptions' alternar + -'filedialog_option'. + - -Arrastre y suelte un widget GCodeGraphics y un widget GcodeEditor. + -Colóquelos y cambie su tamaño como mejor le parezca, dejando espacio para botones. + - -Ahora agregaremos botones de acción. + -Agregue 7 botones de acción a la ventana principal. Si hace doble clic en el botón, + -Puede agregar texto. Edite las etiquetas de los botones para 'Estop', 'Máquina encendida', 'Inicio', 'Cargar', + -'Ejecutar', 'Pausa' y 'detener'. + -Los botones de acción no tienen acción por lo que debemos cambiar las propiedades de las funciones definidas. + -Puede editar las propiedades directamente en el editor de propiedades en el lado derecho del diseñador. + -Una alternativa conveniente es hacer doble clic en el botón Esto abrirá un Diálogo + -que permite seleccionar acciones mientras solo muestra datos relevantes para la acción. + - + -Primero describiremos la manera conveniente: + - - - Haga clic derecho en el botón 'Máquina encendida' y seleccione 'Establecer acciones'. Cuando se muestra el cuadro de diálogo, + -use el cuadro combinado para navegar a 'CONTROLES DE MÁQUINA - Máquina encendida'. En este caso hay + -no hay opción para esta acción, así que seleccione ok. Ahora el botón encenderá la máquina cuando se presione + - -Y ahora el camino directo con el editor de propiedades del Diseñador + - - - Seleccione el botón 'Máquina encendida'. Ahora ve al 'Editor de propiedades' a la derecha + -lado del diseñador. Desplácese hacia abajo hasta encontrar el encabezado 'ActionButton'. + -Verá una lista de propiedades y valores. encuentra la 'máquina en acción' y + -haz clic en la casilla de verificación. el botón ahora controlará el encendido / apagado de la máquina. + - -Haga lo mismo para todos los demás botones con la adición de: + - - - Con el botón 'Inicio' también debemos cambiar la propiedad joint_number a -1, + -Lo que le dice al controlador que guarde todos los ejes en lugar de un eje específico. + - - - Con el botón 'Pausa' debajo del encabezado 'Indicated_PushButton' marque el + -'indicator_option' y debajo del encabezado 'QAbstactButton' marque 'checkable' +Cuando Designer se inicia por primera vez, aparece un cuadro de diálogo 'Nuevo formulario'. +Elija 'Ventana principal' y presione el botón 'crear'. +No cambie el nombre de esta ventana: Qtvcp requiere que el nombre sea 'MainWindow' -.Qt Designer: selección de las propiedades del botón Pausa +Se muestra un widget MainWindow. Agarra la esquina de la ventana y cambia el tamaño a +un tamaño apropiado digamos 1000x600. haga clic derecho en la ventana y haga clic en +Establecer tamaño mínimo. Hazlo de nuevo y establece el tamaño máximo. Nuestro widget de muestra +ahora no será redimensionable. + +Arrastre y suelte el widget de opción de pantalla en la ventana principal (en cualquier lugar). +Este widget no agrega nada visualmente, pero configura algunas opciones comunes. +Se recomienda agregar siempre este widget antes que cualquier otro. +Haga clic derecho en la ventana principal (no en el widget de opciones de pantalla) +y establecer el diseño como vertical. El widget de opción de pantalla ahora será de tamaño completo. + +En el lado derecho hay un panel con pestañas para un editor de propiedades y +Un inspector de objetos. En el inspector de objetos, haga clic en la opción de pantalla. entonces +cambiar al editor de propiedades. Bajo el encabezado 'ScreenOptions' alternar +'filedialog_option'. + +Arrastre y suelte un widget GCodeGraphics y un widget GcodeEditor. +Colóquelos y cambie su tamaño como mejor le parezca, dejando espacio para botones. + +Ahora agregaremos botones de acción. +Agregue 7 botones de acción a la ventana principal. Si hace doble clic en el botón, +Puede agregar texto. Edite las etiquetas de los botones para 'Estop', 'Máquina encendida', 'Inicio', 'Cargar', +'Ejecutar', 'Pausa' y 'detener'. +Los botones de acción no tienen acción por lo que debemos cambiar las propiedades de las funciones definidas. +Puede editar las propiedades directamente en el editor de propiedades en el lado derecho del diseñador. +Una alternativa conveniente es hacer doble clic en el botón Esto abrirá un Diálogo +que permite seleccionar acciones mientras solo muestra datos relevantes para la acción. +Primero describiremos la manera conveniente: + + - Haga clic derecho en el botón 'Máquina encendida' y seleccione 'Establecer acciones'. Cuando se muestra el cuadro de diálogo, + use el cuadro combinado para navegar a 'CONTROLES DE MÁQUINA - Máquina encendida'. En este caso hay + no hay opción para esta acción, así que seleccione ok. Ahora el botón encenderá la máquina cuando se presione + +Y ahora el camino directo con el editor de propiedades del Diseñador + + - Seleccione el botón 'Máquina encendida'. Ahora ve al 'Editor de propiedades' a la derecha + lado del diseñador. Desplácese hacia abajo hasta encontrar el encabezado 'ActionButton'. + Verá una lista de propiedades y valores. encuentra la 'máquina en acción' y + haz clic en la casilla de verificación. el botón ahora controlará el encendido / apagado de la máquina. + +Haga lo mismo para todos los demás botones con la adición de: + + - Con el botón 'Inicio' también debemos cambiar la propiedad joint_number a -1, + Lo que le dice al controlador que guarde todos los ejes en lugar de un eje específico. + + - Con el botón 'Pausa' debajo del encabezado 'Indicated_PushButton' marque el + 'indicator_option' y debajo del encabezado 'QAbstactButton' marque 'checkable' + +.Qt Designer: selección de las propiedades del botón Pausa image::images/designer_button_property.png["propiedad del botón del diseñador", align = "left"] -Luego debemos guardar este diseño como 'tester.ui' en la carpeta sim / qtvcp + -Lo estamos guardando como probador ya que es un nombre de archivo que qtvcp reconoce y + -utilizará un archivo de controlador incorporado para mostrarlo. + +Luego debemos guardar este diseño como 'tester.ui' en la carpeta sim / qtvcp +Lo estamos guardando como probador ya que es un nombre de archivo que qtvcp reconoce y +utilizará un archivo de controlador incorporado para mostrarlo. === Archivo de controlador -Se requiere un archivo de controlador. Permite que las personalizaciones se escriban en python. + -Por ejemplo, los controles del teclado generalmente se escriben en el archivo del controlador. + - + -En este ejemplo, el archivo integrado 'tester_handler.py' se usa automáticamente. + -Hace lo mínimo requerido para mostrar la pantalla definida tester.ui y hacer + -Teclado básico para correr. + + +Se requiere un archivo de controlador. Permite que las personalizaciones se escriban en python. +Por ejemplo, los controles del teclado generalmente se escriben en el archivo del controlador. + +En este ejemplo, el archivo integrado 'tester_handler.py' se usa automáticamente. +Hace lo mínimo requerido para mostrar la pantalla definida tester.ui y hacer +Teclado básico para correr. === INI -Si está utilizando qtvcp para hacer una pantalla de control CNC: + -Bajo el encabezado '[DISPLAY]': + - + -'DISPLAY = qtvcp ' + - + -'' es el nombre base de los archivos .ui y _handler.py. + +Si está utilizando qtvcp para hacer una pantalla de control CNC: +Bajo el encabezado '[DISPLAY]': -En nuestro ejemplo, ya hay una configuración sim llamada tester, que nosotros + +'DISPLAY = qtvcp ' + +'' es el nombre base de los archivos .ui y _handler.py. + +En nuestro ejemplo, ya hay una configuración sim llamada tester, que nosotros usaremos para mostrar nuestra pantalla de prueba. === HAL -Si su pantalla utiliza widgets con pines HAL, debe conectarse en un archivo HAL. + -qtvcp busca bajo el encabezado '[HAL]' la entrada 'POSTGUI_HALFILE = ' + -Por lo general, '' sería el nombre base de la pantalla + '_postgui' + '.hal' + -p.ej. 'qtvcp_postgui.hal' + -Estos comandos se ejecutan después de construir la pantalla, garantizando el widget HAL + -Los pines están disponibles. + - + -En nuestro ejemplo, no hay pines HAl para conectar. + +Si su pantalla utiliza widgets con pines HAL, debe conectarse en un archivo HAL. +qtvcp busca bajo el encabezado '[HAL]' la entrada 'POSTGUI_HALFILE = ' +Por lo general, '' sería el nombre base de la pantalla + '_postgui' + '.hal' +p.ej. 'qtvcp_postgui.hal' +Estos comandos se ejecutan después de construir la pantalla, garantizando el widget HAL +Los pines están disponibles. + +En nuestro ejemplo, no hay pines HAl para conectar. == Archivo de controlador en detalle -Los archivos de controlador se utilizan para crear controles personalizados con Python. + + +Los archivos de controlador se utilizan para crear controles personalizados con Python. === Descripción general -Aquí hay un archivo de controlador de muestra. + -Está dividido en secciones para facilitar la discusión. + + +Aquí hay un archivo de controlador de muestra. +Está dividido en secciones para facilitar la discusión. [source, python] ---- @@ -517,101 +518,121 @@ def get_handlers (halcomp, widgets, caminos): ---- === SECCIÓN DE IMPORTACIÓN -Esta sección es para importar módulos de biblioteca necesarios para su pantalla. + -Sería típico importar la combinación de teclas, el estado y la acción de qtvcp + -bibliotecas + + +Esta sección es para importar módulos de biblioteca necesarios para su pantalla. +Sería típico importar la combinación de teclas, el estado y la acción de qtvcp +bibliotecas === SECCIÓN DE BIBLIOTECAS INSTANCIA -Al crear instancias de las bibliotecas aquí, creamos una referencia global. + -Puede notar esto mediante los comandos que no tienen 'self'. en frente de ellos. + -Por convención, capitalizamos los nombres de las bibliotecas globales referenciadas. + + +Al crear instancias de las bibliotecas aquí, creamos una referencia global. +Puede notar esto mediante los comandos que no tienen 'self'. en frente de ellos. +Por convención, capitalizamos los nombres de las bibliotecas globales referenciadas. === sección CLASE DE MANEJADOR -El código personalizado se coloca en una clase para que qtvcp pueda utilizarlo. + -Estas son las definiciones en la clase de controlador. + + +El código personalizado se coloca en una clase para que qtvcp pueda utilizarlo. +Estas son las definiciones en la clase de controlador. === INICIALIZAR sección -Al igual que todas las bibliotecas de Python, la función __init__ se llama cuando la biblioteca + -se instancia primero. Puede establecer valores predeterminados y variables de referencia aquí. + -Las referencias de widgets no están disponibles en este momento. + -Las variables halcomp, widgets y rutas dan acceso al componente HAL de qtvcp, + -widgets e información de ruta respetablemente. + -Aquí es donde configuraría las variables globales. + -Los widgets no son realmente accesibles en este momento. + + +Al igual que todas las bibliotecas de Python, la función __init__ se llama cuando la biblioteca +se instancia primero. Puede establecer valores predeterminados y variables de referencia aquí. +Las referencias de widgets no están disponibles en este momento. +Las variables halcomp, widgets y rutas dan acceso al componente HAL de qtvcp, +widgets e información de ruta respetablemente. +Aquí es donde configuraría las variables globales. +Los widgets no son realmente accesibles en este momento. === sección FUNCIONES ESPECIALES -Hay varias funciones especiales que qtvcp busca en el archivo del controlador. + -Si qtvcp los encuentra, los llamará, de lo contrario los ignorará en silencio. + + +Hay varias funciones especiales que qtvcp busca en el archivo del controlador. +Si qtvcp los encuentra, los llamará, de lo contrario los ignorará en silencio. ==== inicializado __ (auto): -Esta función se llama después de que se construyen los widgets y los pines HAL + -Puede manipular los widgets y los pines HAL o agregar más pines HAL aquí. + -Por lo general, las preferencias se pueden verificar y establecer, los estilos se aplican a + -widgets o estado de linuxcnc estar conectado a funciones. + -Aquí también es donde se agregarían las combinaciones de teclas. + + +Esta función se llama después de que se construyen los widgets y los pines HAL +Puede manipular los widgets y los pines HAL o agregar más pines HAL aquí. +Por lo general, las preferencias se pueden verificar y establecer, los estilos se aplican a +widgets o estado de linuxcnc estar conectado a funciones. +Aquí también es donde se agregarían las combinaciones de teclas. ==== class_patch __ (self): -Los parches de clase le permiten anular llamadas a funciones en un módulo importado. + -Los parches de clase deben hacerse antes de que el módulo se instancia y modifica + -todas las instancias hechas después de eso. + -Un ejemplo podría ser parchear llamadas de botones del editor de gcode para llamar a funciones + -en el archivo del controlador en su lugar. + + +Los parches de clase le permiten anular llamadas a funciones en un módulo importado. +Los parches de clase deben hacerse antes de que el módulo se instancia y modifica +todas las instancias hechas después de eso. +Un ejemplo podría ser parchear llamadas de botones del editor de gcode para llamar a funciones +en el archivo del controlador en su lugar. Los parches de clase también se conocen como parches de mono. ==== process_key_event __ (self, receptor, evento, is_pressed, key, code, shift, cntrl): + Esta función se llama para facilitar el desplazamiento del teclado, etc. -Al usar la biblioteca de combinaciones de teclas, esto se puede usar para agregar fácilmente + -funciones vinculadas a las pulsaciones de teclas. + +Al usar la biblioteca de combinaciones de teclas, esto se puede usar para agregar fácilmente +funciones vinculadas a las pulsaciones de teclas. ==== keypress_event __ (self, receptor, evento)): -Esta función proporciona eventos de pulsación de tecla sin procesar. Se necesita presidencia sobre + -el evento_clave_procesado. + + +Esta función proporciona eventos de pulsación de tecla sin procesar. Se necesita presidencia sobre +el evento_clave_procesado. ==== keyrelease_event __ (receptor, evento): -Esta función proporciona eventos de liberación de clave sin procesar. Se necesita presidencia sobre + -el evento_clave_procesado. + + +Esta función proporciona eventos de liberación de clave sin procesar. Se necesita presidencia sobre +el evento_clave_procesado. ==== before_loop __ (self): -Esta función se llama justo antes de ingresar el ciclo de eventos Qt. + -En este momento, todos los widgets / bibliotecas / código de inicialización se han completado y la pantalla ya se muestra. + + +Esta función se llama justo antes de ingresar el ciclo de eventos Qt. +En este momento, todos los widgets / bibliotecas / código de inicialización se han completado y la pantalla ya se muestra. ==== system_shutdown_request __ (self): -Si está presente, esta función anula la función normal llamada cuando un usuario selecciona un apagado total del sistema. + -Podría usarse para realizar tareas de limpieza antes del cierre. El sistema no se apagará si usa esta función, usted + -tienes que hacerlo tú mismo. qtvcp / linuxcnc se apagará sin un aviso después de que esta función regrese + + +Si está presente, esta función anula la función normal llamada cuando un usuario selecciona un apagado total del sistema. +Podría usarse para realizar tareas de limpieza antes del cierre. El sistema no se apagará si usa esta función, usted +tienes que hacerlo tú mismo. qtvcp / linuxcnc se apagará sin un aviso después de que esta función regrese ==== ending_cleanup __ (self) -Esta función se llama justo antes de que se cierre la pantalla. Se puede usar + -hacer la limpieza antes de cerrar. + + +Esta función se llama justo antes de que se cierre la pantalla. Se puede usar +hacer la limpieza antes de cerrar. === sección ESTADO DE LLAMADAS -Por convención, aquí es donde pondría funciones que son devoluciones de llamada + -de definiciones de ESTADO. + + +Por convención, aquí es donde pondría funciones que son devoluciones de llamada +de definiciones de ESTADO. === sección LLAMADAS DE FORMULARIO -Por convención, aquí es donde pondría funciones que son devoluciones de llamada + -desde los widgets que ha conectado a MainWindow con el + -editor de diseño + + +Por convención, aquí es donde pondría funciones que son devoluciones de llamada +desde los widgets que ha conectado a MainWindow con el +editor de diseño === sección FUNCIONES GENERALES -Por convención, aquí es donde pones tus funciones generales + + +Por convención, aquí es donde pones tus funciones generales === sección de enlace de teclas -Si está utilizando la biblioteca de combinación de teclas, aquí es donde coloca su + -Rutinas de llamadas clave personalizadas. + -La firma de la función es: + + +Si está utilizando la biblioteca de combinación de teclas, aquí es donde coloca su +Rutinas de llamadas clave personalizadas. +La firma de la función es: + [source, python] ---- def on_keycall_KEY (self, event, state, shift, cntrl): si estado: self.do_something_function () ---- -'KEY' es el código (de la biblioteca de combinaciones de teclas) para la clave deseada. + +'KEY' es el código (de la biblioteca de combinaciones de teclas) para la clave deseada. === sección EVENTO DE CIERRE -Al poner aquí la función de evento cerrado, se detectarán los eventos de cierre. + -Esto reemplaza cualquier función closeEvent predefinida de qtvcp + -Por lo general, es mejor usar la función de cierre_cleanup__ especial. + + +Al poner aquí la función de evento cerrado, se detectarán los eventos de cierre. +Esto reemplaza cualquier función closeEvent predefinida de qtvcp +Por lo general, es mejor usar la función de cierre_cleanup__ especial. + [source, python] ---- def closeEvent (self, event): @@ -620,48 +641,52 @@ Por lo general, es mejor usar la función de cierre_cleanup__ especial. + ---- == Conexión de widgets a código python -Es posible conectar widgets a código python usando señales y ranuras. + -De esta forma, puede dar nuevas funciones a los widgets de Linux o utilizar + -widgets estándar para controlar linuxcnc. + + +Es posible conectar widgets a código python usando señales y ranuras. +De esta forma, puede dar nuevas funciones a los widgets de Linux o utilizar +widgets estándar para controlar linuxcnc. === Descripción general -En el editor Designer, crearía ranuras de funciones de usuario y conectaría + -ellos a los widgets usando señales. + -En el archivo del controlador, crearía las funciones de la ranura definidas en Designer. + + +En el editor Designer, crearía ranuras de funciones de usuario y conectaría +ellos a los widgets usando señales. +En el archivo del controlador, crearía las funciones de la ranura definidas en Designer. === Usar Designer para agregar ranuras -Cuando haya cargado su pantalla en el diseñador, agregue un PushButton simple a la pantalla. + -Puede cambiar el nombre del botón a algo interesante como 'test_button' + -Hay dos formas de editar conexiones: esta es la forma gráfica + -Hay un botón en la barra de herramientas superior del diseñador para editar señales. + -Después de presionarlo, si hace clic y mantiene presionado el botón, se mostrará una flecha + -(parece una señal de tierra del esquema eléctrico) + -Deslice esta flecha a una parte de la ventana principal que no tenga widgets. + -Aparecerá un cuadro de diálogo 'Configurar conexiones'. + -La lista de la izquierda son las señales disponibles del widget. + -La lista de la derecha son las ranuras disponibles en la ventana principal y puede agregarlas. + - -Elija la señal 'clicked ()': esto hace que las ranuras estén disponibles. + -haga clic en 'editar' en la lista de tragamonedas. + -Aparecerá un cuadro de diálogo 'Ranuras / Señales de MainWindow'. + -En la lista de ranuras en la parte superior hay un ícono más: haga clic en él. + -ahora puede editar un nuevo nombre de ranura. + -Borre el nombre predeterminado 'slot ()' y cámbielo a test_button () + -presione el botón ok. + -Volverá al cuadro de diálogo 'Configurar conexiones'. + -ahora puede seleccionar su nuevo espacio en la lista de espacios. + -luego presione ok y guarde el archivo. + - -Señal de diseño / selección de ranura. +Cuando haya cargado su pantalla en el diseñador, agregue un PushButton simple a la pantalla. +Puede cambiar el nombre del botón a algo interesante como 'test_button' +Hay dos formas de editar conexiones: esta es la forma gráfica +Hay un botón en la barra de herramientas superior del diseñador para editar señales. +Después de presionarlo, si hace clic y mantiene presionado el botón, se mostrará una flecha +(parece una señal de tierra del esquema eléctrico) +Deslice esta flecha a una parte de la ventana principal que no tenga widgets. +Aparecerá un cuadro de diálogo 'Configurar conexiones'. +La lista de la izquierda son las señales disponibles del widget. +La lista de la derecha son las ranuras disponibles en la ventana principal y puede agregarlas. + +Elija la señal 'clicked ()': esto hace que las ranuras estén disponibles. +haga clic en 'editar' en la lista de tragamonedas. +Aparecerá un cuadro de diálogo 'Ranuras / Señales de MainWindow'. +En la lista de ranuras en la parte superior hay un ícono más: haga clic en él. +ahora puede editar un nuevo nombre de ranura. +Borre el nombre predeterminado 'slot ()' y cámbielo a test_button () +presione el botón ok. +Volverá al cuadro de diálogo 'Configurar conexiones'. +ahora puede seleccionar su nuevo espacio en la lista de espacios. +luego presione ok y guarde el archivo. + +.Señal de diseño / selección de ranura. image::images/designer_slots.png["QTvcp",align="left"] === Cambios en el archivo del controlador -Ahora debe agregar la función al archivo del controlador. + -La firma de la función es 'def slotname (self):' + -Agregaremos algo de código para imprimir el nombre del widget. + + +Ahora debe agregar la función al archivo del controlador. +La firma de la función es 'def slotname (self):' +Agregaremos algo de código para imprimir el nombre del widget. Entonces, para nuestro ejemplo: + [source, python] ---- def test_button (self): @@ -676,21 +701,21 @@ Agregue este código en la sección llamada: ####################### De hecho, no importa en qué parte de la clase de controlador coloque los comandos -pero por convención, aquí es donde ponerlo. + -Guarde el archivo del controlador. + -Ahora, cuando cargue su pantalla y presione el botón, debería imprimir el nombre + -del botón en la terminal. + +pero por convención, aquí es donde ponerlo. +Guarde el archivo del controlador. +Ahora, cuando cargue su pantalla y presione el botón, debería imprimir el nombre +del botón en la terminal. === Más información -<> +Removed all-English _es file: cha:qtvcp-widgets,widgets QtVCP -qtvcp-libraries,bibliotecas QtVCP +Removed all-Englush _es file: qtvcp-libraries,bibliotecas QtVCP -<> +Removed all-English _es file: cha:qtvcp-code,fragmentos de código de archivo del controlador QtVCP -<> +Removed all-English _es file: cha:qtvcp-development,QtVCP Development -<> +Removed all-English _es file: cha:qtvcp-custom-widgets,QtVCP Custom Designer Widgets diff --git a/docs/src/gui/tklinuxcnc_es.adoc b/docs/src/gui/tklinuxcnc_es.adoc deleted file mode 100644 index 9fd77ba894..0000000000 --- a/docs/src/gui/tklinuxcnc_es.adoc +++ /dev/null @@ -1,262 +0,0 @@ -[[cha:tklinuxcnc-gui]] - -= TkLinuxCNC GUI - -== Introduction - -TkLinuxCNC is one of the first graphical front-ends -for LinuxCNC. It is written in Tcl and uses the Tk toolkit -for the display. Being written in Tcl makes it very portable (it runs on a -multitude of platforms). A separate backplot window can be displayed as -shown. - -.TkLinuxCNC Window - -image::images/tkemc.png[align="center", alt="TkLinuxCNC Window"] - -== Getting Started - -To select TkLinuxCNC as the front-end for LinuxCNC, edit the .ini file. In the -section '[DISPLAY]' change the 'DISPLAY' line to read - ----- -DISPLAY = tklinuxcnc ----- - -Then, start LinuxCNC and select that ini file. The sample configuration -'sim/tklinuxcnc/tklinuxcnc.ini' is already configured to use TkLinuxCNC as its front-end. - -=== A typical session with TkLinuxCNC - -. Start LinuxCNC and select a configuration file. -. Clear the 'E-STOP' condition and turn the machine on (by - pressing F1 then F2). -. 'Home' each axis. -. Load the file to be milled. -. Put the stock to be milled on the table. -. Set the proper offsets for each axis by jogging and either homing - again or right-clicking an axis name and entering an offset value. - footnote:[For some of these actions it might be necessary to change the - mode LinuxCNC is currently running in.] -. Run the program. -. To mill the same file again, return to step 6. To mill a different - file, return to step 4. When you're done, exit LinuxCNC. - -== Elements of the TkLinuxCNC window - -The TkLinuxCNC window contains the following elements: - -* A menubar that allows you to perform various actions -* A set of buttons that allow you to change the current working mode, - start/stop spindle and other relevant I/O -* Status bar for various offset related displays -* Coordinate display area -* A set of sliders which control 'Jogging speed', 'Feed Override' - , and 'Spindle speed Override' which allow you to increase or - decrease those settings -* Manual data input text box 'MDI' -* Status bar display with active G-codes, M-codes, F- and S-words -* Interpreter related buttons -* A text display area that shows the G-code source of the loaded file - -=== Main buttons - -From left to right, the buttons are: - -* Machine enable: 'ESTOP' > 'ESTOP RESET' > 'ON' -* Toggle mist coolant -* Decrease spindle speed -* Set spindle direction 'SPINDLE OFF' > 'SPINDLE FORWARD' . - 'SPINDLE REVERSE' -* Increase spindle speed -* Abort - -then on the second line: - -* Operation mode: 'MANUAL' > 'MDI' > 'AUTO' -* Toggle flood coolant -* Toggle spindle brake control - -=== Offset display status bar - -The Offset display status bar displays the currently selected tool -(selected with Txx M6), the tool length offset (if active), and the -work offsets (set by right-clicking the coordinates). - -=== Coordinate Display Area - -The main part of the display shows the current position of the tool. -The color of the position readout depends on the state of the axis. If -the axis is unhomed the axis will be displayed in yellow letters. Once -homed it will be displayed in green letters. If there is an error with -the current axis TkLinuxCNC will use red letter to show that. (for example -if an hardware limit switch is tripped). - -To properly interpret these numbers, refer to the radio boxes on the -right. If the position is 'Machine', then the displayed number is in -the machine coordinate system. If it is 'Relative', then the displayed -number is in the offset coordinate system. Further down the choices can -be 'actual' or 'commanded'. Actual refers to the feedback coming from -encoders (if you have a servo machine), and the 'commanded' refers to -the position command send out to the motors. These values can differ -for several reasons: Following error, deadband, encoder resolution, or -step size. For instance, if you command a movement to X 0.0033 on your -mill, but one step of your stepper motor is 0.00125, then the -'Commanded' position will be 0.0033 but the 'Actual' position will be -0.0025 (2 steps) or 0.00375 (3 steps). - -Another set of radio buttons allows you to choose between 'joint' and -'world' view. These make little sense on a normal type of machine (e.g. -trivial kinematics), but help on machines with non-trivial kinematics -like robots or stewart platforms. (you can read more about kinematics -in the Integrator Manual). - -.Backplot - -When the machine moves, it leaves a trail called the backplot. You can -start the backplot window by selecting View→Backplot. - -=== Automatic control - -.Buttons for control - -The buttons in the lower part of TkLinuxCNC are used to control the execution of a -program: 'Open' to load a program, 'Verify' to -check it for errors, 'Run' to start the actual cutting, -'Pause' to stop it while running, 'Resume' to -resume an already paused program, 'Step' to advance one line -in the program and 'Optional Stop' to toggle the -optional stop switch (if the button is green the program execution will -be stopped on any M1 encountered). - -.TkLinuxCNC Interpreter / program control -image::images/tkemc-interp.png[align="center", alt="TkLinuxCNC Interpreter / program control"] - -.Text Program Display Area - -When the program is running, the line currently being executed is -highlighted in white. The text display will automatically scroll to -show the current line. - -=== Manual Control - -.Implicit keys - -TkLinuxCNC allows you to manually move the machine. This action is known as -'jogging'. First, select the axis to be moved by clicking it. Then, -click and hold the '+' or '-' button depending on the desired direction -of motion. The first four axes can also be moved by the keyboard arrow keys -(X and Y), the PAGE UP and PAGE DOWN keys (Z) and the '[' and ']' keys (A/4th). - -If 'Continuous' is selected, the motion will continue as long as the -button or key is pressed. If another value is selected, the machine -will move exactly the displayed distance each time the button is -clicked or the key is pressed. The available values are: -'1.0000, 0.1000, 0.0100, 0.0010, 0.0001' - -By pressing 'Home' or the HOME key, the selected axis will be homed. -Depending on your configuration, this may just set the axis value to be -the absolute position 0.0, or it may make the machine move to a -specific home location through use of 'home switches'. See the -<> for more information. - -By pressing 'Override Limits', the machine will temporarily be -permitted to jog outside the limits defined in the .ini file. (Note: if -'Override Limits' is active the button will be displayed using a red -color). - -.TkLinuxCNC Override Limits & Jogging increments example - -image::images/tkemc-override-limits.png[align="center", alt="TkLinuxCNC Override Limits and Jogging increments example"] - -.The Spindle group - -The button on the first row selects the direction for the spindle to -rotate: Counterclockwise, Stopped, Clockwise. The buttons next to it -allow the user to increase or decrease the rotation speed. The button -on the second row allows the spindle brake to be engaged or released. -Depending on your machine configuration, not all the items in this -group may have an effect. - -.The Coolant group - -The two buttons allow the 'Mist' and 'Flood' coolants to be turned on -and off. Depending on your machine configuration, not all the items in -this group may appear. - -=== Code Entry - -Manual Data Input (also called MDI), allows G-code programs to be -entered manually, one line at a time. When the machine is not turned -on, and not set to MDI mode, the code entry controls are unavailable. - -.The Code Entry tab - -image::images/tkemc-mdi.png[align="center", alt="The Code Entry tab"] - -.MDI: - -This allows you to enter a g-code command to be executed. Execute the -command by pressing Enter. - -.Active G-Codes - -This shows the 'modal codes' that are active in the interpreter. For -instance, 'G54' indicates that the 'G54 offset' is applied to all -coordinates that are entered. - -=== Jog Speed - -By moving this slider, the speed of jogs can be modified. The numbers -above refer to axis units / second. The text box with the number is -clickable. Once clicked a popup window will appear, allowing for a -number to be entered. - -=== Feed Override - -By moving this slider, the programmed feed rate can be modified. For -instance, if a program requests 'F60' and the slider is set to 120%, -then the resulting feed rate will be -72. The text box with the number is clickable. Once clicked a popup -window will appear, allowing for a number to be entered. - -=== Spindle speed Override - -The spindle speed override slider works exactly like the feed override -slider, but it controls to the spindle speed. If a program requested -S500 (spindle speed 500 RPM), and the slider is set to 80%, then the -resulting spindle speed will be 400 RPM. This slider has a minimum and -maximum value defined in the ini file. If those are missing the slider -is stuck at 100%. The text box with the number is clickable. Once -clicked a popup window will appear, allowing for a number to be -entered. - -== Keyboard Controls - -Almost all actions in TkLinuxCNC can be accomplished with the keyboard. -Many of the shortcuts are unavailable when in MDI mode. - -The most frequently used keyboard shortcuts are shown in the -following table. - -.Most Common Keyboard Shortcuts - -[width="75%", options="header", cols="1^,3<"] -|======================================== -|Keystroke | Action Taken -|F1 | Toggle Emergency Stop -|F2 | Turn machine on/off -|`, 1 .. 9, 0 | Set feed override from 0% to 100% -|X, ` | Activate first axis -|Y, 1 | Activate second axis -|Z, 2 | Activate third axis -|A, 3 | Activate fourth axis -|Home | Send active axis Home -|Left, Right | Jog first axis -|Up, Down | Jog second axis -|Pg Up, Pg Dn | Jog third axis -|[, ] | Jog fourth axis -|ESC | Stop execution -|======================================== - - diff --git a/docs/src/gui/tooledit.adoc b/docs/src/gui/tooledit.adoc index e641ac508e..e319997dff 100644 --- a/docs/src/gui/tooledit.adoc +++ b/docs/src/gui/tooledit.adoc @@ -55,14 +55,12 @@ following ini file setting: image::images/tooledit-columns.png["Tool Edit GUI - Column Selection",align="center"] .Syntax of .INI file - ---- [DISPLAY] TOOL_EDITOR = tooledit column_name column_name ... ---- .Example for Z and DIAM columns - ---- [DISPLAY] TOOL_EDITOR = tooledit Z DIAM @@ -123,3 +121,4 @@ supports all tool table parameters, allows addition and deletion of tool entries, and performs a number of validity checks on parameter values. +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/tooledit_es.adoc b/docs/src/gui/tooledit_es.adoc index e3b54c822b..1c254958cf 100644 --- a/docs/src/gui/tooledit_es.adoc +++ b/docs/src/gui/tooledit_es.adoc @@ -1,12 +1,12 @@ :lang: es -[[cha:tooledit-gui]] +[[cha:tooledit-gui]] = GUI del Editor de Herramientas == Descripción general .Tabla de herramientas -image::images/tooledit.png[align="center", width="640", alt="GUI del Editor de Herramientas - Descripción general"] +image::images/tooledit.png["GUI del Editor de Herramientas - Descripción general",align="center", width="640"] El programa 'tooledit' puede actualizar el archivo de la tabla de herramientas con los cambios editados usando el botón Guardar Archivo. El botón Guardar Archivo @@ -24,7 +24,7 @@ en orden descendente. La clasificación de columnas requiere que la máquina se configure con la versión tcl mayor o igual a la 8.5. .Clasificacion segun DIAM -image::images/tooledit-sort.png[align="center", alt="GUI del Editor de Herramientas - Ordenación por columnas"] +image::images/tooledit-sort.png["GUI del Editor de Herramientas - Ordenación por columnas",align="center"] Dependiendo de otras aplicaciones instaladas en el sistema, puede ser necesario habilitar tcl/tk8.5 con los comandos: @@ -38,9 +38,7 @@ Por defecto, el programa 'tooledit' mostrará todas las posibles columnas de parámetros de la tabla de herramientas. Dado que pocas máquinas utilizan todos los parámetros, las columnas mostradas pueden ser limitadas con el siguiente ajuste de archivo ini: - - -Sintaxis en archivo .INI +.Sintaxis en archivo .INI ---- [DISPLAY] TOOL_EDITOR = tooledit column_name column_name ... @@ -52,7 +50,7 @@ TOOL_EDITOR = tooledit column_name column_name ... TOOL_EDITOR = tooledit Z DIAM ---- -image::images/tooledit-columns.png[align="center", alt="GUI del Editor de Herramientas - Selección de columnas"] +image::images/tooledit-columns.png["GUI del Editor de Herramientas - Selección de columnas",align="center"] == Uso independiente El programa 'tooledit' también se puede invocar como un programa independiente. @@ -88,7 +86,6 @@ un procesador de textos). La gui Axis puede usar opcionalmente una configuración de archivo ini para especificar el programa editor de herramientas - [DISPLAY]TOOL_EDITOR = path_to_editor_programa Por defecto, se usa el programa llamado 'tooledit'. Este editor @@ -96,4 +93,4 @@ es compatible con todos los parámetros de la tabla de herramientas, permite la de entradas de herramientas, y realiza una serie de verificaciones de validez en valores paramétricos. - +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/tooledit_fr.adoc b/docs/src/gui/tooledit_fr.adoc index 6ca9d5885b..54c51fdfbc 100644 --- a/docs/src/gui/tooledit_fr.adoc +++ b/docs/src/gui/tooledit_fr.adoc @@ -1,10 +1,9 @@ :lang: fr :toc: +[[cha:tooledit-gui]] = Éditeur graphique de table d'outils -[[cha:editeur-tooledit]] - == Versions requises pour l'éditeur d'outils [NOTE] Les éléments de tooledit modifiables décrits ici sont disponibles diff --git a/docs/src/gui/touchy.adoc b/docs/src/gui/touchy.adoc index 309367a3c2..957aa34f01 100644 --- a/docs/src/gui/touchy.adoc +++ b/docs/src/gui/touchy.adoc @@ -43,7 +43,6 @@ Touchy has several output pins that are meant to be connected to the motion controller to control wheel jogging: - 'touchy.jog.wheel.increment', which is to be connected to the 'axis.N.jog-scale' pin of each axis N. - - 'touchy.jog.wheel.N', which is to be connected to 'axis.N.jog-enable' for each axis N. [NOTE]'N' represents the axis number 0-8. @@ -142,3 +141,5 @@ This macro capability is useful for edge/hole probing and other setup tasks, as well as perhaps hole milling or other simple operations that can be done from the panel without requiring specially-written gcode programs. + +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/touchy_es.adoc b/docs/src/gui/touchy_es.adoc index 9b1d79752d..79e5e0c871 100644 --- a/docs/src/gui/touchy_es.adoc +++ b/docs/src/gui/touchy_es.adoc @@ -1,9 +1,12 @@ :lang: es [[cha:touchy-gui]] - = GUI táctil +:ini: {basebackend@docbook:'':ini} +:hal: {basebackend@docbook:'':hal} +:ngc: {basebackend@docbook:'':ngc} + Touchy es una interfaz de usuario para LinuxCNC diseñada para su uso en paneles de control de máquinas, y por lo tanto no requiere teclado ni mouse. @@ -15,7 +18,6 @@ La pestaña 'Volante' tiene botones radio para seleccionar entre las funciones d También están previstos botones radio para la selección de eje e incrementos para jog .Touchy - image::images/touchy.png[align="center", alt="GUI Touchy"] == Configuración del panel @@ -27,24 +29,26 @@ directorio de configuración (el directorio en el que se encuentra su archivo in conectar sus controles. Touchy ejecuta los comandos HAL en este archivo después de que haya hecho disponibles sus propios pines para la conexión. +[NOTE] +Touchy used to require that you create a file named 'touchy.hal' in your +configuration directory (the directory your INI file is in). For legacy reasons +this will continue to work, but INI based postgui files are preferred. + Para obtener más información sobre los archivos HAL y el comando net, consulte el <>. Touchy tiene varios pines de salida que deben conectarse al controlador de movimiento para controlar el jogging de volante: - - 'touchy.jog.wheel.increment', -que debe conectarse al pin 'axis.N.jog-scale' de cada eje N. - - - 'touchy.jog.wheel.N', que se debe conectar a 'axis.N.jog-enable' -para cada eje N. + - 'touchy.jog.wheel.increment', que debe conectarse al pin 'axis.N.jog-scale' de cada eje N. + - 'touchy.jog.wheel.N', que se debe conectar a 'axis.N.jog-enable' para cada eje N. [NOTE] 'N' representa el número de eje 0-8. - Además de estar conectado a 'touchy.wheel-count', la cuenta del volante -también debe estar conectada a 'axis.N.jog-count' para cada eje N. Si usa el componente -HAL 'ilowpass' para suavizar el jog con el volante, -asegúrese de suavizar solo 'axis.N.jog-count' y no 'touchy.wheel-count'. + también debe estar conectada a 'axis.N.jog-count' para cada eje N. Si usa el componente + HAL 'ilowpass' para suavizar el jog con el volante, + asegúrese de suavizar solo 'axis.N.jog-count' y no 'touchy.wheel-count'. .Controles requeridos. @@ -58,14 +62,14 @@ asegúrese de suavizar solo 'axis.N.jog-count' y no 'touchy.wheel-count'. - Para jog continuo, una palanca momentánea bidireccional centrada (o dos botones momentáneos) para cada eje, enganchados a 'touchy.jog.continuous.x.negative', 'touchy.jog.continuous.x.positive', etc. - - Si se desea un botón momentaneo para mover Z a la parte superior del recorrido a maxima velocidad - , debe conectarse a 'touchy.quill-up'. + - Si se desea un botón momentaneo para mover Z a la parte superior del recorrido a maxima velocidad, + debe conectarse a 'touchy.quill-up'. .Lámparas de panel opcionales. - 'touchy.jog.active' muestra cuando los controles de desplazamiento del panel están activos. - 'touchy.status-indicator' está encendido cuando la máquina está ejecutando código G, - y parpadea cuando la máquina está ejecutando pero está en pausa/feedhold. + y parpadea cuando la máquina está ejecutando pero está en pausa/feedhold. === Recomendado para cualquier configuración @@ -95,7 +99,9 @@ Touchy puede invocar macros O-word usando la interfaz MDI. Para configurar esto, en la sección '[TOUCHY]' del archivo ini, agregue una o más líneas 'MACRO'. Cada una debe tener el formato -'MACRO = increment xinc yinc' +---- +MACRO = increment xinc yinc +---- En este ejemplo, increment es el nombre de la macro y acepta dos parámetros, llamados xinc e yinc. @@ -132,3 +138,4 @@ de configuracion, así como quizás fresado de agujeros u otras operaciones simp que se puede hacer desde el panel sin necesidad de escribir especialmente programas de gcode. +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/touchy_fr.adoc b/docs/src/gui/touchy_fr.adoc index bb7ff24017..2e8eed7d80 100644 --- a/docs/src/gui/touchy_fr.adoc +++ b/docs/src/gui/touchy_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= L'interface graphique Touchy - [[cha:touchy-gui]] += L'interface graphique Touchy Touchy est une interface utilisateur pour LinuxCNC, destinée à être utilisée avec les panneaux de commande de machines. Il ne nécessite ni clavier, ni souris. @@ -12,7 +11,6 @@ Il a été conçu pour fonctionner également sur les écrans tactiles, en combi avec une manivelle électronique (MPG) et des boutons et interrupteurs. .L'interface tactile Touchy - image::images/touchy_fr.png[alt="L'interface tactile Touchy"] == Panneau de Configuration @@ -28,16 +26,14 @@ Touchy dispose de plusieurs pins de sortie destinées à être connectées au contrôleur de mouvement pour gérer les manivelles de jog: - touchy.jog.wheel.increment, - qui doit être connecté à la pin _axis.N.jog-scale_ de chacun des N axes. - + qui doit être connecté à la pin _axis.N.jog-scale_ de chacun des N axes. - touchy.jog.wheel.N, qui doit être connecté à _axis.N.jog-enable_ pour - chacun des N axes. - + chacun des N axes. - En plus d'être connecté à _touchy.wheel-counts_, le compteur d'impulsions - de la manivelle doit aussi être connecté à _axis.N.jog-counts_ pour chacun - des N axes. Si le composant de HAL _ilowpass_ est utilisé pour adoucir les - mouvements de jog à la manivelle, il faut l'appliquer uniquement sur - _axis.N.jog-counts_ et non sur _touchy.wheel-counts_. + de la manivelle doit aussi être connecté à _axis.N.jog-counts_ pour chacun + des N axes. Si le composant de HAL _ilowpass_ est utilisé pour adoucir les + mouvements de jog à la manivelle, il faut l'appliquer uniquement sur + _axis.N.jog-counts_ et non sur _touchy.wheel-counts_. ==== Contrôles requis @@ -45,25 +41,23 @@ contrôleur de mouvement pour gérer les manivelles de jog: - Un bouton de _Départ cycle_ (contact momentané) connecté à _touchy.cycle-start_ - Volant/Manivelle/MPG, connecté à _touchy.wheel-counts_ et à la pin de mouvement comme décrit précédemment. - - Un bouton à bascule simple (contact à deux positions) connecté à -_touchy.single-block_ + - Un bouton à bascule simple (contact à deux positions) connecté à _touchy.single-block_ ==== Contrôles optionnels - - Pour le jog continu, un interrupteur à trois positions avec retour au centre + - Pour le jog continu, un interrupteur à trois positions avec retour au centre (ou deux boutons momentanés) pour chacun des axes concernés, attaché à - _touchy.jog.continuous.x.negative_ et à _touchy.jog.continuous.x.positive_, - etc. pour les autres axes. - - Si un bouton de genouillère est nécessaire, (pour jogger Z en haut de sa - course en grande vitesse), un bouton à contact momentané sera connecté à -_touchy.quill-up_. + _touchy.jog.continuous.x.negative_ et à _touchy.jog.continuous.x.positive_, + etc. pour les autres axes. + - Si un bouton de genouillère est nécessaire, (pour jogger Z en haut de sa + course en grande vitesse), un bouton à contact momentané sera connecté à _touchy.quill-up_. ==== Voyants de panneau optionnels - _touchy.jog.active_ indique quand les contrôles de jog du panneau sont actifs. - _touchy.status-indicator_ est allumé en continu quand la machine exécute un - G-code et clignote quand la machine est en marche mais en pause, ou en - vitesse à zéro. + G-code et clignote quand la machine est en marche mais en pause, ou en + vitesse à zéro. === Recommandé pour toutes les configurations @@ -133,3 +127,4 @@ contours ou d'orifices ainsi que pour d'autres opérations simples pré-configurées, de fraisage ou de perçage, qui pourront être réalisées depuis le panneau de Touchy sans avoir, pour cela, à écrire de programme G-code. +// vim: set syntax=asciidoc: diff --git a/docs/src/gui/vismach_es.adoc b/docs/src/gui/vismach_es.adoc deleted file mode 100644 index 3f750ec4fa..0000000000 --- a/docs/src/gui/vismach_es.adoc +++ /dev/null @@ -1,306 +0,0 @@ -[[cha:vismach]] - -= Vismach - -Vismach is a set of Python functions that can be used to create and animate -models of machines. Vismach displays the model in a 3D viewport and the model -parts are animated as the values of associated HAL pins change. - -image::images/vismach.png[align="center", alt="Vismach displays the model in a 3D viewport"] - -The Vismach viewport view can be manipulated as follows - -* zoom by scroll wheel or right button drag - -* pan by left button drag - -* rotate by middle-button drag or shift-drag. - -A Vismach model takes the form of a Python script and can use standard Python -syntax. This means that there is more than one way to lay out the script, but -in the examples given in this document I will use the simplest and most basic -of them. - -The basic sequence in creating the Vismach model is - -* Create the HAL pins that control the motion - -* Create the parts - -* Define how they move - -* Assemble into movement groups - -== Start the script - -It is useful for testing to include the '#!/usr/bin/env python3' to allow the file -to be run as a script. The first thing to do is to import the required -libraries. - ----- -#!/usr/bin/env python3 - -from vismach import * -import hal -import math -import sys ----- - -== Create the HAL pins. - -Hal pins are created with the normal Python "hal" library, and are not -specific to Vismach. Further details can be found in the <> section. -A component should be created with a name that matches the script file name and -then the HAL pins are added to that component. They will be referenced by their -component handle and short name when used to animate the Vismach model. - - c = hal.component("samplegui") - c.newpin("joint0", hal.HAL_FLOAT, hal.HAL_IN) - c.newpin("joint1", hal.HAL_FLOAT, hal.HAL_IN) - c.ready() - -Will create HAL pins 'samplegui.joint0' and 'samplegui.joint1'. When loading -the Vismach model with 'loadusr -W samplegui' the 'c.ready()' function tells -loadusr it's ready. - -== Creating Parts - -It is probably easiest to create geometry in a CAD package and import into -the model script with the AsciiSTL() or AsciiOBJ() functions. -Both functions can take one of two named arguments, either a filename or raw -data - - part = AsciiSTL(filename="path/to/file.stl) - part = AsciiSTL(data="solid part1 facet normal ....") - part = AsciiOBJ(filename="path/to/file.obj) - part = AsciiOBJ(data="v 0.123 0.234 0.345 1.0 ...") - -The parts will be created in the Vismach space in the same locations as they -occupy in the STL or OBJ space. This means that it may be possible to assemble -the model in the CAD package. - -Alternatively parts can be created inside the model script from a range of -shape primitives. Many shapes are created at the origin and need to be moved to -the required location after creation. - - cylinder = CylinderX(x1, r1, x2, r2) - cylinder = CylinderY(y1, r1, y2, r2) - cylinder = CylinderZ(z1, r1, z2, r2) - -Creates a (optionally tapered) cylinder on the given axis with the given radii -at the given points on the axis. - - sphere = Sphere(x, y, z, r) - -Creates a sphere of radius r at (x,y,z) - - triangle = TriangleXY(x1, y1, x2, y2, x3, y3, z1, z2) - triangle = TriangleXZ(x1, z1, x2, z2, x3, z3, y1, y2) - triangle = TriangleYZ(y1, z1, y2, z2, y3, z3, x1, x2) - -Creates a triangular plate between planes defined by the last two values -parallel to the specified plane, with vertices given by the three coordinate -pairs. - - arc = ArcX(x1, x2, r1, r2, a1, a2) - -Create an arc shape. - - box = Box(x1, y1, z1, x2, y2, z2) - -Creates a rectangular prism with opposite corners at the specified positions -and edges parallel to the XYZ axes. - - box = BoxCentered(xw, yw, zw) - -Creates an xw by yw by zw box centred on the origin. - - box = BoxCenteredXY(xw, yw, z) - -Creates a box of width xw / yw and height z. - -Composite parts may be created by assembling these primitives either at creation -time or subsequently: - - part1 = Collection([Sphere(100,100,100,50), CylinderX(100,40,150,30)]) - part2 = Box(50,40,75,100,75,100) - part3 = Collection([part2, TriangleXY(10,10,20,10,15,20,100,101)]) - part4 = Collection([part1, part2]) - -== Moving Parts - -Parts may need to be moved in the Vismach space to assemble the model. They may -also need to be moved to create the animation as the animation rotation axis is -created at the origin (but moves with the Part). - - part1 = Translate([part1], x, y, z) - -Move part1 the specified distances in x, y and z. - - part1 = Rotate([part1], theta, x, y, z) - -Rotate the part by angle theta about an axis between the origin and x, y, z. - -== Animating Parts - -To animate the model (controlled by the values of HAL pins) there are two -functions 'HalTranslate' and 'HalRotate'. For parts to move inside an assembly -they need to have their HAL motions defined before being assembled with the -"Collection" command. The rotation axis and and translation vector move with the -part as it is moved by the vismach script during model assembly, or as it moves -in response to the HAL pins as the model is animated. - - part = HalTranslate([part], comp, "hal_pin", xs, ys, zs) - -The function arguments are first a collection/part which can be pre-created -earlier in the script, or could be created at this point if preferred eg -part1 = HalTranslate([Box(....)], ...). -The the HAL component is the next argument, ie the object returned by the comp -= hal.component(...) command. After that is the name of the HAL in that will -animate the motion, this needs to match an existing HAL pin that is part of -the HAL component created earlier in the script. - -Then follow the X, Y, Z scales. For a Cartesian machine created at 1:1 scale -this would typically be 1,0,0 for a motion in the positive X direction. However -if the STL file happened to be in cm and the machine was in inches, this -could be fixed at this point by using 0.3937 (1cm /2.54in) as the scale. - - part = HalRotate([part], comp, "hal_pin", angle_scale, x, y, z) - -This command is similar in its operation to HalTranslate except that it is -typically necessary to move the part to the origin first to define the axis. -The axis of rotation is from the origin point to the point defined by (x,y,z). -Rotation angles are in degrees, so for a rotary joint with a 0-1 scaling you -would need to use an angle scale of 360. When the part is moved back away from -the origin to its correct location the axis of rotation can be considered to -remain "embedded" in the part. - -== Assembling the model. - -In order for parts to move together they need to be assembled with the -Collection() command. It is important to assemble the parts and define their -motions in the correct sequence. For example to create a moving head milling -machine with a rotating spindle and an animated draw bar you would: - -* Create the head main body. - -* Create the spindle at the origin. - -* Define the rotation. - -* Move the head to the spindle or spindle to the head. - -* Create the draw bar - -* Define the motion of the draw bar - -* Assemble the three parts into a head assembly - -* Define the motion of the head assembly. - -In this example the spindle rotation is indicated by rotation of a set of drive -dogs: - ----- -#Drive dogs -dogs = Box(-6,-3,94,6,3,100) -dogs = Color([1,1,1,1],[dogs]) -dogs = HalRotate([dogs],c,"spindle",360,0,0,1) -dogs = Translate([dogs],-1,49,0) - -#Drawbar -draw = CylinderZ(120,3,125,3) -draw = Color([1,0,.5,1],[draw]) -draw = Translate([draw],-1,49,0) -draw = HalTranslate([draw],c,"drawbar",0,0,1) - -# head/spindle -head = AsciiSTL(filename="./head.stl") -head = Color([0.3,0.3,0.3,1],[head]) -head = Translate([head],0,0,4) -head = Collection([head, tool, dogs, draw]) -head = HalTranslate([head],c,"Z",0,0,0.1) - -# base -base = AsciiSTL(filename="./base.stl") -base = Color([0.5,0.5,0.5,1],[base]) -# mount head on it -base = Collection([head, base]) ----- - -Finally a single collection of all the machine parts, floor and work (if any) -needs to be created. For a serial machine each new part will be added to the -collection of the previous part. For a parallel machine there may be several -"base" parts. Thus, for example, in scaragui.py link3 is added to link2, link2 -to link1 and link1 to link0, so the final model is created by - - model = Collection([link0, floor, table]) - -Whereas a VMC model with separate parts moving on the base might have - - model = Collection([base, saddle, head, carousel]) - -== Other functions - - part = Color([colorspec], [part]) - -Sets the display color of the part. Note that unlike the other functions the -part definition comes second in this case. The colorspec consists of the three -RGB values and an opacity. For example [1,0,0,0.5] for a 50% opacity red. - - myhud = Hud() - -Creates a heads-up display in the Vismach GUI to display such items as axis -positions. - -//// -Need to play around with this to see how it works. -//// - - part = Capture() - -I have no idea what this does, but it seems to be important for tool tip -visualization. - - main(model, tooltip, work, size=10, hud=0, rotation_vectors=None, lat=0, lon=0) - -This is the command that makes it all happen, creates the display etc. -"model" should be a collection that contains all the machine parts. "tooltip" -and "work" need to be created by Capture() to visualize their motion in the -back plot. See scaragui.py for an example of how to connect the tool tip to a tool -and the tool to the model. - -Either rotation_vectors or latitude / longitude can be used to set the -original viewpoint and it is advisable to do as the default initial viewpoint -is rather unhelpfully from immediately overhead. - -size sets the extent of the volume visualized in the initial view. -hud refers to a head-up display of axis positions. - -== Basic structure of a Vismach script. - ----- -#imports -from vismach import * -import hal -#create the HAL component and pins -comp = hal.component("compname") -comp.newpin("pin_name", hal.HAL_FLOAT, hal.HAL_IN) -... -#create the floor, tool and work -floor = Box(-50, -50, -3, 50, 50, 0) -work = Capture() -tooltip = Capture() -... -#Build and assemble the model -part1 = Collection([Box(-6,-3,94,6,3,100)]) -part1 = Color([1,1,1,1],[part1]) -part1 = HalRotate([part1],comp,"pin_name",360,0,0,1) -part1 = Translate([dogs],-1,49,0) -... -#create a top-level model -model = Collection([base, saddle, head, carousel]) -#Start the visualization -main(model, tooltip, work, 100, lat=-75, lon=215) ----- diff --git a/docs/src/hal/basic-hal.adoc b/docs/src/hal/basic-hal.adoc index d17d67e03b..ee5442d434 100644 --- a/docs/src/hal/basic-hal.adoc +++ b/docs/src/hal/basic-hal.adoc @@ -393,13 +393,13 @@ Pins Truth Table [width="90%", options="header"] -|======================================== -|in0 | in1 | out +|=== +|in0 | in1 | out |False | False | False -|True | False | False -|False | True | False -|True | True | True -|======================================== +|True | False | False +|False | True | False +|True | True | True +|=== === not @@ -424,11 +424,11 @@ Pins Truth Table [width="90%", options="header"] -|======================================== -|in | out -|True | False +|=== +|in | out +|True | False |False | True -|======================================== +|=== === or2 @@ -453,13 +453,13 @@ Pins Truth Table [width="90%", options="header"] -|======================================== -|in0 | in1 | out -|True | False | True -|True | True | True -|False | True | True +|=== +|in0 | in1 | out +|True | False | True +|True | True | True +|False | True | True |False | False | False -|======================================== +|=== === xor2 @@ -484,13 +484,13 @@ Pins Truth Table [width="90%", options="header"] -|======================================== +|=== |in0 | in1 | out |True | False | True |True | True | False |False | True | True |False | False | False -|======================================== +|=== == Logic Examples diff --git a/docs/src/hal/basic-hal_fr.adoc b/docs/src/hal/basic-hal_fr.adoc index 6c25f5575e..1265067e6f 100644 --- a/docs/src/hal/basic-hal_fr.adoc +++ b/docs/src/hal/basic-hal_fr.adoc @@ -263,7 +263,7 @@ A 'float' is a floating point number. In other words the decimal point can move as needed. - float values = a 64 bit floating point value, with approximately 53 bits of -resolution and over 1000 bits of dynamic range. + resolution and over 1000 bits of dynamic range. For more information on floating point numbers see: @@ -388,6 +388,7 @@ Table de vérité Le composant 'or2' est une porte OR à deux entrées. Syntaxe + ---- or2[count=n] or [names=name1[,name2...]] ---- @@ -472,6 +473,7 @@ au 'binaire codé décimal' mais avec plus d'options. Le bit 'hold' interrompt l traitement des entrées, de sorte que la valeur 'sum' ne change plus. La syntaxe suivante est utilisée pour charger le composant weighted_sum. + ---- loadrt weighted_sum wsum_sizes=size[,size,...] ---- diff --git a/docs/src/hal/hal-examples.adoc b/docs/src/hal/hal-examples.adoc index cd1eb1e6c2..cef42bcd58 100644 --- a/docs/src/hal/hal-examples.adoc +++ b/docs/src/hal/hal-examples.adoc @@ -172,9 +172,7 @@ that the PID command value changes to new settings more slowly. Three built-in components that limit a signal are: * 'limit2' limits the range and first derivative of a signal. - * 'limit3' limits the range, first and second derivatives of a signal. - * 'lowpass' uses an exponentially-weighted moving average to track an input signal. To find more information on these HAL components check the man pages. diff --git a/docs/src/hal/hal-examples_es.adoc b/docs/src/hal/hal-examples_es.adoc index 4a01379127..8dc3c618f9 100644 --- a/docs/src/hal/hal-examples_es.adoc +++ b/docs/src/hal/hal-examples_es.adoc @@ -155,8 +155,7 @@ IPM en la dirección negativa. Tenga en cuenta que podemos obtener el valor abso desde el pin abs.0.out o la señal X-IPM. .Ejemplo cálculo de velocidad[[cap:Velocity-Example]] - -image::images/velocity-01.png[alt="Ejemplo Velocidad"] +image::images/velocity-01.png["Ejemplo Velocidad"] == Arranque suave @@ -173,9 +172,7 @@ el valor del comando PID cambiará a nuevos valores más lentamente. Los tres componentes integrados que limitan una señal son: * 'limit2' limita el rango y la primera derivada de una señal. - * 'limit3' limita el rango, primera y segunda derivada de una señal. - * 'lowpass' utiliza un promedio móvil ponderado exponencialmente para rastrear una señal de entrada. Para encontrar más información sobre estos componentes HAL, consulte las páginas del manual. @@ -229,8 +226,7 @@ Para separar las señales para que pueda verlas mejor, haga clic en un canal y luego use el control deslizante Pos en el cuadro Vertical para establecer las posiciones. .Arranque suave[[cap:Softstart]] - -image::images/softstart-scope.png[alt="Softstart"] +image::images/softstart-scope.png["Softstart"] To see the effect of changing the set point values of any of the components you can change them in the terminal window. To see what @@ -254,16 +250,6 @@ interferir con la carga de LinuxCNC. Para obtener más información sobre Halscope, consulte el manual de HAL. -== Stand Alone HAL - -In some cases you might want to run a GladeVCP screen with just HAL. For -example say you had a stepper driven device that all you need is to run a -stepper motor. A simple 'Start/Stop' interface is all you need for your -application so no need to load up and configure a full blown CNC application. - -In the following example we have created a simple GladeVCP panel with one - -.Basic Syntax == HAL independiente En algunos casos, es posible que desee ejecutar una pantalla GladeVCP solo con HAL. Por diff --git a/docs/src/hal/haltcl.adoc b/docs/src/hal/haltcl.adoc index 108cffd61c..6ab9473c45 100644 --- a/docs/src/hal/haltcl.adoc +++ b/docs/src/hal/haltcl.adoc @@ -119,6 +119,7 @@ values and the initial (and possibly only) value in the list. In Tcl, this is written `[lindex $::SECTION(ITEM) 0]`. For example: given the following ini values + ---- [HOSTMOT2] DRIVER=hm2_eth @@ -126,17 +127,23 @@ IPADDR="10.10.10.10" BOARD=7i92 CONFIG="num_encoders=0 num_pwmgens=0 num_stepgens=6" ---- + And this loadrt command: + ---- loadrt $::HOSTMOT2(DRIVER) board_ip=$::HOSTMOT2(IPADDR) config=$::HOSTMOT2(CONFIG) ---- + Here is the actual command that is run: + ---- loadrt hm2_eth board_ip={"10.10.10.10"} config={"num_encoders=0 num_pwmgens=0 num_stepgens=6"} ---- + This fails because loadrt does not recognize the braces. So to get the values just as entered in the ini file, re-write the loadrt line like this: + ---- loadrt $::HOSTMOT2(DRIVER) board_ip=[lindex $::HOSTMOT2(IPADDR) 0] config=[lindex $::HOSTMOT2(CONFIG) 0] ---- @@ -243,3 +250,4 @@ 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. +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/haltcl_es.adoc b/docs/src/hal/haltcl_es.adoc index 91ac661510..ac90811e94 100644 --- a/docs/src/hal/haltcl_es.adoc +++ b/docs/src/hal/haltcl_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:haltcl]] - = Archivos HALTCL El lenguaje halcmd sobresale en la especificación de componentes y conexiones, pero @@ -118,6 +117,7 @@ valores y el valor inicial (y posiblemente unico) en la lista. En Tcl, esto se escribe `[lindex $::SECTION(ITEM) 0]`. Por ejemplo: dados los siguientes valores ini + ---- [HOSTMOT2] DRIVER=hm2_eth @@ -125,17 +125,23 @@ IPADDR="10.10.10.10" BOARD=7i92 CONFIG="num_encoders=0 num_pwmgens=0 num_stepgens=6" ---- + Y este comando loadrt: + ---- loadrt $::HOSTMOT2(DRIVER) board_ip=$::HOSTMOT2(IPADDR) config=$::HOSTMOT2(CONFIG) ---- + este sera el comando real que se ejecuta: + ---- loadrt hm2_eth board_ip={"10.10.10.10"} config={"num_encoders=0 num_pwmgens=0 num_stepgens=6"} ---- + Esto falla porque loadrt no reconoce las llaves. Por tanto, para obtener los valores tal como se ingresaron en el archivo ini, vuelva a escribir la línea loadrt así: + ---- loadrt $::HOSTMOT2(DRIVER) board_ip=[lindex $::HOSTMOT2(IPADDR) 0] config=[lindex $::HOSTMOT2(CONFIG) 0] ---- @@ -241,4 +247,4 @@ para demostrar una configuración haltcl junto con el uso de procesamiento twopass. El ejemplo muestra el uso de procedimientos tcl, bucles, uso de comentarios, y salida al terminal. - +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/haltcl_fr.adoc b/docs/src/hal/haltcl_fr.adoc index 5869b0183e..e12c597e69 100644 --- a/docs/src/hal/haltcl_fr.adoc +++ b/docs/src/hal/haltcl_fr.adoc @@ -1,10 +1,9 @@ :lang: fr :toc: +[[cha:haltcl]] = Fichiers TCL pour HAL -[[cha:hal-tcl]] - Le langage de halcmd excelle pour spécifier des composants et des connexions mais il n'offre aucune possibilité de calcul. Par conséquent, les fichiers ini sont limités en clarté et n'ont pas la @@ -39,6 +38,7 @@ sous-ensemble du puissant et polyvalent langage de script Tcl. Les fichiers haltcl utilisent le langage de script Tcl, auquel s'ajoutent les commandes spécifiques de la couche d'abstraction matériel de LinuxCNC (HAL). Les commandes spécifiques sont les suivantes: + .... addf, alias, delf, delsig, @@ -215,3 +215,4 @@ l'utilisation du processus "twopass". L'exemple montre l'utilisation des procédures Tcl, les boucles, l'utilisation des commentaires avec sortie sur le terminal. +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/halui-examples_es.adoc b/docs/src/hal/halui-examples_es.adoc index 9be6d29357..43ffe5a850 100644 --- a/docs/src/hal/halui-examples_es.adoc +++ b/docs/src/hal/halui-examples_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:halui-examples]] - = Ejemplos Halui Para que funcionen los ejemplos de Halui, debe agregar la siguiente línea a la @@ -12,7 +11,6 @@ HALUI = halui ---- [[sec:halui-remote-start]] - == Arranque remoto Para conectar un botón de inicio de programa remoto a LinuxCNC, utilice los @@ -77,7 +75,6 @@ Dificultades en el tiempo - La señal de retorno de entrada "resume" no debe ser más larga que el tiempo requerido para obtener el código g corriendo de nuevo. - - La salida "is-paused" ya no debería estar activa para cuando termina la señal de "resume". diff --git a/docs/src/hal/intro.adoc b/docs/src/hal/intro.adoc index 6eaf5feb49..4c665413d3 100644 --- a/docs/src/hal/intro.adoc +++ b/docs/src/hal/intro.adoc @@ -99,10 +99,11 @@ changes as needed. This document is aimed at people who already know how to do this kind of hardware system integration, but who do not know how to connect the -hardware to LinuxCNC. See the <> section in the HAL UI Examples documentation. +hardware to LinuxCNC. See the +<> +section in the HAL UI Examples documentation. -image::images/remote-start.png[alt="Remote Start Example"] +image::images/remote-start.png["Remote Start Example"] The traditional hardware design as described above ends at the edge of the main control. Outside the control are a bunch of relatively simple diff --git a/docs/src/hal/intro_fr.adoc b/docs/src/hal/intro_fr.adoc index 78da363d61..f39e94012e 100644 --- a/docs/src/hal/intro_fr.adoc +++ b/docs/src/hal/intro_fr.adoc @@ -113,8 +113,11 @@ indispensables. Ce document est destiné aux personnes déjà capables de concevoir ce type de réalisation matérielle, mais qui ne savent pas comment connecter le matériel à LinuxCNC, par exemple pour une -<> telle que décrite -dans la documentation de Halui. +//<> +Remote Start Example +telle que décrite dans la documentation de Halui. + +image::images/remote-start.png["Remote Start Example"] La conception de matériel, telle que décrite précédemment, s'arrête à l'interface de contrôle. Au delà, il y a un tas de boîtes noires, @@ -466,7 +469,8 @@ entrants. Mais, c'est également possible avec l'utilisation appropriée des fonctions dans ce composant de moyeu qui manipulent les signaux quand ils arrivent, venant d'autres composants. -Tous les détails dans le <>. +Tous les détails dans le tutoriel de HAL. +//<> // no idea why this fails, expecting to be auto-fixed with po4a Une autre réflexion qui vient à partir de ce jouet mécanique est une représentation de _HAL threads_. Un _thread_ pourrait ressembler un peu diff --git a/docs/src/hal/rtcomps.adoc b/docs/src/hal/rtcomps.adoc index a93dc3377b..6863ec19bc 100644 --- a/docs/src/hal/rtcomps.adoc +++ b/docs/src/hal/rtcomps.adoc @@ -243,13 +243,11 @@ The PWM generator supports three different 'output types'. * 'Output type 0' - PWM output pin only. Only positive commands are accepted, negative values are treated as zero (and will be affected by the parameter 'min-dc' if it is non-zero). - * 'Output type 1' - PWM/PDM and direction pins. Positive and negative inputs - will be output as positive and negative PWM. The direction pin is false - for positive commands, and true for negative commands. If your control - needs positive PWM for both CW and CCW use the link:../man/man9/abs.9.html[abs] component - to convert your PWM signal to positive value when a negative input is input. - + will be output as positive and negative PWM. The direction pin is false + for positive commands, and true for negative commands. If your control + needs positive PWM for both CW and CCW use the link:../man/man9/abs.9.html[abs] component + to convert your PWM signal to positive value when a negative input is input. * 'Output type 2' - UP and DOWN pins. For positive commands, the PWM signal appears on the up output, and the down output remains false. For negative commands, the PWM signal appears on the down output, and the up output diff --git a/docs/src/hal/tutorial.adoc b/docs/src/hal/tutorial.adoc index 0db2282559..d4ab1d310d 100644 --- a/docs/src/hal/tutorial.adoc +++ b/docs/src/hal/tutorial.adoc @@ -100,6 +100,7 @@ load 'siggen' use the HAL command 'loadrt'. halcmd: loadrt siggen ---- +[[sec:tutorial-halcmd]] === Examining the HAL Now that the module is loaded, it is time to introduce 'halcmd' , the @@ -447,7 +448,6 @@ halcmd: loadusr halmeter The first window you will see is the 'Select Item to Probe' window. .Halmeter Select Window - image::images/halmeter-select.png["Halmeter Select Window",align="center"] This dialog has three tabs. The first tab displays all of the HAL pins @@ -459,7 +459,6 @@ selection dialog will close, and the meter looks something like the following figure. .Halmeter - image::images/halmeter-1.png["Halmeter",align="center"] To change what the meter displays press the 'Select' button which @@ -820,7 +819,6 @@ dialog that looks like the following figure. To change the sample rate left click on the samples box. .Realtime function not linked dialog - image::images/halscope-01.png["Realtime function not linked dialog",align="center"] This dialog is where you set the sampling rate for the oscilloscope. @@ -832,7 +830,6 @@ disappears, and the scope window looks something like the following figure. .Initial scope window - image::images/halscope-02.png["Initial scope window",align="center"] === Hooking up the scope probes @@ -853,7 +850,6 @@ earlier, so we click on the 'Signals' tab, and the dialog displays all of the signals in the HAL (only two for this example). .Select Channel Source - image::images/halscope-03.png["Select Channel Source",align="center"] To choose a signal, just click on it. In this case, we want channel 1 @@ -861,7 +857,6 @@ to display the signal 'X-vel'. Click on the Signals tab then click on 'X-vel' and the dialog closes and the channel is now selected. .Select Signal - image::images/halscope-04.png["Select Signal",align="center"] The channel 1 button is pressed in, and channel number 1 and the name @@ -871,7 +866,6 @@ the selected one is highlighted, and the various controls like vertical position and scale always work on the selected one. .Halscope - image::images/halscope-05.png["Halscope",align="center"] To add a signal to channel 2, click the '2' button. When the dialog @@ -897,7 +891,6 @@ the screen will display the captured waveforms. The result will look something like the following figure. .Captured Waveforms - image::images/halscope-06.png["Captured Waveforms",align="center"] The 'Selected Channel' box at the bottom tells you that the purple @@ -917,7 +910,6 @@ moves the displayed trace up and down over the height of the screen only. For larger adjustments the offset button should be used. .Vertical Adjustment - image::images/halscope-07.png["Vertical Adjustment",align="center"] === Triggering @@ -930,7 +922,6 @@ probe to use for triggering by clicking on it. For this example we will use channel 3, the triangle wave as shown in the following figure. .Trigger Source Dialog - image::images/halscope-08.png["Trigger Source Dialog",align="center"] After setting the trigger source, you can adjust the trigger level and @@ -950,7 +941,6 @@ Now that we have adjusted the vertical controls and triggering, the scope display looks something like the following figure. .Waveforms with Triggering - image::images/halscope-09.png["Waveforms with Triggering",align="center"] === Horizontal Adjustments @@ -970,7 +960,6 @@ instead of displaying about 4 seconds worth of data, one record is 4000 samples at 20KHz, or about 0.20 seconds. .Sample Rate Dialog - image::images/halscope-10.png["Sample Rate Dialog",align="center"] === More Channels @@ -993,7 +982,6 @@ the change in the velocity command. The result should look like the following figure. .Step Pulses - image::images/halscope-11.png["Step Pulses",align="center"] === More samples @@ -1012,3 +1000,4 @@ load it and request 80000 total samples, so that when sampling (If 'scope_rt' was already loaded, the numeric argument to halscope will have no effect). +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/tutorial_es.adoc b/docs/src/hal/tutorial_es.adoc index c54f948626..51b27cff47 100644 --- a/docs/src/hal/tutorial_es.adoc +++ b/docs/src/hal/tutorial_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:hal-tutorial]] - = Tutorial HAL == Introducción @@ -156,7 +155,7 @@ contenido dentro del componente, algunos de los pines tienen un valor cero. El siguiente paso es mirar los parámetros: -. Mostrar parámetros +.Mostrar parámetros ---- halcmd: show param @@ -402,9 +401,8 @@ el siguiente comando en una ventana de terminal. halrun -U ---- -[[sec:tutorial-halmeter]] (((Halmeter, Halmeter Tutorial))) - -== Halmeter +[[sec:tutorial-halmeter]] +== Halmeter(((Halmeter, Halmeter Tutorial))) Puede construir sistemas HAL muy complejos sin tener que utilizar un interfaz gráfico. Sin embargo, es muy satisfactorio ver graficamente el resultado de su trabajo. La primera y más simple herramienta GUI para HAL es @@ -434,8 +432,7 @@ halcmd: loadusr halmeter La primera ventana que verá es la ventana 'Seleccionar elemento a sondear'. .Ventana de selección de Halmeter - -image::images/halmeter-select.png[align="center",alt="Ventana de selección de halmeter"] +image::images/halmeter-select.png["Ventana de selección de halmeter",align="center"] Este diálogo tiene tres pestañas. La primera pestaña muestra todos los pines HAL en el sistema. La segunda muestra todas las señales, y la tercera @@ -445,8 +442,7 @@ El cuadro de diálogo de selección se cerrará, y el medidor se vera como en la siguiente figura. .Halmeter - -image::images/halmeter-1.png[align="center",alt="Halmeter"] +image::images/halmeter-1.png["Halmeter",align="center"] Para cambiar lo que muestra el medidor presione el botón 'Select' que devuelve la ventana de seleccion del elemento a sondear. @@ -460,7 +456,7 @@ Si desea ver más de un pin, señal o parámetro a la vez, puede lanzar más halmeters. La ventana de halmeter es intencionalmente muy pequeña para que se pueda tener muchas de ellas a la vez en la pantalla. -== Ejemplo Stepgen (((stepgen))) +== Ejemplo Stepgen(((stepgen))) Hasta ahora solo hemos cargado un componente HAL. Pero toda la idea detrás de HAL es permitir cargar y conectar una serie de componentes simples @@ -774,9 +770,8 @@ están generando impulsos, variando entre ​+10 KHz y -10 KHz cada segundo. Má ver cómo sacar esas señales internas para mover motores en la realidad, pero primero queremos ver los pulsos y comprobar lo qué está sucediendo. -[[sec:tutorial-halscope]](((Tutorial Halscope))) - -== Halscope +[[sec:tutorial-halscope]] +== Halscope(((Tutorial Halscope))) El ejemplo anterior genera algunas señales muy interesantes. Pero mucho de lo que sucede es demasiado rápido para verlo con 'halmeter'. Para @@ -801,8 +796,7 @@ el cuadro de diálogo 'Realtime function not linked' que se aparece a la siguien figura. .diálogo Función Realtime no vinculada - -image::images/halscope-01.png[align="center", alt="Diálogo de función de tiempo real no vinculada"] +image::images/halscope-01.png["Diálogo de función de tiempo real no vinculada",align="center"] Este diálogo es donde se establece la frecuencia de muestreo para el osciloscopio. Por ahora, queremos muestrear una vez por milisegundo, así que haga clic en el hilo 'slow' @@ -812,8 +806,7 @@ a la vez. Cuando selecciona un hilo y luego hace clic en 'Ok', el diálogo desaparece, y la ventana del osciloscopio aparece como en la siguiente figura. .Vista inicial de halscope - -image::images/halscope-02.png[align="center", alt="Ventana inicial de halscope"] +image::images/halscope-02.png["Ventana inicial de halscope",align="center"] === Conectando las sondas @@ -833,16 +826,14 @@ antes. Hacemos clic en la pestaña "Señales" y el cuadro de diálogo muestra to las señales en HAL (solo dos para este ejemplo). .Seleccione Origen del canal - -image::images/halscope-03.png[align="center", alt="Seleccionar fuente de canal"] +image::images/halscope-03.png["Seleccionar fuente de canal",align="center"] Para elegir una señal, simplemente haga clic en ella. En este caso, queremos que el canal 1 muestre la señal 'X-vel'. Haga clic en la pestaña Señales y luego haga clic en 'X-vel' y el diálogo se cerrara. El canal está ahora seleccionado. .Seleccion de señal - -image::images/halscope-04.png[align="center", alt="Seleccionar señal"] +image::images/halscope-04.png["Seleccionar señal",align="center"] El botón del canal 1 se ve "presionado", y el canal número 1 y el nombre 'X-vel' aparece debajo de la fila de botones. Esa pantalla siempre indica @@ -851,8 +842,7 @@ el seleccionado se resalta, y los diversos controles, como posicion vertical y escala, siempre funcionan en el canal seleccionado. .Halscope - -image::images/halscope-05.png[align="center", alt="Halscope"] +image::images/halscope-05.png["Halscope",align="center"] Para agregar una señal al canal 2, haga clic en el botón '2'. Cuando el diálogo aparezca, haga clic en la pestaña 'Señales', luego haga clic en 'Y-vel'. También queremos @@ -877,8 +867,7 @@ la pantalla mostrará las formas de onda capturadas. El resultado se verá como en la siguiente figura. .Capturando formas de onda - -image::images/halscope-06.png[align="center", alt="Formas de onda capturadas"] +image::images/halscope-06.png["Formas de onda capturadas",align="center"] El cuadro "Selected Channel", en la parte inferior, le dice que la señal de color púrpura es el canal actualmente seleccionado, canal 4, que muestra el @@ -897,8 +886,7 @@ mueve el trazo mostrado arriba y abajo sobre la altura de la pantalla solamente. Para ajustes más grandes, se debe usar el botón 'offset'. .Ajuste vertical - -image::images/halscope-07.png[align="center", alt="Ajuste vertical"] +image::images/halscope-07.png["Ajuste vertical",align="center"] === Disparando @@ -910,8 +898,7 @@ sonda para usarla como disparador haciendo clic en ella. Para este ejemplo lo ha con el canal 3, la onda triangular, como se muestra en la siguiente figura. .Diálogo de Fuente de Disparo - -image::images/halscope-08.png[align="center", alt="Diálogo de origen del disparador"] +image::images/halscope-08.png["Diálogo de origen del disparador",align="center"] Después de configurar la fuente de activación, puede ajustar el nivel de activación y posición del gatillo usando los controles deslizantes en la casilla 'Trigger' a lo largo del borde derecho. @@ -930,8 +917,7 @@ Ahora que hemos ajustado los controles verticales y el disparo, la pantalla del osciloscopio se parecerá a la siguiente figura. .Formas de onda con Triggering - -image::images/halscope-09.png[align="center", alt="Formas de onda con disparador"] +image::images/halscope-09.png["Formas de onda con disparador",align="center"] === Ajustes horizontales @@ -950,8 +936,7 @@ en lugar de mostrar aproximadamente 4 segundos de datos, un registro es 4000 muestras a 20 kHz, o aproximadamente 0,20 segundos. .Diálogo de frecuencia de muestreo - -image::images/halscope-10.png[align="center",alt="Diálogo de frecuencia de muestreo"] +image::images/halscope-10.png["Diálogo de frecuencia de muestreo",align="center"] === Más canales @@ -973,8 +958,7 @@ el cambio en el comando de velocidad. El resultado debería verse como la siguiente figura. .Pasos de paso - -image::images/halscope-11.png[align="center", alt="Impulsos de paso"] +image::images/halscope-11.png["Impulsos de paso",align="center"] === Más muestras @@ -992,4 +976,4 @@ lo carga y solicita 80000 muestras en total, de modo que al tomar muestras en (Si 'scope_rt' ya estaba cargado, el argumento numérico para halscope no tendrá ningún efecto). - +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/tutorial_fr.adoc b/docs/src/hal/tutorial_fr.adoc index 6558736efa..20ebb902d5 100644 --- a/docs/src/hal/tutorial_fr.adoc +++ b/docs/src/hal/tutorial_fr.adoc @@ -1,28 +1,26 @@ :lang: fr :toc: +[[cha:hal-tutorial]] = Le tutoriel de HAL -[[cha:Tutoriel-HAL]] (((Tutoriel de HAL))) - [[sec:Intro-tutoriel]] == Introduction -(((Introduction))) Halrun peut être utilisé pour créer un système complet et fonctionnel. Il s'agit d'un outil de configuration et de mise au point très puissant, en ligne de commande ou en fichier texte. Les exemples suivants illustrent son installation et son fonctionnement. -[[sec:Tutoriel-Halcmd]] +[[sec:tutorial-halcmd]] == Halcmd -(((Tutoriel Halcmd))) Halcmd est un outil en ligne de commande pour manipuler HAL. Il existe une man page plus complète pour halcmd, elle sera installée en même temps qu' LinuxCNC depuis ses sources ou depuis un paquet. Si LinuxCNC a été compilé en _run-in-place_, la man page n'est pas installée, mais elle est accessible, dans le répertoire principal de LinuxCNC, taper: + ---- $ man -M docs/man halcmd ---- @@ -33,6 +31,7 @@ Votre version de halcmd peut inclure la complétion avec la touche tab. Au lieu de compléter les noms de fichiers comme le fait un shell, il complète les commandes avec les identifiants HAL. Essayez de presser la touche tab après le début d'une commande HAL: + ---- halcmd: loa @@ -67,8 +66,7 @@ ce que vous avez besoin de savoir à propos de RTAPI est qu'il doit être pouvoir faire n'importe quoi avec HAL. [[sec:Tutoriel-Exemple-Simple]] -== Tutoriel simple -(((Tutoriel simple))) +== Tutoriel simple(((Tutoriel simple))) === Charger un composant temps réel @@ -78,6 +76,7 @@ linuxcnc/src. Si nécessaire, invoquez le script _rip-environment_ pour préparer votre shell. Dans ce cas, tout ce que vous avez à faire est de charger le RTOS requis et les modules RTAPI dans la mémoire. Tapez juste les commandes suivantes dans une console: + ---- $cd linuxcnc @@ -97,6 +96,7 @@ complète de ce composant est disponible à la <> de ce document. Il s'agit d'un composant temps réel, mis en œuvre comme un module du noyau Linux. Pour charger siggen utiliser la commande de HAL, _loadrt_: + ---- halcmd: loadrt siggen ---- @@ -106,10 +106,11 @@ halcmd: loadrt siggen Maintenant que le module est chargé, il faut introduire _halcmd_, l'outil en ligne de commande utilisé pour configurer HAL. Pour une description plus complète essayez: _man halcmd_, ou consultez la -section <>. La +section <>. La première commande de halcmd et _show_, qui affichera les informations concernant l'état actuel de HAL. Pour afficher tout ce qui est installé tapez: + ---- halcmd: show comp @@ -129,6 +130,7 @@ PID est ajouté à la fin du nom pour rendre celui-ci unique. La liste précédente. Le _RT_ sous _Type_ indique que siggen est un composant temps réel. Ensuite, voyons quelles pins siggen rend disponibles: + ---- halcmd: show pin @@ -152,6 +154,7 @@ du composant siggen. Puisque nous n'avons pas encore exécuté le code contenu dans le composant, certaines pins ont une valeur de zéro. L'étape suivante consiste à examiner les paramètres: + ---- halcmd: show param @@ -194,6 +197,7 @@ la réécriture de HAL sera terminée, je les remettrai. La plupart des composants temps réel exportent une ou plusieurs fonctions pour que le code qu'elles contiennent soit exécuté en temps réel. Voyons ce que la fonction siggen exporte: + ---- halcmd: show funct @@ -214,11 +218,13 @@ _siggen.0.update_, nous avons besoin d'un thread temps réel. C'est le composant appelé _threads_ qui est utilisé pour créer le nouveau thread. Créons un thread appelé _test-thread_ avec une période de 1 ms (1000 µs ou 1000000 ns): + ---- halcmd: loadrt threads name1=test-thread period1=1000000 ---- Voyons si il fonctionne: + ---- halcmd: show thread @@ -232,6 +238,7 @@ des limitations dues au matériel, mais nous avons bien un thread qui tourne à une période approximativement correcte et qui peut manipuler des fonctions en virgule flottante. La prochaine étape sera de connecter la fonction au thread: + ---- halcmd: addf siggen.0.update test-thread ---- @@ -242,6 +249,7 @@ HAL. Mais cette fois-ci, nous avons dans HAL. Nous avons dit à halcmd d'ajouter la fonction _siggen.0.update_ au thread _test-thread_ et la commande suivante indique qu'il a réussi: + ---- halcmd: show thread @@ -257,12 +265,14 @@ première fois, les threads ne sont pas en marche. C'est pour vous permettre de compléter la configuration du système avant que le code temps réel ne démarre. Une fois que vous êtes satisfait de la configuration, vous pouvez lancer le code temps réel comme ceci: + ---- halcmd: start ---- Maintenant le générateur de signal est en marche. Regardons ses pins de sortie: + ---- halcmd: show pin @@ -279,6 +289,7 @@ halcmd: show pin ---- Regardons encore une fois: + ---- halcmd: show pin @@ -306,11 +317,13 @@ La réelle puissance de HAL est de permettre de modifier les choses. Par exemple, on peut utiliser la commande _setp_ pour ajuster la valeur d'un paramètre. Modifions l'amplitude du signal de sortie du générateur de 1.0 à 5.0: + ---- halcmd: setp siggen.0.amplitude 5 ---- Voyons encore une fois les paramètres et les pins: + ---- halcmd: show param @@ -350,6 +363,7 @@ configuration jusqu'à ce qu'il s'arrête. Mais qu'en est-il de la prochaine fois ? Nous ne voulons pas entrer une série de commande à chaque fois que l'on veut utiliser le système. Nous pouvons enregistrer la configuration de l'ensemble de HAL en une seule commande: + ---- halcmd: save @@ -370,6 +384,7 @@ vous commencez par un HAL _vide_ et que vous tapez toute la séquence de commandes HAL, vous aurez la configuration qui existait lors de l'exécution de la commande save. Pour sauver ces commandes pour une utilisation ultérieure, nous allons simplement rediriger la sortie vers un fichier: + ---- halcmd: save all saved.hal ---- @@ -378,6 +393,7 @@ halcmd: save all saved.hal Pour quitter halrun, ne pas fermez simplement la fenêtre de terminal sans avoir arrêté la session de HAL, pour l'arrêter correctement tapez: + ---- halcmd: exit @@ -391,12 +407,14 @@ avons besoin d'exécuter toutes les commandes enregistrées. Pour ce faire, nous utiliserons la commande _-f _ qui lit les commandes à partir d'un fichier, le _-I_ affichera le prompt halcmd après l'exécution des commandes: + ---- ~/linuxcnc$ halrun -I -f saved.hal ---- Noter qu'il n'y a pas de commande _start_ dans le fichier saved.hal. Il est nécessaire de la retaper (ou d'éditer saved.hal pour l'ajouter): + ---- halcmd: start @@ -410,13 +428,13 @@ halcmd: exit Si un arrêt inattendu d'une session de HAL survient, il sera peut être nécessaire de décharger HAL de la mémoire avant de pouvoir lancer une autre session. Pour cela, taper la commande suivante dans une fenêtre de terminal: + ---- ~/linuxcnc$ halrun -U ---- [[sec:Tutoriel-halmeter]] -== Visualiser HAL avec halmeter -(((Tutoriel halmeter))) +== Visualiser HAL avec halmeter(((Tutoriel halmeter))) Il est possible de construire des systèmes HAL vraiment complexes sans utiliser d'interface graphique. Mais il y a quelque chose de rassurant @@ -457,6 +475,7 @@ Nous allons utiliser de nouveaux éléments du composant siggen pour vérifier halmeter. Si vous avez fini l'exemple précédent, alors siggen est déjà chargé. Sinon, on peut charger tout comme nous l'avons fait précédemment: + ---- ~/linuxcnc$ halrun @@ -476,6 +495,7 @@ halcmd: setp siggen.0.amplitude 5 À ce stade, nous avons chargé le composant siggen, il est en cours d'exécution. Nous pouvons lancer halmeter. Puisque halmeter est une application graphique, X doit être actif. + ---- halcmd: loadusr halmeter ---- @@ -483,11 +503,8 @@ halcmd: loadusr halmeter Dans le même temps, une fenêtre s'ouvre sur votre écran, demandant de sélectionner l'item à observer. -[[cap:halmeter-Fenetre-selection]] -.Fenêtre de sélection de halmeter -(((Fenêtre de sélection))) - -image::images/halmeter-select_fr.png[alt="Fenêtre de sélection de halmeter"] +.Fenêtre de sélection de halmeter(((Fenêtre de sélection))) +image:images/halmeter-select_fr.png["Fenêtre de sélection de halmeter"] Ce dialogue contient trois onglets. Le premier onglet affiche toutes les HAL pins du système. La seconde affiche tous les signaux et le @@ -496,11 +513,8 @@ _siggen.0.cosine_ en premier, il suffit de cliquer sur elle puis sur le bouton _Fermer_. Le dialogue de sélection se ferme et la mesure s'affiche dans une fenêtre semblable à la figure ci-dessous. -[[sec:halmeter-valeur]] -.Affichage de la valeur -(((Affichage de la valeur))) - -image::images/halmeter-1_fr.png[alt="Affichage de la valeur"] +.Affichage de la valeur(((Affichage de la valeur))) +image::images/halmeter-1_fr.png["Affichage de la valeur"] Pour modifier ce qui est affiché sur halmeter pressez le bouton _Sélectionner_ qui vous ramènera à la fenêtre de sélection précédente. @@ -514,7 +528,7 @@ Pour éteindre halmeter, cliquer sur le bouton _Quitter_. Pour visualiser plusieurs pins, signaux ou paramètres en même temps, il est possible d'ouvrir plusieurs halmeter. La fenêtre de halmeter est intentionnellement petite justement pour permettre d'en ouvrir un -grand nombre sur le même écran.[[sec:Tutoriel-Plus-Complexe]] +grand nombre sur le même écran. == Tutoriel plus complexe avec stepgen @@ -527,6 +541,7 @@ Avant de mettre en place ce nouvel exemple, nous allons commencer par un petit nettoyage. Si vous avez fini l'un des exemples précédents, il faut supprimer tous les composants et ensuite recharger la RTAPI et les librairies de HAL en faisant: + ---- halcmd: exit @@ -544,6 +559,7 @@ Quand vous entrez la commande en ligne dans la console, sautez simplement le _\_ Dans cet exemple nous utiliserons le type de contrôle _velocity_ du composant stepgen. + ---- halrun: loadrt stepgen step_type=0,0 ctrl_type=v,v @@ -562,6 +578,7 @@ rapide ne prend pas en charge les fonctions à virgule flottante Comme précédemment, on peut utiliser _halcmd show_ pour jeter un coup d'oeil à HAL. Cette fois, nous aurons beaucoup plus de pins et de paramètres que précédemment: + ---- halcmd: show pin @@ -639,11 +656,13 @@ l'entrée _velocity_ du premier générateur d'impulsions de pas. La première étape consiste à connecter le signal à la sortie du générateur de signaux. Pour connecter un signal à une pin, nous utilisons la commande _net_: + ---- halcmd: net X-vel <= siggen.0.cosine ---- Pour voir l'effet de la commande _net_, regardons les signaux: + ---- halcmd: show sig @@ -658,6 +677,7 @@ Les flèches donnent la direction du flux de données, dans ce cas, le flux va de la pin _siggen.0.cosine_ vers le signal _X-vel_. Maintenant, connectons _X-vel_ à l'entrée _velocity_ du générateur d'impulsions de pas: + ---- halcmd: net X-vel => stepgen.0.velocity-cmd ---- @@ -672,6 +692,7 @@ halcmd: net Y-vel siggen.0.sine => stepgen.1.velocity-cmd Pour voir l'effet de la commande net, regardons encore les signaux et les pins: + ---- halcmd: show sig @@ -696,6 +717,7 @@ plus délicates à appréhender. Les fonctions contiennent des instructions pour l'ordinateur. Les threads sont les méthodes utilisées pour faire exécuter ces instructions quand c'est nécessaire. Premièrement, regardons les fonctions dont nous disposons: + ---- halcmd: show funct @@ -747,6 +769,7 @@ lancer _stepgen.capture_position_. Nous lançons les fonctions en les ajoutant aux threads. Chaque thread va à une vitesse précise. Regardons de quels threads nous disposons: + ---- halcmd: show thread @@ -765,6 +788,7 @@ charge les calculs en virgule flottante. Nous l'utilisons pour _stepgen.make_pulses_. Pour connecter des fonctions au bon thread, nous utilisons la commande _addf_. Nous spécifions la fonction en premier, suivie par le thread: + ---- halcmd: addf siggen.0.update slow @@ -775,6 +799,7 @@ halcmd: addf stepgen.make-pulses fast Après avoir lancé ces commandes, nous pouvons exécuter la commande _show thread_ une nouvelle fois pour voir ce qui ce passe: + ---- halcmd: show thread @@ -810,6 +835,7 @@ multiplier la vitesse d'entrée à l'étape générateur d'impulsions par qu'existe le paramètre _stepgen.n.velocity-scale_ . Dans notre cas, les axes X et Y ont la même échelle et nous pouvons passer les deux paramètres à 10000: + ---- halcmd: setp stepgen.0.position-scale 10000 @@ -837,6 +863,7 @@ l'échelle du générateur d'impulsions de pas. Nous avons maintenant tout configuré et sommes prêts à démarrer. Tout comme dans le premier exemple, nous utilisons la commande _start_: + ---- halcmd: start ---- @@ -848,9 +875,7 @@ la suite de ce tutoriel, nous allons voir comment convertir ces signaux internes des moteurs dans le monde réel, mais nous allons d'abord les examiner pour voir ce qui se passe. -[[sec:Tutoriel-halscope]] -== Voyons-y de plus près avec halscope -(((Tutoriel halscope))) +== Voyons-y de plus près avec halscope(((Tutoriel halscope))) L'exemple précédent génère certains signaux très intéressants. Mais beaucoup de ce qui se passe est beaucoup trop rapide pour être vu avec @@ -866,6 +891,7 @@ chargée comme un module de noyau et une partie utilisateur qui fournit l'interface graphique et l'affichage. Cependant, vous n'avez pas à vous inquiéter à ce sujet car l'interface demandera automatiquement que la partie temps réel soit chargée: + ---- halcmd: loadusr halscope ---- @@ -873,10 +899,7 @@ halcmd: loadusr halscope La fenêtre graphique du scope s'ouvre, immédiatement suivie par un dialogue _Fonction temps réel non liée_ visible sur la figure ci-dessous: -[[fig:fonction-non-liee]] -.Dialogue _Fonction temps réel non liée_ -(((Fonction non liée))) - +.Dialogue _Fonction temps réel non liée_(((Fonction non liée))) image::images/halscope-01_fr.png[alt="Dialogue Fonction temps réel non liée"] C'est dans ce dialogue que vous définissez le taux d'échantillonnage @@ -888,11 +911,8 @@ puissions utiliser jusqu'à 4 canaux simultanément. Quand vous sélectionnez un thread puis que vous cliquez sur le bouton _OK_, le dialogue disparaît et la fenêtre initiale du scope s'ouvre, comme ci-dessous. -[[fig:Fenetre-initiale-halscope]] -.Fenêtre initiale du scope -(((Fenêtre initiale))) - -image::images/halscope-02_fr.png[alt="Fenêtre initiale du scope"] +.Fenêtre initiale du scope(((Fenêtre initiale))) +image::images/halscope-02_fr.png["Fenêtre initiale du scope"] === Branchement des sondes du scope @@ -911,11 +931,8 @@ sélection des sources dans lequel vous devrez choisir _la source qui devra s'afficher sur le canal 1, comme sur la figure ci-dessous. Ce dialogue est très similaire à celui utilisé par halmeter. -[[fig:Selection-sources-halscope]] -.Dialogue de sélection des sources -(((Sélection de la source))) - -image::images/halscope-03_fr.png[alt="Dialogue de sélection des sources"] +.Dialogue de sélection des sources(((Sélection de la source))) +image::images/halscope-03_fr.png["Dialogue de sélection des sources"] Nous aimerions bien regarder les signaux que nous avons défini précédemment, pour cela, cliquons sur l'onglet _Signaux_ et le dialogue @@ -927,10 +944,7 @@ nous voulons utiliser le canal 1 pour afficher le signal _X-vel_. Lorsque l'on clique sur _X-vel_, la fenêtre se ferme et le canal a été sélectionné. -[[cap:Select-Signal]] -.Sélection du signal -(((Sélection du signal))) - +.Sélection du signal(((Sélection du signal))) image::images/halscope-04_fr.png[alt="Sélection du signal"] Le bouton du canal _1_ est pressé, le numéro du canal 1 et le nom @@ -938,10 +952,7 @@ _X-vel_ apparaissent sous la rangée de boutons. L'affichage indique toujours le canal sélectionné, vous pouvez avoir beaucoup de canaux sur l'écran, mais celui qui est actif sera en surbrillance. -[[cap:halscope]] -.halscope -(((halscope))) - +.halscope(((halscope))) image::images/halscope-05_fr.png[alt="halscope"] Les différents contrôles comme la position verticale et l'amplitude @@ -971,11 +982,8 @@ haut à droite. Vous devriez voir le reste de la zone tampon se remplir, puis l'écran afficher les ondes capturées. Le résultat ressemble à la figure ci-dessous. -[[fig:Capture-onde-halscope]] -.Capture d'ondes -(((Capture d'onde))) - -image::images/halscope-06_fr.png[alt="Capture d'ondes"] +.Capture d'ondes(((Capture d'onde))) +image::images/halscope-06_fr.png["Capture d'ondes"] === Ajustement vertical @@ -989,11 +997,8 @@ oscilloscopes réels), celle-ci permet d'afficher des signaux très petits trace affichée de haut en bas sur toute la hauteur de l'écran. Pour de plus grands ajustements le bouton _Offset_ peut être utilisé. -[[cap:Ajustement-vertical-halscope]] -.Ajustement vertical -(((Ajustement vertical))) - -image::images/halscope-07_fr.png[alt="Ajustement vertical"] +.Ajustement vertical(((Ajustement vertical))) +image::images/halscope-07_fr.png["Ajustement vertical"] Le grand bouton _Canal sélectionné_ en bas, indique que le canal 1 est actuellement le canal sélectionné et qu'il correspond au signal @@ -1012,11 +1017,8 @@ Pour notre exemple nous utilisons 3 canaux, essayons l'onde triangle. Quand le dialogue ce referme, après le choix, le bouton affiche _Source Canal n_ où n est le numéro du canal venant d'être choisi comme déclencheur. -[[fig:halscope-demo-5]] -.Dialogue des sources de déclenchement -(((Dialogue des sources de déclenchement))) - -image::images/halscope-08_fr.png[alt="Dialogue des sources de déclenchement"] +.Dialogue des sources de déclenchement(((Dialogue des sources de déclenchement))) +image::images/halscope-08_fr.png["Dialogue des sources de déclenchement"] Après avoir défini la source de déclenchement, il est possible d'ajuster le niveau de déclenchement avec les curseurs du groupe @@ -1040,11 +1042,8 @@ _Mode "Run"_. Maintenant que nous avons réglé la position verticale et le déclenchement, l'écran doit ressembler à la figure ci-dessous. -[[fig:halscope-demo-6]] -.Formes d'ondes avec déclenchement -(((Formes d'onde))) - -image::images/halscope-09_fr.png[alt="Formes d'ondes avec déclenchement"] +.Formes d'ondes avec déclenchement(((Formes d'onde))) +image::images/halscope-09_fr.png["Formes d'ondes avec déclenchement"] === Ajustement horizontal @@ -1064,11 +1063,8 @@ Pour notre exemple, nous cliquerons sur le thread _fast_, qui fournira un secondes de données, un enregistrement sera de 4000 échantillons à 20kHz, soit environ 0.20 seconde. -[[fig:halscope-demo-7]] -.Dialogue de choix d'échantillonnage -(((Choix d'échantillonnage))) - -image::images/halscope-10_fr.png[alt="Dialogue de choix d'échantillonnage"] +.Dialogue de choix d'échantillonnag(((Choix d'échantillonnage)))e +image::images/halscope-10_fr.png["Dialogue de choix d'échantillonnage"] === Plus de canaux @@ -1094,16 +1090,15 @@ d'échelle entre la fréquence des pas et l'action sur la vitesse, d'ou la courb X-vel assez plate et les impulsions de pas très resserrées. [[fig:halscope-demo-8]] -.Observer les impulsions de pas -(((Observer les impulsions))) - -image::images/halscope-11_fr.png[alt="Observer les impulsions de pas"] +.Observer les impulsions de pas(((Observer les impulsions))) +image::images/halscope-11_fr.png["Observer les impulsions de pas"] === Plus d'échantillons Si vous souhaitez enregistrer plus d'échantillons à la fois, redémarrez le temps réel et chargez halscope avec un argument numérique qui indique le nombre d'échantillons que vous voulez capturer, comme: + ---- halcmd: loadusr halscope 80000 ---- @@ -1114,4 +1109,4 @@ que lorsque l'échantillonnage se fera sur 4 canaux à la fois, il y aura 20000 échantillons par canal. (Si _scope_rt_ est déjà chargé, l'argument numérique passé à halscope sera sans effet) - +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/twopass.adoc b/docs/src/hal/twopass.adoc index ea8b2fa6a1..801bf9ef41 100644 --- a/docs/src/hal/twopass.adoc +++ b/docs/src/hal/twopass.adoc @@ -150,7 +150,8 @@ to connect hal pins that are created by the GUI. When using a postgui halfile w TWOPASS processing, include all loadrt items for components added by postgui halfiles in a separate halfile that is processed before the GUI. The addf commands can also be included in the file. -Example: + +.Example: ---- [HAL] TWOPASS = on @@ -189,7 +190,7 @@ While the order of loadrt directives is not usually critical, ordering of addf directives is often very important for proper operation of servo loop components. -Excluded '.hal' file example: +.Excluded '.hal' file example: ---- $ cat twopass_excluded.hal # The following magic comment causes this file to @@ -222,3 +223,5 @@ Examples of TWOPASS usage for a simulator are included in the directories: configs/sim/axis/twopass/ configs/sim/axis/simtcl/ + +// vim: set syntax=asciidoc: diff --git a/docs/src/hal/twopass_es.adoc b/docs/src/hal/twopass_es.adoc index ae8eef1d16..42d2814e1d 100644 --- a/docs/src/hal/twopass_es.adoc +++ b/docs/src/hal/twopass_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:hal-twopass]] - = HAL TWOPASS == TWOPASS @@ -63,8 +62,7 @@ La opción TWOPASS se puede especificar con opciones para ampliar la salida para depuración (verbose) o para evitar la eliminación de archivos temporales (nodelete). Las opciones están separadas por comas. -Ejemplo: - +.Ejemplo: ---- [HAL] @@ -121,7 +119,7 @@ El procesamiento en dos pasos ocurre antes de la carga de la interfaz gráfica d [HAL]POSTGUI_HALFILE, es conveniente colocar todo las declaraciones loadrt para los componentes necesarios en un halfile que se carge con anterioridad. -Ejemplo de una sección HAL cuando se usa un POSTGUI_HALFILE: +.Ejemplo de una sección HAL cuando se usa un POSTGUI_HALFILE: ---- [HAL] @@ -154,7 +152,7 @@ Esta disposición de exclusión se puede utilizar para aislar problemas o para c componente hal que no requiere o no se beneficia del procesamiento TWOPASS que maneja múltiples instancias de componentes loadrt. -Ejemplo de archivo '.hal' excluido: +.Ejemplo de archivo '.hal' excluido: ---- $ cat twopass_excluded.hal # El siguiente 'comentario mágico' hace que este archivo @@ -166,7 +164,7 @@ show pin mycomponent ---- [NOTE] - El caso y los espacios en blanco dentro de # NOTWOPASS se ignoran. +El caso y los espacios en blanco dentro de # NOTWOPASS se ignoran. == Post GUI @@ -175,7 +173,8 @@ conectar los pines hal que son creados por la propia GUI. Cuando se utiliza un h el procesamiento TWOPASS, incluya todos los elementos loadrt para los componentes agregados por los halfiles postgui en un halfile separado que se procese antes que la GUI. Los comandos addf también pueden ser incluido en el archivo. -Ejemplo: + +.Ejemplo: ---- [HAL] HALFILE = file_1.hal @@ -194,3 +193,4 @@ Se incluyen ejemplos de uso de TWOPASS para simulador en los directorios: configs/sim/axis/simtcl/ +// vim: set syntax=asciidoc: diff --git a/docs/src/index_fr.tmpl b/docs/src/index_fr.tmpl index f74e924073..10c6807ed2 100644 --- a/docs/src/index_fr.tmpl +++ b/docs/src/index_fr.tmpl @@ -58,7 +58,7 @@
  • Les fonctionnalités de Halshow
  • Liste des composants de HAL
  • Les composants temps réel -
  • L'interface halui +
  • L'interface halui
  • Exemples pour HAL
  • Comp: un outil de création de composants HAL
  • Créer des composants de HAL pour l'espace utilisateur @@ -93,8 +93,6 @@
  • Réglage des moteurs pas à pas
  • Théorie du PID
  • Introduction au langage Ladder -
  • ClassicLadder (en anglais) -
  • Exemples avec ClassicLadder (en anglais)
  • Exemple: Ajouter un port parallèle PCI
  • Exemple: Contrôler la vitesse de la broche
  • Exemple: Utiliser une manivelle électronique diff --git a/docs/src/ladder/classic-ladder_fr.adoc b/docs/src/ladder/classic-ladder_fr.adoc deleted file mode 100644 index fd3ff9acb5..0000000000 --- a/docs/src/ladder/classic-ladder_fr.adoc +++ /dev/null @@ -1,1043 +0,0 @@ -= Classicladder Programming - -[[cha:classicladder-programming]] - -== Ladder Concepts - -Classic Ladder is a type of programming language originally -implemented on industrial PLCs (it's called Ladder Programming). It is -based on the concept of relay contacts and coils, and can be used to -construct logic checks and functions in a manner that is familiar to -many systems integrators. Ladder consists of rungs that may have -branches and resembles an electrical circuit. It is important to know -how ladder programs are evaluated when running. - -It seems natural that each line would be evaluated left to right, then -the next line down, etc., but it doesn't work this way in ladder logic. -Ladder logic 'scans' the ladder rungs 3 times to change the state of the -outputs. - -* the inputs are read and updated -* the logic is figured out -* the outputs are set - -This can be confusing at first if the output of one line is read by the -input of a another rung. There will be one scan before the second input -becomes true after the output is set. - -Another gotcha with ladder programming -is the "Last One Wins" rule. If you have the same output in different -locations of your ladder the state of the last one will be what the -output is set to. - -== Languages - -The most common language used when working with Classic Ladder is -'ladder'. Classic Ladder also supports Sequential Function Chart -(Grafcet). - -== Components - -There are 2 components to Classic Ladder. - -* The real time module classicladder_rt -* The user space module (including a GUI) classicladder - -=== Files - -Typically classic ladder components are placed in the custom.hal file -if your working from a Stepconf generated configuration. These must not -be placed in the custom_postgui.hal file or the Ladder Editor menu will -be grayed out. - -Ladder files (.clp) must not contain any blank spaces in the name. - -=== Realtime Module - -Loading the Classic Ladder real time module (classicladder_rt) is -possible from a HAL file, or directly using a halcmd instruction. The -first line loads real time the Classic Ladder module. The second line -adds the function classicladder.0.refresh to the servo thread. This -line makes Classic Ladder update at the servo thread rate. - ----- -loadrt classicladder_rt -addf classicladder.0.refresh servo-thread ----- - -The speed of the thread that Classic Ladder is running in directly -affects the responsiveness to inputs and outputs. If you can turn a -switch on and off faster than Classic Ladder can notice it then you may -need to speed up the thread. The fastest that Classic Ladder can update -the rungs is one millisecond. You can put it in a faster thread but it -will not update any faster. If you put it in a slower than one -millisecond thread then Classic Ladder will update the rungs slower. -The current scan time will be displayed on the section display, it is -rounded to microseconds. If the scan time is longer than one -millisecond you may want to shorten the ladder or put it in a slower -thread. - -=== Variables - -It is possible to configure the number of each type of ladder object -while loading the Classic Ladder real time module. If you do not -configure the number of ladder objects Classic Ladder will use the -default values. - -.Default Variable Count[[cap:Default-Variable-Count]] - -[width="90%", options="header", cols="<8,<4,<2"] -|======================================== -|Object Name | Variable Name | Default Value -|Number of rungs | (numRungs) | 100 -|Number of bits | (numBits) | 20 -|Number of word variables | (numWords) | 20 -|Number of timers | (numTimers) | 10 -|Number of timers IEC | (numTimersIec) | 10 -|Number of monostables | (numMonostables) | 10 -|Number of counters | (numCounters) | 10 -|Number of HAL inputs bit pins | (numPhysInputs) | 15 -|Number of HAL output bit pins | (numPhysOutputs) | 15 -|Number of arithmetic expressions | (numArithmExpr) | 50 -|Number of Sections | (numSections) | 10 -|Number of Symbols | (numSymbols) | Auto -|Number of S32 inputs | (numS32in) | 10 -|Number of S32 outputs | (numS32out) | 10 -|Number of Float inputs | (numFloatIn) | 10 -|Number of Float outputs | (numFloatOut) | 10 -|======================================== - -Objects of most interest are numPhysInputs, numPhysOutputs, numS32in, -and numS32out. - -Changing these numbers will change the number of HAL bit pins -available. numPhysInputs and numPhysOutputs control how many HAL bit -(on/off) pins are available. numS32in and numS32out control how many -HAL signed integers (+- integer range) pins are available. - -For example (you don't need all of these to change just a few): - ----- -loadrt classicladder_rt numRungs=12 numBits=100 numWords=10 -numTimers=10 numMonostables=10 numCounters=10 numPhysInputs=10 -numPhysOutputs=10 numArithmExpr=100 numSections=4 numSymbols=200 -numS32in=5 numS32out=5 ----- - -To load the default number of objects: - ----- -loadrt classicladder_rt ----- - -== Loading the Classic Ladder user module - -Classic Ladder HAL commands must executed before the GUI loads or the -menu item Ladder Editor will not function. If you used the Stepper -Config Wizard place any Classic Ladder HAL commands in the custom.hal -file. - -To load the user module: - ----- -loadusr classicladder ----- - -To load a ladder file: - ----- -loadusr classicladder myladder.clp ----- - -Classic Ladder Loading Options - -* '--nogui' - (loads without the ladder editor) normally used after - debugging is finished. -* '--modbus_port=port' - (loads the modbus port number) -* '--modmaster' - (initializes MODBUS master) should load the ladder - program at the same time or the TCP is default port. -* '--modslave' - (initializes MODBUS slave) only TCP - -To use Classic Ladder with HAL without EMC: - ----- -loadusr -w classicladder ----- - -The -w tells HAL not to close down the HAL environment -until Classic Ladder is finished. - -If you first load ladder program with the '--nogui' option then load -Classic Ladder again with no options the GUI -will display the last loaded ladder program. - -In AXIS you can load the GUI from File/Ladder Editor... - -== Classic Ladder GUI - -If you load Classic Ladder with the GUI it will display two windows: -section display, and section manager. - -=== Sections Manager - -When you first start up Classic Ladder you get an empty Sections -Manager window. - -.Sections Manager Default Window[[cap:Sections-Manager-Default]] - -image::images/Default_Sections_Manager.png[align="center", alt="Sections Manager Default Window"] - -This window allows you to name, create or delete sections and choose -what language that section uses. This is also how you name a subroutine -for call coils. - -=== Section Display - -When you first start up Classic Ladder you get an empty Section -Display window. Displayed is one empty rung. - -.Section Display Default Window[[cap:Section-Display-Default]] - -image::images/Default_Section_Display.png[align="center", alt="Section Display Default Window"] - -Most of the buttons are self explanatory: - -The Vars button is for looking at variables, toggle it to display one, -the other, both, then none of the windows. - -The Config button is used for modbus and shows the max number of -ladder elements that was loaded with the real time module. - -The Symbols button will display an editable list of symbols for the -variables (hint you can name the inputs, outputs, coils etc). - -The Quit button will shut down the user program meaning Modbus and the -display. The real time ladder program will still run in the background. - -The check box at the top right allows you to select whether variable -names or symbol names are displayed - -You might notice that there is a line under the ladder program display -that reads "Project failed to load..." That is the status bar that -gives you info about elements of the ladder program that you click on -in the display window. This status line will now display HAL signal -names for variables %I, %Q and the first %W (in an equation) You might -see some funny labels, such as (103) in the rungs. This is displayed -(on purpose) because of an old bug- when erasing elements older -versions sometimes didn't erase the object with the right code. You -might have noticed that the long horizontal connection button sometimes -didn't work in the older versions. This was because it looked for the -'free' code but found something else. The number in the brackets is the -unrecognized code. The ladder program will still work properly, to fix -it erase the codes with the editor and save the program. - -=== The Variable Windows - -This are two variable windows: the Bit Status Window (boolean) and -the Watch Window (signed integer). The Vars -button is in the Section Display Window, toggle the Vars button to -display one, the other, both, then none of the variable windows. - -.Bit Status Window[[cap:Bit-Status-Window]] - -image::images/Bit_Status.png[align="center", alt="Bit Status Window"] - -The Bit Status Window displays some of the boolean (on/off) variable data. -Notice all variables start with the % sign. The %I variables represent -HAL input bit pins. The %Q represents the relay coil and HAL output bit -pins. The %B represents an internal relay coil or internal contact. The -three edit areas at the top allow you to select what 15 variables will -be displayed in each column. For instance, if the %B Variable column -were 15 entries high, -and you entered 5 at the top of the column, variables %B5 to %B19 would -be displayed. The check boxes allow you to set and unset %B variables -manually as long as the ladder program isn't setting them as outputs. -Any Bits that are set as outputs by the program when Classic Ladder is -running can not be changed and will be displayed as checked if on and -unchecked if off. - -.Watch Window[[cap:Watch-Window]] - -image::images/watch_window.png[align="center", alt="Watch Window"] - -The Watch Window displays variable status. The edit box beside it is -the number stored in the variable and the drop-down box beside that -allow you to choose whether the number to be displayed in hex, decimal -or binary. If there are symbol names defined in the symbols window for -the word variables showing and the 'display symbols' checkbox is -checked in the section display window, symbol names will be displayed. -To change the variable displayed, type the variable number, e.g. %W2 (if -the display symbols check box is not checked) or type the symbol name -(if the display symbols checkbox is checked) over an existing variable -number/name and press the Enter Key. - -=== Symbol Window - -.Symbol Names window[[cap:Symbol-Names-window]] - -image::images/Default_Symbols_names.png[align="center", alt="Symbol Names window"] - -This is a list of 'symbol' names to use instead of variable names to -be displayed in the section window when the 'display symbols' check box -is checked. You add the variable name (remember the '%' symbol and -capital letters), symbol name . If the variable can have a HAL signal -connected to it (%I, %Q, and %W-if you have loaded s32 pin with the -real time module) then the comment section will show the current HAL -signal name or lack thereof. Symbol names should be kept short to -display better. Keep in mind that you can display the longer HAL signal -names of %I, %Q and %W variable by clicking on them in the section -window. Between the two, one should be able to keep track of what the -ladder program is connected to! - -=== The Editor window - -.Editor Window[[cap:Editor-Window]] - -image::images/Editor.png[align="center", alt="Editor Window"] - -* 'Add' - adds a rung after the selected rung -* 'Insert' - inserts a rung before the selected rung -* 'Delete' - deletes the selected rung -* 'Modify' - opens the selected rung for editing - -Starting from the top left image: - -* Object Selector, Eraser -* N.O. Input, N.C. Input, Rising Edge Input , Falling Edge Input -* Horizontal Connection, Vertical Connection , Long Horizontal Connection -* Timer IEC Block, Counter Block, Compare Variable -* Old Timer Block, Old Monostable Block (These have been replaced by the - IEC Timer) -* COILS - N.O. Output, N.C. Output, Set Output, Reset Output -* Jump Coil, Call Coil, Variable Assignment - -A short description of each of the buttons: - -* 'Selector' - allows you to select existing objects and - modify the information. -* 'Eraser' - erases an object. -* 'N.O. Contact' - creates a normally open contact. It can be an external - HAL-pin (%I) input contact, an internal-bit coil (%B) contact or a - external coil (%Q) contact. The HAL-pin input contact is closed when - the HAL-pin is true. The coil contacts are closed when the - corresponding coil is active (%Q2 contact closes when %Q2 coil is - active). -* 'N.C. Contact' - creates a normally closed contact. It is the same as the - N.O. contact except that the contact is open when the HAL-pin is true - or the coil is active. -* 'Rising Edge Contact - creates a contact that is closed when the HAL-pin - goes from False to true, or the coil from not-active to active. -* 'Falling Edge Contact' - creates a contact that is closed when the HAL-pin - goes from true to false or the coil from active to not. -* 'Horizontal Connection' - creates a horizontal connection to objects. -* 'Vertical Connection' - creates a vertical connection to horizontal lines. -* 'Horizontal Running Connection' - creates a horizontal connection between - two objects and is a quick way to connect objects that are more than one - block apart. -* 'IEC Timer' - creates a timer and replaces the 'Timer'. -* 'Timer' - creates a Timer Module (depreciated use IEC Timer instead). -* 'Monostable' - creates a one-shot monostable module -* 'Counter' - creates a counter module. -* 'Compare' - creates a compare block to compare variable to values or other - variables. (eg %W1<=5 or %W1=%W2) Compare cannot be placed in the right - most side of the section display. -* 'Variable Assignment' - creates an assignment block so you to assign values to - variables. (eg %W2=7 or %W1=%W2) ASSIGNMENT functions can only be - placed at the right most side of the section display. - -=== Config Window - -The config window shows the current project status and has the Modbus -setup tabs. - -.Config Window[[cap:Config-Window]] - -image::images/Config.png[align="center", alt="Config Window"] - -== Ladder objects - -=== CONTACTS - -Represent switches or relay contacts. They are controlled by the -variable letter and number assigned to them. - -The variable letter can be B, I, or Q and the number can be up to a -three digit number eg. %I2, %Q3, or %B123. Variable I is controlled by -a HAL input pin with a corresponding number. Variable B is for -internal contacts, controlled by a B coil with a corresponding number. -Variable Q is controlled by a Q coil with a corresponding number. (like -a relay with multiple contacts). E.g. if HAL pin classicladder.0.in-00 -is true then %I0 N.O. contact would be on (closed, true, whatever you -like to call it). If %B7 coil is 'energized' (on, true, etc) then %B7 -N.O. contact would be on. If %Q1 coil is 'energized' then %Q1 N.O. -contact would be on (and HAL pin classicladder.0.out-01 would be true.) - -* 'N.O. Contact' - image:images/ladder_action_load.png[alt="Normally Open Contact"] (Normally Open) - When the variable is false the switch is off. -* 'N.C. Contact' - image:images/ladder_action_loadbar.png[alt="Normally Closed Contact"] (Normally - Closed) When the variable is false the switch is on. -* 'Rising Edge Contact' - When the variable changes from false to true, - the switch is PULSED on. -* 'Falling Edge Contact' - When the variable changes from true to false, - the switch is PULSED on. - -=== IEC TIMERS - -Represent new count down timers. IEC Timers replace Timers and -Monostables. - -IEC Timers have 2 contacts. - -* 'I' - input contact -* 'Q' - output contact - -There are three modes - TON, TOF, TP. - -* 'TON' - When timer input is true countdown begins and continues as long - as input remains true. After countdown is done and as long as timer - input is still true the output will be true. -* 'TOF' - When timer input is true, sets output true. When the input is - false the timer counts down then sets output false. -* 'TP' - When timer input is pulsed true or held true timer sets output - true till timer counts down. (one-shot) - -The time intervals can be set in multiples of 100ms, seconds, or -minutes. - -There are also Variables for IEC timers that can be read and/or -written to in compare or operate blocks. - -* '%TMxxx.Q' - timer done (Boolean, read write) -* '%TMxxx.P' - timer preset (read write) -* '%TMxxx.V' - timer value (read write) - -=== TIMERS - -Represent count down timers. This is deprecated and replaced by IEC -Timers. - -Timers have 4 contacts. - -* 'E' - enable (input) starts timer when true, resets when goes false -* 'C' - control (input) must be on for the timer to run (usually connect to E) -* 'D' - done (output) true when timer times out and as long as E remains true -* 'R' - running (output) true when timer is running - -The timer base can be multiples of milliseconds, seconds, or minutes. - -There are also Variables for timers that can be read and/or written to -in compare or operate blocks. - -* '%Txx.R' - Timer xx running (Boolean, read only) -* '%Txx.D' - Timer xx done (Boolean, read only) -* '%Txx.V' - Timer xx current value (integer, read only) -* '%Txx.P' - Timer xx preset (integer, read or write) - -=== MONOSTABLES - -Represent the original one-shot timers. This is now -deprecated and replaced by IEC Timers. - -Monostables have 2 contacts, I and R. - -* 'I' - input (input) will start the mono timer running. -* 'R' - running (output) will be true while timer is running. - -The I contact is rising edge sensitive meaning it starts the timer -only when changing from false to true (or off to on). While the timer -is running the I contact can change with no effect to the running -timer. R will be true and stay true till the timer finishes counting to -zero. The timer base can be multiples of milliseconds, seconds, or -minutes. - -There are also Variables for monostables that can be read and/or -written to in compare or operate blocks. - -* '%Mxx.R' - Monostable xx running (Boolean, read only) -* '%Mxx.V' - Monostable xx current value (integer, read only) -* '%Mxx.P' - Monostable xx preset (integer, read or write) - -=== COUNTERS - -Represent up/down counters. - -There are 7 contacts: - -* 'R' - reset (input) will reset the count to 0. -* 'P' - preset (input) will set the count to the preset number assigned - from the edit menu. -* 'U' - up count (input) will add one to the count. -* 'D' - down count (input) will subtract one from the count. -* 'E' - under flow (output) will be true when the count rolls over from 0 - to 9999. -* 'D' - done (output) will be true when the count equals the preset. -* 'F' - overflow (output) will be true when the count rolls over from 9999 - to 0. - -The up and down count contacts are edge sensitive meaning they only -count when the contact changes from false to true (or off to on if you -prefer). - -The range is 0 to 9999. - -There are also Variables for counters that can be read and/or written -to in compare or operate blocks. - -* '%Cxx.D' - Counter xx done (Boolean, read only) -* '%Cxx.E' - Counter xx empty overflow (Boolean, read only) -* '%Cxx.F' - Counter xx full overflow (Boolean, read only) -* '%Cxx.V' - Counter xx current value (integer, read or write) -* '%Cxx.P' - Counter xx preset (integer, read or write) - -=== COMPARE - -For arithmetic comparison. Is variable %XXX = to this number (or -evaluated number) - -The compare block will be true when comparison is true. you can use -most math symbols: - -* +, - ,* , /, = (standard math symbols) -* < (less than), > (greater than), <= (less or equal), >= (greater or - equal), <> (not equal) -* (, ) grouping -* ^ (exponent),% (modulus),& (and),| (or),. - -* ABS (absolute), MOY (French for average) ,AVG (average) - -For example ABS(%W2)=1, MOY(%W1,%W2)<3. - -No spaces are allowed in the comparison equation. For example -%C0.V>%C0.P is a valid comparison expression while %C0.V > %CO.P is not -a valid expression. - -There is a list of Variables down the page that can be used for -reading from and writing to ladder objects. When a new compare block is opened -be sure and delete the # symbol when you enter a compare. - -To find out if word variable #1 is less than 2 times the current value -of counter #0 the syntax would be: - ----- -%W1<2*%C0.V ----- - -To find out if S32in bit 2 is equal to 10 the syntax would be: - ----- -%IW2=10 ----- - -Note: Compare uses the arithmetic equals not the double equals that -programmers are used to. - -=== VARIABLE ASSIGNMENT - -For variable assignment, e.g. assign this number (or evaluated number) -to this variable %xxx, there are two math functions MINI and MAXI that -check a variable for maximum (0x80000000) and minimum values -(0x07FFFFFFF) (think signed values) and keeps them from going beyond. - -When a new variable assignment block is opened be sure to delete the -# symbol when you enter an assignment. - -To assign a value of 10 to the timer preset of IEC Timer 0 the syntax -would be: - ----- -%TM0.P=10 ----- - -To assign the value of 12 to s32out bit 3 the syntax would be: - ----- -%QW3=12 ----- - -[NOTE] -When you assign a value to a variable with the variable assignment block -the value is retained until you assign a new value using the variable -assignment block. The last value assigned will be restored when LinuxCNC -is started. - -The following figure shows an Assignment and a Comparison Example. -%QW0 is a S32out bit and %IW0 is a S32in bit. In this case the HAL pin -classicladder.0.s32out-00 will be set to a value of 5 and when the HAL -pin classicladder.0.s32in-00 is 0 the HAL pin classicladder.0.out-00 -will be set to True. - -.Assign/Compare Example[[cap:Assign/Compare-Example]] - -image::images/AssignCompare-Ladder.png[align="center", alt="Assign/Compare Example"] - -image::images/Assignment_Expression.png[align="center"] - -image::images/Comparison_Expression.png[align="center"] - -=== COILS - -Coils represent relay coils. They are controlled by the variable -letter and number assigned to them. - -The variable letter can be B or Q and the number can be up to a three -digit number eg. %Q3, or %B123. Q coils control HAL out pins, e.g. if -%Q15 is energized then HAL pin classicladder.0.out-15 will be true. B -coils are internal coils used to control program flow. - -* 'N.O. COIL' - (a relay coil.) When coil is energized it's N.O. contact - will be closed (on, true, etc) -* 'N.C. COIL' - (a relay coil that inverses its contacts.) When coil is - energized it"s N.O. contact will be open (off, false, etc) -* 'SET COIL' - (a relay coil with latching contacts) When coil is energized - it's N.O. contact will be latched closed. -* 'RESET COIL' - (a relay coil with latching contacts) When coil is - energized It's N.0. contact will be latched open. -* 'JUMP COIL' - (a 'goto' coil) when coil is energized ladder program jumps - to a rung (in the CURRENT section) -jump points are designated by a - rung label. (Add rung labels in the section display, top left label - box) -* 'CALL COIL' - (a 'gosub' coil) when coil is energized program jumps to a - subroutine section designated by a subroutine number -subroutines are - designated SR0 to SR9 (designate them in the section manager) - -[WARNING] -If you use a N.C. contact with a N.C. coil the logic -will work (when the coil is energized the contact will be closed) but -that is really hard to follow! - -==== JUMP COIL - -A JUMP COIL is used to 'JUMP' to another section, like a goto in BASIC -programming language. - -If you look at the top left of the sections display window you will -see a small label box and a longer comment box beside it. Now go to -Editor→Modify then go back to the little box, type in a name. - -Go ahead and add a comment in the comment section. This label name is -the name of this rung only and is used by the JUMP COIL to identify -where to go. - -When placing a JUMP COIL, add it in the rightmost position and change -the label to the rung you want to JUMP to. - -==== CALL COIL - -A CALL COIL is used to go to a subroutine section then return, like a -gosub in BASIC programming language. - -If you go to the sections manager window hit the add section button. -You can name this section, select what language it will use (ladder or -sequential), and select what type (main or subroutine). - -Select a subroutine number (SR0 for example). An empty section will be -displayed and you can build your subroutine. - -When you've done that, go back to the section manager and click on the -your main section (default name prog1). - -Now you can add a CALL COIL to your program. CALL COILs are to be -placed at the rightmost position in the rung. - -Remember to change the label to the subroutine number you chose before. - -== Classic Ladder Variables - -These Variables are used in COMPARE or OPERATE to get information -about, or change specs of, ladder objects such as changing a counter -preset, or seeing if a timer is done running. - -List of variables : - -* '%Bxxx' - Bit memory xxx (Boolean) -* '%Wxxx' - Word memory xxx (32 bits signed integer) -* '%IWxxx' - Word memory xxx (S32 in pin) -* '%QWxxx' - Word memory xxx (S32 out pin) -* '%IFxx' - Word memory xx (Float in pin) (*converted to S32 in Classic - Ladder*) -* '%QFxx' - Word memory xx (Float out pin) (*converted to S32 in Classic - Ladder*) -* '%Txx.R' - Timer xx running (Boolean, user read only) -* '%Txx.D' - Timer xx done (Boolean, user read only) -* '%Txx.V' - Timer xx current value (integer, user read only) -* '%Txx.P' - Timer xx preset (integer) -* '%TMxxx.Q' - Timer xxx done (Boolean, read write) -* '%TMxxx.P' - Timer xxx preset (integer, read write) -* '%TMxxx.V' - Timer xxx value (integer, read write) -* '%Mxx.R' - Monostable xx running (Boolean) -* '%Mxx.V' - Monostable xx current value (integer, user read only) -* '%Mxx.P' - Monostable xx preset (integer) -* '%Cxx.D' - Counter xx done (Boolean, user read only) -* '%Cxx.E' - Counter xx empty overflow (Boolean, user read only) -* '%Cxx.F' - Counter xx full overflow (Boolean, user read only) -* '%Cxx.V' - Counter xx current value (integer) -* '%Cxx.P' - Counter xx preset (integer) -* '%Ixxx' - Physical input xxx (Boolean) (HAL input bit) -* '%Qxxx' - Physical output xxx (Boolean) (HAL output bit) -* '%Xxxx' - Activity of step xxx (sequential language) -* '%Xxxx.V' - Time of activity in seconds of step xxx (sequential language) -* '%Exx' - Errors (Boolean, read write(will be overwritten)) -* 'Indexed or vectored variables' - These are variables indexed by another - variable. Some might call this vectored variables. Example: %W0[%W4] => - if %W4 equals 23 it corresponds to %W23 - -== GRAFCET Programming - -[WARNING] -This is probably the least used and most poorly understood -feature of Classic Ladder. -Sequential programming is used to make sure a series of -ladder events always happen in a prescribed order. Sequential programs -do not work alone. There is always a ladder program as well that -controls the variables. Here are the basic rules governing sequential -programs: - -* Rule 1 : Initial situation - The initial situation is characterized by - the initial steps which are by definition in the active state at the - beginning of the operation.There shall be at least one initial step. -* Rule 2 : R2, Clearing of a transition - A transition is either enabled - or disabled. It is said to be enabled when all immediately preceding - steps linked to its corresponding transition symbol are active, - otherwise it is disabled. A transition cannot be cleared unless it is - enabled, and its associated transition condition is true. -* Rule 3 : R3, Evolution of active steps - The clearing of a transition - simultaneously leads to the active state of the immediately following - step(s) and to the inactive state of the immediately preceding step(s). -* Rule 4 : R4, Simultaneous clearing of transitions - All simultaneous - cleared transitions are simultaneously cleared. -* Rule 5 : R5, Simultaneous activation and deactivation of a step - If - during operation, a step is simultaneously activated and deactivated, - priority is given to the activation. - -This is the SEQUENTIAL editor window Starting from the top left image: -Selector arrow , Eraser Ordinary step , Initial (Starting) step -Transition , Step and Transition Transition Link-Downside , Transition -Link-Upside Pass-through Link-Downside , Pass-through Link-Upside Jump -Link Comment Box [show sequential program] - -* 'ORDINARY STEP' - has a unique number for each one -* 'STARTING STEP' - a sequential program must have one. This is where the - program will start. -* 'TRANSITION' - This shows the variable that must be true for control to - pass through to the next step. -* 'STEP AND TRANSITION' - Combined for convenience -* 'TRANSITION LINK-DOWNSIDE' - splits the logic flow to one of two possible - lines based on which of the next steps is true first (Think OR logic) -* 'TRANSITION LINK=UPSIDE' - combines two (OR) logic lines back in to one -* 'PASS-THROUGH LINK-DOWNSIDE' - splits the logic flow to two lines that - BOTH must be true to continue (Think AND logic) -* 'PASS-THROUGH LINK-UPSIDE' - combines two concurrent (AND logic) logic - lines back together -* 'JUMP LINK' - connects steps that are not underneath each other such as - connecting the last step to the first -* 'COMMENT BOX' - used to add comments - -To use links, you must have steps already placed. Select the type of -link, then select the two steps or transactions one at a time. It -takes practice! - -With sequential programming: The variable %Xxxx (eg. %X5) is used to -see if a step is active. The variable %Xxxx.V (eg. %X5.V) is used to -see how long the step has been active. The %X and %X.v variables are -use in LADDER logic. The variables assigned to the transitions (eg. %B) -control whether the logic will pass to the next step. After a step has -become active the transition variable that caused it to become active -has no control of it anymore. The last step has to JUMP LINK back only -to the beginning step. - -== Modbus - -Things to consider: - -* Modbus is a userspace program so it might have latency issues on a - heavily laden computer. -* Modbus is not really suited to Hard real time events such as position - control of motors or to control E-stop. -* The Classic Ladder GUI must be running for Modbus to be running. -* Modbus is not fully finished so it does not do all modbus functions. - -To get MODBUS to initialize you must specify that when loading the -Classic Ladder userspace program. - -.Loading Modbus ----- -loadusr -w classicladder --modmaster myprogram.clp ----- - -The -w makes HAL wait until you close Classic Ladder before closing realtime -session. Classic Ladder also loads a TCP modbus slave if you add '--modserver' -on command line. - -.Modbus Functions -* '1' - read coils -* '2' - read inputs -* '3' - read holding registers -* '4' - read input registers -* '5' - write single coils -* '6' - write single register -* '8' - echo test -* '15' - write multiple coils -* '16' - write multiple registers - -If you do not specify a '-- modmaster' when loading the Classic Ladder user -program this page will not be displayed. - -.Config I/O[[cap:Config-I/O]] - -image::images/Config-io.png[align="center", alt="Config I/O"] - -.Config Coms[[cap:Config-Coms]] - -image::images/Config-com.png[align="center", alt="Config Coms"] - -* 'SERIAL PORT' - For IP blank. For serial the location/name of serial driver eg. - /dev/ttyS0 ( or /dev/ttyUSB0 for a USB-to-serial converter). - -* 'SERIAL SPEED' - Should be set to speed the slave is set for - 300, 600, 1200, 2400, - 4800, 9600, 19200, 38400, 57600, 115200 are supported. - -* 'PAUSE AFTER TRANSMIT' - Pause (milliseconds) after transmit and before receiving answer, - some devices need more time (e.g., USB-to-serial converters). - -* 'PAUSE INTER-FRAME' - Pause (milliseconds) after receiving answer from slave. This sets - the duty cycle of requests (it's a pause for EACH request). - -* 'REQUEST TIMEOUT LENGTH' - Length (milliseconds) of time before we decide that the slave didn't - answer. - -* 'MODBUS ELEMENT OFFSET' - used to offset the element numbers by 1 (for manufacturers numbering - differences). - -* 'DEBUG LEVEL' - Set this to 0-3 (0 to stop printing debug info besides no-response - errors). - -* 'READ COILS/INPUTS MAP TO' - Select what variables that read coils/inputs will update. (B or Q). - -* 'WRITE COILS MAP TO' - Select what variables that write coils will updated.from (B,Q,or I). - -* 'READ REGISTERS/HOLDING' - Select what variables that read registers will update. (W or QW). - -* 'WRITE REGISTERS MAP TO' - Select what variables that read registers will updated from. (W, QW, - or IW). - -* 'SLAVE ADDRESS' - For serial the slaves ID number usually settable on the slave device - (usually 1-256) For IP the slave IP address plus optionally the port - number. - -* 'TYPE ACCESS' - This selects the MODBUS function code to send to the slave (eg what - type of request). - -* 'COILS / INPUTS' - Inputs and Coils (bits) are read from/written to I, B, or Q variables (user selects). - -* 'REGISTERS (WORDS)' - Registers (Words/Numbers) map to IW, W, or QW variables (user selects). - -* '1st MODBUS ELEMENT' - The address (or register number) of the first element in a group. - (remember to set MODBUS ELEMENT OFFSET properly). - -* 'NUMBER OF ELEMENTS' - The number of elements in this group. - -* 'LOGIC' - You can invert the logic here. - -* '1st%I%Q IQ WQ MAPPED' - This is the starting number of %B, %I, %Q, %W, %IW, or %QW variables - that are mapped onto/from the modbus element group (starting at the - first modbus element number). - -In the example above: Port number - for my computer /dev/ttyS0 was my -serial port. - -The serial speed is set to 9600 baud. - -Slave address is set to 12 (on my VFD I can set this from 1-31, -meaning I can talk to 31 VFDs maximum on one system). - -The first line is set up for 8 input bits starting at the first -register number (register 1). So register numbers 1-8 are mapped onto -Classic Ladder's %B variables starting at %B1 and ending at %B8. - -The second line is set for 2 output bits starting at the ninth -register number (register 9) so register numbers 9-10 are mapped onto -Classic Ladder's %Q variables starting at %Q9 ending at %Q10. - -The third line is set to write 2 registers (16 bits each) starting at -the 0th register number (register 0) so register numbers 0-1 are -mapped onto Classic Ladder's %W variables starting at %W0 ending at %W1. - -It's easy to make an off-by-one error as sometimes the modbus elements -are referenced starting at one rather then 0 (actually by the standard -that is the way it's supposed to be!) You can use the modbus element -offset radio button to help with this. - -The documents for your modbus slave device will tell you how the -registers are set up- there is no standard way. - -The SERIAL PORT, PORT SPEED, PAUSE, and DEBUG level are editable for -changes (when you close the config window values are applied, though -Radio buttons apply immediately). - -To use the echo function select the echo function and add the slave -number you wish to test. You don't need to specify any variables. - -The number 257 will be sent to the slave number you specified and the -slave should send it back. you will need to have Classic Ladder running -in a terminal to see the message. - -=== MODBUS Settings - -Serial: - -* Classic Ladder uses RTU protocol (not ASCII). -* 8 data bits, No parity is used, and 1 stop bit is also known as 8-N-1. -* Baud rate must be the same for slave and master. Classic Ladder can - only have one baud rate so all the slaves must be set to the same rate. -* Pause inter frame is the time to pause after receiving an answer. -* MODBUS_TIME_AFTER_TRANSMIT is the length of pause after sending a - request and before receiving an answer (this apparently helps with USB - converters which are slow). - -=== MODBUS Info - -* Classic Ladder can use distributed inputs/outputs on modules using the - modbus protocol ("master": polling slaves). -* The slaves and theirs I/O can be configured in the config window. -* 2 exclusive modes are available : ethernet using Modbus/TCP and serial - using Modbus/RTU. -* No parity is used. -* If no port name for serial is set, TCP/IP mode will be used... -* The slave address is the slave address (Modbus/RTU) or the IP address. -* The IP address can be followed per the port number to use - (xx.xx.xx.xx:pppp) else the port 9502 will be used per default. -* 2 products have been used for tests: a Modbus/TCP one (Adam-6051, - http://www.advantech.com) and a serial Modbus/RTU one - (http://www.ipac.ws). -* See examples: adam-6051 and modbus_rtu_serial. -* Web links: http://www.modbus.org and this interesting one: - http://www.iatips.com/modbus.html -* MODBUS TCP SERVER INCLUDED -* Classic Ladder has a Modbus/TCP server integrated. Default port is 9502. - (the previous standard 502 requires that the application must be - launched with root privileges). -* List of Modbus functions code supported are: 1, 2, 3, 4, 5, 6, 15 and 16. -* Modbus bits and words correspondence table is actually not parametric - and correspond directly to the %B and %W variables. - -More information on modbus protocol is available on the internet. - -http://www.modbus.org/[http://www.modbus.org/] - -=== Communication Errors - -If there is a communication error, a warning window will pop up (if -the GUI is running) and %E0 will be true. Modbus will continue to try -to communicate. The %E0 could be used to make a decision based on the -error. A timer could be used to stop the machine if timed out, etc. - -=== MODBUS Bugs - -* In compare blocks the function %W=ABS(%W1-%W2) is accepted but does - not compute properly. only %W0=ABS(%W1) is currently legal. -* When loading a ladder program it will load Modbus info but will not - tell Classic Ladder to initialize Modbus. You must initialize Modbus - when you first load the GUI by adding '--modmaster'. -* If the section manager is placed on top of the section display, across - the scroll bar and exit is clicked the user program crashes. -* When using '--modmaster' you must load the ladder program at the same - time or else only TCP will work. -* reading/writing multiple registers in Modbus has checksum errors. - -== Setting up Classic Ladder - -In this section we will cover the steps needed to add Classic Ladder -to a Stepconf Wizard generated config. On the advanced Configuration -Options page of Stepconf Wizard check off "Include Classic Ladder PLC". - -.Stepconf Classic Ladder[[cap:Stepconf-Classicladder]] - -image::images/stepconf_ladder.png[align="center", alt="Stepconf Classic Ladder"] - -=== Add the Modules - -If you used the Stepconf Wizard to add Classic Ladder you can skip -this step. - -To manually add Classic Ladder you must first add the modules. This is -done by adding a couple of lines to the custom.hal file. - -This line loads the real time module: - ----- -loadrt classicladder_rt ----- - -This line adds the Classic Ladder function to the servo thread: - ----- -addf classicladder.0.refresh servo-thread ----- - -=== Adding Ladder Logic - -Now start up your config and select "File/Ladder Editor" to open up -the Classic Ladder GUI. You should see a blank Section Display and -Sections Manager window as shown above. In the Section Display window -open the Editor. In the Editor window select Modify. Now a Properties -window pops up and the Section Display shows a grid. The grid is one -rung of ladder. The rung can contain branches. A simple rung has one -input, a connector line and one output. A rung can have up to six -horizontal branches. While it is possible to have more than one -circuit in a run the results are not predictable. - -.Section Display with Grid[[cap:Section-Display-with-Grid]] - -image::images/Section_Display_Grid.png[align="center", alt="Section Display with Grid"] - -Now click on the N.O. Input in the Editor Window. - -.Editor Window[[cap:Editor-Window-NO]] - -image::images/Editor_NO_Input.png[align="center", alt="Editor Window"] - -Now click in the upper left grid to place the N.O. Input into the -ladder. - -.Section Display with Input[[cap:Section-Display-with-Input]] - -image::images/Section_Display_Build01.png[align="center", alt="Section Display with Input"] - -Repeat the above steps to add a N.O. Output to the upper right grid -and use the Horizontal Connection to connect the two. It should look -like the following. If not, use the Eraser to remove unwanted sections. - -.Section Display with Rung[[cap:Section-Display-with-Rung]] - -image::images/Section_Display_Build02.png[align="center", alt="Section Display with Rung"] - -Now click on the OK button in the Editor window. Now your Section -Display should look like this. - -.Section Display Finished[[cap:Section-Display-Finished]] - -image::images/Section_Display_Build03.png[align="center", alt="Section Display Finished"] - -To save the new file select Save As and give it a name. The .clp -extension will be added automatically. It should default to the running -config directory as the place to save it. - -.Save As Dialog[[cap:Save-As-Dialog]] - -image::images/SaveAs.png[align="center", alt="Save As Dialog"] - -Again if you used the Stepconf Wizard to add Classic Ladder you can -skip this step. - -To manually add a ladder you need to add add a line to your custom.hal -file that will load your ladder file. Close your LinuxCNC session and add -this line to your custom.hal file. - ----- -loadusr -w classicladder --nogui MyLadder.clp ----- - -Now if you start up your LinuxCNC config your ladder program will be -running as well. If you select "File/Ladder Editor", the program you -created will show up in the Section Display window. - - diff --git a/docs/src/ladder/ladder-examples_fr.adoc b/docs/src/ladder/ladder-examples_fr.adoc deleted file mode 100644 index 95ef3f58e9..0000000000 --- a/docs/src/ladder/ladder-examples_fr.adoc +++ /dev/null @@ -1,194 +0,0 @@ -== Ladder Examples - -[[cha:classicladder-examples]] - -=== Wrapping Counter - -To have a counter that "wraps around" you have to use the preset pin -and the reset pin. When you create the counter set the preset at the -number you wish to reach before wrapping around to 0. The logic is if -the counter value is over the preset then reset the counter and if the -underflow is on then set the counter value to the preset value. As you -can see in the example when the counter value is greater than the -counter preset the counter reset is triggered and the value is now 0. -The underflow output %Q2 will set the counter value at the preset when -counting backwards. - -.Wrapping Counter[[fig:Wrapping-Counter]] - -image::images/wrapping-counter.png[alt="Wrapping Counter"] - -=== Reject Extra Pulses - -This example shows you how to reject extra pulses from an input. -Suppose the input pulse %I0 has an annoying habit of giving an extra -pulse that spoils our logic. The TOF (Timer Off Delay) prevents the -extra pulse from reaching our cleaned up output %Q0. How this works is -when the timer gets an input the output of the timer is on for the -duration of the time setting. Using a normally closed contact %TM0.Q -the output of the timer blocks any further inputs from reaching our -output until it times out. - -.Reject Extra Pulse[[fig:Reject-Extra-Pulse]] - -image::images/extra-pulse-reject.png[alt="Reject Extra Pulse"] - -=== External E-Stop - -The External E-Stop example is in the /config/classicladder/cl-estop -folder. It uses a pyVCP panel to simulate the external components. - -To interface an external E-Stop to LinuxCNC and have the external E-Stop -work together with the internal E-Stop requires a couple of connections -through Classic Ladder. - -First we have to open the E-Stop loop in the main HAL file by -commenting out by adding the pound sign as shown or removing the -following lines. - - # net estop-out <= iocontrol.0.user-enable-out - # net estop-out => iocontrol.0.emc-enable-in - -Next we add Classic Ladder to our custom.hal file by adding these two -lines: - - loadrt classicladder_rt - addf classicladder.0.refresh servo-thread - -Next we run our config and build the ladder as shown here. - -.E-Stop Section Display[[cap:E-Stop-Section-Display]] - -image::images/EStop_Section_Display.png[alt="E-Stop Section Display"] - -After building the ladder select Save As and save the ladder as -estop.clp - -Now add the following line to your custom.hal file. - - # Load the ladder - loadusr classicladder --nogui estop.clp - -I/O assignments - - - %I0 = Input from the pyVCP panel simulated E-Stop (the checkbox) - - %I1 = Input from LinuxCNC's E-Stop - - %I2 = Input from LinuxCNC's E-Stop Reset Pulse - - %I3 = Input from the pyVCP panel reset button - - %Q0 = Ouput to LinuxCNC to enable - - %Q1 = Output to external driver board enable pin (use a N/C output if - your board had a disable pin) - -Next we add the following lines to the custom_postgui.hal file - - # E-Stop example using pyVCP buttons to simulate external components - - # The pyVCP checkbutton simulates a normally closed external E-Stop - net ext-estop classicladder.0.in-00 <= pyvcp.py-estop - - # Request E-Stop Enable from LinuxCNC - net estop-all-ok iocontrol.0.emc-enable-in <= classicladder.0.out-00 - - # Request E-Stop Enable from pyVCP or external source - net ext-estop-reset classicladder.0.in-03 <= pyvcp.py-reset - - # This line resets the E-Stop from LinuxCNC - net emc-reset-estop iocontrol.0.user-request-enable => - classicladder.0.in-02 - - # This line enables LinuxCNC to unlatch the E-Stop in Classic Ladder - net emc-estop iocontrol.0.user-enable-out => classicladder.0.in-01 - - # This line turns on the green indicator when out of E-Stop - net estop-all-ok => pyvcp.py-es-status - -Next we add the following lines to the panel.xml file. Note you have -to open it with the text editor not the default html viewer. - -[source,xml] -------------------------------------------------- - - - - - "py-es-status" - 50 - "green" - "red" - - - "py-estop" - "E-Stop" - - - - -------------------------------------------------- - -Now start up your config and it should look like this. - -.AXIS E-Stop[[cap:AXIS-E-Stop]] - -image::images/axis_cl-estop.png[alt="AXIS E-Stop"] - -Note that in this example like in real life you must clear the remote -E-Stop (simulated by the checkbox) before the AXIS E-Stop or the -external Reset will put you in OFF mode. If the E-Stop in the AXIS -screen was pressed, you must press it again to clear it. You cannot -reset from the external after you do an E-Stop in AXIS. - -=== Timer/Operate Example - -In this example we are using the Operate block to assign a value to -the timer preset based on if an input is on or off. - -.Timer/Operate Example[[cap:Timer/Operate-Example]] - -image::images/Tmr_Section_Display.png[alt="Timer/Operate Example"] - -In this case %I0 is true so the timer preset value is 10. If %I0 was -false the timer preset would be 5. - -=== Tool Turret - - - This Example is not complete yet. - -This is a program for one type of tool turret. The turret has a home -switch at tool position 1 and another switch to tell you when the -turret is in a lockable position. To keep track of the actual tool -number one must count how many positions past home you are. We will use -Classic Ladder's counter block '$CO'.The counter is preset to 1 when -RESET is true. The counter is increased by one on the rising edge of -INDEX. We then 'COMPARE' the counter value (%C0.V) to the tool number -we want (in the example only checks for tool 1 and 2 are shown). We -also 'OPERATE' the counter value to a word variable (%W0) that (you can -assume) is mapped on to a s32 out HAL pin so you can let some other HAL -component know what the current tool number is. In the real world -another s32 (in) pin would be used to get the requested tool number -from LinuxCNC.You would have to load Classic Ladder's real time module -specifying that you want s32 in and out pins. See 'loading options' -above. [display turret sample] - -=== Sequential Example - - - This Example is not complete yet. - -This is a sequential program. + -When the program is first started step one is active. + -Then when %B0 is true, steps 2 and 3 are then active and step one is inactive. + -Then when %B1 and/or %B2 are true, step 4 and/or 5 are active and step 2 and/or 3 are inactive. + -Then when either %B3 OR %B4 are true, step 6 is true and steps 4 and 5 are inactive. + -Then when %B5 is true step 1 is active and step 6 is inactive and it all starts again. - -As shown, the sequence has been: + -%B0 was true making step 2 and 3 active, then %B1 became true + -(and still is-see the pink line through %B1) + -making step 4 active and step 2 inactive. + -Step 3 is active and waiting for %B2 to be true. + -Step 4 is active and is waiting for %B3 to be true. + -WOW, that was quite a mouthful!! + - - diff --git a/docs/src/ladder/ladder-intro_fr.adoc b/docs/src/ladder/ladder-intro_fr.adoc index 2189eb0626..6f1a53500a 100644 --- a/docs/src/ladder/ladder-intro_fr.adoc +++ b/docs/src/ladder/ladder-intro_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= La programmation en Ladder - [[cha:classicladder-introduction]] += La programmation en Ladder == Introduction diff --git a/docs/src/lathe/lathe-user_es.adoc b/docs/src/lathe/lathe-user_es.adoc index f357fc8cd2..cd4f254614 100644 --- a/docs/src/lathe/lathe-user_es.adoc +++ b/docs/src/lathe/lathe-user_es.adoc @@ -2,9 +2,11 @@ :toc: [[cha:lathe-user-information]] - = Informacion para Usuarios de Torno +FIXME from French: Ce chapitre va regrouper les informations spécifiques aux tours, il +est encore en cours de rédaction. + == Modo Torno Si su máquina CNC es un torno, hay algunos cambios específicos que diff --git a/docs/src/motion/dh-parameters.adoc b/docs/src/motion/dh-parameters.adoc index fb60738c99..3a0bcfed00 100644 --- a/docs/src/motion/dh-parameters.adoc +++ b/docs/src/motion/dh-parameters.adoc @@ -101,10 +101,8 @@ The three configurable parameters are: . *alpha* : positive or negative rotation (in radians) around the X-axis of the "current coordinate system" - . *a* : positive distance, along X, between two joint axes specified in 'machine units' (mm or inch) defined in the system's ini file. - . *d* : positive or negative length along Z (also in 'machine units') The parameter sets are always derived in the same order and a set is diff --git a/docs/src/motion/dh-parameters_es.adoc b/docs/src/motion/dh-parameters_es.adoc index a943aa273a..7abffb0064 100644 --- a/docs/src/motion/dh-parameters_es.adoc +++ b/docs/src/motion/dh-parameters_es.adoc @@ -1,9 +1,7 @@ :lang: es -[[cha:dh-parameters]] (((DH parameters Examples))) - -= Configuración de parámetros "modificados" Denavit-Hartenberg (DH) para -'genserkins' +[[cha:dh-parameters]] += Configuración de parámetros "modificados" Denavit-Hartenberg (DH) para 'genserkins'(((DH parameters Examples))) == Preludio @@ -15,13 +13,11 @@ Este documento ilustra un método para configurar los parámetros DH para un rob Mitsubishi RV-6SDL en LinuxCNC utilizando la cinemática 'genserkins'. [NOTE] - Este documento no cubre la creación de un modelo 'vismach' que, aunque ciertamente es muy útil, requiere un modelado igual de cuidadoso para que coincida con el modelo 'genserkins' derivado en este documento. [NOTE] - Puede haber errores y/o defectos: ¡use bajo su propio riesgo! == General @@ -102,11 +98,9 @@ imposible definir la posición 0° de nuestras articulaciones de robots de forma Los tres parámetros configurables son: . *alpha*: rotación positiva o negativa (en radianes) alrededor del eje X -del "sistema de coordenadas actual" - + del "sistema de coordenadas actual" . *a*: distancia positiva, a lo largo de X, entre dos ejes de articulacion especificados en -'unidades máquina' (mm o pulgadas) definidas en el archivo ini del sistema. - + 'unidades máquina' (mm o pulgadas) definidas en el archivo ini del sistema. . *d*: longitud positiva o negativa a lo largo de Z (también en 'unidades máquina') Los conjuntos de parámetros siempre se derivan en el mismo orden y un conjunto es diff --git a/docs/src/motion/external-offsets.adoc b/docs/src/motion/external-offsets.adoc index 8abe9a950f..7d8b38ccb9 100644 --- a/docs/src/motion/external-offsets.adoc +++ b/docs/src/motion/external-offsets.adoc @@ -26,13 +26,13 @@ For each axis letter (*L* in xyzabcuvw): . If nonzero, the OFFSET_AV_RATIO (*r*), adjusts the conventional (planning) max velocity and acceleration to preserve [AXIS_L] constraints: ---- - planning max velocity = (1-r) * MAX_VELOCITY - external offset velocity = ( r) * MAX_VELOCITY +---- +planning max velocity = (1-r) * MAX_VELOCITY +external offset velocity = ( r) * MAX_VELOCITY - planning max acceleration = (1-r) * MAX_ACCELERATIOIN - external offset acceleration = ( r) * MAX_ACCELERATION ---- +planning max acceleration = (1-r) * MAX_ACCELERATIOIN +external offset acceleration = ( r) * MAX_ACCELERATION +---- == Hal Pins diff --git a/docs/src/motion/external-offsets_es.adoc b/docs/src/motion/external-offsets_es.adoc index 73c99b5264..28605f6e49 100644 --- a/docs/src/motion/external-offsets_es.adoc +++ b/docs/src/motion/external-offsets_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:external-offsets]] - = Offsets Externos de Ejes Los offsets externos de ejes estan soportados durante los movimientos teleop (universal) @@ -27,11 +26,13 @@ Para cada letra de eje (*L* será uno de x,y,z,a,b,c,u,v,w): . Si no es cero, OFFSET_AV_RATIO (*r*), ajusta la velocidad y aceleración máxima convencional (planificada) para preservar las restricciones en [AXIS_L]: - velocidad máxima planificada = (1-r) * MAX_VELOCITY - velocidad de offset externo = ( r) * MAX_VELOCITY +---- +velocidad máxima planificada = (1-r) * MAX_VELOCITY +velocidad de offset externo = ( r) * MAX_VELOCITY - aceleración máxima planificada = (1-r) * MAX_ACCELERATIOIN - aceleración de offset externo = ( r) * MAX_ACCELERATION +aceleración máxima planificada = (1-r) * MAX_ACCELERATIOIN +aceleración de offset externo = ( r) * MAX_ACCELERATION +---- == Pines Hal diff --git a/docs/src/motion/kinematics_es.adoc b/docs/src/motion/kinematics_es.adoc index 0abcddd4ab..27cc6b99d5 100644 --- a/docs/src/motion/kinematics_es.adoc +++ b/docs/src/motion/kinematics_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:kinematics]] - = Cinemática == Introducción @@ -147,8 +146,7 @@ bípode (una versión simplificada del trípode, que es una version simplificada del hexápodo). .Configuración del bípode - -image::images/bipod.png[alt="Configuracion de Bipod"] +image::images/bipod.png["Configuracion de Bipod"] El Bipod del que estamos hablando es un dispositivo que consta de 2 motores colocado en una pared, de la cual cuelga un dispositivo usando un cable. Las diff --git a/docs/src/motion/kinematics_fr.adoc b/docs/src/motion/kinematics_fr.adoc index 708afeab07..0604585bea 100644 --- a/docs/src/motion/kinematics_fr.adoc +++ b/docs/src/motion/kinematics_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= La cinématique dans LinuxCNC - [[cha:Cinematique]] += La cinématique dans LinuxCNC == Introduction @@ -107,7 +106,6 @@ appelée bipode (une version simplifiée du tripode, qui est déjà une version simplifiée de l'hexapode). .Définir un bipode[[cap:Bipod-setup]] - image::images/bipod.png[alt="Définir un bipode"] Le bipode dont nous parlons est un appareil, composé de deux moteurs @@ -127,7 +125,8 @@ La tâche de la cinématique consistera à transformer les longueurs des articulations en (AD, BD) en coordonnées Cartésiennes (Dx, Dy) et vice-versa. -=== Transformation avant[[sec:Forward-transformation]] +[[sec:Forward-transformation]] +=== Transformation avant Pour effectuer la transformation de l'espace articulation en espace Cartésien nous allons utiliser quelques règles de trigonomètrie (le @@ -143,7 +142,6 @@ et par conséquent: *x=(AD^2^-BD^2^+Bx^2^)/(2*Bx)* De là nous calculons: *y=sqrt(AD^2^-x^2^)* - Noter que le calcul inclus la racine carrée de la différence, mais qu'il n'en résulte pas un nombre réel. Si il n'y a aucune coordonnée Cartésienne pour la position de cette articulation, alors la position est @@ -161,7 +159,8 @@ pos->tran.y = sqrt(y2); return 0; ---- -=== Transformation inverse[[sec:Inverse-transformation]] +[[sec:Inverse-transformation]] +=== Transformation inverse La cinématique inverse est beaucoup plus simple dans notre exemple, de sorte que nous pouvons l'écrire directement: @@ -171,6 +170,7 @@ sorte que nous pouvons l'écrire directement: *BD=sqrt((Bx-x)^2^+y^2^)* ou traduite en code: + ---- double x2 = pos->tran.x * pos->tran.x; double y2 = pos->tran.y * pos->tran.y; diff --git a/docs/src/motion/pid-theory_es.adoc b/docs/src/motion/pid-theory_es.adoc index d9ab23f418..ff846c2d85 100644 --- a/docs/src/motion/pid-theory_es.adoc +++ b/docs/src/motion/pid-theory_es.adoc @@ -71,12 +71,11 @@ la salida del controlador 'maestro', que está controlando basándose en una var === Teoría -'PID' lleva el nombre de sus tres cálculos de corrección; todos añaden -o ajustan la cantidad controlada. Estas adiciones son en realidad +'PID' lleva el nombre de sus tres cálculos de corrección; todos añaden o +ajustan la cantidad controlada. Estas adiciones son en realidad 'restas' de error, porque las proporciones son generalmente negativas: .Proporcional - Para manejar el estado presente, el error se multiplica por una P constante (de 'proporcional', negativa) y se añade (restando el error) a la cantidad controlada. P solo es válido en la banda sobre la que @@ -85,7 +84,6 @@ que cuando el error es cero, la salida de un controlador proporcional es cero. .Integral - Para aprender del pasado, el error está integrado (acumulado) sobre un período de tiempo, y luego multiplicado por una constante I (negativa, haciendo un promedio), y añadido a (restando el error de) la cantidad controlada. @@ -100,7 +98,6 @@ el punto de ajuste siempre se está reduciendo. Por lo tanto, eventualmente, una salida del proceso del bucle PID bien ajustado se establecerá en el punto de ajuste. .Derivativo - Para manejar el futuro, se calcula la primera derivada (la pendiente del error) con el tiempo y se multiplica por otra constante (negativa) D, y también se añade a (restando el error de) la cantidad controlada. @@ -140,7 +137,6 @@ sistema a un cambio de un paso la entrada, midiendo la salida en función del tiempo y usando esta respuesta para determinar los parámetros de control. .Método simple - Si el sistema debe permanecer en línea, se debe configurar primero un ajuste a cero de los valores I y D. Aumentar P hasta que la salida del lazo oscile. Luego aumentar I hasta que la oscilación se detenga. Por último, aumentar @@ -159,7 +155,6 @@ rapidez. Sin embargo, algunos sistemas no pueden aceptar estos rebasamientos. Efectos del aumento de parámetros .Método Ziegler-Nichols - Otro método de ajuste se conoce formalmente como el 'método Ziegler-Nichols', presentado por John G. Ziegler y Nathaniel B. Nichols. Comienza de la misma manera que el método descrito anteriormente: primero, se configura I y D a cero y luego se aumenta la ganancia P y @@ -178,9 +173,7 @@ de la salida (P~c~). Luego ajuste los controles P, I y D como muestra la tabla: | ======================================= .Pasos Finales - Después de ajustar el eje, verifique el error de seguimiento con Halscope para asegurarse de que está dentro de los requisitos de su máquina. Hay más información sobre Halscope en el manual de usuario de HAL. - diff --git a/docs/src/motion/pid-theory_fr.adoc b/docs/src/motion/pid-theory_fr.adoc index b33796ca9a..7105037b44 100644 --- a/docs/src/motion/pid-theory_fr.adoc +++ b/docs/src/motion/pid-theory_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= Réglages d'une boucle PID - [[cha:Regulation-PID]] += Réglages d'une boucle PID == Régulation à PID diff --git a/docs/src/motion/tweaking-steppers_es.adoc b/docs/src/motion/tweaking-steppers_es.adoc index 17467d51a9..8ab75fc757 100644 --- a/docs/src/motion/tweaking-steppers_es.adoc +++ b/docs/src/motion/tweaking-steppers_es.adoc @@ -1,8 +1,7 @@ :lang: es -= Afinación de Steppers - [[cha:Stepper-Tuning]] += Afinación de Steppers == Obtener el máximo rendimiento del Software de Stepping @@ -62,6 +61,7 @@ Las diferentes marcas de unidades paso a paso tienen diferentes requisitos de te en sus pasos y entradas de dirección. Necesita la hoja de datos que tiene las especificaciones de su unidad. Del manual de Gecko G202: + .... Frecuencia de pasos: 0 a 200 kHz Step Pulse "0" Time: 0.5 us min (Paso en el flanco descendente) @@ -70,6 +70,7 @@ Configuración de dirección: 1 us min (20 us min tiempo de retencion despues de .... Del manual de Gecko G203V: + .... Frecuencia de paso: 0 a 333 kHz Step Pulse "0" Time: 2.0 us min (paso en flanco ascendente) @@ -226,4 +227,3 @@ que podrá generar Se han agregado mas cosas a la hoja de cálculo para calcular la velocidad máxima y cálculos eléctricos paso a paso. - diff --git a/docs/src/motion/tweaking-steppers_fr.adoc b/docs/src/motion/tweaking-steppers_fr.adoc index 6b3cddf3ee..4f7e013925 100644 --- a/docs/src/motion/tweaking-steppers_fr.adoc +++ b/docs/src/motion/tweaking-steppers_fr.adoc @@ -1,9 +1,8 @@ :lang: fr :toc: -= Réglages des pas à pas - [[cha:Reglages-de-pas-a-pas]] += Réglages des pas à pas == Obtenir le meilleur pilotage logiciel possible @@ -38,6 +37,7 @@ de pas et de direction. Aussi vous avez besoin d'accéder (ou Google) à la fiche des spécifications techniques de votre carte. Par exemple, le manuel du Gecko G202 indique: + .... Step Frequency: 0 to 200 kHz Step Pulse “0” Time: 0.5 µs min (Step on falling edge) @@ -46,6 +46,7 @@ Direction Setup: 1 µs min (20 µs min hold time after Step edge) .... Les spécifications du Gecko G203V indiquent: + .... Step Frequency: 0 to 333 kHz Step Pulse “0” Time: 2.0 µs min (Step on rising edge) @@ -58,6 +59,7 @@ Direction setup: Un carte Xylotex donne dans ses données techniques un superbe graphe du timing nécessaire, il indique: + .... Minimum DIR setup time before rising edge of STEP Pulse 200ns Minimum DIR hold time after rising edge of STEP pulse 200ns @@ -227,4 +229,3 @@ aussi la fréquence de pas maximum que vous serez en mesure de générer. J'ai ajouté quelques petites choses à la feuille de calcul pour calculer la fréquence maximum et quelques autres calculs. - diff --git a/docs/src/plasma/plasma-cnc-primer.adoc b/docs/src/plasma/plasma-cnc-primer.adoc index a3ff20217c..5abf8a28eb 100644 --- a/docs/src/plasma/plasma-cnc-primer.adoc +++ b/docs/src/plasma/plasma-cnc-primer.adoc @@ -2,6 +2,7 @@ [[cha:plasma-primer]] = Plasma Cutting Primer for LinuxCNC Users(((Plasma Cutting Primer))) + :toc: == What Is Plasma? @@ -35,15 +36,15 @@ Plasma operations on CNC machines is quite unique in comparison to milling or tu A plasma Arc is oval in shape and the cutting height needs to be controlled to minimise bevelled edges. If the torch is too high or too low then the edges can become excessively bevelled. It is also critical that the torch is held perpendicular to the surface. -*Torch to work distance can impact edge bevel* +* *Torch to work distance can impact edge bevel* image::images/primer_cut-angularity.png[width=50%] -*Negative cut angle:* torch too low, increase torch to work distance. - -*Positive cut angle:* torch too high, decrease torch to work distance. +* *Negative cut angle:* torch too low, increase torch to work distance. +* *Positive cut angle:* torch too high, decrease torch to work distance. -NOTE: A slight variation in cut angles may be normal, as long as it is within tolerance. +[NOTE] +A slight variation in cut angles may be normal, as long as it is within tolerance. The ability to precisely control the cutting height in such a hostile and ever changing environment is a very difficult challenge. Fortunately there is a very linear relationship between Torch height (Arc length) and arc voltage as this graph shows. @@ -174,8 +175,8 @@ It is important for the plasma controller to “wait it out" before auto samplin In our testing this varies between machines and material from 0.5 to 1.5 seconds. Therefore a delay of 1.5 seconds after a valid arcOK signal is received before enabling THC control is a safe initial setting. If you want to shorten this for a given material, LinuxCNC's Halscope will allow you to plot the torch voltage and make informed decisions about the shortest safe delay is used. - -NOTE: If the cut velocity is not near the desired cut speed at the end of this delay, the controller should wait until this is achieved before enabling the THC. +[NOTE] +If the cut velocity is not near the desired cut speed at the end of this delay, the controller should wait until this is achieved before enabling the THC. == Torch Voltage Sampling @@ -284,7 +285,6 @@ As can be seen, plasma tables are pin intensive and we have already consumed abo * As mentioned earlier, a breakaway sensor should be installed that is triggered if the torch crashes and falls off. * Usually, this would be connected to 'halui.program-pause' so the fault can be rectified and the program resumed. - == G-Code For Plasma Controllers Most plasma controllers offer a method to change settings from G-Code. Linuxcnc support this via M67/M68 for analog commands and M62-M65 for digital (on/off commands). How this is implemented is totally arbitrary. Lets look at how the LinuxCNC QtPlasmaC configuration does this: @@ -504,3 +504,4 @@ Another popular post-processor is included with the popular Fusion360 package bu LinuxCNC is a CNC application and discussions of CAM techniques other than this introductory discussion are out of scope of LinuxCNC. +// vim: set syntax=asciidoc: diff --git a/docs/src/plasma/plasma-cnc-primer_es.adoc b/docs/src/plasma/plasma-cnc-primer_es.adoc index f741adf66f..184cce7a81 100644 --- a/docs/src/plasma/plasma-cnc-primer_es.adoc +++ b/docs/src/plasma/plasma-cnc-primer_es.adoc @@ -1,8 +1,8 @@ :lang: es [[cha:plasma-primer]] - = Basicos del Corte por Plasma para Usuarios de LinuxCNC + :toc: == ¿Qué es el plasma? @@ -41,10 +41,10 @@ Un arco de plasma tiene forma ovalada y la altura de corte debe controlarse para image::images/primer_cut-angularity.png[width=50%] * Ángulo de corte negativo: * antorcha demasiado baja, aumente la distancia de la antorcha al trabajo. - * Ángulo de corte positivo: * antorcha demasiado alta, disminuir la antorcha a la distancia de trabajo. -NOTA: Una ligera variación en los ángulos de corte puede ser normal, siempre que esté dentro de tolerancia. +[NOTE] +Una ligera variación en los ángulos de corte puede ser normal, siempre que esté dentro de tolerancia. La capacidad de controlar con precisión la altura de corte en un entorno tan hostil y siempre cambiante es un desafío muy difícil. Afortunadamente, existe una relación muy lineal entre la altura de la antorcha (longitud del arco) y el voltaje del arco, como muestra este gráfico. @@ -105,7 +105,6 @@ La antorcha se monta en una plataforma deslizante que puede moverse hacia arriba Independientemente del método de sondeo utilizado, se recomienda encarecidamente que se implemente el interruptor flotante para que haya una señal fallback o secundaria para evitar daños a la antorcha por un choque. [[ohmic-sensing]] - === Detección óhmica La detección óhmica se basa en el contacto entre la antorcha y el material que actúa como un interruptor para activar una señal eléctrica que es detectada por el controlador CNC. Siempre que el material esté limpio, este puede ser un método mucho más preciso para detectar el material que un interruptor flotante que puede causar la desviación de la superficie del material. Este circuito de detección óhmico está funcionando en un entorno extremadamente hostil, por lo que es necesario implementar una serie de medidas de seguridad para garantizar la seguridad tanto de la electrónica del CNC como del operador. En el corte por plasma, la abrazadera de tierra unida al material es positiva y la antorcha es negativa. Se recomienda que: @@ -176,7 +175,8 @@ Es importante que el controlador de plasma "espere" antes de muestrear automáti En nuestras pruebas, esto varía entre máquinas y material de 0.5 a 1.5 segundos. Por lo tanto, una demora de 1.5 segundos después de que se recibe una señal válida de arcoOK antes de habilitar el control de THC es una configuración inicial segura. Si desea acortar esto para un material determinado, el Halscope de LinuxCNC le permitirá trazar el voltaje de la antorcha y tomar decisiones informadas sobre el menor retraso seguro a utilizar. -NOTA: Si la velocidad de corte no está cerca de la velocidad de corte deseada al final de este retraso, el controlador debe esperar hasta que esto se logre antes de habilitar el THC. +[NOTE] +Si la velocidad de corte no está cerca de la velocidad de corte deseada al final de este retraso, el controlador debe esperar hasta que esto se logre antes de habilitar el THC. == Muestreo de voltaje de antorcha @@ -285,7 +285,6 @@ Como se puede ver, las mesas de plasma son intensivas en pines y ya hemos consum * Como se mencionó anteriormente, se debe instalar un sensor de ruptura que se dispara si la antorcha se estrella y se cae. * Por lo general, esto se conectaría a 'halui.program-pause' para que la falla se pueda rectificar y se reanude el programa. - == Código G para controladores de plasma La mayoría de los controladores de plasma ofrecen un método para cambiar la configuración de G-Code. Linuxcnc admite esto a través de M67/M68 para comandos analógicos y M62-M65 para digital (comandos de encendido/apagado). Cómo se implemente esto es totalmente arbitrario. Veamos cómo la configuración de LinuxCNC QtPlasmaC hace esto: @@ -353,7 +352,7 @@ MAX_VELOCITY = 60 MAX_ACCELERATION = 700 ---- -Para obtener más información sobre las compensaciones externas (para V 2.8 y superior), lea la <]>> del documento del archivo INI y <> en la documentación de Linuxcnc. +Para obtener más información sobre las compensaciones externas (para V 2.8 y superior), lea la <]>> del documento del archivo INI y <> en la documentación de Linuxcnc. == Lectura de voltaje de arco con el THCAD de Mesa @@ -504,3 +503,5 @@ Muchos usuarios de Linuxcnc están perfectamente contentos con el uso de Inkscap Se incluye otro postprocesador popular con el popular paquete Fusion360, pero los postprocesadores incluidos necesitarán cierta personalización. LinuxCNC es una aplicación CNC y las discusiones sobre técnicas CAM distintas a esta discusión introductoria están fuera del alcance de LinuxCNC. + +// vim: set syntax=asciidoc: diff --git a/docs/src/plasma/qtplasmac.adoc b/docs/src/plasma/qtplasmac.adoc index 0d0f1a6116..07c527a2f0 100644 --- a/docs/src/plasma/qtplasmac.adoc +++ b/docs/src/plasma/qtplasmac.adoc @@ -33,23 +33,21 @@ There are three available formats: Screenshot examples of QtPlasmaC are below: -*16:9* - +.*16:9* image::images/qtplasmac_16x9.png[width=800,align="center"] -*9:16* - +.*9:16* image::images/qtplasmac_9x16.png[width=450,align="center"] -*4:3* - +.*4:3* image::images/qtplasmac_4x3.png[width=600,align="center"] == Installing LinuxCNC The preferred method for installing LinuxCNC is via an ISO image as described below. -NOTE: It is possible to install and run LinuxCNC on a variety of Linux distributions however that is beyond the scope of this User Guide. If the user wishes to install a Linux distribution other than those recommended, they will first need to install their preferred Linux distribution and then install LinuxCNC v2.9 or later along with any required dependencies. +[NOTE] +It is possible to install and run LinuxCNC on a variety of Linux distributions however that is beyond the scope of this User Guide. If the user wishes to install a Linux distribution other than those recommended, they will first need to install their preferred Linux distribution and then install LinuxCNC v2.9 or later along with any required dependencies. === If The User Does Not Have Linux Installed @@ -88,18 +86,26 @@ QtPlasmaC requires the selection of one of following three operating modes: |*Mode*|*Description* |0|Uses an external arc voltage input to calculate both Arc Voltage (for Torch Height Control) and Arc OK. |1|Uses an external arc voltage input to calculate Arc Voltage (for Torch Height Control). + - Uses an external Arc OK input for Arc OK. + Uses an external Arc OK input for Arc OK. |2|Uses an external Arc OK input for Arc OK. + - Use external up/down signals for Torch Height Control. + Use external up/down signals for Torch Height Control. |=== -IMPORTANT: If the plasma power source has an Arc OK (Transfer) output then it is recommended to use that for Arc OK rather than the soft (calculated) Arc OK provided by mode 0. It may also be possible to use a <> as an alternative method to establish an Arc OK signal when the power source does not provide one. +IMPORTANT: +If the plasma power source has an Arc OK (Transfer) output then it is recommended +to use that for Arc OK rather than the soft (calculated) Arc OK provided by mode 0. +It may also be possible to use a <> as an alternative +method to establish an Arc OK signal when the power source does not provide one. -NOTE: For fine tuning of Mode 0 Ark OK see <> in the Advanced Topics section of the manual. +[NOTE] +For fine tuning of Mode 0 Ark OK see <> in the +Advanced Topics section of the manual. === Available I/Os -NOTE: This section only touches on the hardware I/O's required for QtPlasmaC. Base machine requirements such as limit switches, home switches, etc. are in addition to these. +[NOTE] +This section only touches on the hardware I/O's required for QtPlasmaC. +Base machine requirements such as limit switches, home switches, etc. are in addition to these. [width="100%",cols="4,2,14"] |=== @@ -162,18 +168,26 @@ If *Ohmic Probe* is used then *Ohmic Probe Enable* is required to be checked on *Breakaway Switch* is not mandatory because the *Float Switch* is treated the same as a breakaway when not probing. If they are two separate switches, and there are not enough inputs on the breakout board, they could be combined and connected as a *Float Switch*. -NOTE: The minimum I/O requirement for a QtPlasmaC configuration to function are: *Arc Voltage* input OR *Arc OK* input, *Float Switch* input, and *Torch On* output. To reiterate, in this case QtPlasmaC will treat the float switch as a breakaway switch when it is not probing. +[NOTE] +The minimum I/O requirement for a QtPlasmaC configuration to function are: *Arc Voltage* input OR *Arc OK* input, *Float Switch* input, and *Torch On* output. To reiterate, in this case QtPlasmaC will treat the float switch as a breakaway switch when it is not probing. [[qt_z-settings]] === Recommended Settings: -Refer to the <> diagram for a visual representation of the terms below. - -* *[AXIS_Z] MIN_LIMIT* should be just below top of the slats with allowances for float_switch_travel and over travel tolerance. For example, if the user's float switch takes 4mm (0.157") to activate then set the Z minimum to 5mm (0.197") plus an allowance for overrun (either calculated using the equation below or allow 5mm (0.2") below the lowest slat. -* *[AXIS_Z] MAX_LIMIT* should be the highest the user wants the Z axis to travel (it must not be lower than Z HOME_OFFSET). -* *[AXIS_Z] HOME* should be set to be approximately 5mm-10mm (0.2"-0.4") below the maximum limit. +Refer to the <> diagram for a visual representation of the terms below. -* *Floating Head* - it is recommended that a floating head be used and that it has enough movement to allow for overrun during probing. Overrun can be calculated using the following formula: + * *[AXIS_Z] MIN_LIMIT* should be just below top of the slats with + allowances for float_switch_travel and over travel tolerance. For example, + if the user's float switch takes 4mm (0.157") to activate then set the Z + minimum to 5mm (0.197") plus an allowance for overrun (either calculated + using the equation below or allow 5mm (0.2") below the lowest slat. + * *[AXIS_Z] MAX_LIMIT* should be the highest the user wants the Z axis + to travel (it must not be lower than Z HOME_OFFSET). + * *[AXIS_Z] HOME* should be set to be approximately 5mm-10mm (0.2"-0.4") + below the maximum limit. + * *Floating Head* - it is recommended that a floating head be used and + that it has enough movement to allow for overrun during probing. Overrun + can be calculated using the following formula: ---- o = 0.5 × a × (v ÷ a)^2 @@ -200,7 +214,7 @@ source ~/linuxcnc-dev/scripts/rip-environment If using a Package installation then no additional action is required. -If using a parallel port, use the <> (enter the following command into a terminal window): +If using a parallel port, use the <> (enter the following command into a terminal window): ---- stepconf @@ -225,9 +239,15 @@ https://forum.linuxcnc.org/39-pncconf[PnCConf Wizard] Fill in the required entries to suit the machine wiring/breakout board configuration. -QtPlasmaC adds two pages to the LinuxCNC configuration wizards for QtPlasmaC specific parameters, the two pages are QtPlasmaC options and <>. Complete each of the wizards QtPlasmaC page to suit the machine that is being configured and the user button requirements. +QtPlasmaC adds two pages to the LinuxCNC configuration wizards for +QtPlasmaC specific parameters, the two pages are QtPlasmaC options and +<>. Complete each of the wizards +QtPlasmaC page to suit the machine that is being configured and the user +button requirements. -Note that PnCConf options allow user selection of Feed Override, Linear Velocity, and Jog Increments whereas in StepConf these are automatically calculated and set. +Note that PnCConf options allow user selection of Feed Override, Linear +Velocity, and Jog Increments whereas in StepConf these are automatically +calculated and set. *PnCConf QtPlasmaC Options:* @@ -247,9 +267,9 @@ The THCAD screen will only appear if a Plasma Encoder is selected in the card sc image::images/qtplasmac_pncconf_thcad.png[width=600,align="center"] -More information on <>. +More information on <>. -When the configuration is complete, the wizard will save a copy of the configuration that may be loaded and edited at a later time, a working QtPlasmaC configuration will be created in the following directory: ~/linuxcnc/configs/ +When the configuration is complete, the wizard will save a copy of the configuration that may be loaded and edited at a later time, a working QtPlasmaC configuration will be created in the following directory: ~/linuxcnc/configs/. The newly created QtPlasmaC configuration can be run by entering the following command into a terminal window (*change "" to the machine name entered into the configuration wizard*): @@ -271,7 +291,8 @@ IMPORTANT: BEFORE PROCEEDING, THE USER SHOULD BE ABLE TO HOME THE MACHINE, ZERO ONLY WHEN this criteria is met should the user proceed with the QtPlasmaC initial setup. -NOTE: It is possible to create a sim configuration using StepConf but it is not possible to have tandem joints in the sim configuration. +[NOTE] +It is possible to create a sim configuration using StepConf but it is not possible to have tandem joints in the sim configuration. [[qt-dependency]] === Qt Dependency Errors @@ -297,7 +318,7 @@ The following heights diagram will help the user visualize the different heights image::images/qtplasmac_heights_diagram.png[width=800,align="center"] -Click on the <> to view the *CONFIGURATION* section which shows the user settable parameters. It is necessary to ensure every one of these settings is tailored to the machine. +Click on the <> to view the *CONFIGURATION* section which shows the user settable parameters. It is necessary to ensure every one of these settings is tailored to the machine. To set the Z axis DRO relative to the Z axis MINIMUM_LIMIT, the user should perform the following steps. It is important to understand that in QtPlasmaC, touching off the Z axis DRO has no effect on the Z axis position while running a G-Code program. These steps simply allow the user to more easily set the probe height as after performing the steps, the displayed Z axis DRO value will be relative to Z axis MINIMUM_LIMIT. @@ -328,22 +349,25 @@ If the machine is equipped with a float switch then the user will need to set th . After the adjustments to the "Float Travel" have been made, repeat the process from #4 above until the measured distance between the material and the torch tip matches the *Pierce Height* of the currently selected material. -. If the table has a laser or camera for sheet alignment, a scribe, or uses offset probing then the required offsets need to be applied by following the procedure described in <>. +. If the table has a laser or camera for sheet alignment, a scribe, or uses offset probing then the required offsets need to be applied by following the procedure described in <>. . CONGRATULATIONS! The user should now have a working QtPlasmaC Configuration. -NOTE: If the amount of time between the torch contacting the material and when the torch moves up and comes to rest at the Pierce Height seems excessive, see <> for a possible solution. +[NOTE] +If the amount of time between the torch contacting the material and when the torch moves up and comes to rest at the Pierce Height seems excessive, see <> for a possible solution. -IMPORTANT: IF USING A *Mesa Electronics THCAD* THEN THE *Voltage Scale* VALUE WAS OBTAINED MATHEMATICALLY. IF THE USER INTENDS TO USE CUT VOLTAGES FROM A MANUFACTURE'S CUT CHART THEN IT WOULD BE ADVISABLE TO DO MEASUREMENTS OF ACTUAL VOLTAGES AND FINE TUNE THE *Voltage Scale* AND *Voltage Offset*. +IMPORTANT: +IF USING A *Mesa Electronics THCAD* THEN THE *Voltage Scale* VALUE WAS OBTAINED MATHEMATICALLY. IF THE USER INTENDS TO USE CUT VOLTAGES FROM A MANUFACTURE'S CUT CHART THEN IT WOULD BE ADVISABLE TO DO MEASUREMENTS OF ACTUAL VOLTAGES AND FINE TUNE THE *Voltage Scale* AND *Voltage Offset*. -CAUTION: PLASMA CUTTING VOLTAGES CAN BE LETHAL, IF THE USER IS NOT EXPERIENCED IN DOING THESE MEASUREMENTS GET SOME QUALIFIED HELP. +CAUTION: +PLASMA CUTTING VOLTAGES CAN BE LETHAL, IF THE USER IS NOT EXPERIENCED IN DOING THESE MEASUREMENTS GET SOME QUALIFIED HELP. [[qt_modify-config]] == Migrating to QtPlasmac From PlasmaC (Axis or Gmoccapy) There are two methods available to get from a working PlasmaC configuration to a new QtPlasmaC configuration. These methods assume the user is on LinuxCNC v2.9 or later, QtVCP is installed, and all dependency requirements are satisfied. -If there are Qt dependency errors, the user should run the <>. +If there are Qt dependency errors, the user should run the <>. === Quick Method @@ -398,7 +422,8 @@ Leave this blank if it is not used/required. After filling in the appropriate entries, press *CONVERT*. -NOTE: This method will not change any existing debounce components to the new dbounce component. If the user wishes to change to the new dbounce component then the New Base Config method should be used for migration. +[NOTE] +This method will not change any existing debounce components to the new dbounce component. If the user wishes to change to the new dbounce component then the New Base Config method should be used for migration. === New Base Config Method @@ -548,6 +573,7 @@ Displaying a terminal can be handy for error and information messages. === QtPlasmaC Files After a successful QtPlasmaC installation, the following files are created in the configuration directory: + [width="100%",cols="1,2"] |=== |*Filename*|*Function* @@ -561,22 +587,28 @@ After a successful QtPlasmaC installation, the following files are created in th |backup|A directory for backups of config files. |=== -NOTE: is whatever name the user entered into the "Machine Name" field of the configuration wizard program -NOTE: Custom commands are allowed in custom.hal and the custom_postgui.hal files as they are not overwritten during updates. +[NOTE] + is whatever name the user entered into the "Machine Name" field of the configuration wizard program + +[NOTE] +Custom commands are allowed in custom.hal and the custom_postgui.hal files as they are not overwritten during updates. After running a new configuration for the first time the following files will be created in the configuration directory: + [width="100%",cols="1,2"] |=== |*Filename*|*Function* -|_material.cfg|A file for storing the material settings from the MATERIAL section of the <>. +|_material.cfg|A file for storing the material settings from the MATERIAL section of the <>. |.prefs|A file containing the users QtPlasmac specific preferences and parameters. It also stores the current color configuration. |qtvcp.prefs|A file containing the QtVCP preferences. |qtplasmac.qss|This file is used to store the stylesheet for the currently loaded session of QtPlasmaC. |=== -NOTE: The configuration files (.ini and .hal) that are created by configuration wizard are notated to explain the requirements to aid in manual manipulation of these configurations. They may be edited with any text editor. +[NOTE] +The configuration files (.ini and .hal) that are created by configuration wizard are notated to explain the requirements to aid in manual manipulation of these configurations. They may be edited with any text editor. -NOTE: The .prefs file is plain text and may be edited with any text editor. +[NOTE] +The .prefs file is plain text and may be edited with any text editor. === INI File @@ -632,7 +664,8 @@ FLASH_ERROR = 0 (status bar error message will not flash) (0 is the default if not specified) ---- -NOTE: MODE and ESTOP_TYPE will default to 0 if not specified and all other variables are optional. +[NOTE] +MODE and ESTOP_TYPE will default to 0 if not specified and all other variables are optional. *[FILTER]* Section @@ -656,7 +689,8 @@ SUBROUTINE_PATH = ./:./qtplasmac:../../nc_files/subroutines (./ must be in USER_M_PATH = ./:./qtplasmac (for M190 material change) ---- -IMPORTANT: SEE <> FOR RS274NGC_STARTUP_CODE INFORMATION RELATED TO G64. +IMPORTANT: +SEE <> FOR RS274NGC_STARTUP_CODE INFORMATION RELATED TO G64. *[HAL]* Section @@ -671,7 +705,8 @@ POSTGUI_HALFILE = postgui_call_list.hal (required) SHUTDOWN = shutdown.hal (shutdown HAL commands) ---- -NOTE: The user could place custom HAL commands in the custom.hal file as this file is not overwritten by QtPlasmaC updates. +[NOTE] +The user could place custom HAL commands in the custom.hal file as this file is not overwritten by QtPlasmaC updates. [[qt_ini-display]] *[DISPLAY]* Section @@ -722,7 +757,8 @@ MAX_ACCELERATION = double the value in the corresponding joint OFFSET_AV_RATIO = 0.5 ---- -NOTE: QtPlasmaC uses the LinuxCNC External Offsets feature for all Z axis motion, and for moving the X and/or Y axis for a consumable change while paused. For more information on this feature, please read <> in the LinuxCNC documentation. +[NOTE] +QtPlasmaC uses the LinuxCNC External Offsets feature for all Z axis motion, and for moving the X and/or Y axis for a consumable change while paused. For more information on this feature, please read <> in the LinuxCNC documentation. == QtPlasmaC GUI Overview @@ -898,7 +934,8 @@ See <> for detailed information on [underline]*JOGGING* -NOTE: During Paused Motion, this section will become <> +[NOTE] +During Paused Motion, this section will become <> [width="100%",cols="4,16"] |=== @@ -915,7 +952,8 @@ NOTE: During Paused Motion, this section will become <> for a detailed description of the cut recovery functionality. +[NOTE] +During Paused Motion, this section will be shown on top of the JOGGING panel. The following section will cover each button encountered in this panel. Please see <> for a detailed description of the cut recovery functionality. [width="100%",cols="4,16"] |=== @@ -977,13 +1015,13 @@ If a full table is displayed due to no G-Code file being loaded and the user wis [[qt_conversational-tab]] === CONVERSATIONAL Tab -Screenshot example of the QtPlasmaC <> in *16:9* aspect ratio: +Screenshot example of the QtPlasmaC <> in *16:9* aspect ratio: image::images/qtplasmac_conversational.png[width=800,align="center"] -The <> enables the user to quickly program various simple shapes for quick cutting without the need for CAM software. +The <> enables the user to quickly program various simple shapes for quick cutting without the need for CAM software. -See <> for detailed information on the Conversational feature. +See <> for detailed information on the Conversational feature. It is possible to disable this tab so the conversational feature cannot be used by an operator. This may be achieved either by wiring the pin to a physical key-switch or similar or it may also be set in a HAL file using the following command: @@ -994,13 +1032,13 @@ setp qtplasmac.conv_disable 1 [[qt_parameters-tab]] === PARAMETERS Tab -Screenshot example of the QtPlasmaC <> in *16:9* aspect ratio: +Screenshot example of the QtPlasmaC <> in *16:9* aspect ratio: image::images/qtplasmac_parameters.png[width=800,align="center"] Some functions/features are only used for particular modes and are not displayed if they are not required by the chosen QtPlasmaC mode. -Due to space constraints, the 4x3 GUI's <> will be spread across two tabs, PARAMETERS and SETTINGS. +Due to space constraints, the 4x3 GUI's <> will be spread across two tabs, PARAMETERS and SETTINGS. This tab is used to display configuration parameters that are modified infrequently. @@ -1019,31 +1057,33 @@ setp qtplasmac.param_disable 1 |Max Starts|0, 1, 2|This sets the number of times QtPlasmaC will attempt to start the arc. |Retry Delay|0, 1, 2|This sets the time (in seconds) between an arc failure and another arc start attempt. |Voltage Scale|0, 1|This sets the arc voltage input scale and is used to display the correct arc voltage. + - For initial setup, see <>. + For initial setup, see <>. |Voltage Offset|0, 1|This sets the arc voltage offset and is used to display zero volts when there is zero arc voltage input. + - For initial setup, see <>. + For initial setup, see <>. |Height Per Volt|0, 1, 2|This sets the distance the torch would need to move to change the arc voltage by one volt. + Used for manual height manipulation only. |OK High Volts|0|This sets the voltage threshold below which Arc OK signal is valid. |OK Low Volts|0|This sets the voltage threshold above which the Arc OK signal is valid. |=== -NOTE: When setting the OK Low Volts and OK High Volts in Mode 0, the cut voltage of a stable arc must be greater than the OK Low Volts value but lower than the OK High Volts value for QtPlasmaC to receive a valid Arc OK signal. To further clarify, to have a valid Arc OK, the arc voltage must fall between the two limits. +[NOTE] +When setting the OK Low Volts and OK High Volts in Mode 0, the cut voltage of a stable arc must be greater than the OK Low Volts value but lower than the OK High Volts value for QtPlasmaC to receive a valid Arc OK signal. To further clarify, to have a valid Arc OK, the arc voltage must fall between the two limits. [underline]*CONFIGURATION - PROBING* [width="100%",cols="4,16"] |=== |*Name*|*Description* -|Float Travel|This sets the amount of travel the float switch moves before completing the float switch circuit. This distance can be measured by using the Probe Test button, and the method described in <>. +|Float Travel|This sets the amount of travel the float switch moves before completing the float switch circuit. This distance can be measured by using the Probe Test button, and the method described in <>. |Probe Speed|This sets the speed at which the torch will probe to find the material after it moves to the Probe Height. -|Probe Height|This sets the height above the Z axis minimum limit that Probe Speed begins. Refer to the <> diagram for a visual representation. +|Probe Height|This sets the height above the Z axis minimum limit that Probe Speed begins. Refer to the <> diagram for a visual representation. |Ohmic Offset|This sets the distance above the material the torch will should go after a successful ohmic probe. It is mainly used to compensate for high probing speeds. |Ohmic Retries|This sets the number of times QtPlasmaC will retry a failed ohmic probe before falling back to the float switch for material detection. -|Skip IHS|This sets the distance threshold used to determine if an Initial Height Sense (probe) can be skipped for the current cut, see <>. +|Skip IHS|This sets the distance threshold used to determine if an Initial Height Sense (probe) can be skipped for the current cut, see <>. |=== -NOTE: If the amount of time between the torch contacting the material and when the torch moves up and comes to rest at the Pierce Height seems excessive, see <> for a possible solution. +[NOTE] +If the amount of time between the torch contacting the material and when the torch moves up and comes to rest at the Pierce Height seems excessive, see <> for a possible solution. [underline]*CONFIGURATION - SAFETY* @@ -1083,7 +1123,8 @@ NOTE: If the amount of time between the torch contacting the material and when t |Setup Speed|The Z axis velocity for setup moves (movements to Probe Height, Pierce Height, Cut Height, etc.). |=== -NOTE: Setup Speed has no effect on THC speed which is capable of the velocity displayed in the Max. Speed field. +[NOTE] +Setup Speed has no effect on THC speed which is capable of the velocity displayed in the Max. Speed field. [underline]*CONFIGURATION - THC* @@ -1099,7 +1140,8 @@ NOTE: Setup Speed has no effect on THC speed which is capable of the velocity di |PID-D|0, 1|This sets the Derivative gain for the THC PID loop. Derivative gain works to dampen the system and reduce over correction oscillations and is not always needed. |=== -NOTE: PID loop tuning is a complicated process and is outside the scope of this User Guide. There are many sources of information available to assist with understanding and tuning PID loops. If the THC is not making corrections fast enough, it is recommended to increase the P gain in small increments until the system operates favorably. Large P gain adjustments can result in over correction and oscillations. +[NOTE] +PID loop tuning is a complicated process and is outside the scope of this User Guide. There are many sources of information available to assist with understanding and tuning PID loops. If the THC is not making corrections fast enough, it is recommended to increase the P gain in small increments until the system operates favorably. Large P gain adjustments can result in over correction and oscillations. [underline]*SAVE & RELOAD Buttons* @@ -1116,10 +1158,10 @@ This section shows the parameters which are active for the current cut. |=== |*Name*|*Description* |Material|The top drop down menu is used to manually select the current material cut parameters. If there are no materials in the material file then only the default material will be displayed. -|Kerf Width|This sets the kerf width for the currently selected material. Refer to the <> diagram for a visual representation. -|Pierce Height|This sets the pierce height for the currently selected material. Refer to the <> diagram for a visual representation. +|Kerf Width|This sets the kerf width for the currently selected material. Refer to the <> diagram for a visual representation. +|Pierce Height|This sets the pierce height for the currently selected material. Refer to the <> diagram for a visual representation. |Pierce Delay|This sets the pierce delay (in seconds) for the currently selected material. -|Cut Height|This sets the cut height for the currently selected material. Refer to the <> diagram for a visual representation. +|Cut Height|This sets the cut height for the currently selected material. Refer to the <> diagram for a visual representation. |Cut Feed Rate|This sets the cut feed rate for the currently selected material. |Cut Amps|This sets the cut amperage for the currently selected material. + This is a visual indicator to the operator only, unless PowerMax communications are being used. @@ -1331,7 +1373,8 @@ The following variables are optional. If they are not detected or have no value * GAS_PRESSURE * CUT_MODE -NOTE: Material numbers 1000000 and above are reserved for temporary materials. +[NOTE] +Material numbers 1000000 and above are reserved for temporary materials. WARNING: It is the responsibility of the operator to ensure that the variables are included if they are a requirement for the G-Code to be run. @@ -1377,7 +1420,8 @@ M3 $0 S1 M5 $0 ---- -NOTE: Manual material handling will restrict the user to only one material for the entire job. +[NOTE] +Manual material handling will restrict the user to only one material for the entire job. === Automatic Material Handling @@ -1526,7 +1570,8 @@ For both a Manual creation or a Fusion 360 conversion, a dialog box will show wi image::images/qtplasmac_material_manual_dialog.png[width=150,align="center"] -NOTE: If the user selects ~/linuxcnc/configs/_material.cfg and the file already exists, it will be overwritten. +[NOTE] +If the user selects ~/linuxcnc/configs/_material.cfg and the file already exists, it will be overwritten. [[qt_camera]] === CAMERA @@ -1718,7 +1763,8 @@ IMPORTANT: *G-CODE THC* AND *VELOCITY BASED THC* ARE NOT ABLE TO BE USED IF *CUT WARNING: If Cut Feed Rate in the MATERIAL section of the <> is set to Zero then QtPlasmaC will use *motion.requested-velocity* (as set by a standard Feedrate call in the G-Code) for the THC calculations. This is not recommended as it is not a reliable way of implementing velocity based THC. -NOTE: All references to CutFeedRate refer to the *Cut Feed Rate* value displayed in the MATERIAL section of the <>. +[NOTE] +All references to CutFeedRate refer to the *Cut Feed Rate* value displayed in the MATERIAL section of the <>. [[qt_thc]] === THC (Torch Height Controller) @@ -1816,7 +1862,8 @@ This speed value affects ALL probing so if the user uses ohmic probing and the u The reliability of this feature will only be as good as the repeatability of the float switch. -NOTE: Probe Height refers to the height above the Z axis MINIMUM_LIMIT. +[NOTE] +Probe Height refers to the height above the Z axis MINIMUM_LIMIT. [[qt_offset_probing]] === Offset Probing @@ -1880,7 +1927,8 @@ There are three methods available for improving the quality of small holes: . *Arc Dwell (<>)* - Keeping the torch on for a short time at the end of the hole while motion is stopped to allow the arc to catch up. . *Overcut* - Turning the torch off at the end of the hole then continue along the path. -NOTE: If both *Arc Dwell* and *Overcut* are active at the same time then *Overcut* will take precedence. +[NOTE] +If both *Arc Dwell* and *Overcut* are active at the same time then *Overcut* will take precedence. IMPORTANT: *OVERCUT* IS NOT ABLE TO BE USED IF CUTTER COMPENSATION IS IN EFFECT; AN ERROR MESSAGE WILL BE DISPLAYED. @@ -2009,7 +2057,8 @@ G0 X0 Y0 M2 (end job) ---- -NOTE: It is OK to have multiple and mixed hole commands in a single G-Code file. +[NOTE] +It is OK to have multiple and mixed hole commands in a single G-Code file. === Single Cut @@ -2060,7 +2109,8 @@ If the user is using a custom user button then substitute *F9* with *User Button . The torch will turn off and the Z axis will return to the starting position. + . The jog speed will automatically be returned to the value it was prior to initiating the manual cut process, the label will stop blinking and the jog speed manipulation will be enabled. *MANUAL CUT* will stop blinking and revert to *CYCLE START*. -NOTE: If the torch flames out during cutting, the user must still press *F9* or *Esc* or the *CYCLE STOP* button to end the cut. This clears the Z offsets and returns the torch to the starting position. +[NOTE] +If the torch flames out during cutting, the user must still press *F9* or *Esc* or the *CYCLE STOP* button to end the cut. This clears the Z offsets and returns the torch to the starting position. [[qt_mesh-mode]] === Mesh Mode (Expanded Metal Cutting) @@ -2126,7 +2176,8 @@ If an alignment laser has been set up then it is possible to use the laser durin If a laser offset is in effect when *CANCEL MOVE* is pressed then this offset will also be cleared. -NOTE: Cut recovery movements will be limited to a radius of 10mm (0.4") from either the point the program was paused, or from the last point on the cut path if paused motion was used. +[NOTE] +Cut recovery movements will be limited to a radius of 10mm (0.4") from either the point the program was paused, or from the last point on the cut path if paused motion was used. [[qt_run-from-line]] === Run From Line @@ -2266,7 +2317,8 @@ G90 M2 ---- -NOTE: The *high feed rate* of 99999 is to ensure that the motion is at the machine's highest feed rate. +[NOTE] +The *high feed rate* of 99999 is to ensure that the motion is at the machine's highest feed rate. IMPORTANT: SOME PLASMA CUTTERS WILL NOT BE SUITABLE FOR THIS FEATURE. + IT IS RECOMMENDED THAT THE USER CARRY OUT SOME TEST SPOTTING TO ENSURE THAT THE PLASMA CUTTER IS CAPABLE OF UTILIZING THIS FEATURE. @@ -2293,7 +2345,8 @@ If the virtual keyboard has been repositioned and on the next opening of a virtu Below is a list of all available keyboard shortcuts in QtPlasmaC. -NOTE: All keyboard shortcuts are disabled by default. +[NOTE] +All keyboard shortcuts are disabled by default. In order to utilize them, *KB Shortcuts* must be enabled in the *GUI SETTINGS* section of the <>. @@ -2366,7 +2419,8 @@ In order to utilize them, *KB Shortcuts* must be enabled in the *GUI SETTINGS* s In addition to the typical G and M codes that are allowed by LinuxCNC in MDI mode, the MDI in QtPlasmaC can be used to access several other handy features. The following link outlines the features and their use: link:http://linuxcnc.org/docs/devel/html/gui/qtvcp_widgets.html#_mdiline_widget[MDILine Widget] -NOTE: M3, M4, and M5 are not allowed in the QtPlasmaC MDI. +[NOTE] +M3, M4, and M5 are not allowed in the QtPlasmaC MDI. *In addition, pressing RETURN (or ENTER) with no entry in the MDI will close the MDI window.* @@ -2377,7 +2431,8 @@ image::images/qtplasmac_conversational.png[width=800,align="center"] The *Conversational Shape Library* consists of several basic shapes and functions to assist the user with generating quick G-Code at the machine to cut simple shapes quickly. This feature is found on the <>. -NOTE: The Conversational Library is not meant to be a CAD/CAM replacement as there are limitations to what can be achieved. +[NOTE] +The Conversational Library is not meant to be a CAD/CAM replacement as there are limitations to what can be achieved. Blank entries in the shape input boxes will use the current setting at the time the G-Code was generated. For example, if *X start* was left blank then the current X axis position would be used. @@ -2415,7 +2470,8 @@ If there is an added shape that is unsaved or unsent then it is not possible to If *NEW* is pressed to remove an added shape that is unsaved or unsent then a warning dialog will be displayed. -NOTE: All distances are in machine units relative to the current User Coordinate System and all angles are in degrees. +[NOTE] +All distances are in machine units relative to the current User Coordinate System and all angles are in degrees. === Conversational Settings @@ -2465,7 +2521,8 @@ To use lines and arcs: If the user wishes to create a closed shape, they will need to create any required lead-in as the first segment of the shape. If a lead-out is required it will need to be the last segment of the shape. -NOTE: At this stage there is no automatic option for a lead-in/lead-out creation if the shape is closed. +[NOTE] +At this stage there is no automatic option for a lead-in/lead-out creation if the shape is closed. === Conversational Single Shape @@ -2575,7 +2632,8 @@ The user may opt to disable the Operator Error popup window, and view the error desktop_notify ---- -NOTE: .prefs must be edited with QtPlasmaC closed or any changes will be overwritten on exit. +[NOTE] +.prefs must be edited with QtPlasmaC closed or any changes will be overwritten on exit. Additionally, it is possible for *ERROR SENT TO MACHINE LOG* to flash to get the user's attention by adding or editing the following line in the [QTPLASMAC] section of the .ini file: @@ -2717,7 +2775,8 @@ There are two ways to modify an existing QtPlasmaC configuration: IMPORTANT: Any manual modification to the .ini and .hal files will not be registered in PnCConf or StepConf. -NOTE: If unsure of the HAL pin's full name, the user may start LinuxCNC and run *HalShow* for a full listing of all HAL pins. +[NOTE] +If unsure of the HAL pin's full name, the user may start LinuxCNC and run *HalShow* for a full listing of all HAL pins. == Customizing QtPlasmaC GUI @@ -3017,7 +3076,8 @@ QtPlasmaC will then wait in this state for the time specified (rounded to no dec BUTTON_n_CODE = probe-test 6 ---- -NOTE: Enabling a user button as a Probe Test button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. +[NOTE] +Enabling a user button as a Probe Test button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. [[qt_button-ohmic]] [underline]*Ohmic Test* @@ -3028,7 +3088,8 @@ QtPlasmaC will enable the Ohmic Probe Enable output signal and if the Ohmic Prob BUTTON_n_CODE = ohmic-test ---- -NOTE: Enabling a user button as an Ohmic Test button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. +[NOTE] +Enabling a user button as an Ohmic Test button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. [[qt_button-cut]] [underline]*Cut Type* @@ -3058,7 +3119,8 @@ There are three methods to return to the previous coordinates: BUTTON_n_CODE = change-consumables X10 Y10 F1000 ---- -NOTE: Enabling a user button as a Change Consumables button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. +[NOTE] +Enabling a user button as a Change Consumables button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. [[qt_button-load]] [underline]*Load* @@ -3090,7 +3152,8 @@ If the button is released before the countdown is complete then the torch will t BUTTON_n_CODE = torch-pulse 0.5 ---- -NOTE: Enabling a user button as a Torch Pulse button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. +[NOTE] +Enabling a user button as a Torch Pulse button will add an <> that may be connected from a pendant etc. HAL connections to this HAL pin needs to be specified in a postgui HAL file as the Hal pin is not available until the QtPlasmac GUI has loaded. [[qt_button-single]] [underline]*Single Cut* @@ -3119,7 +3182,8 @@ The following GUI buttons and Keyboard Shortcuts (if enabled in the <>- Resumes paused Framing motion. . Changing the *FEED SLIDER* or any of the CTRL+0-9 <> - Slows the feed rate. -NOTE: IF THE FEED RATE IS CHANGED FOR THE FRAMING MOTION, IT WILL BE NECESSARY TO RETURN THE FEED SLIDER TO 100% BEFORE PRESSING CYCLE START AND CUTTING THE LOADED JOB. +[NOTE] +IF THE FEED RATE IS CHANGED FOR THE FRAMING MOTION, IT WILL BE NECESSARY TO RETURN THE FEED SLIDER TO 100% BEFORE PRESSING CYCLE START AND CUTTING THE LOADED JOB. ---- BUTTON_n_CODE = framing @@ -3193,7 +3257,8 @@ Use the following sequence to set the offsets for a laser, camera, or scribe: Cancelling may be done at any stage by pressing the CANCEL button which will close the dialog and no changes will be saved. -NOTE: By following the above procedure the offsets are available for use immediately and no restart of LinuxCNC is required. +[NOTE] +By following the above procedure the offsets are available for use immediately and no restart of LinuxCNC is required. === Keep Z Motion @@ -3468,7 +3533,8 @@ To switch the PowerMax back to local mode the user can either: TIP: If PowerMax communications is active then selecting <> will automatically select CPA mode on the PowerMax unit. -NOTE: To use the PowerMax communications feature it is necessary to have the python pyserial module installed. + +[NOTE] +To use the PowerMax communications feature it is necessary to have the python pyserial module installed. + If pyserial is not installed an error message will be displayed. To install pyserial, enter the following command into a terminal window: @@ -3524,7 +3590,8 @@ Create or edit a .ts file: $ langfile xx ---- -NOTE: this command is a script which runs the following: $ pylupdate5 *.py ../*.py ../../../../../lib/python/qtvcp/lib/qtplasmac/*.py -ts qtplasmac_xx.ts +[NOTE] +this command is a script which runs the following: $ pylupdate5 *.py ../*.py ../../../../../lib/python/qtvcp/lib/qtplasmac/*.py -ts qtplasmac_xx.ts The editing of the translation is done with the linguist application: ---- @@ -3812,7 +3879,8 @@ There is a frequency divider jumper on each THCAD card which should be set accor This value is required to be entered into PNcConf during installation. -NOTE: If using a parallel port it may be necessary for the user to adjust the jumper setting and the subsequent scaling values on the <> to achieve optimal results. Symptoms may include random torch raises or dives during otherwise stable cutting. Halscope plots may be useful in diagnosing these issues. +[NOTE] +If using a parallel port it may be necessary for the user to adjust the jumper setting and the subsequent scaling values on the <> to achieve optimal results. Symptoms may include random torch raises or dives during otherwise stable cutting. Halscope plots may be useful in diagnosing these issues. [[qt_calibration-values]] Located on the rear of the THCAD is a calibration sticker showing: @@ -3873,9 +3941,11 @@ IMPORTANT: IF THE USER IS USING A HF START PLASMA POWER SUPPLY THEN EACH OF THES CAUTION: IF THE USER IS USING A HF START PLASMA POWER SUPPLY THEN OHMIC SENSING IS NOT RECOMMENDED. -NOTE: These values can be calculated by using https://jscalc.io/calc/NTr5QDX6WgMThBVb[this online calculator]. +[NOTE] +These values can be calculated by using https://jscalc.io/calc/NTr5QDX6WgMThBVb[this online calculator]. -NOTE: There is a <> available which may be useful if using a THCAD and there is a lot of noise on the returned arc voltage. +[NOTE] +There is a <> available which may be useful if using a THCAD and there is a lot of noise on the returned arc voltage. [[qt_rs485_connections]] === RS485 Connections @@ -3942,7 +4012,8 @@ AUTOREPEAT_ALL == ENABLE This issue does not affect any jogging using the GUI jog buttons. -NOTE: Disconnecting and reconnecting a keyboard during an active QtPlasmaC session will cause the autorepeat feature to re-enable itself automatically which may cause intermittent stopping and starting during jogging. The user must restart QtPlasmaC to disable the autorepeat feature again. +[NOTE] +Disconnecting and reconnecting a keyboard during an active QtPlasmaC session will cause the autorepeat feature to re-enable itself automatically which may cause intermittent stopping and starting during jogging. The user must restart QtPlasmaC to disable the autorepeat feature again. == Support @@ -3950,3 +4021,4 @@ Online help and support is available from the https://forum.linuxcnc.org/plasmac The user can create a compressed file containing the complete machine configuration to aid in fault diagnosis by pressing following the directions in the <> section. The resulting file is suitable for attaching to a post on the LinuxCNC Forum to help the community diagnose specific issues. +// vim: set syntax=asciidoc: diff --git a/docs/src/user/starting-linuxcnc.adoc b/docs/src/user/starting-linuxcnc.adoc index 6566374c1c..3ff0fc548c 100644 --- a/docs/src/user/starting-linuxcnc.adoc +++ b/docs/src/user/starting-linuxcnc.adoc @@ -64,3 +64,5 @@ The configuration files are saved in linuxcnc/configs directory. .Configuration Selector image::images/configuration-selector.png["LinuxCNC Configuration Selector",align="center"] + +// vim: set syntax=asciidoc: diff --git a/docs/src/user/starting-linuxcnc_es.adoc b/docs/src/user/starting-linuxcnc_es.adoc index cb662fc9b4..972187b5e6 100644 --- a/docs/src/user/starting-linuxcnc_es.adoc +++ b/docs/src/user/starting-linuxcnc_es.adoc @@ -1,7 +1,6 @@ :lang: es [[cha:starting-linuxcnc]] - = Iniciando LinuxCNC == Ejecutando LinuxCNC @@ -24,7 +23,6 @@ GladeVCP con pines HAL, debe usar el archivo HAL postgui para hacer cualquier conexion a esos pines. Consulte la sección <> de la configuración INI para más información. [[sub:selector-de-configuración]] - === Selector de configuracion Si no se pasa ningún archivo .ini al script linuxcnc, se carga el selector de configuración @@ -33,5 +31,6 @@ de ejemplo se ha guardado, se puede modificar para adaptarse a su aplicación. Los archivos de configuración se guardan en el directorio linuxcnc/configs. .Selector de configuración +image::images/configuration-selector_es.png["Selector de configuración de LinuxCNC",align="center"] -image::images/configuration-selector_es.png[align="center", alt="Selector de configuración de LinuxCNC"] +// vim: set syntax=asciidoc: diff --git a/docs/src/user/user-concepts_fr.adoc b/docs/src/user/user-concepts_fr.adoc index f2db27de2d..220e0f9b53 100644 --- a/docs/src/user/user-concepts_fr.adoc +++ b/docs/src/user/user-concepts_fr.adoc @@ -2,7 +2,6 @@ :toc: [[cha:Concepts-pour-utilisateur]] - = Concepts importants pour l'utilisateur == La configuration machine diff --git a/docs/src/user/user-foreword_es.adoc b/docs/src/user/user-foreword_es.adoc index 5db574bf9a..8973c2182a 100644 --- a/docs/src/user/user-foreword_es.adoc +++ b/docs/src/user/user-foreword_es.adoc @@ -2,7 +2,6 @@ :toc: [[cha:user-foreword]] - = Prefacio para el usuario LinuxCNC es modular y flexible. Estos atributos llevan a muchas personas a verlo como un revoltijo confuso de pequeñas cosas y se preguntan por qué es así. diff --git a/docs/src/user/user-intro_es.adoc b/docs/src/user/user-intro_es.adoc index bdd4e93317..dff9f1185f 100644 --- a/docs/src/user/user-intro_es.adoc +++ b/docs/src/user/user-intro_es.adoc @@ -55,8 +55,7 @@ LinuxCNC viene con varios tipos de interfaces de usuario que se pueden elegir al image::../gui/images/axis_es.png["Axis, interfaz GUI de teclado estándar",align="center"] - -<> es una GUI para usar con pantalla táctil: +'Touchy' es una GUI para usar con pantalla táctil: image::../gui/images/touchy_es.png["Touchy, una GUI para usar con pantalla táctil",align="center"] @@ -76,7 +75,8 @@ image::../gui/images/ngcgui.png["NGCGUI, una GUI de subrutinas que proporciona u Como se mencionó anteriormente, muchas de las GUI de LinuxCNC pueden ser personalizadas por el usuario. Esto se puede hacer para agregar indicadores, salidas de lectores, interruptores o controles deslizantes a la apariencia básica de una de las GUI para aumentar su flexibilidad o funcionalidad. Se ofrecen dos estilos de Paneles de Control Virtual en LinuxCNC: -<> un panel de control virtual basado en Python que se puede agregar a la GUI Axis. PyVCP utiliza solo señales virtuales contenidas dentro de la capa de abstracción de hardware HAL, como el indicador de velocidad del husillo o la señal de salida de Parada de Emergencia, y tiene una apariencia sencilla, sin lujos. Esto lo hace una excelente opción si el usuario desea agregar un Panel de Control Virtual con un mínimo esfuerzo. +//<> +'PyVCP' un panel de control virtual basado en Python que se puede agregar a la GUI Axis. PyVCP utiliza solo señales virtuales contenidas dentro de la capa de abstracción de hardware HAL, como el indicador de velocidad del husillo o la señal de salida de Parada de Emergencia, y tiene una apariencia sencilla, sin lujos. Esto lo hace una excelente opción si el usuario desea agregar un Panel de Control Virtual con un mínimo esfuerzo. image::../gui/images/axis-pyvcp.png["PyVCP en Axis",align="center"]