diff --git a/docs/man/man3/hal_init.3hal b/docs/man/man3/hal_init.3hal index afc1cf1b76f..912fa15f768 100644 --- a/docs/man/man3/hal_init.3hal +++ b/docs/man/man3/hal_init.3hal @@ -25,5 +25,5 @@ Call only from within user or init/cleanup code, not from relatime tasks. .SH RETURN VALUE On success, returns a positive integer module ID, which is -used for subsequent calls to hal and rtapi APIs. +used for subsequent calls to HAL and rtapi APIs. On failure, returns a HAL error code. diff --git a/docs/man/man3/hal_malloc.3hal b/docs/man/man3/hal_malloc.3hal index 873fd28d3aa..4a7c876d8ad 100644 --- a/docs/man/man3/hal_malloc.3hal +++ b/docs/man/man3/hal_malloc.3hal @@ -9,7 +9,7 @@ hal_malloc \- Allocate space in the HAL shared memory area .SH ARGUMENTS .IP \fIsize\fR -Gives the size, in bytes, of the block +Gives the size, in bytes, of the block. .SH DESCRIPTION \fBhal_malloc\fR allocates a block of memory from the main HAL shared memory area. diff --git a/docs/src/gcode/o-code.adoc b/docs/src/gcode/o-code.adoc index 121e2da773f..ae968be328b 100644 --- a/docs/src/gcode/o-code.adoc +++ b/docs/src/gcode/o-code.adoc @@ -44,9 +44,9 @@ change in the future. The behavior is undefined if: -* The same number is used for more than one block -* Other words are used on a line with an O- word -* Comments are used on a line with an O-word +* The same number is used for more than one block. +* Other words are used on a line with an O- word. +* Comments are used on a line with an O-word. [NOTE] Using the lower case 'o' makes it easier to distinguish from a 0 @@ -369,7 +369,7 @@ o[#101+2] call ---- .Computing values in O-words -For more information on computing values see the following sections +For more information on computing values see the following sections: * <> * <> @@ -381,7 +381,7 @@ For more information on computing values see the following sections To call a separate file with a subroutine name the file the same as your call and include a sub and endsub in the file. The file must be in the -directory pointed to by 'PROGRAM_PREFIX' or 'SUBROUTINE_PATH' in the ini file. +directory pointed to by 'PROGRAM_PREFIX' or 'SUBROUTINE_PATH' in the INI file. The file name can include *lowercase* letters, numbers, dash, and underscore only. A named subroutine file can contain only a single subroutine definition. diff --git a/docs/src/gcode/other-code.adoc b/docs/src/gcode/other-code.adoc index faec3ebfffb..9062e626b56 100644 --- a/docs/src/gcode/other-code.adoc +++ b/docs/src/gcode/other-code.adoc @@ -13,14 +13,14 @@ The application of the feed rate is as described in the <> Section, unless 'inverse time feed rate mode' or 'feed per revolution mode' are in effect, in which case the feed rate -is as described in the <> Section. +is as described in the <> section. [[sec:set-spindle-speed]] == S: Set Spindle Speed(((S: Set Spindle Speed))) 'Sx [$n]' - set the speed of the spindle to 'x' revolutions per minute (RPM) with the optional $ set the spindle speed for a specific spindle. Without the $ -the command will default to spindle.0 +the command will default to spindle.0. The spindle(s) or selected spindle will turn at that speed when a 'M3' or 'M4' is in effect. It is OK to program an S word whether the spindle is turning or diff --git a/docs/src/gcode/overview.adoc b/docs/src/gcode/overview.adoc index bbeb530a697..cc847afb3e5 100644 --- a/docs/src/gcode/overview.adoc +++ b/docs/src/gcode/overview.adoc @@ -29,7 +29,7 @@ rate to the programmed end point', and 'X3' provides an argument value (the value of X should be 3 at the end of the move). Most LinuxCNC G-code commands start with either G or M (for General and Miscellaneous). The words for these commands are called 'G -codes' and 'M-codes.' +codes' and 'M-codes'. The LinuxCNC language has no indicator for the start of a program. The Interpreter, however, deals with files. A single program may be in a @@ -273,7 +273,7 @@ value found in parameter 3. The '\#' character may be repeated; for example '##2' means the value of the parameter whose index is the (integer) value of parameter 2. -* '31-5000' - G code user parameters. These parameters are global in the G +* '31-5000' - G-code user parameters. These parameters are global in the G code file, and available for general use. Volatile. * '5061-5069' - Coordinates of a <> probe result (X, Y, Z, A, B, C, U, V & W). Coordinates are in the coordinate system in @@ -585,7 +585,7 @@ to the values of INI file entries and HAL pins. * '#<_ini[section]name>' Returns the value of the corresponding item in the INI file. -For example, if the ini file looks like so: +For example, if the INI file looks like so: [source,{ini}] --------------------------------------------------------------------- @@ -597,7 +597,7 @@ YPOS = 2.718 you may refer to the named parameters `#<_ini[setup]xpos>` and `#<_ini[setup]ypos>` within G-code. -`EXISTS` can be used to test for presence of a given ini file +`EXISTS` can be used to test for presence of a given INI file variable: [source,{ngc}] @@ -609,10 +609,10 @@ o100 else o100 endif --------------------------------------------------------------------- -The value is read from the inifile once, and cached in the +The value is read from the INI file once, and cached in the interpreter. These parameters are read-only - assigning a value will cause a runtime error. The names are not case sensitive - they are -converted to uppercase before consulting the ini file. +converted to uppercase before consulting the INI file. * '#<_hal[Hal item]>' Allows G-code programs to read the values of HAL pins Variable access is @@ -1222,11 +1222,11 @@ material removal rate. * 'G-code out of range' - A G-code greater than G99 was used, the scope of G codes in LinuxCNC is 0 - 99. Not every number between 0 and 99 is a valid G-code. -* 'Unknown g code used' - A G-code was used that is not part of the LinuxCNC +* 'Unknown G-code used' - A G-code was used that is not part of the LinuxCNC G-code language. * 'i,j,k word with no Gx to use it' - i, j and k words must be used on the same line as the G-code. -* 'Cannot use axis values without a g code that uses them' - Axis values can +* 'Cannot use axis values without a G-code that uses them' - Axis values can not be used on a line without either a modal G-code in effect or a G-code on the same line. * 'File ended with no percent sign or program end' - Every G-code file must diff --git a/docs/src/gui/gmoccapy.adoc b/docs/src/gui/gmoccapy.adoc index d9d52b40652..45dcc23c022 100644 --- a/docs/src/gui/gmoccapy.adoc +++ b/docs/src/gui/gmoccapy.adoc @@ -286,10 +286,10 @@ will hide the chosen box. image::images/gmoccapy_embedded_tabs.png[align="left"] [NOTE] -If you make any hal connections to your custom glade panel, you need to do that in the hal file -specified in the EMBED_TAB_COMMAND line, otherwise you may get an error that the hal pin does not exist -- -this is because of race conditions loading the hal files. Connections to gmoccapy hal pins need to be made in the -postgui hal file specified in your INI file, because these pins do not exist prior of realizing the GUI. +If you make any HAL connections to your custom glade panel, you need to do that in the HAL file +specified in the EMBED_TAB_COMMAND line, otherwise you may get an error that the HAL pin does not exist -- +this is because of race conditions loading the HAL files. Connections to gmoccapy HAL pins need to be made in the +postgui HAL file specified in your INI file, because these pins do not exist prior of realizing the GUI. Here are some examples: @@ -306,7 +306,7 @@ image::images/gmoccapy_with_left_box_in_edit_mode.png[align="left"] 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 +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. Here is how to set up 3 user pop up message dialogs the messages support pango @@ -317,7 +317,7 @@ https://developer.gnome.org/pango/stable/PangoMarkupFormat.html[Pango Markup] ---- MESSAGE_TEXT = The text to be displayed, may be pango markup formatted MESSAGE_TYPE = "status" , "okdialog" , "yesnodialog" -MESSAGE_PINNAME = is the name of the hal pin group to be created +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 @@ -346,8 +346,8 @@ MESSAGE_TYPE = okdialog MESSAGE_PINNAME = okdialog ---- -The specific hal pin conventions for these can be found under the -<> hal pin section. +The specific HAL pin conventions for these can be found under the +<> HAL pin section. [[gmocappy:rs274ngc]] === The RS274NGC Section @@ -470,7 +470,7 @@ If MAX_VELOCITY is not given, it will default to 600 == HAL Pins -gmoccapy exports several hal pin to be able to react to hardware devices. +gmoccapy exports several HAL pin to be able to react to hardware devices. The goal is to get a GUI that may be operated in a tool shop, completely/mostly without mouse or keyboard. @@ -522,10 +522,10 @@ and the bottom (horizontal) buttons are: As the buttons in the bottom list will change according the mode and other influences, the hardware buttons will activate different functions, and you -don't have to take care about switching functions around in hal, because that +don't have to take care about switching functions around in HAL, because that is done completely by gmoccapy! -for a 3 axis XYZ machine the hal pin will react as follows: +for a 3 axis XYZ machine the HAL pin will react as follows: in manual mode: @@ -573,11 +573,11 @@ in settings mode: * gmoccapy.h-button.button-2 == * gmoccapy.h-button.button-3 == * gmoccapy.h-button.button-4 == open classic ladder -* gmoccapy.h-button.button-5 == open hal scope -* gmoccapy.h-button.button-6 == open hal status -* gmoccapy.h-button.button-7 == open hal meter -* gmoccapy.h-button.button-8 == open hal calibration -* gmoccapy.h-button.button-9 == open hal show +* gmoccapy.h-button.button-5 == open HAL scope +* gmoccapy.h-button.button-6 == open HAL status +* gmoccapy.h-button.button-7 == open HAL meter +* gmoccapy.h-button.button-8 == open HAL calibration +* gmoccapy.h-button.button-9 == open HAL show in homing mode: @@ -644,7 +644,7 @@ in select file mode: * gmoccapy.h-button.button-8 == * gmoccapy.h-button.button-9 == back -*So we have 67 reactions with only 10 hal pin!* +*So we have 67 reactions with only 10 HAL pin!* These pins are made available to be able to use the screen without an touch panel, or protect it from excessive use by placing hardware buttons around @@ -657,7 +657,7 @@ image::images/gmoccapy_0_9_7_sim_hardware_button.png[align="left"] All sliders from gmoccapy can be connected to hardware encoder or hardware potentiometers. [NOTE] -for gmoccapy 3 the hal pin name has changed, as new controls has been implemented, +for gmoccapy 3 the HAL pin name has changed, as new controls has been implemented, max velocity does not exist any more, as rapid override has been implemented. This change has been done as many user ask for that. @@ -678,7 +678,7 @@ To connect 'encoders' the following pin are exported: | gmoccapy.rapid.rapid-override.count-enable | HAL_BIT | Must be True, to enable counts |==== -To connect 'potentiometers', use the following hal pin: +To connect 'potentiometers', use the following HAL pin: [{pin_tab_options}] |==== @@ -693,7 +693,7 @@ To connect 'potentiometers', use the following hal pin: | gmoccapy.rapid.rapid-override.analog-enable | HAL_BIT | Must be True, to allow analog inputs |==== -In addition gmoccapy 3 offers additional hal pin to control the new slider widgets with momentary switches. +In addition gmoccapy 3 offers additional HAL pin to control the new slider widgets with momentary switches. The values how fast the increase or decrease will be, must be set in the glade file. In a future release it will be integrated in the settings page. @@ -732,13 +732,13 @@ you want to set the slider value. [WARNING] If you use both connection types, do not connect the same slider to both pin, as the influences between the two has not been tested! Different -sliders may be connected to the one or other hal connection type. +sliders may be connected to the one or other HAL connection type. [IMPORTANT] Please be aware, jog velocity depends on the turtle button state, it will lead to different slider scales depending on the mode (turtle or rabbit). Please take also a look to -<> for more +<> for more details. .Example @@ -759,9 +759,9 @@ All axis given in the INI File have a jog-plus and a jog-minus pin, so hardware momentary switches can be used to jog the axis. [NOTE] -naming of this hal pin has changed for gmoccapy2 +naming of this HAL pin has changed for gmoccapy2 -For the standard XYZ config following hal Pin will be available: +For the standard XYZ config following HAL Pin will be available: * gmoccapy.jog.axis.jog-x-plus * gmoccapy.jog.axis.jog-x-minus @@ -793,19 +793,19 @@ divider can be set on the <>. So using a touch screen it is much easier to select smaller velocities. -gmoccapy offers a hal pin to toggle between turtle and rabbit jogging +gmoccapy offers a HAL pin to toggle between turtle and rabbit jogging * gmoccapy.jog.turtle-jog (Hal Bit In) === Jog Increment Hal Pins -The jog increments are selectable through hal pins, so a selection hardware +The jog increments are selectable through HAL pins, so a selection hardware switch can be used to select the increment to use. There will be a maximum -of 10 hal pin for the increments given in the INI File, if you give more +of 10 HAL pin for the increments given in the INI File, if you give more increments in your INI File, they will be not reachable from the GUI as they will not be displayed. -If you have 6 increments in your hal you will get *7* pins: +If you have 6 increments in your HAL you will get *7* pins: jog-inc-0 is unchangeable and will represent continuous jogging. * gmoccapy.jog.jog-inc-0 @@ -816,7 +816,7 @@ jog-inc-0 is unchangeable and will represent continuous jogging. * gmoccapy.jog.jog-inc-5 * gmoccapy.jog.jog-inc-6 -gmoccapy offers also a hal pint to output the selected jog invrement +gmoccapy offers also a HAL pint to output the selected jog invrement * gmoccapy.jog.jog-increment @@ -944,7 +944,7 @@ net tool-prep-loop iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared ---- [NOTE] -Please take care, that this connections have to be done in the postgui hal file! +Please take care, that this connections have to be done in the postgui HAL file! .Tool Offset Pins These pins allow you to show the active tool offset values for X and Z in the @@ -956,7 +956,7 @@ image::images/gmoccapy_0_9_7_tool_info.png["Tool information",align="left"] * gmoccapy.tooloffset-z [NOTE] -Please take care, that this connections have to be done in the postgui hal file! +Please take care, that this connections have to be done in the postgui HAL file! [NOTE] the tooloffset-x line is not needed on a mill, @@ -979,7 +979,7 @@ each tool change! Gmoccapy offers an integrated auto tool measurement. 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. +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 @@ -1113,7 +1113,7 @@ You may want to modify this file to fit more your needs. === Needed Hal Connections -Connect the tool probe in your hal file like so: +Connect the tool probe in your HAL file like so: [source,{hal}] ---- @@ -1356,8 +1356,8 @@ image::images/gmoccapy_settings_hardware.png["Hardware settings",align="left"] ==== Hardware MPG Scales For the different Hal Pin to connect MPG Wheels to, you may select individual scales to be applied. -The main reason for this was my own test to solve this through hal connections, resulting in a very -complex hal file. Imagine a user having an MPG Wheel with 100 ipr and he wants to slow down the max +The main reason for this was my own test to solve this through HAL connections, resulting in a very +complex HAL file. Imagine a user having an MPG Wheel with 100 ipr and he wants to slow down the max vel from 14000 to 2000 mm/min, that needs 12000 impulses, resulting in 120 turns of the wheel! Or an other user having a MPG Wheel with 500 ipr and he wants to set the spindle override witch has limits from 50 to 120 % so he goes from min to max within 70 impulses, meaning not even 1/4 turn. @@ -1411,7 +1411,7 @@ There are three options to unlock the settings page: * use unlock code (the user must give a code to get in) * Do not use unlock code (There will be no security check) -* Use hal pin to unlock (hardware pin must be high to unlock the settings, +* Use HAL pin to unlock (hardware pin must be high to unlock the settings, see <> Default is use unlock code (default = *123*) @@ -1450,7 +1450,7 @@ This settings will have influence on the jog velocities. if in turtle mode (button pressed, showing the turtle) [NOTE] -This button can be activated using the <> hal pin. +This button can be activated using the <> HAL pin. [[gmoccapy:tool-measurement]] === Advanced Settings diff --git a/docs/src/gui/qtvcp-code-snippets.adoc b/docs/src/gui/qtvcp-code-snippets.adoc index fa752df8a91..42575546eee 100644 --- a/docs/src/gui/qtvcp-code-snippets.adoc +++ b/docs/src/gui/qtvcp-code-snippets.adoc @@ -103,7 +103,7 @@ def on_keycall_F12(self,event,state,shift,cntrl): == Request Dialog Entry -Qtvcp uses STATUS messages to pop up and return information from dialogs. + +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 @@ -261,7 +261,7 @@ In the 'IMPORT SECTION' add: from qtvcp.core import Qhal ---- -Loads the Qhal library for access to Qtvcp's hal component. +Loads the Qhal library for access to QtVCP's hal component. in the 'INSTANTIATE LIBRARY' Section add: @@ -487,7 +487,7 @@ def our_load(self,fname): 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 +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. + @@ -498,7 +498,7 @@ 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 + +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. @@ -576,7 +576,7 @@ 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. + +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: @@ -665,7 +665,7 @@ In the 'IMPORT SECTION' add: from qtvcp.core import Qhal ---- -Loads the Qhal library for access to Qtvcp's hal component. +Loads the Qhal library for access to QtVCP's hal component. in the 'INSTANTIATE LIBRARY' Section add: @@ -702,7 +702,7 @@ def update_periodic(self): == 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 +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 @@ -753,7 +753,7 @@ import json context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://127.0.0.1:5690") -topic = b'Qtvcp' +topic = b'QtVCP' # prebuild message 1 # makes a dict of function to call plus any arguments @@ -793,7 +793,7 @@ 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 +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 @@ -940,7 +940,7 @@ def focusInChanged(self, widget): ---- Notice we sometimes compare to 'widget', sometimes 'widget.parent()'. + -This is because some Qtvcp widgets are built from multiple sub-widgets +This is because some QtVCP widgets are built from multiple sub-widgets and the sub-widgets actually get the focus; so we need to check the parent of those sub-widgets. + Other times the main widget is what gets the focus; ie G-code display diff --git a/docs/src/gui/qtvcp-custom-widgets.adoc b/docs/src/gui/qtvcp-custom-widgets.adoc index e43564f2cdd..81aa441f101 100644 --- a/docs/src/gui/qtvcp-custom-widgets.adoc +++ b/docs/src/gui/qtvcp-custom-widgets.adoc @@ -2,7 +2,7 @@ :toc: [[cha:qtvcp-custom-widgets]] -= QTvcp Building Custom Widgets += QtVCP Building Custom Widgets == Overview @@ -36,12 +36,12 @@ added to the right folder. + === initialization process -Qtvcp does extra setup for widgets subclassed from _HALWidgetBase. (aka +QtVCP does extra setup for widgets subclassed from _HALWidgetBase. (aka HAL-ified widgets)+ This includes injecting important variables, calling an extra setup function and calling a closing cleanup function at shutdown. + These functions are not called when the Designer editor displays the widgets. + -When Qtvcp builds a screen from the .ui file, it searches for all the +When QtVCP builds a screen from the .ui file, it searches for all the HAL-ified widgets. + Then it finds the ScreenOptions widget, to collect information it needs to inject into the other widgets. + @@ -60,14 +60,14 @@ self.HAL_GCOMP = the HAL component instance self.HAL_NAME = This widgets name as a string self.QT_OBJECT_ = This widgets object instance self.QTVCP_INSTANCE_ = The very toplevel Parent Of the screen -self.PATHS_ = The instance of Qtvcp's path library +self.PATHS_ = The instance of QtVCP's path library self.PREFS_ = the instance of an optional preference file self.SETTINGS_ = the Qsettings object ---- === cleanup process -When Qtvcp closes, it calls the function _hal_cleanup() on all HAL-ified +When QtVCP closes, it calls the function _hal_cleanup() on all HAL-ified widgets. + The baseclass creates an empty _hal_cleanup() function, which can be redefined in the custom widget subclass. + @@ -126,7 +126,7 @@ 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 +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. + @@ -264,7 +264,7 @@ class StateLed(LED): ---- 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 +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. + @@ -294,7 +294,7 @@ 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. + +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 @@ -308,7 +308,7 @@ don't use them in this example) 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.PATHS_ = The instance of QtVCP's path library self.PREFS_ = the instance of an optional preference file ---- diff --git a/docs/src/gui/qtvcp-libraries.adoc b/docs/src/gui/qtvcp-libraries.adoc index e99220d0537..0808e0ac44b 100644 --- a/docs/src/gui/qtvcp-libraries.adoc +++ b/docs/src/gui/qtvcp-libraries.adoc @@ -385,14 +385,14 @@ it will return True if there was an error. + === CONVERT_TO_WEAR_TYPE(toolarray) This function converts a LinuxCNC raw tool array to a qtvcp tool wear array. + -Qtvcp's array includes entries for X and Z axis tool wear. + +QtVCP's array includes entries for X and Z axis tool wear. + inuxcnc covers tool wear by adding tool wear information into tool entries above 10000. + This also requires remap code to add the wear offsets at tool change time. + === CONVERT_TO_STANDARD_TYPE(toolarray) This function converts qtvcp's tool array into a LinuxCNC raw tool array. + -Qtvcp's array includes entries for X and Z axis tool wear. + +QtVCP's array includes entries for X and Z axis tool wear. + LinuxCNC covers tool wear by adding tool wear information into tool entries above 10000. + This also requires remap code to add the wear offsets t tool change time. + @@ -427,19 +427,19 @@ PATH.PREFS_FILENAME # The preference file path PATH.WORKINGDIR # The directory qtvcp was launched from PATH.IS_SCREEN # Is this a screen or a VCP? PATH.CONFIGPATH # launched configuration folder -PATH.RIPCONFIGDIR # The Run-in-place config folder for Qtvcp screens +PATH.RIPCONFIGDIR # The Run-in-place config folder for QtVCP screens PATH.BASEDIR # Base folder for LinuxCNC PATH.BASENAME # The Designer files name (no ending) -PATH.IMAGEDIR # The Qtvcp image folder -PATH.SCREENDIR # The Qtvcp builtin Screen folder -PATH.PANELDIR # The Qtvcp builtin VCP folder +PATH.IMAGEDIR # The QtVCP image folder +PATH.SCREENDIR # The QtVCP builtin Screen folder +PATH.PANELDIR # The QtVCP builtin VCP folder PATH.HANDLER # Handler file Path -PATH.XML # Qtvcp ui file path -PATH.QSS # Qtvcp Qss file path +PATH.XML # QtVCP UI file path +PATH.QSS # QtVCP Qss file path PATH.PYDIR # Linuxcnc's python library -PATH.LIBDIR # The Qtvcp library folder -PATH.WIDGET # The Qtvcp widget folder -PATH.PLUGIN # The Qtvcp widget plugin folder +PATH.LIBDIR # The QtVCP library folder +PATH.WIDGET # The QtVCP widget folder +PATH.PLUGIN # The QtVCP widget plugin folder # Not currently used: PATH.LOCALEDIR # Locale translation folder @@ -722,8 +722,8 @@ from qtvcp.lib.audio_player import Player ---- To instantiate the module so you can use it add this python code to your instantiated section: + -_register_messages() function connects the audio player to the STATUS library for sounds can be played + -with the STATUS message system. + +_register_messages() function connects the audio player to the STATUS library for sounds can be played +with the STATUS message system. [source,python] ---- @@ -775,16 +775,15 @@ BEEP == virtual keyboard -This library allows you to use STATUS messages to launch a virtual keyboard. + -It uses Onboard or Matchbox library for the keyboard. + +This library allows you to use STATUS messages to launch a virtual keyboard. +It uses Onboard or Matchbox library for the keyboard. == TOOLBAR ACTIONS -This library supplies prebuilt submenus and actions for toolbar menus and toolbar buttons. + -Toolbuttons, menu and toolbar menus are built in designer and assigned actions/submenus in the handler file. + - -Actions: +This library supplies prebuilt submenus and actions for toolbar menus and toolbar buttons. +Toolbuttons, menu and toolbar menus are built in designer and assigned actions/submenus in the handler file. +.Actions: ---- estop power @@ -903,8 +902,7 @@ a 3 axis mill with an A axis/spindle and a scara mill. + These samples, if loaded after a running linuxcnc configuration (including non-QTvcp based screens), + most will react to machine movement. Some require HAL pins to be connected for movement + -from a terminal (pick one): - +.from a terminal (pick one): ---- qtvcp vismach_mill_xyz qtvcp vismach_scara @@ -918,13 +916,13 @@ This gives basic building blocks of a simulated machine. ==== Collection -A collection is an object of individual machine parts. + +A collection is an object of individual machine parts. This holds a hierarchical list of primitive shapes or STL objects that operations can be applied to. ==== Translate -This object will perform an openGL translation calculation on a Collection object. + -Translation refers to moving an object to a different position on screen. + +This object will perform an openGL translation calculation on a Collection object. +Translation refers to moving an object to a different position on screen. ==== Scale @@ -932,9 +930,9 @@ This object will perform an openGL scale function on a collection object. ==== HalTranslate -This object will perform an openGL translation calculation on a Collection object, offset by the HAL pin value. + +This object will perform an openGL translation calculation on a Collection object, offset by the HAL pin value. Translation refers to moving an object to a different position on screen. + -You can either read a pin from a component owned by the vismach object or, + +You can either read a pin from a component owned by the vismach object or, if the component argument is set to None, read a HAL system pin directly. ==== Rotate @@ -953,8 +951,7 @@ This object will build a CylinderZ object that will change size and length based loaded tool dimensition (from the tool table) + It reads the HAL pins: 'halui.tool.diameter' and 'motion.tooloffset.z' -(from mill_xyz sample) - +.from mill_xyz sample ---- toolshape = CylinderZ(0) toolshape = Color([1, .5, .5, .5], [toolshape]) @@ -966,41 +963,39 @@ tool = Collection([ ==== Track -move and rotate an object to point from one capture()'d coordinate system to another. - - +Move and rotate an object to point from one capture()'d coordinate system to another. Base object to hold coordinates for primitive shapes. ==== CylinderX, CylinderY, CylinderZ -build a cylinder on the X (or Y or Z) axis by giving endpoint X (or Y, or Z) and radii coordinates. +Builds a cylinder on the X (or Y or Z) axis by giving endpoint X (or Y, or Z) and radii coordinates. ==== Sphere -build a sphere from center and radius coordinates. +Builds a sphere from center and radius coordinates. ==== TriangleXY TriangleXZ TriangleYZ -build a triangle in the soecified plane by giving the corners Z coordinates for each side +Builds a triangle in the soecified plane by giving the corners Z coordinates for each side. ==== ArcX -build an arc by specifying +Build an arc by specifying: ==== Box -Build a box specified by the 6 coordinates +Build a box specified by the 6 coordinates. ==== BoxCentered -specify the width in X and Y, and the height in Z the box is centered on the origin +Specify the width in X and Y, and the height in Z the box is centered on the origin. ==== BoxCenteredXY specify the width in X and Y, and the height in Z the box is centered in X and Y, and runs from Z=0 up -(or down) to the specified Z value +(or down) to the specified Z value. ==== Capture @@ -1016,18 +1011,17 @@ and HUD.show("stuff") for one-shot things like error messages ==== Color -Applies a color to the parts of a collection +Applies a color to the parts of a collection. ==== AsciiSTL AsciiOBJ -Loads a STL file/ STL data as a vismach part +Loads a STL file/ STL data as a vismach part. === Importing and Initiating -Here is how one might import the XYZ_mill simulation in a qtvcp panel or screen handler file. + - -Import the Mill library: +Here is how one might import the XYZ_mill simulation in a qtvcp panel or screen handler file. +.Import the Mill library: [source,python] ---- ############################ @@ -1037,8 +1031,7 @@ Import the Mill library: import mill_xyz as MILL ---- -instantiate the simulation widget and add it to the screen's main layout: - +.Instantiate the simulation widget and add it to the screen's main layout: [source,python] ---- ########################################## diff --git a/docs/src/gui/qtvcp-vcp-panels.adoc b/docs/src/gui/qtvcp-vcp-panels.adoc index 7baa971cb10..ed256e3f828 100644 --- a/docs/src/gui/qtvcp-vcp-panels.adoc +++ b/docs/src/gui/qtvcp-vcp-panels.adoc @@ -2,7 +2,7 @@ :toc: [[cha:qtvcp-vcp-panels]] -= Qtvcp Virtual Control Panels += QtVCP Virtual Control Panels // Custom lang highlight // must come after the doc title, to work around a bug in asciidoc 8.6.6 @@ -10,11 +10,11 @@ :hal: {basebackend@docbook:'':hal} :ngc: {basebackend@docbook:'':ngc} -Qtvcp is an infrastructure to display a custom CNC screen or control +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 VCP Panel. + -Qtvcp is completely customizable - you can add different buttons and +QtVCP is completely customizable - you can add different buttons and status LEDs etc. or add python code for even finer grain customization. == Builtin panels @@ -24,7 +24,7 @@ in a terminal type 'qtvcp list' to see a list. + === copy -used for copying qtvcp's builtin screen/panels/vismach code to a folder +used for copying QtVCP's builtin screen/panels/vismach code to a folder so one can customize it. In a terminal: @@ -34,7 +34,7 @@ In a terminal: qtvcp copy ---- -.copy Dialog - Copy Qtvcp's builtin Screen, Panel or Vismach code +.copy Dialog - Copy QtVCP's builtin Screen, Panel or Vismach code image::images/qtvcp_copy_dialog.png["Copy Dialog",align="left"] === test_dial @@ -91,7 +91,7 @@ image::images/test_panel.png["Test Panel",align="left"] - a camera display widget for rotational alignment -.Qtvcp cam align- Camera based alignment panel +.QtVCP cam align- Camera based alignment panel image::images/qtvcp-cam-align.png["Qt Camera Alignment",align="left"] === sim_panel @@ -104,7 +104,7 @@ image::images/qtvcp-cam-align.png["Qt Camera Alignment",align="left"] loadusr qtvcp sim_panel ---- -.Qtvcp sim panel - Simulated controls for screen testing. +.QtVCP sim panel - Simulated controls for screen testing. image::images/qtvcp_sim_panel.png["Sim Panel",align="left"] [[cha:qtvcp-vismach-panels]] @@ -118,8 +118,8 @@ image::images/qtvcp_sim_panel.png["Sim Panel",align="left"] loadusr qtvcp vismach_mill_xyz ---- -.Qtvcp vismach- 3 Axis Mill panel -image::images/qtvismach.png["Qtvcp Vismach Mill",align="left"] +.QtVCP vismach- 3 Axis Mill panel +image::images/qtvismach.png["QtVCP Vismach Mill",align="left"] === vismach_scara @@ -130,8 +130,8 @@ image::images/qtvismach.png["Qtvcp Vismach Mill",align="left"] loadusr qtvcp vismach_scara ---- -.Qtvcp vismach- 3 Axis Mill panel -image::images/qtvismach_scara.png["Qtvcp Vismach Scara",align="left"] +.QtVCP vismach- 3 Axis Mill panel +image::images/qtvismach_scara.png["QtVCP Vismach Scara",align="left"] === vismach_millturn @@ -142,8 +142,8 @@ image::images/qtvismach_scara.png["Qtvcp Vismach Scara",align="left"] loadusr qtvcp vismach_millturn ---- -.Qtvcp vismach- 3 Axis Mill panel -image::images/qtvismach_millturn.png["Qtvcp Vismach MillTurn",align="left"] +.QtVCP vismach- 3 Axis Mill panel +image::images/qtvismach_millturn.png["QtVCP Vismach MillTurn",align="left"] === vismach_mill_5axis_gantry @@ -154,8 +154,8 @@ image::images/qtvismach_millturn.png["Qtvcp Vismach MillTurn",align="left"] loadusr qtvcp vismach_mill_5axis_gantry ---- -.Qtvcp vismach- 3 Axis Mill panel -image::images/qtvismach_5axis_gantry.png["Qtvcp Vismach 5 Axis Gantry",align="left"] +.QtVCP vismach- 3 Axis Mill panel +image::images/qtvismach_5axis_gantry.png["QtVCP Vismach 5 Axis Gantry",align="left"] === vismach_fanuc_200f @@ -166,8 +166,8 @@ image::images/qtvismach_5axis_gantry.png["Qtvcp Vismach 5 Axis Gantry",align="le loadusr qtvcp vismach_fanuc_200f ---- -.Qtvcp vismach- 6 Joint Robotic Arm -image::images/qtvismach_fanuc_200f.png["Qtvcp 6 Joint Robotic Arm",align="left"] +.QtVCP vismach- 6 Joint Robotic Arm +image::images/qtvismach_fanuc_200f.png["QtVCP 6 Joint Robotic Arm",align="left"] === tool_dialog @@ -185,7 +185,7 @@ Options: * -o audio_on -play sound on tool change * -o speak_on -speak announcement of tool change -.Qtvcp tool dialog - Manual Tool Change Dialog +.QtVCP tool dialog - Manual Tool Change Dialog image::images/qtvcp_toolChange.png["Tool Change Dialog",align="left"] == Custom Panels diff --git a/docs/src/gui/qtvcp-widgets.adoc b/docs/src/gui/qtvcp-widgets.adoc index 3c7b20ba012..b884c612310 100644 --- a/docs/src/gui/qtvcp-widgets.adoc +++ b/docs/src/gui/qtvcp-widgets.adoc @@ -2,7 +2,7 @@ :toc: [[cha:qtvcp-widgets]] -= QTvcp Widgets += QtVCP Widgets // Custom lang highlight // must come after the doc title, to work around a bug in asciidoc 8.6.6 @@ -10,7 +10,7 @@ :hal: {basebackend@docbook:'':hal} :ngc: {basebackend@docbook:'':ngc} -Qtscreen uses QTvcp widgets for linuxcnc integration. +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. @@ -49,7 +49,7 @@ Allows one to adjust a HAL pins using a sliding pointer. === LED Widget .LED -image::images/qtvcp_ledWidget.png["QTvcp led",scale="25%"] +image::images/qtvcp_ledWidget.png["QtVCP led",scale="25%"] An indicator that optionally follows a HAL pin's logic. @@ -91,7 +91,7 @@ It is based on pyQT's QRadioButton. === Round Gauge .Round Gauge -image::images/qtvcp_round_gauge.png["QTvcp round gauge",scale="25%"] +image::images/qtvcp_round_gauge.png["QtVCP round gauge",scale="25%"] Round Gauge can be used in a linuxcnc GUI to display an input parameter on the dial face. @@ -153,7 +153,7 @@ The custom parameters are: === HALPad .HALPAD -image::images/qtvcp_HALPad.png["QTvcp HAL button Joypad ",scale="25%"] +image::images/qtvcp_HALPad.png["QtVCP HAL button Joypad ",scale="25%"] This widget looks and acts like a 5 button D-pad, with an LED ring Each button has an selectable type (Bit, S32 or Float) output HAL pin. @@ -253,7 +253,7 @@ It also has other options: ==== LED indicator option .Indicated Action Button -image::images/qtvcp_actionButton.png["QTvcp led Action Button",scale="25%"] +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. @@ -404,7 +404,7 @@ 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%"] +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. @@ -952,7 +952,7 @@ It is based on pyQT's QWidget which incorporates GcodeDisplay widget This Displays the current G-code in a graphical form. .Graphics Display -image::images/qtvcp_gcodeGraphics.png["QTvcp G-code Graphics",scale="25%"] +image::images/qtvcp_gcodeGraphics.png["QtVCP G-code Graphics",scale="25%"] Properties that can be set via stylesheets: @@ -1292,13 +1292,13 @@ These states are selectable: * 'halpin status' + Shows the HAL pin output of a selected HAL pin * 'jograte_status' + - Shows the current QTvcp based Jog Rate + Shows the current QtVCP based Jog Rate * 'jograte_angular_status' + - Shows the current QTvcp based Angular Jog Rate + Shows the current QtVCP based Angular Jog Rate * 'jogincr_status' + - Shows the current QTvcp based Jog increment + Shows the current QtVCP based Jog increment * 'jogincr_angular_status' + - Shows the current QTvcp based Angular Jog increment + Shows the current QtVCP based Angular Jog increment * 'machine state_status' + Shows the current machine interpreter state using the text described from the state_list. + @@ -1368,7 +1368,7 @@ Status image switcher will switch between images based on linuxcnc states. 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%"] +image::images/statusImageSwitcher.png["QtVCP Status Image Switcher",scale="25%"] In the properties section notice that: @@ -1428,11 +1428,11 @@ These properties can be set in designer, in python handler code or These include: * 'halCompBaseName': + - If left empty Qtvcp will use the screen's name as the HAL component's + If left empty QtVCP will use the screen's name as the HAL component's basename. - If set, Qtvcp will use this string as the HAL component's basename. - If the -c command line option is used when loading Qtvcp, - Qtvcp will use the name specified in the command line - it overrides + If set, QtVCP will use this string as the HAL component's basename. + If the -c command line option is used when loading QtVCP, + QtVCP will use the name specified in the command line - it overrides all above options. If you programmically set the basename in the handlerfile - it will override all above options. @@ -1578,7 +1578,7 @@ qproperty-close_overlay_color: rgba(0, 255, 0, 0.75) } If the preference file option is selected, screenOption widget will make an INI based preference file. -While other Qtvcp widgets will add to this list, the screenOptions widget +While other QtVCP widgets will add to this list, the screenOptions widget will add these entries: @@ -1801,7 +1801,7 @@ It is based on pyQT's QToolButton === MacroTab Widget .Macrotab -image::images/qtvcp_macro.png["QTvcp led",scale="25%"] +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. @@ -1932,7 +1932,7 @@ MDI_HISTORY_FILE = '~/.axis_mdi_history' === MDITouchy .MDI Touchy -image::images/qtvcp_mdiTouchy.png["QTvcp MDI Touchy",scale="25%"] +image::images/qtvcp_mdiTouchy.png["QtVCP MDI Touchy",scale="25%"] This widget display button and entry lines for use with entering MDI commands. @@ -2015,7 +2015,7 @@ G-code programs. === OriginOffsetView Widget .origin Offset View -image::images/qtvcp_originoffsetview.png["QTvcp Origin Offset View"] +image::images/qtvcp_originoffsetview.png["QtVCP Origin Offset View"] This widget allows one to modify User System origin offsets directly It will update linuxcnc's Parameter file for changes made or found. @@ -2103,7 +2103,7 @@ It is based on pyQT's === FileManager .FileManager -image::images/qtvcp_fileManager.png["QTvcp File Manager Widget",scale="25%"] +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. @@ -2131,7 +2131,7 @@ It is based on pyQT's === ToolOffsetView .Tool Offset View -image::images/qtvcp_tooloffsetview.png["QTvcp Tool Offset View"] +image::images/qtvcp_tooloffsetview.png["QtVCP Tool Offset View"] This widget will display and allows one to modify tool offsets It will update linuxcnc's tool table for changes made or found. @@ -2209,7 +2209,7 @@ self.w.tooloffsetview.set_all_unchecked() === BasicProbe .BasicProbe -image::images/qtvcp_basicProbe.png["QTvcp basicProbe widget",scale="25%"] +image::images/qtvcp_basicProbe.png["QtVCP basicProbe widget",scale="25%"] Widget for probing on a mill. Used by the QtDragon screen. @@ -2297,7 +2297,7 @@ 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%"] +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. @@ -2311,7 +2311,7 @@ It is based on pyQT's QMessagebox. === Dialog File Chooser Widget .File Dialog -image::images/qtvcp_fileDialog.png["QTvcp file dialog",scale="25%"] +image::images/qtvcp_fileDialog.png["QtVCP file dialog",scale="25%"] This is used to load G-code files. If there is a Focus Overlay widget present, it will signal it to display. @@ -2354,7 +2354,7 @@ It is based on pyQT's QMessagebox. === Dialog Origin Offset Widget .Offsets -image::images/qtvcp_offsetpage.png["QTvcp origin Offset Page",scale="25%"] +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. @@ -2368,7 +2368,7 @@ It is based on pyQT's QDialog. === Dialog tool Offset Widget .Tool Offsets -image::images/qtvcp_toolOffset.png["QTvcp Tool Offset Page",scale="25%"] +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. @@ -2408,7 +2408,7 @@ It is based on pyQT's QDialog === Dialog Calculator .Calculator -image::images/qtvcp_calculator.png["QTvcp Calculator",scale="25%"] +image::images/qtvcp_calculator.png["QtVCP Calculator",scale="25%"] This is a dialog to display a calculator for numeric entry, such as origin offset. @@ -2422,7 +2422,7 @@ 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%"] +image::images/qtvcp_runFromLine.png["QtVCP Run-from-line",scale="25%"] Dialog to preset spindle settings before running a program from a specific line. @@ -2430,7 +2430,7 @@ specific line. === Dialog VersaProbe .Versa Probe Dialog -image::images/qtvcp_versaProbe.png["QTvcp Versa Probe",scale="25%"] +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 @@ -2438,7 +2438,7 @@ It is based on pyQT's QDialog === Dialog MachineLogDialog .Machine Log Dialog -image::images/qtvcp_machineLog.png["QTvcp MachineLog Dialog",scale="25%"] +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. @@ -2451,7 +2451,7 @@ Other available widgets === Nurbs Editor .Nurbs Editor -image::images/qtvcp_nurbsEditor.png["QTvcp nurbs editor",scale="25%"] +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 @@ -2580,7 +2580,7 @@ These can be set in stylesheets or python code to change it's properties. A file path or resource path to an image to display in the described button location. If the reset button is pressed in the Designer editor property, the - image will not be displayed. (allowing optionally text) + image will not be displayed (allowing optionally text). * 'left_text': * 'right_text': * 'center_text': @@ -2620,7 +2620,7 @@ self.w.joypadename.setProperty('false_color','red') ---- == Import only Widgets -These widgets are usually the base class widget for other QTvcp widgets. +These widgets are usually the base class widget for other QtVCP widgets. They are not available directly from the Designer editor but could be imported and manually inserted. They could also be subclassed to make a similar widget with new features. diff --git a/docs/src/hal/basic-hal.adoc b/docs/src/hal/basic-hal.adoc index 69f4295cb4e..8411a179f6a 100644 --- a/docs/src/hal/basic-hal.adoc +++ b/docs/src/hal/basic-hal.adoc @@ -162,10 +162,10 @@ pin works not how it is handled in HAL. A pin can be connected to a signal if it obeys the following rules: -* An IN pin can always be connected to a signal -* An IO pin can be connected unless there's an OUT pin on the signal +* An IN pin can always be connected to a signal. +* An IO pin can be connected unless there's an OUT pin on the signal. * An OUT pin can be connected only if there are no other OUT or IO pins - on the signal + on the signal. The same 'signal-name' can be used in multiple net commands to connect additional pins, as long as the rules above are obeyed. @@ -319,7 +319,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 2^10 (~ 1000) bits of dynamic range. For more information on floating point numbers see: @@ -331,14 +331,14 @@ http://en.wikipedia.org/wiki/Floating_point[http://en.wikipedia.org/wiki/Floatin An 's32' number is a whole number that can have a negative or positive value. -- s32 values = integer numbers -2147483648 to 2147483647 +- s32 values = integer numbers from -2147483648 to 2147483647 [[sub:hal-u32]] === u32(((HAL u32,u32))) A 'u32' number is a whole number that is positive only. -- u32 values = integer numbers 0 to 4294967295 +- u32 values = integer numbers from 0 to 4294967295 [[sec:hal-files]] == HAL Files(((HAL Files))) @@ -353,7 +353,7 @@ have up to three HAL files in your config directory. GUI is loaded. - 'custom_postgui.hal' This file is loaded after the GUI loads. This is where you put your custom HAL commands that you want loaded after the - GUI is loaded. Any HAL commands that use pyVCP widgets need to be + GUI is loaded. Any HAL commands that use PyVCP widgets need to be placed here. [[sec:hal-parameters]] diff --git a/docs/src/hal/canonical-devices.adoc b/docs/src/hal/canonical-devices.adoc index 74f0e6a007d..bd47f231c54 100644 --- a/docs/src/hal/canonical-devices.adoc +++ b/docs/src/hal/canonical-devices.adoc @@ -108,7 +108,7 @@ of values. Examples are digital to analog converters or PWM generators. === Parameters(((HAL Analog Output Parameters))) (float) *offset*:: This will be added to the *value* before the - hardware is updated + hardware is updated. (float) *scale*:: This should be set so that an input of 1 on the *value* pin will cause the analog output pin to read 1 volt. (float) *high_limit* (optional):: When calculating the value to @@ -118,7 +118,7 @@ of values. Examples are digital to analog converters or PWM generators. to the hardware, if *value* + *offset* is less than *low_limit*, then *low_limit* will be used instead. (float) *bit_weight* (optional):: The value of one least significant - bit (LSB), in volts (or mA, for current outputs) + bit (LSB), in volts (or mA, for current outputs). (float) *hw_offset* (optional):: The actual voltage (or current) that will be output if 0 is written to the hardware. diff --git a/docs/src/hal/comp.adoc b/docs/src/hal/comp.adoc index 25718a2b5e1..63add4bf94c 100644 --- a/docs/src/hal/comp.adoc +++ b/docs/src/hal/comp.adoc @@ -67,7 +67,7 @@ addf ddt.0 servo-thread ---- More information on 'loadrt' and 'addf' can be found in the -<>. +<>. To test your component you can follow the examples in the <>. @@ -307,8 +307,8 @@ parameters, and functions for `prefix`. in the automatically defined 'rtapi_app_main'. * 'option userspace yes' - (default: no) - If specified, this file describes a userspace (ie, non-realtime) component, rather - than a regular (ie, realtime) one. A userspace component may not have functions + If specified, this file describes a userspace (i.e., non-realtime) component, rather + than a regular (i.e., realtime) one. A userspace component may not have functions defined by the 'function' directive. Instead, after all the instances are constructed, the C function `void user_mainloop(void);` is called. When this function returns, the component exits. @@ -358,8 +358,8 @@ The result of using any other option is undefined. + license "GPL"; // indicates GPL v2 or later + For additional information on the meaning of MODULE_LICENSE() and -additional license identifiers, see ''. or the manual page -'rtapi_module_param(3)' +additional license identifiers, see '' or the manual page +'rtapi_module_param(3)'. + This declaration is *required*. @@ -456,7 +456,7 @@ when its 'condition' evaluated to a nonzero value. * 'variable_name' - For each variable 'variable_name' there is a macro which allows the name to be used on its own to refer to the variable. When 'variable_name' is an array, the normal C-style - subscript is used: 'variable_name[idx]' + subscript is used: 'variable_name[idx]'. * 'data' - If "option data" is specified, this macro allows access to the instance data. @@ -803,10 +803,10 @@ which creates the following pins: - 3-input AND and XOR gates: logic.2.and, logic.2.xor, logic.2.in-00, logic.2.in-01, logic.2.in-02 -=== general functions +=== General Functions -This example shows how to call functions from the main function. + -it also shows how to pass reference of HAL pins to those functions. + +This example shows how to call functions from the main function. +It also shows how to pass reference of HAL pins to those functions. [source,c] ---- @@ -844,7 +844,7 @@ FUNCTION(_) { } ---- -This component uses two general function to manipulate a HAL bit pin referenced to it. + +This component uses two general function to manipulate a HAL bit pin referenced to it. == Command Line Usage diff --git a/docs/src/hal/components.adoc b/docs/src/hal/components.adoc index 6bae516038e..e38c59beaad 100644 --- a/docs/src/hal/components.adoc +++ b/docs/src/hal/components.adoc @@ -124,15 +124,15 @@ deadzone:: (((deadzone))) Return the center if within the threshold. hypot:: (((hypot))) Three-input hypotenuse (Euclidean distance) calculator. -mult2:: (((mult2))) Product of two inputs. +mult2:: (((mult2))) Product of two inputs (multiplexing). -mux16:: (((mux16))) Select from one of sixteen input values. +mux16:: (((mux16))) Select from one of sixteen input values (multiplexing). -mux2:: (((mux2))) Select from one of two input values. +mux2:: (((mux2))) Select from one of two input values (multiplexing). -mux4:: (((mux4))) Select from one of four input values. +mux4:: (((mux4))) Select from one of four input values (multiplexing). -mux8:: (((mux8))) Select from one of eight input values. +mux8:: (((mux8))) Select from one of eight input values (multiplexing). near:: (((near))) Determine whether two values are roughly equal. diff --git a/docs/src/hal/hal-examples.adoc b/docs/src/hal/hal-examples.adoc index 49ff4a49319..931c1305ece 100644 --- a/docs/src/hal/hal-examples.adoc +++ b/docs/src/hal/hal-examples.adoc @@ -69,7 +69,7 @@ Owner Type Dir Value Name 22 bit OUT FALSE or2.0.out ==> led-1 ---- -You can see from the hal command 'show pin or2' that the 'button-1' pin is +You can see from the HAL command 'show pin or2' that the 'button-1' pin is connected to the 'or2.0.in0' pin and from the direction arrow you can see that the button is and output and the 'or2.0.in0' is an input. The output from or2 goes to the input of the led. @@ -80,7 +80,7 @@ In this example it is assumed that you're 'rolling your own' configuration and wish to add the HAL Manual Toolchange window. The HAL Manual Toolchange is primarily useful if you have presettable tools and you store the offsets in the tool table. If you need to touch off for -each tool change then it is best just to split up your g code. To use +each tool change then it is best just to split up your G-code. To use the HAL Manual Toolchange window you basically have to load the hal_manualtoolchange component then send the iocontrol 'tool change' to the hal_manualtoolchange 'change' and send the hal_manualtoolchange @@ -268,7 +268,7 @@ 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 +In the following example we have created a simple GladeVCP panel with one stepper. .Basic Syntax ---- @@ -287,7 +287,7 @@ addf stepgen.capture-position slow addf parport.0.read fast addf parport.0.write fast -# make hal connections +# make HAL connections net winder-step parport.0.pin-02-out <= stepgen.0.step net winder-dir parport.0.pin-03-out <= stepgen.0.dir net run-stepgen stepgen.0.enable <= winder.start_button diff --git a/docs/src/hal/halmodule.adoc b/docs/src/hal/halmodule.adoc index 2c2a9f3e5d8..55310c37a07 100644 --- a/docs/src/hal/halmodule.adoc +++ b/docs/src/hal/halmodule.adoc @@ -178,8 +178,8 @@ One should call 'ready()' on the component after. === component_exists Does the specified component exist at this time. + -Example: +.Example ---- hal.component_exists("testpanel") ---- @@ -187,8 +187,8 @@ hal.component_exists("testpanel") === component_is_ready Is the specified component ready at this time. + -Example: +.Example ---- hal.component_is_ready("testpanel") ---- @@ -205,8 +205,8 @@ used for debugging information. === connect Connect a pin to a signal. + -Example: +.Example ---- hal.connect("pinname","signal_name") ---- @@ -214,8 +214,8 @@ hal.connect("pinname","signal_name") === disconnect Disonnect a pin from a signal. + -Example: +.Example ---- hal.disconnect("pinname") ---- @@ -223,8 +223,8 @@ hal.disconnect("pinname") === get_value Read a pin, param, or signal directly. + -Example: +.Example ---- value = hal.get_value("iocontrol.0.emc-enable-in") ---- @@ -268,9 +268,9 @@ paramDirection1 = listOfDicts[0].get('DIRECTION') === new_sig -Create a new signal of the type specified. + -Example: +Create a new signal of the type specified. +.Example ---- hal.new_sig("signalname",hal.HAL_BIT) ---- @@ -350,16 +350,16 @@ TODO === set_p -Set a pin value of any pin in the HAL system. + -Example: +Set a pin value of any pin in the HAL system. +.Example ---- hal.set_p("pinname","10") ---- == Constants -Use These To specify details rather then the value they hold. +Use these to specify details rather then the value they hold. * HAL_BIT * HAL_FLOAT @@ -441,7 +441,7 @@ Then make a pin and connect a 'value_changed' (the watcher) signal to a function # **** INITIALIZE **** # ######################## # widgets allows access to widgets from the qtvcp files - # at this point the widgets and hal pins are not instantiated + # at this point the widgets and HAL pins are not instantiated def __init__(self, halcomp,widgets,paths): self.hal = halcomp self.testPin = self.hal.newpin('test-pin', hal.HAL_BIT, hal.HAL_IN) @@ -459,8 +459,8 @@ This shows ways to get the pin value and information. def setTestPin(self, data): print("Test pin value changed to:" % (data)) print('halpin object =', self.w.sender()) - print('Halpin name: ',self.sender().text()) - print('Halpin type: ',self.sender().get_type()) + print('halpin name: ',self.sender().text()) + print('halpin type: ',self.sender().get_type()) # this can be called outside the function print(self.testPin.get()) @@ -478,6 +478,6 @@ This shows ways to get the pin value and information. and use it to display a digital readout with information of your choice (Ubuntu package name "lcdproc", in the universe repository) * Create a virtual control panel using any GUI library supported by - Python (gtk, qt, wxwindows, etc) + Python (gtk, Qt, wxWindows, etc.) // vim: set syntax=asciidoc: diff --git a/docs/src/hal/halshow.adoc b/docs/src/hal/halshow.adoc index 4698ebbcfa9..18593677c5d 100644 --- a/docs/src/hal/halshow.adoc +++ b/docs/src/hal/halshow.adoc @@ -91,7 +91,7 @@ as focused as you need. .[yellow-background]#New in 2.9# * Selected text from the Show tab can be copied by right-click or CTRL-C. -* The command entry provides now a bash-like history (only for the session) for executed commands. +* The command entry provides now a BASH-like history (only for the session) for executed commands. If we take a closer look at the tree display we can see that the six major parts of a HAL can all be expanded at least one level. As these @@ -136,7 +136,6 @@ to axis position so that we could see the rate of change in position, i.e., acceleration. We first need to load a HAL component named ddt, add it to the servo thread, then connect it to the position pin of a joint. Once that is done we can find the output of the differentiator in halscope. So let's go. -(Yes, I looked this one up. [source,{hal}] ---- diff --git a/docs/src/hal/intro.adoc b/docs/src/hal/intro.adoc index 129e4cf4393..5ae5592d1b5 100644 --- a/docs/src/hal/intro.adoc +++ b/docs/src/hal/intro.adoc @@ -320,7 +320,7 @@ does - that is determined by which functions are connected to it. The real distinction is simply how often a thread runs. -In LinuxCNC you might have a 50 us thread and a 1 ms thread. +In LinuxCNC you might have a 50 µs thread and a 1 ms thread. These would be created based on BASE_PERIOD and SERVO_PERIOD, the actual times depend on the values in your ini file. diff --git a/docs/src/hal/rtcomps.adoc b/docs/src/hal/rtcomps.adoc index 9ecfc144c45..b10065b31ee 100644 --- a/docs/src/hal/rtcomps.adoc +++ b/docs/src/hal/rtcomps.adoc @@ -144,9 +144,9 @@ timing of the step and direction signals. In the following figure the meaning of these parameters is shown. The parameters are in nanoseconds, but will be rounded up to an integer multiple of the thread period for the threaed that calls -'make_pulses()'. For example, if 'make_pulses()' is called every 16 us, +'make_pulses()'. For example, if 'make_pulses()' is called every 16 µs, and steplen is 20000, then the step pulses will -be 2 x 16 = 32 us long. The default value for all four of the parameters +be 2 x 16 = 32 µs long. The default value for all four of the parameters is 1ns, but the automatic rounding takes effect the first time the code runs. Since one step requires 'steplen' ns high and 'stepspace' ns low, the maximum frequency is 1,000,000,000 divided by @@ -210,7 +210,7 @@ threads is not supported. feedback, updates latches and scales position. The high speed function 'stepgen.make-pulses' should be run in a very -fast thread, from 10 to 50 us depending on the +fast thread, from 10 to 50 µs depending on the capabilities of the computer. That thread's period determines the maximum step frequency, since 'steplen', 'stepspace', 'dirsetup', 'dirhold', and 'dirdelay' are all rounded up to a integer multiple of @@ -332,7 +332,7 @@ not supported. * '(funct) pwmgen.make-pulses' - High speed function to generate PWM waveforms (no floating point). The high speed function 'pwmgen.make-pulses' should be - run in the base (fastest) thread, from 10 to 50 us depending on the + run in the base (fastest) thread, from 10 to 50 µs depending on the capabilities of the computer. That thread's period determines the maximum PWM carrier frequency, as well as the resolution of the PWM or PDM signals. If the base thread is 50,000nS then every 50uS the module decides if it is time @@ -355,10 +355,10 @@ rates of 10kHz to perhaps up to 50kHz. The base thread should be 1/2 count speed to allow for noise and timing variation. For example if you have a 100 pulse per revolution encoder on the -spindle and your maximnum RPM is 3000 the maximum base thread should be 25 us. +spindle and your maximnum RPM is 3000 the maximum base thread should be 25 µs. A 100 pulse per revolution encoder will have 400 counts. The spindle speed of 3000 RPM = 50 RPS (revolutions per second). 400 * 50 = 20,000 counts per -second or 50 us between counts. +second or 50 µs between counts. The Encoder Counter Block Diagram is a block diagram of one channel of an encoder counter. diff --git a/docs/src/hal/tutorial.adoc b/docs/src/hal/tutorial.adoc index 276ba5a1388..edf07f62ab3 100644 --- a/docs/src/hal/tutorial.adoc +++ b/docs/src/hal/tutorial.adoc @@ -221,7 +221,7 @@ should probably disappear.] To actually run the code contained in the function 'siggen.0.update', we need a realtime thread. The component called 'threads' that is used to create a new thread. Lets create a thread called 'test-thread' with -a period of 1 ms (1,000 us or 1,000,000 ns): +a period of 1 ms (1,000 µs or 1,000,000 ns): ---- halcmd: loadrt threads name1=test-thread period1=1000000 @@ -892,7 +892,7 @@ left click on the samples box. image::images/halscope-01.png["Realtime function not linked dialog",align="center"] This dialog is where you set the sampling rate for the oscilloscope. -For now we want to sample once per millisecond, so click on the 989 us +For now we want to sample once per millisecond, so click on the 989 µs thread 'slow' and leave the multiplier at 1. We will also leave the record length at 4000 samples, so that we can use up to four channels at one time. When you select a thread and then click 'OK', the dialog @@ -1037,11 +1037,11 @@ position slider to determine which part of the zoomed waveform is visible. However, sometimes simply expanding the waveforms isn't enough and you need to increase the sampling rate. For example, we would like to look at the actual step pulses that are being generated in our -example. Since the step pulses may be only 50 us long, sampling at 1KHz +example. Since the step pulses may be only 50 µs long, sampling at 1KHz isn't fast enough. To change the sample rate, click on the button that displays the number of samples and sample rate to bring up the 'Select Sample Rate' dialog, figure . For this example, we will click on the -50 us thread, 'fast', which gives us a sample rate of about 20KHz. Now +50 µs thread, 'fast', which gives us a sample rate of about 20KHz. Now instead of displaying about 4 seconds worth of data, one record is 4000 samples at 20KHz, or about 0.20 seconds.