now screens can read raw tool number and offset number.
fix error/message handling; can't use:
try;
except Exception as e:
remap always errors.
use something similar to:
try:
except:
self.set_errormsg("Remap aborted")
return INTERP_ERROR
spindle-control-changed now has the at-speed state.
This is used in status image switcher to change images based on current spindle state.
Also added feedmode states (G93 94 95) to status image switcher
Updated other widgets to use the modified status message
ver 3.1.3.7
- bug in embedded tabs, setting box_tool_and_gcode_info"
as location did hide also the overrides, that was not correct.
as we do need to hide them i.e. for plasma, I introduced a new
feature. If you just enter hide as vommand in INI file, the
corresponding widget will be hidden, without replacing the content.
Thanks Jasen for reporting
Signed-off-by: gmoccapy <nieson@web.de>
ver 3.1.3.7
- bug in embedded tabs, setting box_tool_and_gcode_info"
as location did hide also the overrides, that was not correct.
as we do need to hide them i.e. for plasma, I introduced a new
feature. If you just enter hide as vommand in INI file, the
corresponding widget will be hidden, without replacing the content.
Thanks Jasen for reporting
Signed-off-by: gmoccapy <nieson@web.de>
Code in the gcode interpreter assumes that number parsing/formatting
is done according to the C locale, as gcode part programs always use
"." as the decimal separator.
However, some of the user interfaces set the LC_NUMERIC to the user's
locale and then call into the interpreter to prepare previews of the
part program.
The last time I addressed this, it was by changing one routine to work via
an ostringstream, which is not affected by locales by default.
This time I took a different approach, which is to temporarily force the
LC_NUMERIC to C at entry to certain functions, and to restore it on exit.
If UIs or other embedders of the interpreter also use threads, they
must use `uselocale` to switch from program-wide to per-thread locale
settings, or the behavior of their program becomes undefined.
This hopefully fixes multiple bugs in affected locales, and closes#1158.
However, I did not actually set up a testing environment that would allow
me to check it. Additionally, saving & restoring parameters will now
take place in the C locale.
Update de.po
IMHo some translations are not longer used, i.e. use screen 2.
I will check that later and may be do an additional push
@litti thanks for your support!
To select a new source, a row has to be double-clicked or selected and
pressed enter on the keyboard. This is a change, since previously it was
enough with a single click.
It is easier to search for the correct item, the functionality is also
identical to that in halmeter.
We stopped using the dialog_generic_t struct. Most of the functionality we
used is built in GTK now, so we're using that instead.
Replaces CList with a TreeView in the "Select Channel Source" dialog
window. Search functionality is built-in, and it now correctly finds the
previously selected item.
GTK2 and GTK3 compatible
This replaces the open/save dialog which is now called GtkFileChooser.
For the save dialog, it will now prompt if the user tries to overwrite
an existing file. I have also replaced the function "halscope_suffix"
with a built in file filter. This was also added for the "Save Data
File" dialog.
ver 3.1.3.6
- get rid o some "ERROR" strings in translation file
as the error type is displayed as ICON in self._show_error
Thanks to hansu for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.5
- wrong translation of "Follow System Theme" leaded to a wrong
theme when loading the GUI.
Will correct the translation files with a different commit
Thanks to hansu for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.3
- pause a program would not allow to jog through the gcode preview
gcode preview will no be enabled if program is paused, only scrolling,
it is not possible to edit or select a line!
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.6
- get rid o some "ERROR" strings in translation file
as the error type is displayed as ICON in self._show_error
Thanks to hansu for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.5
- wrong translation of "Follow System Theme" leaded to a wrong
theme when loading the GUI.
Will correct the translation files with a different commit
Thanks to hansu for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.3
- pause a program would not allow to jog through the gcode preview
gcode preview will no be enabled if program is paused, only scrolling,
it is not possible to edit or select a line!
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3.2
- change og gmoccapy hal pin gmoccapy.jog.jog-inc-N leaded to an
aboart() command, so changing that pin i.e. in AUTO mode stops
Spindle and program execution. That is not the expected behavior.
I changed this to not throw any error, just change silently the
jog-increment to the selected one. Just not allowing this, would lead
to an unsynchronized system between hardware and GUI
Thanks to ZincBoy for reporting this misbehavior
Signed-off-by: gmoccapy <nieson@web.de>
modify emctaskmain to always display messages.
I think that previously, messages were only on the interp_list,
so had to wait for motion to finish?
Now they are immediately processed.
Not sure if that's a problem for Gcode defined messages...
This allows the realtime threads to be easily distinguished from the
utility threads with `ps`:
```
$ ps -C rtapi_app H -o tid,comm
TID COMMAND
31568 rtapi_app
31569 rtapi_app:mesg
31570 rtapi_app:T#0
```
(though one can also follow the rule that the first two are the utility
threads and the following are the realtime threads from fastest to
slowest)
pthread_setname_np is nonportable but a cursory search shows it's available
on Linux and FreeBSD.
conversational interlock for unsaved/unsent shapes
change button text for all dialogs
tidy up messages
add more validity checks for custom user buttons
more conversational entry checks
conversational: prevent error if leading zero is omitted for lead in
field
conversational: add material info to preview window
conversational: add kerf width to material info
align torch pulse code with probe test code
doc updates for clarity
some users have pdf setup files - now they can load them
in qtvcp using the system program.
In the future we can load them inside qtvcp - need python 3
add a change-button HAL pin for external acknowledgement.
add a property for frame/frameless windws. ie window header/controls
add a property for selecting desktop notify for toolchange acknowledgement
revamp dialog geometry code to default to center, but still record changes
for next time.
moify screenoptions to expose the new options
bounding check now handles gcode that contains only X or only Y
movements without error
added the distance outside of the limits to the bounds error message(s)
added exception handling to the m190 script to prevent erroneous errors
in terminal
minor docs changes
find a current list of dics of hal pins
listdict = get_info_pins()
pinname = listdict[0].get('name')
pinvalue = listdict[0].get('value')
find a list of signal/parameter names:
listdict = get_info_signals()
name = listdict[0].get('name')
value = listdict[0].get('value')
listdict = get_info_params()
name = listdict[0].get('name')
value = listdict[0].get('value')
If a user enters a new filename without an ending ACTION.SAVE_PROGRAM
added .ngc and this was not added to the originaly returned name from
the filedialog so caused an error when reloading then file into linuxcnc.
A filename passed to the function can have an ending added automatically.
if the save was succesful, the name is returned with the ending.
the ending can be specified.
In this way functions after saving can get the full/right filename
Qt reacted differently to the basic lighting used in Axis.
Gtk uses slightly different ones to.
So now we use our own
Now the cone and tools are transparent even looking from the top.
It seems ambient light setting on the material was set too high.
in qtvcp this is required for the cone to be transparent.
Strangley Axis doesn't need this even though we are using the same function.
Could this could be because of the lower down libraries used?
Axis use mingl qtvcp use qt opengl
Seems not to hurt Axis display anyways.
latency-histogram uses a mix of uS and uSec as units of time. But
large case S is the unit Siemens, and second should never be
shortened to "sec" or "Sec".
This patch changes to [greek letter mu]s in the GUI but uses "us" in
the terminal, since not all terminals support UTF-8.
sometimes a quick switch transition will cause the button
state to be inverted. This tries to avoid that be
setting the states based on pressed vrs released rather then
inverting state on press and release.
sometimes a quick switch transition will cause the button
state to be inverted. This tries to avoid that be
setting the states based on pressed vrs released rather then
inverting state on press and release.
The resource file is compiled from the qrc file on demand.
In a installed version of linuxcnc, one can;t save the
compiled file back where the default qrc file is, without
being root.
Now we add a qtvcp directory to the users's config folder
and put the compiled resource file there.
So now we show a specific notify message for hard limit errors.
This is so you can override the limits and turn the machine back on
with one button press.
The override limits check button would not always be in synch with
linuxcnc. linuxcnc does not have a way to specicifically set the
override state, only toggle it.
between this and the machine on button color not following linuxcnc state,
could make it very confusing what was on or off.
Also linuxcnc override_limits seems to work slightly different in homed
vrs not homed state. In homed state the override stays active after a jog,
in not homed state, linuxcnc automatically sets the machine off and sets
the override off.
In qtvcp, when the hard limits are cleared, we automatically set
limits override to off.
with locale=de_DE:
- entering for exampe (1,5) results in an error
- pressing the "="-button multiple times when an number with a comma is displayed results in multipliying the result by 10
run-from-line uses MDI code to set spindle settings before running.
If you applied these before actually running from line,
it changed the mode from auto to MDI.
- when used trivkins together with kinstype=BOTH, there was no
joint jog buttons, as this way of using trivkins is not recommended
nor useful. Even so a user might want to use that config so I
changed gmoccapy to display in this case the joints jog button
Thanks to Clive S and mucy007 for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.3
- added a dialog asking the user to save changes
- when in min screen resolution the editing page was wrong formated
while using German language, because of too long strings
Thanks to Hans470 for reporting this bugs
Signed-off-by: Norbert Schechner <nieson@web.de>
- Added a signal to emit changed, this way GUI can react
to that signal and ask the user if he want to save
the changes made.
Signed-off-by: Norbert Schechner <nieson@web.de>
- Added some line brakes to show correct in min screen
resolution. Bug has been reported by hansu (Hans470)
Thanks for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
- when going back from file loading menu without selecting a file
brought you into fullscreen view.
Reported by: Hans (Hans470)
Thanks for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
- while running a program it was possible to click the reload file
button, resulting in an immediate reloading and stopping the running
code. Button is no insensitive while running a file
Signed-off-by: Norbert Schechner <nieson@web.de>
Probably should find a better way -surely someone will want a lathe
with a Y axis. Can't think of a way to deduce what the user wants.
Currently linuxcnc needs to include the Y axis so that one can rotate
the coordinate system ie mirror the X axis.
There seems to be a problem only when the docs are uploaded and web-served
from wlo that - becomes &minus become –.
And the long dash doesn't work as a HAL pin name.
Signed-off-by: andypugh <andy@bodgesoc.org>
widget rounded number to integers, which puts ticks in the wrong spot
when spaced evenly.
Now Jim made it not print numbers if they aren't integers.
The user fix is to adjust number of ticks to one more then a divisible number of
max
If the value is above 100 or below 50 the widget can have the style sheet change
the widgets look - to alert the user they are out of the normal range.
The under/over range is arbritray - it should be made easier to set in the future
Forgot to add this to last commit.
this code clashes with the check button for inhibit selection.
We will let the user decide how they want to select the run from line
tpExecId would not return a 0 after a ngc program was run or an o word was
executed from MDI. After removing the check on tpExecId, motion will stop
when the probe contact is triggered during o word functions as well as ngc
programs.
Addresses bug #368.
particularily on an installed version, it's difficult for users to
find the file that need to be copied into the config folder so
they can modify them. Hopefully this helps.
plasmac use case:
Closing program (m2) after initiating clearing of external offsets
exposes transient reset of joint->vel_cmd (2 servo periods)
because of cubicDrain() on transition from coord mode to
teleop mode.
This commit: conditionally disable cubicDrain() if external offsets active
at transition
Thanks to Phillc,snowgoer540 for isolating problem in a sim config
When running a program one was locked out of the settings page on a limits trip.
now you can see the settings page at anytime.
also now override limits calls the right function and automatically resets when
the limit switch clears.
User wishes to remap m9 - this change allows it. When I tried
to remap m9 with python it worked fine other then the active m codes didn't
immediately update - hopefully that can be worked out.
Observed:
with previous_frame->positon==-1, subroutine files
opened by mdi command not closed, so conditionally
close settings->file_pointer if non-null
fixes#1088
Formerly, command.c jogging setups (JOG_CONT,JOG_INCR) used
a convenience EOFFSET_EPSILON to detect removal of external
offsets. The hard-coded value could differ from the stopping
criterion used in control.c due to configuration settings
for the servo_period and the external offsets acceleration
value in use.
Thanks go to Phillc and Greg Carl snowgower540 for finding the
problem, isolating the cause in hardware testing and the
making the solution.
Most of the other screens use ms, AXIS uses seconds.
If a user switched screens without fixing cycle time it would not work.
Now AXIS understands ms too
filemanager checks the preference file for the last loaded directory
so it can default there. No reason to send an error to the user if it's
missing, just ignore it.
The current HAL memory limit is set at 85 * 4096 (340k) which allows around
2500 HAL pins to exist.
The limit was last increased in 2014 to accommodate longer HAL pin names.
Mesa smart-serial means that configurations are possible with many thousands
of pins, and 340k seems like a very small limit.
This patch increases the HAL memory to a full 1MB.
Signed-off-by: andypugh <andy@bodgesoc.org>
Originally Mesa Smart-Serial allowed the transfer of 96 bits of data in each
direction, via 3 x 32-bit registers. smartserialb uses up to 7 registers for
224 bits per transfer.
The new version has a different GTAG. At the moment only one type of smart-
serial module is supported in a single firmware.
Signed-off-by: andypugh <andy@bodgesoc.org>
havinf muliple . in a filename causes some reported problems.
the original check would look at the complete path and sometime temparay
filenames would use a .
Now we just check the file name - one . allowed only
missed normalizing duble clicked paths.
jumplists read the button text - change capitalizing broke the comparison.
Now it normalizes the text to all capitals before comparing.
Removed some unused variables and changed the indentation.
The indentation is now 4 spaces. I also removed all whitespace at the
end of line.
The only real code change is two if statements which I changed to one,
with the same result. Line 41-42
Note: this branch is force pushed, rebased to master at 890187289
================================================================
This commit refactors internal tool data handling to:
1) Update and consolidate functions in a new directory:
src/emc/tooldata
2) Define an applications interface: src/emc/tooldata/tooldata.hh
3) Support a new interface to a user-provided tool database
management program specified by [EMCIO]DB_PROGRAM
4) Use a new mmapped tooldata interface between
EMCIO and TASK while maintaining number of allowed
pockets specified by CANON_POCKETS_MAX=1001
5) Deprecate tooldata in nml messages between EMCIO and TASK
(legacy nml message method remains available using
configure --enable-toolnml until removal)
6) Minimize impact to current users of master branch and
continue to pass the suite of runtests on all supported
buildbot machines.
7) Clarify program variable names that use a sequential
index (idx) for accessing internal tooldata.
Note: some legacy variable names like:
pocketPrepped, selected_pocket,current_pocket
are still used in a few places because of their inclusion
in fielded user remap scripts or the tests suite.
These items may be renamed in the future.
================================================================
Change Summary:
1) new directory: src/emc/tooldata
tooldata.hh ------------ api
tooldata_common.cc ----- shared functions
tooldata_mmap.cc ------- mmap tooldata
tooldata_nml.cc -------- nml tooldata
tooldata_db.cc --------- database interface functions
tool_watch.cc ---------- test utility
tool_mmap_read.cc ------ test utility for mmap
3) updated docs:
docs/src/getting-started/updating-linuxcnc.txt
docs/src/config/ini-config.txt
docs/src/code/code-notes.txt
docs/src/gcode/overview.txt
docs/src/gcode/tool-compensation.txt
docs/src/remap/remap.txt
docs/man1/iocontrol*.1
docs/src/tooldatabase/tooldatabase.txt (new)
3) removed (consolidated into other files):
src/emc/task/iotaskintf.cc
src/emc/ini/initool.hh
src/emc/ini/initool.cc
src/emc/rs274ngc/tool_parse.h
src/emc/rs274ngc/tool_parse.cc
src/emc/toolstore/
4) emccanon call: removed GET_EXTERNAL_POCKETS_MAX
(superseded by CANON_POCKETS_MAX)
5) hal: params to pins:
iocontrol.N.tool-prep-index
6) gui updates (axis gui only)
Print message if both [EMCIO]TOOL_TABLE and DB_PROGRAM
are specified. Allow specifying tooleditor for a DB_PROGRAM
Issue message for db_program/tool_table ambiguities
7) simulation configs:
configs/sim/axis/db_demo/db_ran.ini
configs/sim/axis/db_demo/db_nonran.ini
================================================================
Notes:
1) Testing has been aided by the extensive set of tests
exercised by the runtests program employed to ensure
the integrity of buildbot created deb packages. However,
numerous functions are NOT tested by the runtests suite.
Examples:
a) remapped tool handling
b) user-interfaces (ui) support for tool changes
c) iov2 (ioControl_v2.cc -- no maintainer, deprecated)
2) Use of the mmapped interface between EMCIO and TASK
reduces the EMC_TOOL_STAT message size from 112224 bytes
to 224 bytes (64bit architecture)
3) The complete toolTable[] data for all (1001)
CANON_POCKETS_MAX is no longer available should someone
implement a *remote* ui with TASK and EMCIO
implemented on *separate* machines via networked (TCP)
nml messages. A single tool table instance for
the current tool in spindle is included in the
EMC_TOOL_STAT message.
Third times the charm? I musta been asleep.
Stems from seconds vrs milliseconds.
Since I just invented GRAPHICS and HALPIN CYCLE_TIME they will all be in MS
Caused widgets to not show and no response.
After fixing the insert DRO display awhile back i guess I never tested
a lathe config that used the DRO.
I forgot to add a needed attibutes. With openGL code, it doesn't crash
it just does weird things.
Not sure why this is broken just with XZ machines.
Would not show a proper display because of trying to
hilight a line that was not there yet as there was no
program loaded.
buildbot fails only occur when bot is heavily loaded
example fail for prior value of COMM_TIMEOUT=4.0:
Running test: /home/buildslave/emc2-buildbot/wheezy-amd64/rip-wheezy-amd64/build/tests/interp/m98m99/12-M99-endless-main-program
...
task: 118 cycles, min=0.000060, max=4.929809, avg=0.057317, 10 latency excursions (> 10x expected cycle time of 0.001000s)
...
*** /home/buildslave/emc2-buildbot/wheezy-amd64/rip-wheezy-amd64/build/tests/interp/m98m99/12-M99-endless-main-program: XFAIL: checkresult exited with 1
Setting DEBUG=3 on transactions produces a lot of useless debug information what makes it impossible to read the data bytes. That is now moved to DEBUG=4.
start without preloaded entry
finish empty if using MDI line, or with the next command if using
double click in mdi history.
wrap around when getting to ends of history.
Thanks Phill!
skip file remains as test still fails frequently
just update to follow affecting commits:
5cd845a7eb linuxcnc.in: terminate motion-logger also
2a1befea6d motion-logger.c print format was: %.6f, is: %.6g
remove skip file to restore this test after
follow commits:
5cd845a7eb linuxcnc.in: terminate motion-logger also
2a1befea6d motion-logger.c print format was: %.6f, is: %.6g
dialogs is the standard way to add pop ups.
this allows options such as focus overlay, user/preference file placement,
and in the future different keyboard options.
fix for occaisonal buildbot failures for tests/motion-logger/mountaindew
that occur coincident with reports of excessive (> 1second) task latency
excursions like:
"task: 307 cycles, min=0.000155, max=1.804823, avg=0.014539, 7 latency excursions ..."
Scenario:
1) At termination of [DISPLAY]DISPLAY=test-ui.py, the linuxcnc script
initiates shutdown by sending a SIGTERM to linuxcncsvr and milltask.
2) On a heavily loaded buildbot system (showing task latencies like above),
the delivery of the SIGTERM to milltask may be delayed such that
the linuxcncsvr process exits well before milltask and the final
EMCMOT_DISABLE message is undeliverable to the motion-logger
process resulting in absence of the final expected motion-logger
"DISABLE" report.
3) This commit sends the SIGTERM to the motion-logger process also
so the race-dependent final "DISABLE" report is no longer
expected.
error is now displayed when probing and pierce height would exceed z
maximum
prevent hitting z maximum limit when second cut is closer to z maximum
than safe height
Add an axisui.error pin, mirroring the behaviour of the gmoccapy
error pin exactly. The pin will be set high / True upon error,
and will be set low / False when all error notifications have
been dismissed by the operator.
gcode graphics didn't send out the line that was selected.
gcode editor was broken when I fixed gcode graphics.
STATUS signals about gcode line are now consistant - lines are 1 based just
as the user displayed code is. Gcode editor is internally 0 based and this
caused a lot of problems.
Had to adjust the run-from-line toolbar for 1 based lines
added a user marker for toggling a visual point in gcode lines.
Now we use a marker for the gcode selected line rather then the carret
line. Finally!
can style selected text now (cause I was going to use that as highlight.
The displayed value was not correlate to linuxcnc's rotational coordinates.
add block_wheel_rotation property.
add cam_number property for picking a cam out of multiple available.
add some currently unused vision detection code for testing on newer QT systems
- still a bug in handling ignore limits solved
issue #1000 reported by Hans470
solved by using new hal staus signal and deleted
some unneded code
Signed-off-by: Norbert Schechner <nieson@web.de>
Phill needed to display a DRO that was not linuxcnc defined.
He will drive it (externally) with a HAL pin.
you change the displayed valye by changing the qreference_type property
and calling .update_user() with a int/float value
You can also use that function as a slot for signals in designer
qt Widgets dont send a signal on initilization so the HAL output
can be out of synch (it defaults to 0)
either you can force the controlling widget to output a signal with
python call or you can set the initial value of the HAL pin to match the
widget.
ver 3.1.2
- connecting macro button to physical button did send
a clicked signal, but macro button did expect a pressed signal
This bug has been reported from ulistermclame
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.1
- setting analog-enable hal pins signal always reseted
the jog vel of the slider. This has been reported from
hans23, solved with this update
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.1.0
- added the ability to hide the tool-tips to
make the use with touch monitors more useful
Thanks to neilwhelcher for the code and pointing this out
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.0.10
- bug in handling ignore limits solved
issue #1000 reported by Hans470
solved by using new hal staus signal and deleted
some unneeded code
Signed-off-by: Norbert Schechner <nieson@web.de>
gusset text
mdi focus and selection color
prevent duplicate initial z moves
rs485 fixes and error display changes
mdi input changes
conversational rotate
automatically adjust it's self for metric/imperial machines.
Don't use INI [TOOL_CHANGE] as linuxcnc already has a mechanism
to set tool change position.
always set G90 before executing G53 moves.
we read the INI file to check [TRAJ]LINEAR_AXES for 'inch'.
and then set th eparam accordingly.
Useful for remaps to decide how some varibles should be interpreted.
This is a common modification to linuxcnc.
maybe if we have a 'standard' remap it will make things easier.
This is based on Versaprobe remap.
Param 4999 holds whether the machine in imperial.
param 5000 holds the workpiece height in absolute machine units.
The ini holds the rest of the required imforation.
To make things essier it would be nice to have a couple params
always available, such as what units the machine is based on
work in progress but it does work.
A toolsetter component for sim testing would be helpful too.
Better error handling of remaps, particular finding the files to import,
would really help people.
It it fails it would be nice to know where it looked...
some of the toolbuttons such as the lexer buttons should be hidden
from users if they are not needed.
now you can hide the whole toobar or the individual buttons/label
previous button crashed.
seach and replace didn't move to the next search point.
added some test code - to test this widget directly from python
Someone wanted to not see homing plot lines but did want jogging plot lines.
Originally the module did not have a function to set logger colors after intialization.
Now one can make the color match the background untill after homing.
This won't work if one uses gradient backgrounds in qtvcp though...
popping an entry dialog on top of a already overlayed widget. would remove the overlay
when the entry dialog was closed. Now we can tell it not to overlay/ remove overlay at all
The waveforms are created with https://wavedrom.com/editor.html from the json-data.
See man pages of groff_www, groff_man and groff for formatting the text.
The HTML related commands of groff_www doesn't affect the man pages in the terminal.
Usually in linuxcnc, setting s0 would set spindle off;
Setting m3/4 before s was above 0 would not allow s to be set after.
This commit fixes those problems.
tested on a real machine with two spinldes - one as an indexer
It's common in other machines to be able to set S and m3/4/5 separately.
This allows using the extra spindles in unique ways such as indexers.
(s setting can represent position)
This may help laser users with laser intensity etc.
If users relied on setting s to 0 to turn off the spindle will need to change their programs.
One could argue the were not using the code properly anyways.
now defults to a table of filename/timestamp and size.
Can be changed back to simple list
Can you designer signals to connect to the scroll slot.
This allows using a slider or diali widget to scroll up and down.
Coulfd also connect an external MPG to do the same thing.
QtTouchy sim shows how that would work (the code is a little different 0 - i've noe made it easier)
QtAxis's center tabs can be double clicked to deatch them from the main
screen. Double click the title bar and it will be full screen.
close to reattach.
Now if pin making fails, it won;t kill the program
right away.
You can check for the error and an error is logged.
calls to set() are ignored.
probably will fail when get() is called.
Pobably sjould make it fail right away in verbose mode but
that will take changes in qtvcp.py
If two instances of camview are initiated - crash because
of same named pins.
Now we send an error message and igore the pin
This probably should be done in QPIN class
designer purposely doesn't call hal_init() because linuxcnc isn't
running.
We called camview's hal_init() in camview dialogs __init__ function.
the __init__ function is called from designer so broke things.
This showed up after changing camview dialog's _hal_init() to hall_init()
hal_init() is the function in the baseclass that usually gets called by qt_makepins.
_hal_init() is the function called on subclasses.
camview_widget is subclassed so should use _hal_init.
When building HAL-ified widgets by hand one must call the hal_init() function ourselves.
So camviw dialog should call hal_init() on camview widget(baseclass),
which them calls _hal_init() on the camview widget.
As it was - camview widget's HAL pin was never made when using a dialog.
Code based on vismach.py, now runs under PYQT5 instead of tkinter.
This allows embedding into other projects.
added ability to read relevant HAL pins without connecting.
Added a Qtvcp panel to test with (vismach_mill_xyz)
added a sample config that embeds into AXIS gui. (qtvismach_tab.ini)
We want the lasted loaded folder shown on startup.
we want the media file manager not to show an error to user
if the path is wrong. (Which is higly unlikely anyways)
user/media paths were opposite.
Now will set 'jump user' to [DISPLAY] PROGRAM_PREFIX, if available.
More error maessages annoinced in notify.
Possible to change directyview programmically without Notify announcing
errors.
Now you can see the current path as a text line.
Jump button can have new user-selected paths added by pressing a button.
Selection of jump path is by long press.
If the option showCopyControls is called true, then a copy path
text edit is show plus copy and paste buttons.
fix torch pulse button text
fix add circle to file
fix torch enable error
add bolt circle to conversational
add gusset to conversational
add sector to conversational
change path name of common files
The widget checked for joint type early in the process by calling stat.
Stat might not have been polled yet so might get the wrong info.
This would show as the format of the angular DRO changing to imperial/metric
format
It was noticed adding the touchyMDI widget would fix the problem
because it polled status it's self.
Fixed the bug that caused an error.
improved the error message to include python's error.
use self.shutdown so the component is unloaded properly.
fix some spelling errors
Realising that a mutli-line component docstring in a .comp file leads to
the SYNOPSIS section being the second line, fix the docstring in demux.comp
and use it to our advantage in bldc.comp
Signed-off-by: andypugh <andy@bodgesoc.org>
Return -1 if toolno for toolinSpindle is -1
Formerly, when requesting "home" pocket for an invalid
toolno (-1), returned the 'pocket' for the last entered
valid tool.
Had to change the way we colored background for it to work properly.
Before we checked the default color of the window and used that.
But then it would ignore our qproperty settings.
it's common to add extra hidden DRO widgets to a screen so it can work
with different number of axis machines.
But previously we errored on not finding the axis number from the INI.
now its a debug message and we use 0 (X) as it's always available.
dro_widget needs these conversions; num of joints vrs number of axes
are not nessasarily the same.
python linuxcnc library always reports axes positions in a set of 9 variables.
the number of joint number varies but is always the same or more then axes.
This makes a map of the differences.
adding anything besides all (*) is too restricting.
fix qtdragon not being able to load files because the file ending is checked incorrectly.
change extension defaults in INI for qtdragon - gcode file should show first
I couldn't figure out how to filter multiple extension simutaneously
last time. Finally got it now.
Now both file dialog and filemanager can filter extensions properly.
Both can display a user made title in the combo box.
they use different qt_istat functions to get the info though...
Because pin directions aren't actually finalized until the first
write, this error doesn't occur. However, other invalid pin errors
occur, so just accept any of them
Both hm2_queue_read() and hm2_finish_read() used
the same error message:
"error finishing read! iter=%u\n".
Use a different error message for each of the function
to easily deduce from which location the error
commes from.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
This is almost never desired, because it means that only 24 bits
of precision are kept. Usually this was done by accident, when
thinking about the HAL type hal_float, which is actually a "double
precision" type too.
* absenc: incompatible change: require version 4, support new register
* eth: add support for 7i94, 7i95, 7i97
* inmux: add support for inputs from multiplexor chips
* inm: add support for MPGs
* pwmgen: Add support for "offset mode"
* xymod: Add support for galvanometer hardware interface
This is the master version fix.
Qtdragon used an attribute from IStat that was never updated.
Also Qtdragon set a bunch of max settings that are already set in the
jog slider widget code.
keybinding failed in a weird way because I used 'writer' rather then
'writer.main'
Writer is a little different library as it loads as a standalone mainWindow
We now try to load the HTML setup page automatically if it's found
This needs more work for better intergration.
Probably a button for tool table copying,
maybe a builtiin widget rather then a separate window.
It's a start
Consistency for both teleop and joint mode jogging
as partially implemented by prior commits:
Nov 2014 50b1fbe13 jogging: ignore feedoverride
Oct 2020 4a6877449 control.c jogs inhibition if feedhold
All feed overriding commands:
nml and hal pins: motion.feed-hold
motion.feed-inhibit
halui.feed-override.*
should be ignored for both teleop-mode and joint-mode jogs
for both starting a jog and for in-progress jogs
2014 discussion:
https://www.mail-archive.com/emc-developers@lists.sourceforge.net/msg13998.html
qtvcp ignored the path argument oother then the basepath.
It would use this to check 'usual' locations.
This didn't allow directly specifying the path to a panel
mills don't support toolwear so don't do the conversions
fix the showing of negative numbers loaded from the tool file;
the check for close-to-zero didn't account for negative numbers
The doublespinbox that pops up for entry didn't allow negative numbers
Also added a spinbox for tool numbers so one can't enter negative or decimal numbers.
Commit 61ebd8221e increased the max number of cycles from 10 to 16,
but didn't update an associated magic number from 10 to 16.
Changed this magic number from 10 to MAX_CYCLE so that the number of phases in a user step type is counted correctly..
1) vismach: use tool diam
2) pyvcp panel: joints and plotclear
3) [DISPLAY]GEOMETRY: order fix
4) [DISPLAY]INCREMENTS: use mm
5) [DISPLAY]OPEN_FILE: demo example file
The "tune" command wasn't actually applying the desired locks
because it was locking a bitwise 'and' of values 1 & 2, which
gives a value of 0. This should have been a bitwise or of the
values.
Also changed the associated 'unlock' functions so that the "tune"
command unlocks the same locks as it locked.
Created a new #define to represent the locks to locks for the "tune"
command to help make it clearer that that the lock and unlock
functions should alter the same locks.
Replaced the component type magic numbers with an enumerated type.
The new types have the same values as before.
i.e.
0 == user
1 == realtime
2 == something else (not sure where this value is ever assigned)
There should be no functional change.
1) 5axiskins: use IN pin for pivot_len (not IO)
2) 5axisgui: provide OUT pin for gui simulated pivot length
3) configs/sim/5axis/bridgemill sim config:
5axis.tbl: use metric tool length values to agree with 5axis.ini
5axisgui.hal (new)
a) compute pivot length needed for 5axiskins with loaded tool
b) consolidate postgui hal statements
5axis.ini:
a) use added 5axisgui.hal file
b) add omitted [TRAJ]MAX_ANGULAR_VELOCITY
c) add tooledit options 'z diam'
d) update j5/w, j2,z limits
README: demo example
I've needed to test something when i couldn;t see the screen.
Now I can connect a HAL pin to this test LED and have it speak
the (editable) label and state.
Inverting the step pin in the gui actually inverted the direction pin.
Looks like do to python lists not having consistant ordering.
Thank Peter for heads up.
1) print command lines settings
usage example: 5axisgui pivot_len=300
2) parameterize pivot_len incorporating za,zb box heights
3) remove unused tool_radius var
4) pivot_len var now represents correctly the effective pivot_len
with default value of 250 and is unchanged for compatibility
with hal pin default of 5axiskins.c
(no functional changes intended by this commit)
It seems on HAL float input pins that got their value
from QPin's QTSignal, would get an integer number rather then the float.
I could change that by changing the order of the overloaded pyqtSignal
definition but then that may have just made eveything a float...
Now we send a PyQt_PyObject that is not supposed to be converted
internally. It seems to work.
For reasons I couldn't quite figure out, the original design had
so many layers that stylesheets changes on the main window
would not change the SoftInputWidget's style.
probably a parenting problem (or based on QObject vrs QWidget).
Simplified now and only two widgets.
Seems to work now.
(fix buildbot builds for rtai)
roundf() (float args) is not available for rtai
but
round() (double args) is available
notes:
1) hal 'float' pins are actually doubles:
ref hal.h:
typedef double real_t __attribute__((aligned(8)));
...
#define hal_float_t volatile real_t
2) mixed usage of 'variable double', 'variable float'
declarations within file may be unecessarily complicated
(but are handled by implicit casts)
The A axis often doesn't have home switches.
If not every axes have home switches then the 'all home' button
in AXIS does not show.
Now 'All home' button will work if the A axis homes immediately in position.
It's a pain to make a panel for a quick HAL test.
this supplies 4 each of LEDs, pushbuttons, checkbuttons,
dials with scaling spinboxes.
Also launch buttons for halmeter and halscope.
I should make a way to connect pins and send HAL commands...
This widget is a double spinbox with HAL output pins.
it can output pyqt signals for other widgets (like QLabel).
it can be fed an input signal that will be multiplied with the output.
As reported in https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
"As of the 4.9 kernel, all Pis report BCM2835, even those with BCM2836, BCM2837 and BCM2711 processors. You should not use this string to detect the processor. Decode the revision code using the information below, or cat /sys/firmware/devicetree/base/model"
So the get_cpuinfo_revision() function is no longer correct and above all does not work with RPi4.
Therefore, I think it is more appropriate to completely replace this function, which is now obsolete, with a simpler one that can also adapt to future models of the Raspberry.
Also it's possible to delete cpuinfo.h
In some cases after homing, when clearing the plot the tool will end
up at the machine origin rather then the curent user origin.
It seems to be a timing/race issue. Calling the logger.clear() directly helps alot.
In python3 super class seems to work differently then python2.
to be able to support both in qtvcp's qt5_graphics we need this change.
I've tested AXIS in py2 and py3 seems not to hurt it.
built with halcompile for commonality with other components:
1) support count= or names= specifiers
2) provide compatiblity for twopass processing
3) provide 'delay' pins per instance instead of by group
Notes:
debounce.c uses cfg=... and was created before the availability
of the halcompile utility (formerly named 'comp')
Ref:
aaf422b8d 2004-06-13 added 'debounce' HAL module to debounce
mechanical switch signals
d29cb53fe 2006-09-06 add "comp", a program for
writing HAL boilerplate
We do not comply with Debian Standards Version 4.0.0. Specifically:
9.3.3.2
Packages must not call "/etc/init.d" scripts directly even as a
fallback, and instead must always use "invoke-rc.d" (which is
essential and shouldn't require any conditional).
But this is exactly how LinuxCNC runs the realtime start scripts.
Signed-off-by: andypugh <andy@bodgesoc.org>
Reinstate them.
Also switch to using Xetex in place of Latex as the dblatex backend so that
Chinese PDFs can be made.
Signed-off-by: andypugh <andy@bodgesoc.org>
Remove duplicated entries.
Change tab with spaces to get indentation right.
Remove Debian-Testing as a distribution, this distribution dosen't work,
because of Python2 removal in Debian.
Also set the Spanish online index to point to the Spanish manpages where
they exist. Not-yet-translated docs are marked with an asterix
Signed-off-by: andypugh <andy@bodgesoc.org>
I had removed M6 for testing with a remapped lathe screen.
I forgot to put the M6 back for regular lathe configs.
I now have fixed the remap screen t0 ignore M6.
So now even with the added M6 both type of configs will work
I added a lathe tool change with wear remap into standard glue.
This excecises it.
Change the tool table name to something less silly.
comment the remap file so someone might figure out where the actual code is.
This code allows a separate program to call functions in the qt window object.
and optionally allows the screen to publish messages to separate programs.
It uses zmq for the socket connection.
It uses json for object conversion
It hasn't actually been translated, but it needs to exist to allow
some links to work. Also carry-over some Plasmac image changes.
Signed-off-by: andypugh <andy@bodgesoc.org>
The Spanish translation has translations for the sample config readme files
but we probably don't want to replace the english ones. This commit keeps
both
Signed-off-by: andypugh <andy@bodgesoc.org>
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
translated to es
AgentWD40 informed about a config like
XYYZZ
would lead to an error and proposed a code, I implemented that code with only one smal change
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.0.9
- added settings to set min, default and angular velocities
for angular jogging. No keyboard shortcuts for jogging angular
axis, all prepared for doing so, but no idea which keys to use
Signed-off-by: Norbert Schechner <nieson@web.de>
- The function to arange jogging buttons relies on the dict
that hold available axes to be in the same order as defined.
in python 2.7 that is not the default behaivor of dicts.
So the function (with a XYZAB machine for example) gave two
sets of row/coloumn numbers for four buttons, leading to two
buttons not being available.
Thanks to Chris Morley for fixing this
Signed-off-by: Norbert Schechner <nieson@web.de>
The function to arange jogging buttons relies on the dict
that hold available axes to be in the same order as defined.
in python 2.7 that is not the default behaivor of dicts.
So the function (with a XYZAB machine for example) gave two
sets of row/coloumn numbers for four buttons, leading to two
buttons not being available.
add setup page, gcode descriptiom page
reramp how mode buttons display tabs
fix some image resource files
class patch the filemanager so it doesn't accept single click loading
and auto loads the HTML file if present.
If you load a file and there is no setup file, let the user know that
in the setup page.
camview would display 'no image' if it couldn't display anything.
Since it knows the problem if the library is missing, might as well
mention that to users. qtvcp does print this to the terminal but not all users
know to look here.
We used to have to call hal_init() with a ton of variables.
Now they are embedded into an instance of _HalWidgetBase, so you just have
to call hal_init()
You can still use the variable HAL_NAME= to set the HAL pin name or
else it uses the pyqt objectName
update all the qtvcp code to use this new way.
as per Peter Wallace:
This needs to be scaled correctly for metric.
Bounding the PID to 0.0005 mm doesn't give the PID enough headroom to adjust for
timebase differences between LinuxCNC and the stepgen hardware.
The point of this setting is to limit bogus stepgen velocity corrections caused by position
feedback sample time jitter. That is, say you have 200 usec of jitter on your servo thread and a
velocity of 10 IPS, a 200 usec late position sample would be off by 0.002", This would
cause the PID to command a bogus 20% velocity change with the standard PID tuning,
by bounding the maximum PID error to 0.0005" we get a 5% change instead.
Note that this is mostly obsolete if the DPLL is used as this reduces the sample time
jitter to about 250 ns.
With reqular flashing option on, the LED will only flash if state is true.
It should have been possible to directly turn flashing on/off with a function call,
regardless of state.
When flashing was turned off sometimes the LED would not be displaying the current state.
if there is a BASENAME.qrc file, it will (if required) compile it into a
resources.py file and then import it into qtvcp
it check to see if the qrc file is newer then the resources.py file.
If there is just a resources.py file, it will use it.
if there is neither, it will do lothing extra.
Not sure why this was changed but users can't load panelui anymore.
Asked on the maillist never got answer.
We will see what happens - haven't tested on python3
This works around a problem where imagemagick declines to convert
files to pdf; I don't know why a gif uses this conversion path but
a png doesn't.
Note that this change confuses dependency analysis. If you built docs
before this change, you'll get an error that the (no longer referenced)
gif files don't exist. "make clean" or "git clean" can correct the
problem.
Silent failures were occurring during the doc build because the
program `image-wildcard` could not be executed:
http://buildbot.linuxcnc.org/buildbot/builders/4042.deb-buster-rtpreempt-rpi4/builds/163/steps/shell_3/logs/stdio
Traceback (most recent call last):
File "../docs/src/image-wildcard", line 6, in <module>
from six.moves import map
ImportError: No module named six.moves
Rather than depending on six (which we _could_ do), just remove the
need for it.
While we're here, unconditionally use `relpath` just so we know
whether it works.
Testing performed: built html docs locally. Inspected make output
and viewed axis.html; images were present.
Note: There is no way I could find to make failures in asciidoc
`sys:` to cause asciidoc to indicate build failure back to make.
The only way to see such problems is apparently to read through
all the make output, or inspect the generated documentation files.
Note 2: This is likely to fail on buster-ish systems when imagemagic
is configured to block all reading and writing of PDF files, which was
recently done due to a known security problem in ghotscript:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964090
update qtlathe to a more general lathe screen.
Surely needs more refinement.
sometime I'll get back to the HASS style screen that this was based from.
Thank you forum user hottabich for your work on this.
Both hm2_queue_read() and hm2_finish_read() used
the same error message:
"error finishing read! iter=%u\n".
Use a different error message for each of the function
to easily deduce from which location the error
commes from.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes issue #68 by preventing any blending between position-synced
motions (G33) and other motion modes (velocity-sync and normal):
Current behavior:
Mode Transitions | blending allowed
--------------------+-----------------
normal -> position | no
position -> normal | no
all others | yes
Note that this is more conservative than LinuxCNC 2.6:
Mode Transitions | blending allowed
--------------------+-----------------
normal -> position | no
position -> normal | *yes*
all others | yes
This patch ensures that the start and end of a sequence of G33 motions
will be exact-stop.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
In velocity mode, the target velocity is specified indirectly by the
spindle speed and feed-per-rev setting. The ideal solution is to know
what the maximum spindle speed could be (i.e. set point + override
limit), and multiply that by feed/rev. As a quick fix, however, we just
assume the worst case (i.e. absolute maximum velocity).
Related cleanup and fixes:
1) Purged some obsolete uses of TC_STRUCT "target_vel" field, since it's no
longer used during arc-blending optimization.
2) Refactored maximum target velocity computation so that the function is
usable in blendmath. Previously, this calculation was manually repeated
in the blend math code, and had diverged slightly from the TP version.
Now, the actual target velocity is calculated at planning time through
tpGetMaxTargetVel, or during execution by tpGetRealTargetVel. There is
more cleanup to do, but now enough infrastructure is in place for
blending to work during both velocity and position sync modes.
This refactor also fixed a minor bug in tangent calculation, so that the user's
current maximum velocity setting does not influence the planned velocity
for tangent segments.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Reset emcmotStatus->spindleSync on abort / empty queue
Otherwise successive spindle synched moves do not wait for index, so there
is no reset and a rapid move to catch up ensues.
Signed-off-by: andy pugh <andy@bodgesoc.org>
These tests refer to files outside the `tests` directory. To make the
tests function disembodied from the source tree and against a system
install, add rules to the build to copy the needed files in place, and
adjust the tests to work properly.
Also, the `personalities_mod` test did something funky: it overwrote
standard comps with modified versions, then replaced those when the
test finished. This patch undoes that, and instead renames the comps.
Tests running against system install need `linuxcnc-python` in
`$PATH`.
The system-installed `stepconf` script uses it, too, so this
particular commit is a fix rather than a hack.
Some tests make assumptions about header and library locations; these
are correct for an RIP build but not for a system build.
This patch removes those assumptions and supplies the locations as
environment variables directly from the `runtests` script.
The `halcompile` script installs user comps in `/usr/bin` by default.
For testing temporary test user comps against a system install, teach
`halcompile` to put them in the test directory and run the test from
there.
This makes touch-off expressions work when the internal scale is not
1.0, ie when Axis is in metric view mode. Before this commit, the scale
would be applied only to the last token in the expression.
This fixes#867, and fixes a similar unreported bug for tool-length
touch-off.
libnml/inifile/inifile.cc: In member function ‘const char* IniFile::Find(const char*, const char*, int, int*)’:
libnml/inifile/inifile.cc:304:26: warning: ‘elinenext’ may be used uninitialized in this function [-Wmaybe-uninitialized]
elinenext = elinenext + newLinePos;
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Interp should only connect to HAL through public APIs. This patch
introduces pin, signal and param getter functions to the public HAL
API and replaces interp calls to private functions with these.
The `cc-option` macro took two args, but passing only one arg causes
the following warning:
Makefile:1086: warning: undefined variable '2'
There's apparently a single instance where `cc-option` is used in the
`Makefile`, and it passes only one arg.
This patch silences the warning by removing the second arg from the
macro.
dpkg-buildpackage: warning: debian/changelog(l8): found start of entry where expected more change data or trailer
LINE: linuxcnc (1:2.7.14) unstable; urgency=medium
etc.
...unless V=1. This prints out a 5600 character line when
regenerating `linuxcnc.pot`, which happens even after minor changes to
sources such as `emctaskmain.cc`.
This does almost the same as the `stop-button-crazy-move` test, in
that it catches unflushed segments from readahead mistakenly flushed
to the interp queue after abort, triggered by G-code blocks run as
part of the abort process.
Instead of testing a state tag restore command, though, it tests
an `.ini` file `ON_ABORT_COMMAND` block.
LCNC [issue #865][1] found a race condition where an abort during
readahead resulted in unintended motion. The `emcTaskAbort()`
function appears to be responsible for aborting interp, since it runs
`emcTaskPlanClose()`, but that by itself doesn't flush readahead
segments.
When `emcTaskStateRestore()` restored state from the `3D_Chips.ngc`
test program, executing `G64P.1`, the resulting `SET_MOTION_CONTROL_MODE()`
canon call ran `flush_segments()`, causing the unwanted motion to be
queued.
This patch fixes the problem by calling `emcTaskPlanReset()` alongside
`emcTaskPlanClose()` in `emcTaskAbort()`. For good measure, it also
adds the call in a couple of other places alongside
`emcTaskPlanClose()` where the purpose is obviously to abort and clear
out interp and all queue.
[1]: https://github.com/LinuxCNC/linuxcnc/issues/865
Image has been reconstructed from pieces found it:
http://www.fennetic.net/art/originals/chips2.svg
then installed as:
/usr/share/icons/hicolor/scalable/apps/linuxcncicon.svg
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
This reverts commit d4aea4d347.
Build errors from the package build:
```
for F in debian/extras/usr/share/applications/linuxcnc-latency.desktop debian/extras/usr/share/applications/linuxcnc-gcoderef.desktop debian/extras/usr/share/applications/linuxcnc.desktop debian/extras/usr/share/applications/linuxcnc-gettingstarted.desktop debian/extras/usr/share/applications/linuxcnc-halmanual-fr.desktop debian/extras/usr/share/applications/linuxcnc-integratormanual-fr.desktop debian/extras/usr/share/applications/linuxcnc-manualpages.desktop debian/extras/usr/share/applications/linuxcnc-usermanual-fr.desktop debian/extras/usr/share/applications/linuxcnc-documentation.desktop debian/extras/usr/share/applications/linuxcnc-gettingstarted-fr.desktop debian/extras/usr/share/applications/linuxcnc-integratorinfo.desktop debian/extras/usr/share/applications/linuxcnc-pncconf.desktop debian/extras/usr/share/applications/linuxcnc-gcoderef-vi.desktop debian/extras/usr/share/applications/linuxcnc-gcoderef-fr.desktop debian/extras/usr/share/applications/linuxcnc-stepconf.desktop; do \
desktop-file-validate $F; \
done
debian/extras/usr/share/applications/linuxcnc-latency.desktop: error: value "cnc;linuxcnc;cncprog;benchmark" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-gcoderef.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc.desktop: error: value "cnc;linuxcnc;cncprog" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-gettingstarted.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-halmanual-fr.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-integratormanual-fr.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-manualpages.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-usermanual-fr.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-documentation.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-gettingstarted-fr.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-integratorinfo.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-pncconf.desktop: error: value "cnc;linuxcnc;cncprog;cncconfig" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-gcoderef-vi.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-gcoderef-fr.desktop: error: value "cnc;linuxcnc;cncdoc" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
debian/extras/usr/share/applications/linuxcnc-stepconf.desktop: error: value "cnc;linuxcnc;cncprog;cncconfig" for locale string list key "Keywords" in group "Desktop Entry" does not have a semicolon (';') as trailing character
make: *** [install] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
```
Fixes various issues with desktop files:
$ desktop-file-validate *.desktop
linuxcnc.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-documentation.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-gcoderef.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-gcoderef-fr.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-gcoderef-vi.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-gettingstarted.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-gettingstarted-fr.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-halmanual-fr.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-integratorinfo.desktop: warning: value "Integrator Information" for key "Comment" in group "Desktop Entry" looks redundant with value "Integrator Information" of key "Name"
linuxcnc-integratorinfo.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-integratormanual-fr.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-latency.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-manualpages.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-pncconf.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-stepconf.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
linuxcnc-usermanual-fr.desktop: hint: value "X-CNC;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
$ echo $?
1
Switch to use xdg-open(1) for opening URL in the user's preferred application.
[1]https://portland.freedesktop.org/doc/xdg-open.html
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
now one can specify a minimuim spindle speed and an increment to increase
or decrease.
Ultimately this should be motion's responsibility but it's late in the 2.8 game.
Update sample configs
Removes .encode() as it generates bytes() not str() which
generates errors during parsing of configuration files.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Because pin directions aren't actually finalized until the first
write, this error doesn't occur. However, other invalid pin errors
occur, so just accept any of them
one can select run from status or run from slot.
Status gets it's line number from STATUS messages ie from gcode_display.
Slot gets it's line number from a designer slot. The slot can be connected
to a lineedit for entering a line number.
If there are more then 5 errors qtvcp automatically quits.
This is so endless loop errors will return control back to the user.
But we didn't give the clue to the error.
When running a program, the `programStartLine` is normally set to 0.
When the "run from line" option is set, then `programStartLine` is set
to something greater than zero. Logic in `readahead_reading()` checks
if the currently-read line number is less or equal to than the "run
from" line, and if so, clears the interp queue before queueing up the
current line.
For unknown reasons dating back to 2005 (see c06400d4), when stepping,
the "run from" line is set to 1. Normally, clearing the queue at this
point doesn't cause a problem, since nothing is queued up. But in the
special case of a loop, any queued commands from previous iterations
are thrown away, and only the final iteration of the loop will
execute.
It seems this bug was only recently discovered by @andypugh after all
this time because of its obsucer, corner-case nature.
Fixes (non-fatal) error:
gcc: fatal error: no input files
produced by compilers which does not support -dumpfullversion
(includes old gcc and all clang).
It also uses $(CC) instead of hardcoded 'gcc' value.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
This fixes linking against libreadline v5 in a non standard directory.
On Fedora multiple readline libraries can be installed in parallel.
Old GPL-2 compatible libreadline v5 has its own header and library in the
following directories:
$ rpm -ql compat-readline5-devel | grep -e 'readline\.h' -e 'libreadline\.so'
/usr/include/readline5/readline/readline.h
/usr/lib64/readline5/libreadline.so
As per 'configure --help' the following flags (excerpt) should be supported:
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
Despite passing above directories via 'CPPFLAGS' and 'LDFLAGS' to 'configure' the linking
process fails as follows:
gcc -Wl,-rpath-link,../lib -ltirpc -o ../bin/halcmd objects/hal/utils/halcmd.o
objects/hal/utils/halcmd_commands.o objects/hal/utils/halcmd_main.o
objects/hal/utils/halcmd_completion.o ../lib/liblinuxcncini.so.0
../lib/liblinuxcnchal.so.0 -lreadline
/usr/bin/ld: cannot find -lreadline
This was due to not honoring flags passed to configure.
This also fixes the error of passing C specific compielr option to C++ compiler:
cc1plus: warning: '-Werror=' argument '-Werror=implicit-function-declaration'
is not valid for C++
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following exceptions:
For python3:
Traceback (most recent call last):
File "/home/sw/projects/machinekit/linuxcnc/lib/python/stepconf/pages.py", line 91, in on_button_fwd_clicked
self['%s_finish'%name]()
File " fhome/sw/projects/machinekit/linuxcnc/lib/python/stepconf/pages.py", line 881, in finished_finish
self.a.buid_config()
File "/home/sw/projects/machinekit/linuxcnc/bin/stepconf”, line 795, in buid_config
self.d.save(base)
File "/home/sw/projects/machinekit/linuxcnc/bin/stepcont", line 680, in save
d.writexml(open((filename, "wb"), addindent=" ", newl="\n")
File "/usr/lib/python3.7/xml/dom/minidom.py", line 1791, in writexml
writer.write('<?xml version="1.0" ?>'+newl)
TypeError: a bytes-like objectis required, not'str’
Above generates empty ~/.stepconf-preferences which in turns triggers the next exception
(applicable for both python2/3):
Traceback (most recent call last):
File "/home/sw/projects/machinekit/linuxcnc/bin/stepconf", line 1576, in <module>
app = StepconfApp(False)
File "/home/sw/projects/machinekit/linuxcnc/bin/stepconf", line 770, in __init__
self.d.load_preferences()
File "/home/sw/projects/machinekit/linuxcnc/bin/stepconf", line 515, in load_preferences
d = xml.dom.minidom.parse(open(filename, "r"))
File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 928, in parse
result = builder.parseFile(file)
File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 211, in parseFile
parser.Parse("", True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
For the last one the warning-dialog is now diplayed depicting the problem to the user.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
In big programs it's nice to know it's still loading.
now overlay will hide the overlay instead of the dialog.
This is because dialog actually hides the overlay way before the program
is loaded, but because of python single thread it actually hides later.
But when we force an redraw in verlay to see the prgressbar change, it
changes this process.
This reverts commit 94fa1b2338.
It caused builds on older architectures with RTAI to fail:
make -f /usr/src/linux-headers-3.4-9-common-rtai/scripts/Makefile.build obj=/home/buildslave/emc2-buildbot/wheezy-rtai-i386/rip-wheezy-rtai-i386/build/src
make[1]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
/usr/src/linux-headers-3.4-9-common-rtai/scripts/Makefile.build:49: *** CFLAGS was changed in "/home/buildslave/emc2-buildbot/wheezy-rtai-i386/rip-wheezy-rtai-i386/build/src/Makefile". Fix it to use ccflags-y. Stop.
make[3]: *** [_module_/home/buildslave/emc2-buildbot/wheezy-rtai-i386/rip-wheezy-rtai-i386/build/src] Error 2
load() will now again load the current selected file.
load(filename) will load the specified file which can be found
with getCurrentSelected()
load can be class patched to do something else if nessasary.
Adds a possibility to owerwrite 'checklink' by using:
$ ac_cv_path_CHECKLINK=<path-to-executable> ./configure
Note: Specifying '/usr/bin/true' as follows:
$ ac_cv_path_CHECKLINK=/usr/bin/true ./configure
can be used to build the html documentation on machines
(usually builders) which by design disables network access
during a build process.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
This fixes linking against libreadline v5 in a non standard directory.
On Fedora multiple readline libraries can be installed in parallel.
Old GPL-2 compatible libreadline v5 has its own header and library in the
following directories:
$ rpm -ql compat-readline5-devel | grep -e 'readline\.h' -e 'libreadline\.so'
/usr/include/readline5/readline/readline.h
/usr/lib64/readline5/libreadline.so
As per 'configure --help' the following flags (excerpt) should be supported:
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
Despite passing above directories via 'CPPFLAGS' and 'LDFLAGS' to 'configure' the linking
process fails as follows:
gcc -Wl,-rpath-link,../lib -ltirpc -o ../bin/halcmd objects/hal/utils/halcmd.o
objects/hal/utils/halcmd_commands.o objects/hal/utils/halcmd_main.o
objects/hal/utils/halcmd_completion.o ../lib/liblinuxcncini.so.0
../lib/liblinuxcnchal.so.0 -lreadline
/usr/bin/ld: cannot find -lreadline
This was due to not honoring flags passed to configure.
This also fixes the error of passing C specific compielr option to C++ compiler:
cc1plus: warning: '-Werror=' argument '-Werror=implicit-function-declaration'
is not valid for C++
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes error when micro version part contains non-digits characters.
Specifically for:
$ dblatex --version
dblatex version 0.3.11py3
which is available on Fedora the configure script produces:
checking dblatex version... ./configure: line 7138: \
test: 11py3: integer expression expected
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following warning when compiling for python3.8:
linuxcnc/lib/python/pyngcgui.py:1424: SyntaxWarning: "is" with a literal. Did you mean "=="?
if comment is '':
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
The guard macro for python3 behavior was wrong, and so the code inside
was untested.
Once the bug was fixed, the expected output still didn't match, because
2/3 format floats differently with .format(). Ugh. Instead, compare
the values for exact numeric equality. Update expected output.
Fixes the following error:
/usr/bin/env: ‘python’: No such file or directory
/usr/bin/xgettext: no input file given
Try '/usr/bin/xgettext --help' for more information.
make: *** [po/Submakefile:59: po/linuxcnc.pot] Error 1
make: *** Waiting for unfinished jobs....
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following warnings:
Checking "text/x-python" (by MIME type) files for python2 and python3 compatibility...
../tests/hard-limits/test-ui.py:82: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while (all_homed is not 3) and (time.time() - start_time < 5):
../tests/hard-limits/test-ui.py:87: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if all_homed is not 3:
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following linking error:
/usr/bin/ld: objects/hal/classicladder/files_project.o:
/home/sw/projects/rpmbuild/BUILD/linuxcnc-bb2a4cc21a7fed9574059d46eb4507c40ba3bf55 \
/src/hal/classicladder/files_project.c:163: multiple definition of `FileName'; \
objects/hal/classicladder/files.o:/home/sw/projects/rpmbuild/BUILD/ \
linuxcnc-bb2a4cc21a7fed9574059d46eb4507c40ba3bf55/src/hal/classicladder/files.c:1303: \
first defined here
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
These are non-trivial C++ objects. When `do_task_new` was introduced
in 2016, this memset() should have been removed, but it was not. The
task type is responsible for fully initializing all fields in the task
structure to valid values.
It is designed to be used for checking compatibility of python
scripts (currently only from the 'tests' subdirectory) with
both python2 and python3 interpreters.
Usage:
$ make pycheck
Successfull output:
$ make pycheck
Reading 200/200 dependency files
Done reading dependencies
Reading 212/212 realtime dependency files
Done reading realtime dependencies
Checking *.py files for python2 and python3 compatibility...
Checking "text/x-python" (by MIME type) files for python2 and python3 compatibility...
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Sometimes people want to do something custom with the filename, rather then just load
the program. Now they can class patch the function to call a function in the handler file.
We may make a better change for this in the future, but for now
we don't guarantee any particular length of time for the changed
tool to become visible to UIs, and we're actively hitting failures
in this test on buildbot VMs and on rpis, apparently since the
tool table was enlarged.
Fixes:
File "motion/g0/checkresult", line 80
print "sample 0: X starts at %.6f, not at 0.000000" % samples[0][1]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("sample 0: X starts at %.6f, not at 0.000000" % samples[0][1])?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
The assumption that joints map 1:1 to coordinates meant that Touchy did not
properly display the homing state of (for example) an XZ lathe.
Nor was it possible to individually home / unhome the Z axis.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Reset emcmotStatus->spindleSync on abort / empty queue
Otherwise successive spindle synched moves do not wait for index, so there
is no reset and a rapid move to catch up ensues.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Fixes:
File "./test-ui.py", line 55
print "running gcode:", gcode
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("running gcode:", gcode)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./test-ui.py", line 22
print "acceleration:", status.acceleration
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("acceleration:", status.acceleration)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./test-ui.py", line 53
print "Current coordinate system is G%d, not G55" % \
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Current coordinate system is G%d, not G55" % \)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
print "nothing from polling error channel"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("nothing from polling error channel")?
Sorry: TabError: inconsistent use of tabs and spaces in indentation (test-ui.py, line 64)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./test-ui.py", line 57
print "nothing from polling error channel"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("nothing from polling error channel")?
Sorry: TabError: inconsistent use of tabs and spaces in indentation (test-ui.py, line 64)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./test-ui.py", line 57
print "nothing from polling error channel"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("nothing from polling error channel")?
Sorry: TabError: inconsistent use of tabs and spaces in indentation (test-ui.py, line 64)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./remap/sequencing/permute.py", line 41
print perm
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(perm)?
File "./remap/introspect/oword.py", line 37
print "debug: ", self.debugmask,"logging:",self.loggingLevel
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("debug: ", self.debugmask,"logging:",self.loggingLevel)?
File "./remap/oword-pycall/oword.py", line 37
print "multiply: number of arguments=", len(args)
^
SyntaxError: invalid syntax
File "./oremap/introspec/tword.py", line 41
print("args=(", end=' ')
^
SyntaxError: invalid syntax
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "mdi-while-queuebuster-waitflag/remap.py", line 13
print "self.input_flag pre = %s" % self.input_flag
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("self.input_flag pre = %s" % self.input_flag)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./trajectory-planner/circular-arcs/run_all_tests.py", line 51
print "In folder {0}, found {1} files:".format(testpath,len(files))
^
SyntaxError: invalid syntax
File "./trajectory-planner/circular-arcs/run_all_tests.py", line 51
print "In folder {0}, found {1} files:".format(testpath,len(files))
^
SyntaxError: invalid syntax
File "./trajectory-planner/circular-arcs/machine_setup.py", line 39
print "No G code specified, setup complete"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("No G code specified, setup complete")?
File "./trajectory-planner/circular-arcs/linuxcnc_control.py", line 125
print "interrupted by keyboard in c.wait_complete(self.timeout)"
^
SyntaxError: invalid syntax
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./interp/python-self/subs.py", line 24
print "__init__: self not is this"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("__init__: self not is this")?
File "./interp/python-self/oword.py", line 25
print "param1 was retained, value = ", self.param1
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("param1 was retained, value = ", self.param1)?
Sorry: TabError: inconsistent use of tabs and spaces in indentation (oword.py, line 31)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Configure's check for C++11 support leaves post-C++11 features enabled
if they are by default. Making this change should help guide developers
to avoid language features that are not in our oldest compilers.
I was reading the plasma primer and spotted a few typos and such.
Note that I have had no luck with changing the size of the first two images. I left my edits in as markers, but they don't work.
Fixes the following errors:
File "test-ui.py", line 19
print "%.3f: %s" % (delta_t, msg)
^
SyntaxError: invalid syntax
File "test-ui.py", line 19
print()"%.3f: %s" % (delta_t, msg))
^
SyntaxError: invalid syntax
File "test-ui.py", line 70
print "halui reports mode", pin_name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("halui reports mode", pin_name)?
File "test-ui.py", line 73
print "timeout waiting for halui to report mode", pin_name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("timeout waiting for halui to report mode", pin_name)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following errors:
File "test", line 6
print("#", t, file=sys.stderr)
^
SyntaxError: invalid syntax
File "test", line 6
print("# {}".format(t), file=sys.stderr)
^
SyntaxError: invalid syntax
Sorry: TabError: inconsistent use of tabs and spaces in indentation (test, line 16)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes:
File "./test-ui.py", line 3, in <module>
import linuxcnc
ImportError: /home/sw/projects/machinekit/linuxcnc/lib/python/linuxcnc.so: undefined symbol: PyString_FromString
link (updating variable file): No such file or directory
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following errors:
File "test-ui.py", line 22
print "%.3f: %s" % (delta_t, msg)
^
SyntaxError: invalid syntax
File "test-ui.py", line 285
print "%s starting at %.3f" % (name0, start_position0)
^
SyntaxError: invalid syntax
File "test-ui.py", line 294
print "jogging %s positive using the private per-joint jog pins" % name0
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("jogging %s positive using the private per-joint jog pins" % name0)?
File "test-ui.py", line 302
print "%s did not start jogging" % name0
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s did not start jogging" % name0)?
File "test-ui.py", line 310
print "jogging selected joint (%s) negative" % (name1)
^
SyntaxError: invalid syntax
File "test-ui.py", line 319
print "%s did not start jogging" % name1
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s did not start jogging" % name1)?
File "test-ui.py", line 349
print "%s stopped jogging" % name0
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s stopped jogging" % name0)?
File "test-ui.py", line 366
print "stopping jog"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("stopping jog")?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following error:
File "test-ui.py", line 70
print "position:", s.position
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("position:", s.position)?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following error in case where the libtirpc is used
as an RPC implementation provider:
+ g++ -std=c++0x -DULAPI -I/home/sw/projects/machinekit/linuxcnc-rip/include -E -x c++ /home/sw/projects/machinekit/linuxcnc-rip/include/cms_xup.hh
/home/sw/projects/machinekit/linuxcnc-rip/include/cms_xup.hh:19:10: fatal error: rpc/rpc.h: No such file or directory
19 | #include <rpc/rpc.h> /* struct XDR */
| ^~~~~~~~~~~
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes error:
grep: /etc/apt/sources.list.d/*: No such file or directory
which happens when you run:
$sudo scripts/travis-install-build-deps.sh
in an official ubuntu:16.04 docker image.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes various python errors e.g.:
File "<stdin>", line 14
print "set", p, v, h[p]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("set", p, v, h[p])?
Fixes python code to be python2 and python3 compatible.
Extract the code to a separate file to be able to check the python
syntax easily. Verified with both:
$ python2 -m py_compile test.py
$ python3 -m py_compile test.py
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Fixes the following errors:
File "./test-ui.py", line 69
print "feed rate:", s.settings[1]
^
SyntaxError: Missing parentheses in call to 'print'.
Did you mean print("feed rate:", s.settings[1])?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Adds a missing #ifdef guard to avoid a clash
with strsep() from <string.h>.
Fixes the following error:
Compiling rtapi/test_rtapi_vsnprintf.c
from rtapi/rtapi_string.h:41,
from rtapi/vsnprintf.h:41,
from rtapi/test_rtapi_vsnprintf.c:19:
rtapi/vsnprintf.h:485:7: error: expected identifier or ‘(’ before ‘__extension__’
char *strsep(char **s, const char *ct)
^
rtapi/vsnprintf.h:485:7: error: expected identifier or ‘(’ before ‘)’ token
char *strsep(char **s, const char *ct)
^
make: *** [objects/rtapi/test_rtapi_vsnprintf.o] Error 1
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
added optional dro with reset pin called clear_pin also key binding rest
added optional text
added optional scale_pin
added color tags for active and background
Halcmd commands 'list' and 'gets' conflict with normal tcl commands.
Improve handling in hal_to_tcl proc:
list: puts to stdout
gets: error (since unexpected in a conventional halfile)
Update tests/twopass*/ to
a) use 'list' not 'show' to preclude possibly variable Owner id
b) list more hal items for completeness
On gcc 9.3 the readline test reports false positive failure:
checking whether readline license is compatible with GPL-2... no
due to the following compilation error:
In file included from /usr/include/readline5/readline/readline.h:36,
from conftest.c:51:
/usr/include/readline5/readline/rltypedefs.h:65:28: error: unknown type name 'FILE'
65 | typedef int rl_getc_func_t PARAMS((FILE *));
| ^~~~~~
In file included from /usr/include/readline5/readline/readline.h:37,
from conftest.c:51:
/usr/include/readline5/readline/rltypedefs.h:1:1:
note: 'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
- Add `SET_NAIVECAM_TOLERANCE` to expected output in `tests/interp/g84/*`
- From post-abort restore G64 settings work in #283
- Update sequence numbers in `tests/motion-logger/startup-gcode-abort`
- State tags restore sequence number
Signed-off-by: John Morris <john@zultron.com>
Following the work of the previous commit, "Restore G61/G61.1/G64
state after abort," this patch addresses additional issues with G64
tolerances:
- Update tolerance settings after changing units with G20/G21
- Save and restore tolerance settings after canned cycles; affected
regression tests are updated
Signed-off-by: John Morris <john@zultron.com>
After abort, restore motion control mode and blend/naive CAM
tolerances to state of last executing motion before the abort. This
depends on Rob Ellenberg's state tags work.
The `state_tag_t` struct keeps integer settings in an array, indexed
by the `StateField` enum. Introducing the `G64 P* Q*` tolerances adds
two more `float` types to the existing two for feed and speed. This
patch packs those all into a new array of floats, indexed by a new
enum, to simplify handling. These new floats are exposed in the
python module `status.settings` attribute, positions 3 and 4.
Restoring this state has two parts. The motion control mode
G61/G61.1/G64 would have been handled by `Interp::gen_g_codes()`, and
the G64 blend/naive CAM tolerances would have been handled by
`Interp::gen_settings()`. However, a switch from G61/G61.1 to G64 and
a simultaneous switch of P/Q tolerance values cannot be done with two
independent functions. Therefore, `gen_g_codes()` has been merged
into `gen_settings()` in order to handle this special case.
To keep the tolerances updated during program execution, they are
added to the `Interp::synch()` function.
To restore the naive CAM tolerance, a new function
`GET_EXTERNAL_MOTION_CONTROL_NAIVECAM_TOLERANCE()` is introduced,
parallel to `GET_EXTERNAL_MOTION_CONTROL_TOLERANCE()` for blend
tolerance.
This patch fixes#177, "Forgetting G64 mode after E-stop," and one of
the remaining issues in #134, "Updating `state-tags-master` branch for
acceptance into LinuxCNC."
Signed-off-by: John Morris <john@zultron.com>
`emcTaskStateRestore()` calls `restore_from_tag()` to generate a G
code block, and executes it. If immediately followed by
`emcTaskAbort()`, any items appended to the interpreter queue will be
cleared before they are ever issued.
Signed-off-by: John Morris <john@zultron.com>
This test runs and aborts a test .ngc program several times with
various blend mode and tolerance settings. At various points at
execution, it compares expected and active settings for blend mode
(using the status buffer) and blend tolerances (using X coordinates
collected by halsampler).
This test replicates Github Issue #177.
Signed-off-by: John Morris <john@zultron.com>
This puts G92.1, G92.2 and G92.3 in group 16 in order to show in Active GCodes
whether G92 is currently applied. The readout only ever shows G92.2 and G92.3,
since G92.1 is a special case of G92.2.
Wheter G92 is applied (aka variable 5210) is added to the state tags, and
restored on abort.
Previously, aborting a program that used G92 offsets would give you unapplied
G92, contrary to expectations.
Signed-off-by: Chris Radek <chris@timeguy.com>
Use one function to write to canon, instead of 3. The original idea was
to have the state tag live longer, possibly as a replacement for the
interpreter's internal state, but this didn't really pan out. Instead,
we create them on demand, so it might as well be a single function call.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Clarify pre-state tags abort bug: after point of abort in program,
switch to G56 and throw in queue buster; this shows that the problem
is one of interp running ahead of motion, not one of incomplete
clean-up by abort functions.
Signed-off-by: John Morris <john@zultron.com>
- State tag debugging `EMC_DEBUG_STATE_TAGS` flag and `logStateTags()`
macro
- `print_state_tag()` prints some state tag contents when debug flag
set
- Add debugging messages to state tags code
Signed-off-by: John Morris <john@zultron.com>
Change licenses to GPLv2+ for the following files, as approved by the
author Rob Ellenberg in LinuxCNC GitHub issue #134:
src/emc/motion/state_tag.h
src/emc/rs274ngc/modal_state.cc
src/emc/rs274ngc/modal_state.hh
[1]: https://github.com/LinuxCNC/linuxcnc/issues/134
Signed-off-by: John Morris <john@zultron.com>
(Original commit log)
State tag restore: fix issue where a queuebuster flag prevented a
vaalid tag from being restored (bitbucket issue #1015)
(cherry picked from commit 1f1011b18a043212e6cdf1153fc57a55b9e2a26f)
Signed-off-by: John Morris <john@zultron.com>
The new fields added to TP that store completed ID and current state tag
should be reset when the TP is cleared.
(cherry picked from commit 70e1b624a28b6ec16c284357cefc63a8473574ec)
Signed-off-by: John Morris <john@zultron.com>
Conflicts:
src/emc/tp/tp.c
The StateTag copy constructor more elgantly copies the state_tag_t internals,
and initializes the bitset based on the packed flags.
(cherry picked from commit cab591735e91b4394203b47a919df1477d1fc749)
Signed-off-by: John Morris <john@zultron.com>
We now explicitly check for AUTO mode before pulling state information
from motion, to prevent user interface stutter during MDI commands.
(cherry picked from commit d81169f5210a8f1d2a3069274a4765aaea6a5393)
Signed-off-by: John Morris <john@zultron.com>
This further prevents odd behavior on abort by preventing M code changes
from triggering M words in the restore command.
(cherry picked from commit 28007aaa77509fe45118959522fd3307539b3b90)
Signed-off-by: John Morris <john@zultron.com>
Conflicts:
src/emc/rs274ngc/interp_convert.cc
`restore_from_tag()` can fail; print failure message so
`emcTaskStateRestore()` breakage isn't so mysterious.
Signed-off-by: John Morris <john@zultron.com>
This also adds additional safeguards to make sure that motion is aborted
before any state restoration, so that it's not possible for any
interpreter restore commands to make it down to motion. While likely
overkill, this will help prevent hard-to-test-for race conditions.
(cherry picked from commit 92ca9e2292dc55e0d0a6e86ad1a2b76c3337a276)
Signed-off-by: John Morris <john@zultron.com>
1) Add error checks to prevent using an empty state tag as a source of stat information
2) Create virtual function for restore_from_tag to eliminate dangerous
pointer cast
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
This reverts commit 10bd7c50e78fcc97d4b0cb0ef339071e2e7d84f6.
[Note from rebaser: Don't trust this commit message without checking
carefully - I think it's not an exact reversion because this commit
changes interp_convert.cc but the original doesn't. -cradek]
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
The state tag changes show the "current" state according to motion.
However, an early abort will cause the displayed modes to suddenly
switch to the actual interpreter state. This could be confusing to a
user, so we call a restore method on abort that pulls the latest state
tag from motion and unpacks it into a usable state.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Since G-Codes are represented internally as 10*N (N=0-99), one of these
codes can fit in a 16 bit int, and save a few bytes. Since the line
number needs to be a 32 bit int, this is broken out as a separate field.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
- Restore deleted `set_line_number()` call for `STRAIGHT_TRAVERSE()`
- Add missing `UPDATE_TAG()` to `interp/compile` test
- `use-rs274.cc` must implement `emc/nml_intf/canon.hh`
- Remove unused function
Signed-off-by: John Morris <john@zultron.com>
This commit implements state tags at all levels. State tags contain a
snapshot of the interpreter state that rides along with a motion
command. This way, we can easily determine what the interpreter state
was at the time the motion was generated. This tag in principle can be
extended arbitrarily, though the size should be kept to a minimum.
Interp: generate state tags before calling a canon command that produces
a motion. Right now this is done by manually creating a tag before it's
needed.
Canon: Keeps a local copy of the state tag, which is updated by a
dedicated canon command. This tag is added to any outgoing motion, and
it's Interp's responsibility to keep it up to date. Ideally, canon
wouldn't have to deal with this at all, and the tag would be an argument
to canon commands (or packed into an appropriate structure).
Task/NML: State tags are included in the NML messages for motion
commands. HOWEVER, "update" methods are NOT implemented, because motion
messages are never actually transmitted via NML when Task / Motion are
on the same machine. In this case, the NML message is just a holding
tank for motion data, which is eventually copied into motion shared
memory.
Motion / TP: The state tag is included as an additional argument, but is
otherwise unused currently. Pretty much all that happens here is that
the tag is copied into the TC_STRUCT, and the currently executing
segment's tag is copied into motion's status output.
Status: If motion is running, it reports a state tag through
EMC_TRAJ_STAT. Task unpacks this into the appropriate active_g/m_codes
in emcStatus, so that UI's see the active state corresponding to the
motion. If motion is not running, then the active state shown is copied
directly from interp, as before.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
The included test case shows the wrong active G-Codes (for example, the
work offset will always show G56, even though this is only active for
the last 3rd of the program).
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
There is a difference between last_file_path and recent_path.
last file path is for preselecting the directory when loading/saving.
This was originally intended but the meaning got confused and
had a diffeent meaning fot the loading dialog then from the file manager widget.
It caused an eror when qtdragon reloaded a program after homing.
Now we separate them properly by using qtaxis' Recent_path_0'.
I regret originally using the word path rather then directory and filepath
So switch to using 'last_loaded_directory' and 'RecentPath_0'
also swicthed to 'last_saved_directory and 'RecentSavedPath'
There is a difference between last_file_path and recent_path.
last file path is for preselecting the directory when loading/saving.
This was originally intended but the meaning got confused and
had a diffeent meaning fot the loading dialog then from the file manager widget.
It caused an eror when qtdragon reloaded a program after homing.
Now we separate them properly by using qtaxis' Recent_path_0'.
I regret originally using the word path rather then directory and filepath
So switch to using 'last_loaded_directory' and 'RecentPath_0'
also swicthed to 'last_saved_directory and 'RecentSavedPath'
The optional interpreter features have been documented in the remap section
from when they were introduced, but have nothing to do with remap.
So, change the docs anchors to reflect this.
Also reword a reference to a behaviour that is now defaulted to on.
Signed-off-by: andypugh <andy@bodgesoc.org>
G43.2 requires an H word to import offsets from the tool table. This patch
allows the additional offsets to be specified directly, for example in an
MDI window. This makes it behave as an incremental G43.1 as well as an
incremental G43.
Signed-off-by: andypugh <andy@bodgesoc.org>
Also update the documentation, moving the details out of remap to ini-config
Update the update_ini script to convert existing FEATURES entries to the
new tags.
Change the default behaviour to enable INI and HAL access from G-code.
Signed-off-by: andypugh <andy@bodgesoc.org>
Fixes the following issues:
- TabError: inconsistent use of tabs and spaces in indentation
-- File "image-wildcard", line 12
-- File "image-wildcard", line 22
- SyntaxError: invalid syntax
-- File "./image-wildcard", line 58
Above happens as the image-wildcard uses default python interpreter and
on my system it's python 3.x:
$ /usr/bin/env python --version
Python 3.7.6
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
tempfile(1) is not available at all on Fedora while mktemp(1) is
part of the coreutils package available virtually on all Linux
distributions.
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
unless you have dual joint axes, you don't need it.
If someone uses it as a sample and wants NO_FORCE_HOMING -1 it will not be
obvious why it won't work.
If you are not in manual mode it's not possible to be jogging.
cancelling jog while in other modes floods operator with error messages.
Cause by a program that changes to/from metric mode.
This would cause the jogging increments widgets to reset their display,
which would cancel jogging.
Some systems are reported not working by throwing errors.
The notifications shouldn't stop the screen from working so we
work around them till we can fix them.
if you were continuous jogging with screen buttons and change the incrments
with key shortcut (i) then the jog would continue forever.
Though no current sample adjusts the increments with a shortcut,
it certainly could be added and the problem would show.
Now we cancel any jogging on increment change.
if you were continuous jogging with screen buttons and change the incrments
with key shortcut (shift i) then the jog would continue forever.
Now we cancel any jogging on increment change.
if you were continuous jogging with screen buttons and change the incrments
with key shortcut (i) then the jog would continue forever.
Now we cancel any jogging on increment change.
$(EXTRA_CFLAGS) incorporates RTFLAGS from RTAI with options such as
-nostdinc which can interfere with compilation of userspace comps.
Signed-off-by: andypugh <andy@bodgesoc.org>
(reverse-run was backported from master to 2.8 but )
(this related commit was omitted: cherry-pick 08ec94fa8)
(incorporate errata from ebf9a036b2 )
History:
1) commit b28255e46 (Apr 2016) modified axis.py:redraw_dro()
to remove items of the dro display tab as part
of extensive JA work of that time:
"axis.py: abandon DRO tab home&limit indicators JA"
2) commit 3b0eb77 was merged to the master branch
when incorporating reverse run functionality.
This commit claims whitespace only changes to axis.py:
"axis: whitespace only"
However, the fix of merge conflicts:
"EDIT: fix merge conflicts 12 Dec 2018"
inadvertently restored some obsoleted code
in redraw_dro().
The obsoleted code predates b2855e46 probably
indicating that the reverse run branch
had not been updated for the redraw_dro() changes
making for a confusing merge.
3) This commit restores axis.py:redraw_dro() to agree
with current 2.8 branch (at commit 36820175f)
(reverse-run was backported from master to 2.8 but )
(this related commit was omitted: cherry-pick 3a47be11e)
probably a typo unnoticed to to few users connecting
this pin.
also add motion.tp-reverse to motion man page
call find_tool_pocket if the pocket number is required,
and only use find_tool index where the index is required.
Signed-off-by: Rene Hopf <renehopf@mac.com>
rename SELECT_POCKET to SELECT_TOOL
iocontrol now gets the pocket number
of the selected tool from the tooltable.
Signed-off-by: Rene Hopf <renehopf@mac.com>
Alpha mode is good when displaying very dense gcode programs.
inhibit Selection stops gcode line selection -on large programs it block for a long time.
push errors up a level so we can control them better
add a standard function to handle function calls -
this should work 99% of the time and it's cleaner in the
handler file.
Fix typo from 5ad444c6 causing compile warnings:
emc/rs274ngc/paramclass.hh:24:0: warning: "BOOST_PYTHON_MAX_ARITY" redefined
#define BOOST_PYTHON_MAX_ARITY 4
^
emc/task/taskmodule.cc:21:0: note: this is the location of the previous definition
#define BOOST_PYTHON_MAX_ARITY 7
^
You can;t set the view untill it's actually showinng.
Now we catch the event and set the view, so the display defaults
to mwhatever it was set to, rather then doing it on the first loading.
Now that qt5_graphics doesnt reset the view when reloading, we
don't have to restore the zoom setting - no flicker
added: invert X and Y uttons, reset view button, grid space spin button.
Also now you can set tool number and the gcode will still display.
for qt5_graphics to load gcode with tool commands, requires tool tooltable to have
the tool proper number in it. linuxcnc isn't running we need to fake it.
If you ask for a tool number more then 55 this will fail.
you could always change them after initializing.
When you loaded a gcode program, we called set_current_view() to redraw the
screen. This function resets the zoomsistance and recenters the view.
Bow it doesn't. If you want to reset the view you have to specifically ask for it
by calling set_current_view()
feedrate, tool number and now 7 selectable control points
fake_status was changed so grids could properly calculate size
it needed some real numbers...
now you can use buttons to cycle showing the last critical messages.
or clear the dialog with an external button.
On the destop notify baloon you can press a button to show the last 5 messages.
add comments and cleaned up the code a bit.
looks like copy paste error. Strangely linuxcnc accepted the error without complaint.
it ended up with a MDI call of:
G10 L20 p0 1.000
Added a check for valid axis in qt action SET_ORIGIN function
The was no reference to Notify available in the handler file and if I import it
i'll get a new instance rather then the one from screenoptions.
Now screenoptions can inject data into the main object.
When using the widget without linuxcnc running it wold show a blank
screen. It's useful in designer to see the actual screen so you can
exersice the options.
Before if you asked for spindle increase past the maximuim,
you would get 'wind up' and decreasing speed wouldn't do anything
till requested speed was below the maximuim
When a wrapped rotary axis absolute position is > 360 or < -360, axis preview will fail to load a file. This is because axis issues hidden "g53 g0 ..." commands to the preview interpreter prior to sending the file contents to the preview interpreter. Axis uses the absolute coordinates as part of those commands which is not correct for a wrapped_rotary type axis.
Included is a sim file wrapped_rotary to demonstrate this issue as well as demonstrate the fix.
To Test:
1. linuxcnc wrapped_rotary.ini
2. home
3. mdi "g0 a180"
4. mdi "g0 a0"
5. ctrl-r (reload axis.ngc)
richtext button use a label on top of the button.
I didn't realize this would mess with stylesheets changing the text of the button.
of cource the text is now a lable rather then a button.
I'll look into if there is a work around - why isn't this standard?
path and widgets are loaded as libraries so it loads just like other libraries.
update sample screens with new syntact.
Old way of loading the editor still works
Example problem demonstration:
$ halrun
$ halcmd: loadrt trivkins
--> results in rtai lockup
problem is reproducible on a virtual machine (vbox)
problem occurs with: gcc (Debian 8.3.0-6) 8.3.0
problem does not occur with gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Make a mixin class to make geometry functions easier to work with.
Make it possible to have different geometry entries in the preference file.
Fix Calculator dialog geometry recording
Since people will tend to use these as a base try to keep with
best practices. Using ACTION raher then directly calling functions
allows use to future proof screens from future library changes
Seems I had not been using ACTION to do view changes...
breaking my own rules!
using ACTION allows us to do updates in the future without breaking
old configs in most cases.
changed the GObject signal to add a python object - for options
that python option will be a dict
if no specfic extension is designated, use the default set in the INI.
previously if you specified an extension then any other dialog got the
same extension from thn on.
If you dont select the action (because it is already showing)
you get None rather then what it shows.
It seems the view and the selection aren't jiving.
Ican't figure it out - so hack around it somewhat
I forgot to test external firmware loading from system folders.
Mesa cards such as 7i43 and 5i20 for instance.
It caused 'global name 'currentboard' is not defined'
Testing in a test branch indicates that this compiles on current platforms.
I am open to further changes and corrections, but let us get the master branch compiling cleanly again.
using absolute pathways breaks on different systems so now also
check the builtin image folder.
This way you can reference images directly from the folder, but
still use your own images too.
make the editor panel grow in edit mode.
make the edit mode exit button work properly in qtaxis context
make typing in gcode display only wotk in edit mode - other wise
call the keybindings functions.
If qtvcp crashes without calling it's cleanup functions,
the subprograms run forever and use large CPU cycles.
Now the sub programs check for the main programs running process.
This was the easiest way I could find.
A axis data is saved with a string value for the PID 'P' value.
The string is 'None' and is used as a switch to tell pncconf to calculate
the P value for steppers.
pncconf was expecting a float value or python's None value but got a string.
The inRange() test formerly set all joint positions to zero
before computing new joint values by kinematicsInverse().
This method is suitable for most kinematics inverse
calculations but can fail for kins that *iterate* to a
solution using current joint positions as the start values
for the computation.
Such a failure occured with the sim puma560.ini using genserkins
with 'benign' reports like:
"ERR kI - compute_jinv (joints: 0.000000 ... ), (iterations=0)
Investigation showed that genserkins:kinematicsInverse()
detected a singular matrix as reported by compute_jinv()
but the function genserkins:kinematicsInverse() returns the
error reported from the gomath library (GO_RESULT_SINGULAR
-- a positive enum). The test in inRange() used '<0' as
its criteria so the error was masked.
Qss file are not easily relocateable if they have image paths.
here we look for the resource file signature and replace it with
qtvcp standard image path.
This would be easier if you could tell pyqt where paths are relative to ...
If the machine needs individual homing but the screen only has a
home-all button, issue a warning and offer to work around the problem
by homing each jopint wityh another push of the home button.
aa38c80db used filename ../docs/src/man/man1/svd-pd_vfd.txt
09fb7c8ec renamed to ../docs/src/man/man1/svd-pd_vfd.1.txt
0892a45f9 merge commit passed travis tests
but failed buildbot docs building on all hosts
This commit:
1) use consistent name ../docs/src/man/man1/svd-ps_vfd.1.txt
(buildbot failures ultimately report unrealistic:
'fatal error: hostmot2-serial.h: No such file or directory')
2) removes empty "ISSUES" section which caused xmllint error;
a2x: executing: "xmllint" ... svd-ps_vfd.1.xml"
.../svd-ps_vfd.1.xml:325: element refsect1: validity error : \
Element refsect1 content does not follow the DTD,...
originally the preference defaults were hard coded and didn't
always follow the designer selected options that the integrator
intended - now it should.
Added another preference to avoid the notify initial greeting, while still
allowing the error messages to use the noify protocol.
Allows unconventional mapping of coordinate letters to
joint numbers with the module 'coordinate' parameter in
the same way trivkins uses the parameter.
Default mapping is unchanged:
xyzac-trt-kins: x:0,y:1,z:2,a:3,c:4
xyzbc-trt-kins: x:0,y:1,z:2,b:3,c:4
New kinematics utility routine: map_coordinates_to_jnumbers()
for use with trivkins and other kinematics modules needing
flexible mapping of coordinate letters to joint numbers.
Notes:
1) No configuration or functional changes intended.
2) Supports coordinates specifications with duplicate letters
typically used for two-motor gantry configs.
3) Also supports unconventional settings like coordinates=zyx
(reversed order). Such a reversed order config is not
supported by the axis gui with the default (identity)
kinstype so when using trivkins, a note is printed
recommending kinstype=both (which works with the axis gui).
* origin/2.7:
docs: improve description of automatic minor-release updates
LinuxCNC v2.7.15
docs: fix #<_coord_system> value for G54
docs: be more clear about Cycle Start in M2/M30 docs
docs: fix typos in "About LinuxCNC"
In the pursuit of having AXIS styles embedding.
QT5 doesn't do embedding well - very inconsistant.
Having qt embed a running program seems to work best.
Try that if we can, otherwise allow the program to embed.
There seems to be a race - hence the sleep statements
the move/resize event works only when qt embeds the program.
And it's flakey
For qtvcp embedding only seems to work reasonably
if we use the top window rather then the plug - go figure.
We push the XWin id number with either aproach = it's a signal that gladevcp
has finished making pins etc
This is useful if calling one function with multiple keys or convienent
if each ket repersents a value such as keys 1-0 for 10% - 100%
Each key could have the percent value attached.
The value can be any python object.
Qtvcp sample screens make HAL pins the same name as hal_manualtoolchange
to help with easy intergration to existing users configs.
If the orginal component was still loaded QTVCP crashed with hard
to discover error code.
Now we print a warning and just use the orignal tool change component.
clarify name as the item is a joint number assigned for a locking
indexer as used with JA
was: indexrotary
is: indexer_jnum
aside:
motion.h struct emcmot_command_t overloads its 'turn' item as:
'turns for circle or joint number for a locking indexer'
so it is (still) confusing to see:
taskinf.cc:emcTrajLinearMove() emcmotCommand.turn = indexer_jnum
I think the gir1.2-vte dependency is not strictly correct (it's gtk3
only) but this dependency will be part of the way forward for gscreen's
terminal widget when it transitions to gtk3.
This yields a working package which can be installed, and AXIS runs.
Note that this removes a duplicated case label in
src/hal/drivers/mesa-hostmot2/pins.c
which is not shown by `git show` (!) and prevented a successful build.
This is almost never desired, because it means that only 24 bits
of precision are kept. Usually this was done by accident, when
thinking about the HAL type hal_float, which is actually a "double
precision" type too.
Fix G70 for paths which are not monotonic in Z, but are
monotonic in X.
Remove the wrong side of curve message, and move the point to
the correct side just like Fanuc.
allows easier access to small python coded arbitrary actions.
If there is a handler file it can call functions in it.
It can call arbitrary python code.
It has some specfic references to Gstat, linuxcnc command, linuxcnc Stat.
It should be easier for users to use then adding a full handler file for small
code snippets
* absenc: incompatible change: require version 4, support new register
* eth: add support for 7i94, 7i95, 7i97
* inmux: add support for inputs from multiplexor chips
* inm: add support for MPGs
* pwmgen: Add support for "offset mode"
* xymod: Add support for galvanometer hardware interface
1) In motion/control.c when entering teleop, joint positions
were set for the number of joints specified by the number of
joints used for kinematics:
(NO_OF_KINS_JOINTS == ini: [KINS]JOINTS value).
2) The joint structures for higher joint numbers allowed
by the compile-time setting of EMCMOT_MAX_JOINTS were
uninitialized and consequently these joint position values
could be nonzero (unpredictably).
3) The joint position values are used by the subsequent
kinematicsForward() function to establish teleop positions.
4) The trivkins module kinematicsForward() sets a world
position (EmcPose) for the total number of allowed joints
(EMCMOT_MAX_JOINTS) since it has no information for the
exact number of joints used (ini: [KINS]JOINTS value).
5) When using trivkins with no specified coordinates=
parameter, it defaults to "xyzabcuvw" and can
set the EmcPose structure for unused coordinates
using the uninitialized joint values.
5) The interpreter routines do not always honor
the axis_mask (ini: [TRAJ]COORDINATES value).
Example, moves like G0,G1 (STRAIGHT_TRAVERSE)
in src/rs274ngc/interp_convert.cc:Interp::convert_straight()
use src/rs274ngc/interp_find.cc:Interp::find_ends()
and may set canon moves for *non-used* coordinates
with *unitialized* values.
6) When unitialized *nonzero* values are propagated to
commands in the motion module, a confusing error will
be reported by command.c:check_axis_constraint().
Example report (axis gui, using mdi tab, then switching
to manual tab mdi):
"linear move on line 0 would exceed B´s negative limit
"invalid params in linear command"
where the coordinate (B) is not specified in
[TRAJ]COORDINATES.
7) This commit forces initialization of all possible
joint structures (EMCMOT_MAX_JOINTS) when entering
teleop mode.
------------------------------------------------------
Notes:
a) The interpreter should probably never populate items with
non-default values for coordinates that are not specified
with [TRAJ]COORDINATES (axis_mask).
b) Errors have been reported for the master branch,
for complex setups, example:
https://forum.linuxcnc.org/10-advanced-configuration/31813-tcp-5-axis-kinematics?start=210#150437
c) The same conditions may occur with the 2.8 branch. If
so, the backport is slightly different due to the
incorporation of extrajoints in the master branch
(ee816bd9b5)
When selecting a axis to un/home we nee the joint number set.
Since we are not in joint mode it was not set by the widget.
If we set it normally it sends a STATUS message that puts tings out of synch.
We get around this by setting the joint number without sending a STATUS message.
Hopefully that doesn't create problems later
1) name change to clarify mapping based on
module 'coordinates' parameter:
was: data->joints[i]
is: data->axis_idx_for_jno[i]
2) more consistent indentation
Jim Persei put lots work to make this function and be better laid out.
I added error checking to stop movement if anything goes wrong.
Needs lotsa testing
reading the stndin status before reading data, stops blocking
1) improve formatting for setp commands in *_cmd.hal
2) use 'allu' option for hal save if the ini
file uses multiple [HAL]HALFILEs
3) add note about ALL unconnected pins
when using 'allu' option
Note: 2) above allows basic_sim.tcl to support
creation of more complete *_cmds.hal when
using twopass and multiple HALFILEs
rtai version 3.4-9-rtai-686-pae does not report strings formerly used
"^.*Adeos: Pipelining started\.|^.*I-pipe: Domain RTAI registered\."
so use abbreviated "RTAI registered" which is reported with 3.4-9-rtai
This eliminates the verbose inclusion of all of dmesg output
in report
Ref: last commit 098ae0daf3 was for 2.6.24-16-rtai
Date: Thu Apr 23 12:53:33 2009 +0000
Based on the hal_gpio driver from Machinekit, modified for the LinuxCNC
build environment and with support for the Raspberry Pi Version 4.
Signed-off-by: andypugh <andy@bodgesoc.org>
It added joint code instead of spindle code.
This currently leaves the spindle as internally PID rather the the preferred
external - I'd need to test to do better
The parity calculation would attempt to access pins out of range if the
number of sense pins was not a multiple of 4.
Signed-off-by: andy pugh <andy@bodgesoc.org>
use sybprocces so it doesn't block the gui from updating/responding.
Now the main program launches the subprogram and communicate the function to call.
The grep/cut combination used to find the kernel version sometimes returns
a multi-line result, leading to an unterminated kernel version string in
config.h and a rather nonsensical error message when booting linuxcnc
"LinuxCNC requires the real-time kernel 4.14.132-rtai-amd64
#define __GCC_ASM_FLAG_OUTPUTS__ 1 to run." for example.
A -s switch in the cut command appears to address this problem.
Signed-off-by: andypugh <andy@bodgesoc.org>
we now register the widget when it's built in screenoptions and
add a springboard function so closing cleanup is called on versaprobe
when called on the dialog
now we can arbitraily add widgets to the list, for instance if we
use screenoptions widget or the handler file to create widgets outside
of qtvcp's normal routine.
In this way we can still get them to call closing cleanup functions.
designer image paths are relative - since I want all images files in one
place the relative position of ui and images must stay the same.
I'm sure there is a better way to do this but this fixes the problem for now.
Jim Persei supplies an updated versa probe ui file to fix some small issues.
Thanks Jim
Action button should only be able to be clicked if on hard limit.
Should only be resetable after hard limit is cleared.
Add some Error messages to warn the operator
add limits override to qtaxis for testing
State of limits_override is probably more importatant - not sure you
can set override on separate joints.
Added functions:
is_hard_hard_limits_tripped
is_limits_override_set
check the boxes and (in the dialog version) press delete and the checked tools
will be removed from the toolfile.
A ton of work to add space in the array for the checkbox.
pyqt is not nearly as easy as GTK in this regard.
This code needs clean up ... but that will have to come later
previously it was easy for multiple widgets reading the HASH code to
fool each other that the toolfile hadn't changed.
Now the toolfile is checked with STATUS and then if it has changed
we emit a signal with the new data, again using STATUS
Also added a delete tool function that takes a list of tool numbers to
delete. It loads and saves the tool file, ignoring the tools in the list.
added a toolfile-stale signal to STATUS to facilitate this. This signal
is not available in GStat (gladevcp's version)
Updated tooloffsetview widget to use new signal for update
ver 3.0.8.2
- minor bug in enable_dro handling from gremlin dro,
special case for non identical kinematics
- some additional print statements and code clearance
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 3.0.8.1
- bug reported by Markus, jogging in diameter mode would only jog half the requested
distance, what is OK for X axis, but not for all other axis.
Signed-off-by: Norbert Schechner <nieson@web.de>
we use a trick to cover tool wear for lathes.
but we need to convert from linuxcnc and qtvcp info arrays.
we were not adding some of the information so somtimes
tooloffsetview would not register the change on screen.
Switch to a ascending tool number view.
move code for future upgrade to metric/imperial conversion.
1) preview tab: show extra joints' values after
homing (if not showing offsets)
2) preview tab: show allhomeicon for extra joints
as well as the coordinates
3) preview tab: show limitedicon (not somelimiticon)
individually for extra joint on limit switch
also:
a) consolidate logic for icon display for w/wo offset
b) use common params for glBitmap for all icons
c) refactor show_icon() and use for all icons
Support emccalib tuning for up to 10 spindles (numbered 0..9)
Note:
Current multispindles allows 8 spindles (numbered 0..7)
but legacy [SPINDLE_9] configs exist
so allow for 10 (0..9)
History:
1) commit b2855e46 (Apr 2016) modified axis.py:redraw_dro()
to remove items of the dro display tab as part
of extensive JA work of that time:
"axis.py: abandon DRO tab home&limit indicators JA"
2) commit 3b0eb77 was merged to the master branch
when incorporating reverse run functionality.
This commit claims whitespace only changes to axis.py:
"axis: whitespace only"
However, the fix of merge conflicts:
"EDIT: fix merge conflicts 12 Dec 2018"
inadvertently restored some obsoleted code
in redraw_dro().
The obsoleted code predates b2855e46 probably
indicating that the reverse run branch
had not been updated for the redraw_dro() changes
making for a confusing merge.
3) This commit restores axis.py:redraw_dro() to agree
with current 2.8 branch (at commit 36820175f)
New motmod parameter: num_extrajoints
1) An 'extra' joint uses the normal joint homing process but
transfers control to a new hal pin (joint.N.posthome-cmd)
after homing. An independent motion planner/controller
(limit3 component typically) must be employed to manage
the 'extra' joint motion using this input.
2) Includes: simulation configs:
1extrajoint.ini XYYZ (4joints) + 1 extra ( 5 joints total)
2extrajoints.ini XYYZ (4joints) + 2 extra ( 6 joints total)
12extrajoints.ini XYYZ (4joints) + 12 extra (16 joints total)
and example M144 command to set extra joints jN.limit3.in
3) motion man page update
Notes:
1) if num_extrajoints is nonzero, require KINEMATICS_BOTH
in order to make sensible axis gui displays
2) by legacy, [KINS]JOINTS= sets the *total* number of joints
e.g., num_joints + num_extrajoints
Example non-motion source files using [KINS]JOINTS:
a) src/emc/ini/initraj.cc
b) src/emc/usr_intf/halui.cc
c) src/emc/usr_intf/axis/scripts/axis.py
------------------------------------------------------------
updates:
rebased to origin/master ae6e7e00a Thu Sep 5 22:27:20 2019 -0700
1) report numExtraJoints to task
2) axis.py update joint jog radiobuttons for homing
3) use #define for ALL_JOINTS,NO_OF_KINS_JOINTS,IS_EXTRAJOINT
4) axis.py formerly would not 'unhome all' unless machine on
5) add demo ini for 16 joints (12 extra)
6) glcanon.py posstrs minor format
------------------------------------------------------------
Anticpated support for 'extra' joints can use a number of joints
that exceeds the number of axes used (maxium of 9 for coordinates
xyzabcuvw).
Test increasing EMCMOT_MAX_JOINTS (64bit OS) using
configs/sim/axis/extrajoints/demo1.ini:
EMCMOT_MAX_JOINTS = 9 ==> sizeof EMC_STAT = 14816
EMCMOT_MAX_JOINTS = 16 ==> sizeof EMC_STAT = 16336 <--
Message size for emcStatus is allocated in configs/common/linuxcnc.nml:
B emcStatus SHMEM localhost 16384 0 0 2 16 1002 TCP=5005 xdr
From 2.7 (77309ebf9) to master (0f67445fa) the sizeof EMC_STAT
for 9 joints max has grown by about 2500 bytes
(14816-12304=2512). The message size allocation of 16384
(4 4096sized pages) is marginal for 16 joints. This commit
indreases this size to 20480 leaves (20480-16336)=4144 bytes
for future growth.
Notes:
1) EMC_STAT includes:
EMC_MOTION_STAT
EMC_TRAJ_STAT
EMC_JOINT_STAT joint[EMCMOT_MAX_JOINTS]
EMC_AXIS_STAT axis[EMCMOT_MAX_AXIS]
EMC_SPINDLE_STAT spindle[EMCMOT_MAX_SPINDLES]
int synch_di[EMCMOT_MAX_DIO]
int synch_do[EMCMOT_MAX_DIO]
double analog_input[EMCMOT_MAX_AIO]
double analog_output[EMCMOT_MAX_AIO]
int debug
int on_soft_limit
int external_offsets_applied
EmcPose eoffset_pose
2) Tested on:
a) Debian GNU/Linux 10 (buster)
4.19.0-5-amd764 (uspace sim)
b) Debian GNU/Linux 9.3 (stretch)
4.9.0-5-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.65-3+deb9u2 x86_64
c) VirtualBox: Debian GNU/Linux 7.9 (wheezy)
3.4-9-rtai-686-pae #1 SMP PREEMPT Debian 3.4.55-4linuxcnc i686
(sizeof EMC_STAT = 15592 rtai,32bit)
d) Debian GNU/Linux buster/sid
4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 x86_64
3) fix runtests that are hardcoded for the number of joints:
interp/m98m99/12-M99-endless-main-program
motion-logger/basic adapt
motion-logger/mountaindew
4) axis gui (axis.py) updated to display up to 16 joint radio
buttons and can display 16 joint values in preview and DRO
tabs.
(Future increases of EMCMOT_MAX_JOINTS beyond 16 will require
additional changes to display all joints in the DRO tab and
in the Preview created by glcanon.py)
5) tested guis touchy,gmoccapy,gscreen,tklinuxcnc to verify that
*existing* sim configs continue to startup.
This makes things like sorting work better.
It used to sort based on the file order every second.
Now it only update when it notices the file changed.
Use new status function to check for valid status object.
add a tool to the front of the array so it's easier to find.
add bool return values and change the same of the function
to compare the hash value between now and last.
It the function retrns false we need to update things.
Switch from calling linuxcnc directly to using ACTION library.
Report if EMCMOT_SET_NUM_SPINDLES (typ: [TRAJ]SPINDLE=)
requests more spindles than configured for the motion module
(typ: [EMCMOT]motmod num_spindles=)
For other spindle commands, include erroneous spindle number
requested
The close dialog and lncdialog from screen option both used the same
NAME so if you asked for one you got both sometimes.
changed the return codes to true and false ( and -1 for shutdown)
so they are easier to use.
added an ok/cancel option.
type now uses text keys: OK YESNO OKCANCEL for different dialog buttons
add a 'qualifiedreturn' function so we can add the -1 return code only
for the close dialog (signifies to shutdown the whole system)
add ability in Designer to change user added dialog's NAME id
so you could have more then one say message dialog and they won't react
to each other's requests.
screenoption's close dialog is a special case and needed to be updated
to use the new ways of launching and returning.
make_pinname called a function in the app instance that the data instance
doesn't have access to. So we moved the functions.
These didn't belong in the data class anyways.
I personally don't like using INI substitutuion for mesa boards
names but it does make it easier to modify HAL files for boards
that pncconf doesn't know about.
Not tested - pushing so someone can test
made pncconf look up the boardnames from internal firware data rather
then having then hard coded.
I think I should build a card metdata class so things like driver type
can be looked up rather then hard coded.
but eliminate updates in the treeclose proc
Restores prior tree display while eliminating
multiple background error reports for
"too many nested evaluations" in treeclose
Improves fix of 06ac1139b7
Make joint-jog rejection in control.c, command.c conform
to documentation when a HOME_SEQUENCE is specified with
mixed positive and negative specifiers.
docs/src/config/ini-homing.txt: "If any joint has a
negative HOME_SEQUENCE value, then all joints with the
same absolute value (positive or negative) of the
HOME_SEQUENCE item value will synchronize the final move."
ver 3.0.8
+- added the possibility to add also images to macro button. The images will be
+ resized to fit the buttons (72x48). The macro file need to contain a line like
+ (IMAGE, ./macros/images/goto_x_y_z.png)
+ the path must be absolute or relative to the config dir, "~" is allowed in path
Signed-off-by: Norbert Schechner <nieson@web.de>
Fix incorrect ordering of control.c call to new api
function read_homing_in_pins() introduced at:
commit 84d5758ed "homing.h api"
For index homing, process_inputs() handles a special
case where index_enable is deasserted while in the
state HOME_INDEX_SEARCH_WAIT in order to ignore a
possible ferror caused by a transient discrepancy due
to changed encoder position (handled later by the next
homing state (HOME_INDEX_SET_POSITION)).
linuxcnc reports requested spindle speed in css mode as maximuim rpm
rather then requested rpm - now we will watch the HAL pin which
does show the requested speed as the diameter changes.
For use with ini setting [JOINT_n]HOME_USE_INDEX
sim_home_switch.comp: new I/O hal pin for index-enable
and pin to set time delay for reset delay
sim_lib.tcl: if [JOINT_n]HOME_USE_INDEX is specified,
make connection to I/O pin:
joint.N.index-enable
sim configs: /sim/axis/axis_9axis.ini: incorporate
[JOINT_n]HOME_USE_INDEX for three joints
ver 3.0.7.3
- Ralf reported an error toggling the Edit Offsets button. It was caused because
I missed to change the widget handling of the dynamically created widgets on
this special page.
Signed-off-by: Norbert Schechner <nieson@web.de>
- getiniinfo did a find all for machine units, leading in a returned
tupple, so comparison with string gave wrong results, corrected!
- changed glade file, so hardware settings page does not have
overlapping widgets any more in min resolution
- did not update the gmoccapy.toolmeasurement hal pin, so tool
measurement ended with an error after a restart of the GUI
Thanks to Mark and Ralf for reporting
- deleted unneeded def n_tbtn_use_screen2_toggled as that widget
does not exist any more
- deleted some print statements
Signed-off-by: Norbert Schechner <nieson@web.de>
A HAL port pin is a hal pin that acts as a real time one way byte oriented data stream An output port on any component may be connected to an input port on any other component via a signal. Data written on the output pin becomes accessible to the input pin. A HAL port signal may link only a single writer and a single reader. A port buffers data with a user definable buffer size.
Includes:
Documentation on how to use a port object.
a ctypes wrapper for the hal api (pyhal.py)
a test to exersice hal port code along with pyhal.py
changes to allow halcmd to understand and manipulate ports.
- I did just return button_name[0], but that is a string so it
has to be converted to an integer before return
Signed-off-by: Norbert Schechner <nieson@web.de>
- jogging on configs with missing axis like XZ (Y missing) did lead to an error
due to not taken care about the homing status. Not homed requires the joint
number, while jogging in homed state requires the axis index.
Signed-off-by: Norbert Schechner <nieson@web.de>
- Most widgets like homing and touch button are now generated on the fly,
leading to the need of less resources and a quicker start of the GUI
- gmoccapy now supports 9 axis and 9 joints
- configuration of joint axis relation are now applied as given in the
ini file, allowing also strange configs like XZCW lathe configs or
scara or 6 axis robot arms
- Display of cutting speed is now correct, even on a lathe with
constant surface speed
- Jog increments on a lathe do now take care of being in diameter or
radius mode, so if you jog 1,0 mm in diameter mode, the X axis will
only move 0.5 mm!
- a lot of internal stuff has been optimized
Signed-off-by: Norbert Schechner <nieson@web.de>
- The axis joint assignment did not work correct, if the axis and
joint count was not according to XYZABCUVW to 012345678, leading
to strange reactions on a lathe with XZ being joint 0 and 1. It was
even worse on a XYCW lathe config having joint 0,1,2,3
- added a new signal, clicking on the axisletter will emit a new signal
('axis-clicked') clicking on the numbers will still toggle the readout
Signed-off-by: Norbert Schechner <nieson@web.de>
- Added a code to delete the selected text if a new value is entered with
the popup keyboard. Prior to this change the new value was added to the
displayed text. That was an other behavior as known from the
normal OS behavior.
Signed-off-by: Norbert Schechner <nieson@web.de>
The wrapped component can catch HAL pin change events.
originally the widgets got the wrapped version but the handler file didn't.
It useful to be able to make event driven HAL pin in the handler
Uses a pyvcp panel "J1,3 JOGGING" to illustrate methods to:
1) Synchronize homing final move for joint1 and joint3
(disallows joint mode jogging of these joints to
prevent inadvertent racking)
2) Enable individual joint mode jogging of joint1 and joint3
using the axis gui jog buttons (operator may rack gantry)
3) Enable synchronized jogging of joint1 and joint3
using the pyvcp panel COUNTS setting to emulate
the counts of a realtime Manual-Pulse-Generator (MPG)
Note:
The messaging methods for jogging that are used by the
non-realtime guis (axis, halui, etc), and programming
interfaces (python, tcl) start and stop jogging using commands
for a single-joint-per-message making it problematical to
guarantee synchronization for multiple joints. The synchronized
jogging method demonstrated uses the provisions for realtime
MPG jogging using the joint jog pins for the synchronized joints:
jog.N.enable
jog.N.counts
jog.N.scale
Avoid segfault if a gui sends a request to jog an undefined joint.
Valid joint numbers are defined by ini setting: [KINS]JOINTS
so legal joint_nums are 0 ... ([KINS]JOINTS-1)
0) clarify interface with new homing.h
1) provide for initialization (homing_init())
2) localize per-joint homing-specific hal pins:
use: export_joint_home_pins() (one-time)
read_homing_in_pins() (servo-rate)
write_homing_out_pins() (servo-rate)
3) localize internal homing state machine (home_state_t)
'hiding' state variables from other motion components
4) use simple set_/get_ functions for overall and per-joint
queries and settings (instead of macros)
5) maintains use of existing logic and core routines:
do_homing_sequence()
do_homing()
6) use rtapi_bool.h
7) uses sequence states (home_sequence_state_t) per existing
design
No interface or functional changes are intended.
Rebases:
baaf887f1 Wed Jul 17, 2019
Related earlier work:
4aa4791cd1 2008-02-27 (provisional)
0a7f2d34fc 2009-12-24 (enabled)
* origin/2.8:
packaging: let debian/configure be explicit about the yapps runtime
remove our copy of yapps, we can rely on packaged yapps now
process halcompile with the packaged yapps, not our own copy
build-depend on yapps
halcompile: move yapps preparser code to after the parser itself
halcompile: switch from py2-style print to py3-style print_function
* origin/2.7:
packaging: let debian/configure be explicit about the yapps runtime
remove our copy of yapps, we can rely on packaged yapps now
process halcompile with the packaged yapps, not our own copy
build-depend on yapps
halcompile: move yapps preparser code to after the parser itself
halcompile: switch from py2-style print to py3-style print_function
Debian's packaging of the yapps runtime changed between Stretch and
Buster. In Stretch and earlier the runtime was in `yapps2-runtime`,
but in Buster the package was renamed to `python-yapps`.
Our `linuxcnc-dev` package runtime-depends on the yapps runtime because
halcompile imports it.
This commit lets the -dev package pull in either the old yapps2-runtime
or the new python-yapps, whichever it needs, depending on the distro
it's built for.
All distros supported by 2.7 and newer (Lucid and newer) have yapps
packaged in a usable way.
This commit adds the yapps package to our build dependencies and configure
script, in preparation for getting rid of our old copy.
Note: on Buster the yapps executable is called bin/yapps2, on Stretch
and older it's called just bin/yapps.
Buster's yapps 2.2 writes "from __future__ import print_function" at
the top of its parser, which must come first in the python program,
before any other python statements.
This commit just moves halcompile's early python statements to come
after the yapps parser, instead of before.
All our supported platforms have Python 2.6 or newer, which means they
have `__future__.print_function()`.
Buster's yapps uses future-style print(), which means the whole program
needs to use it everywhere.
This commit mechanically changes all old-style `print` calls into
future-style `print()` calls. I verified there's no change in
halcompile's output for any of our in-tree halcompile components.
pin iocontrol.0.tool-prep-number is only valid when
iocontrol.0.tool-prepare is true. So until that happened,
the self.old[] dict was missing the tool-prep-number entry
This also extends the file dialog to set directory, filename and extentions
when a dialog request is made.
update a boring macro sample to add the load/save keywords
G84 runtests were failing locally because the spindle was not started in
the test NGC files, and an invalid spindle state (i.e. not stopped, CW or
CCW) was ignored in the interp.
Collectes scattered static variables into a single container class for
one-click reset of all internal state in saicanon. This includes some
cleanup of global variables in canon.hh that were either lazily
implemented (instead of a getter / setter) or not used except by
saicanon.
ECHO_WITH_ARGS prints the function name and parenthesis automatically,
so you just have to provide the argument format string and values. It's
still an ugly way to do it, but less verbose than before.
Unit tests for interp are now broken up into:
* tests_main.cc, which defines some common resources and the main function.
* test_interp_basics.cc, which has the initial batch of unit tests
It's trivial to add more test_XXX files as needed to cover more interp
test cases.
C++ makes #defines for const signed int values all but obsolete, and
canon.hh is a pure C++ header. The same is true for the "typedef struct {...}
StructName;" pattern, which is an anti-pattern in C++.
Also, propagate this change through to various places (like python
modules) to avoid changing the external API. Canon enum values are
exported at module scope, for example.
The meson build system is expanded a bit:
* meson.build files in subdirectories list files / include directories
(relative to that subdir) for later use. These build files should NOT
include any dependencies (so they can be included in any order)
* top-level meson.build specifies everything else (deps, libraries,
targets, etc.) after including the subdir files
* Some kludgy mock files are used to pave over stray missing symbols not
really needed for unit tests
The meson build could eventually be expanded to replace the existing autotools / make build if
desired (there are guides on how to do this), or scrapped and replaced
with CMake 3 if need be.
The strstore function is just a means to make sure that a const char *
is not deleted prematurely (it also does some caching to avoid creating
duplicate strings).
Having a separate set of strings between pyplugin and librs274 may
increase memory used slightly (since strings will no longer be shared).
Calling G92 will compute axis offsets with XY rotation applied, so the
stored offset will depend on the current rotation.
Note that the current test result is technically wrong (interp applies
the rotation before all offsets), so the reported current position does
not match expectations.
1) Convert HOME_SEQUENCE = -1 to no entry to suit the new mode of excluding
2) Set paired gantry axes to the same negative HOME_SEQUENCE
3) Assign HOME_SEQUENCE properly for missing-axis configs.
Signed-off-by: andypugh <andy@bodgesoc.org>
1) Convert HOME_SEQUENCE = -1 to no entry to suit the new mode of excluding
2) Set paired gantry axes to the same negative HOME_SEQUENCE
3) Assign HOME_SEQUENCE properly for missing-axis configs.
Signed-off-by: andypugh <andypugh@rm-one.bodgesoc>
This patch requires a firmware change in the the encoder firmware.
Writing 1 to the quadrature error bit in the encoder control register will reset the error and writing 0 to it will do nothing.
Previous driver had a bug in error handling, where it did not report the quadrature error properly.
Using this patch with unpatched firmware is harmless as the encoder quadrature error did not work to start with.
The previous version of this script did not correctly convert lathe configs
with three axes declared. It also failes with gantries using gantrykins but
defined as XYZA in "coordinates"
This commit addresses both these issues and improves the section ordering for
gantry configs
Signed-off-by: andypugh <andypugh@rm-one.bodgesoc>
History:
1) Early joints-axes work (commit: 0f0d50adfd 23Mar08)
changed initraj.cc to rename [TRAJ] items:
MAX_ACCELERATION --> MAX_LINEAR_ACCEL
DEFAULT_ACCELERATION --> DEFAULT_LINEAR_ACCEL
This change anticpates future support for ANGULAR
acceleration trajectory planning limits (not implemented)
2) later JA work (commit: 30429d703 21Jun16) updated many
sim configs (some were missed) but erroneously
used: MAX_LINEAR_ACCELERATION, DEFAULT_LINEAR_ACCELERATION
instead of the abbreviated forms used in initraj.cc:
MAX_LINEAR_ACCEL, DEFAULT_LINEAR_ACCEL
3) update_ini script followed erroneous pattern of 2) with
commit 3a16c157 23Jun16
Since this error is longstanding and numerous user configs
have already been updated with update_ini, this commit amends
initraj.cc and all sim configs to use:
MAX_LINEAR_ACCELERATION, DEFAULT_LINEAR_ACCELERATION
No changes required for update_ini or configs converted by it.
User configs created independently need updating if they make
use of the abbreviated names
qtvcp was looking for a non existant confuration file path.
VCP's don't usuallu have a config path as they are really for
controlling a cnc machine - time will tell what paths a VCP will need
*.var files are deleted at the conclusion of the
runtests script so having sim.var in the git tree
creates a git working dir change (deletion) whenever
runtests is run
Since there is a 1:1 correspondence between a joint and an axis, I suggest to correct the example by counting the homed axes and comparing with the number of joints (2.8) or number of axes (2.7):
2.8: s.homed.count(1) == s.joints
2.7: s.homed.count(1) == s.axes
Since there is a 1:1 correspondence between a joint and an axis, I suggest to correct the example by counting the homed axes and comparing with the number of joints (2.8) or number of axes (2.7):
2.8: s.homed.count(1) == s.joints
2.7: s.homed.count(1) == s.axes
* origin/2.8:
packaging: buster needs the py2 python-yapps package
debian/configure: oops, Debian Buster isn't released yet
fix some compiler warnings in libnml
debian buster packaging: use correct package names for python imaging debs
let debian/configure specify python-imaging and python-imaging-tk package names
debian/configure: Debian-testing will become Debian-10
packaging: don't depend on python-gnome2
remove unused program halgui
hy_gy_vfd: fix modbus byte timeout
mb2hal: add support for libmodbus 3.1.2 and newer
Our packaging runs our halcompile tool, which is a python2 program that
imports yapps.
Our package build-depends on yapps2, which on older (pre-Buster) distros
pulls in the correct python2 yapps runtime package, but Buster switched
the yapps2 runtime to the python3 version.
This commit updates debian/configure to, on Buster, explicitly
build-depend on the py2 python-yapps package.
The halcompile runtime dependency (for the linuxcnc-dev package) uses
${python:Depends} to automatically depend on python-yapps, so no change
is needed there.
* origin/2.7:
fix some compiler warnings in libnml
debian buster packaging: use correct package names for python imaging debs
let debian/configure specify python-imaging and python-imaging-tk package names
debian/configure: Debian-testing will become Debian-10
packaging: don't depend on python-gnome2
remove unused program halgui
hy_gy_vfd: fix modbus byte timeout
mb2hal: add support for libmodbus 3.1.2 and newer
Buster's yapps2.deb installs bin/yapps2, instead of bin/yapps like
Stretch and older versions of yapps2.deb.
This lets configure.ac find and use either, and substitutes the actual
yapps binary found for the Makefiles.
The new yapps also import from __future__, so the yapps parser has to
come at the very beginning of halcompile.
* origin/2.7-buster:
fix some compiler warnings in libnml
debian buster packaging: use correct package names for python imaging debs
let debian/configure specify python-imaging and python-imaging-tk package names
debian/configure: Debian-testing will become Debian-10
packaging: don't depend on python-gnome2
remove unused program halgui
hy_gy_vfd: fix modbus byte timeout
mb2hal: add support for libmodbus 3.1.2 and newer
This fixes a bunch of compiler warnings from GCC 8.2.0 (in Debian 10
"Buster") of this sort:
libnml/cms/cms_up.hh:80:11: warning: unnecessary parentheses in declaration of ‘encoded_data’ [-Wparentheses]
void *(&encoded_data); /* pointer to local copy of encoded data */
^
libnml/cms/cms_up.hh:81:11: warning: unnecessary parentheses in declaration of ‘encoded_header’ [-Wparentheses]
void *(&encoded_header); /* pointer to local copy of encoded header */
^
libnml/cms/cms_up.hh:82:11: warning: unnecessary parentheses in declaration of ‘encoded_queuing_header’ [-Wparentheses]
void *(&encoded_queuing_header); /* pointer to local copy of encoded
^
The names of the packages providing python-imaging and python-imaging-tk
changed in Debian 10 "Buster", this updates our packaging to use the
new names.
Up until Debian 9 "Stretch", the package names have been `python-imaging`
and `python-imaging-tk`, but in Debian 10 "Buster" the packages are named
`python-pil` and `python-pil.imagetk`.
This commit updates the debian packaging infrastructure so that different
distros can use different names for these packages.
It was added in 2005 and never touched since. It's never been installed
as part of our build system or packaging. Our documentation has always
listed it as "not implemented yet".
It's the only part of our code that tries to import python-gnome2,
which is no longer included in Debian 10 ("Buster").
I'm removing it because i think no one uses it or cares about it.
This commit fixes two bugs in hy_gt_vfd modbus timeout handling:
* Fix a copy/paste error that called the wrong function(!) on all
platforms.
* Fix disabling of modbus byte timeout on libmodbus >= 3.1.2 (Debian
Buster)
These are safer numbers that will at least move the steppers.
One could adjust them lower for better speed if hardware allows.
A suggestion from Peter W from the forum
This commit updates autoconf to attemt building with TI-RPC if libc does
not provide RPC.
The RPC implementation in libc was obsoleted in 2011. Ref:
https://sourceware.org/git/?p=glibc.git;a=commit;h=7b57bfe5988e476ea40934457dfd1c8a231e2391
Quote from NEWS:
The RPC implementation in libc is obsoleted. Old programs keep working
but new programs cannot be linked with the routines in libc anymore.
Programs in need of RPC functionality must be linked against TI-RPC.
The TI-RPC implemtation is IPv6 enabled and there are other benefits.
Implemented by Ulrich Drepper.
This was removed in Fedora 28, Removal of Sun RPC Interfaces From glibc:
https://fedoraproject.org/wiki/Changes/SunRPCRemoval
This fixes issue #392
Signed-off-by: Alex Wigen <alex@wigen.net>
While autoconf will correctly identify yapps or yapps2, the provided
variable should be used in the Makefile.
Signed-off-by: Alex Wigen <alex@wigen.net>
Fedora (and others) do not package YAPPS. When installing from pip the
binary is named yapps2. Modify the binary search to search for either
binary name.
Also fix a spelling mistake.
Signed-off-by: Alex Wigen <alex@wigen.net>
it's easy to not notice that you are configuring a simulated
hardware config, that woun't run hardware.
Worse yet the tests in stepconf _will_ run hardware, even
with the simulator option.
Now there is a big red warning label on the finish page.
I turned this option off because it made the screen ipdate
stop while the program searched for the line number.
Now we check to see if the program is idle before searching.
There is no point in finding the line if the program is running anyways
auto load a qss file if its in the config file and named the same as the ui file.
have the style editor search for qss file better:
-don't error if not found
-search the screen folder and the comfig folder
There is a regression in bash shipped with Debian Stretch which results in `~/.local/bin` not being on the path. This is the location to which pip installs python entry points, so is needed for linuxcnc to be able to find and launch some python based displays.
Thanks to JT for writing the needed lines of bash.
Linuxcnc makes joint/axis separation possible but awkward.
Qtvcp descibes axes with the unique joint numbers.
when in 'axes' mode if you jog either joint the related axis
will jog.
In 'joint' mode the individual joint will jog.
This seems reasonable to me - time will tell.
Istat needed to supply different information so we adjusted
the available information collected.
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
Chris M has also modified code so we use dialog-request
for all dialogs rather then have load-file-request and save-file-request.
touched some other file because of this change.
before if you loaded the same file STATUS would not notice
so the gcode display and gcode editor wouldn;t update.
Now we check for that explicitly and force an update.
This is probably a problem in GladeVCP too though I havent checked.
If you don't set an INI switch geometry option, then the window will
use the preference file geometry - which usually just remembers where
the wimdow was at when closed. If the is no preference file then it shows
in the natural place.
Line continuation using trailing backslash:
1) Adapt halcmd_main.c for scripted & interactive usage
2) Update twopass.tcl to concatenate extended lines
3) Add backslash examples in tests/loadrt.1
4) Update halcmd.1 man page
Notes:
a) The tcl "source" cmd substitutes a trailing '\' with
a single ' ', so in twopass.tcl, detect a
trailing '\' in a .tcl file and line extend
b) haltcl uses the tclreadline package with dubious
support for prompt2 handling
forgot to change the copied code names that select which dialog shows.
general messages can have anything in them so we should use safer
.get() function to not error if it's the wrong message.
It's much easier to select dialogs here then place them on the screen.
Since they are usually hidden and the show posiiton is controlled by
the preference file - placement on the screen is unimportant.
i should add the rest of the dialogs..TODO
The focus overlay is really difficult to place and have it work properly.
The seems to work reall well - and is more convenient.
There are some options not exposed such as image paths...TODO
Since each button instance had it's own dialog, a call to show the dialog
would show a dialog for the total of axis_tool_button instances.
Now we must add a dialog to the main ui and all the toolbuttons will use that one.
Modify the screens that use axistoolbuttons to have a dialog in the main screen.
1) Increase MAX_PERSONALITES from 16 to 64
Only components that actually use personality are affected.
2) With a prior commit, names= storage was converted to
RTAPI_MP_STRING and the number of names= realtime comps is
no longer limited by halcompile (similar to count= usage)
3) Add doc notes for personality assignment in two special
cases:
a) more instances than specified personalities
(a personality of 0 is assigned for these instances)
b) more personalities then MAX_PERSONALITIES
(personalities are indexed modulo the MAX_PERSONALITIES)
A message is printed for this case now.
Future: Additional memory limiting compile-time settings may
require adjustment when using many components with
personality.
If there was no file loaded previously, on a MODE switch to AUTO
there was an error message printed to the terminal.
Also add access to Designer options lost when the edit mode widget was
built
Also flesh out some more possible mode change options
Entry dialogs need to return the answer to the sender.
There is a general message that can do this (or anything else) now.
Axis_toolbutton uses it for setting the offset
Users using twopass processing request increased number of
named component instances (typically for simple logic elements
like and2,or2,...). This commit removes the maximum
limit of 16 for names= items for realtime components.
Notes:
1) For realtime components (loadrt), the maxium number of
names= items is not limited by halcompile.
2) For userspace components (loadusr), the maximum number
of names= remains fixed at: MAX_USERSPACE_NAMES=16
3) The maxium number of personalities is by default:
MAX_PERSONALITIES=16
4) A command line option can set the maximum number of
personalities: -P|--personalities
5) Behavior for count= directives is unchanged.
6) Current MAX_CMD_LENGTH=1024 in src/hal/halcmd.h may
need increasing if using many very long names= names.
7) For normal usage, all names= items (comma-separated)
must (still) be on a single loadrt line. Using twopass
processing allows multiple loadrt lines for the same
component type.
8) Formerly, a loadrt directive that specified no count= parameter
and an empty names= parameter resulted in an error and no
component was loaded. With this commit, such a directive
loads a single instance (like and2.0)
Updated tests/:
a) module-loading/or2/17-names ---- remove, no longer applicable
b) module-loading/or2/0-names ---- adapt per Note 8 above
c) module-loading/pid/17-names ---- no change (pid.c hardcoded for 16)
d) module-loading/siggen/17-names - no change (siggen.c hardcoded for 16)
e) halcompile/personalities_mod --- new tests for personalites that are
modulo the compiled-in personalities
using the --personalities= option
ver 2.3.5
- jogging a not homed machine did change the button state of MDI and AUTO to be
sensitive, what is not correct.
- it was not possible to jog a unhomed machine over the given limits, what is
not a correct behavior.
Signed-off-by: Norbert Schechner <nieson@web.de>
In AUTO Mode we will allow the following key shortcuts
* R or r = run program
* P or p = pause program
* S or s = resume program
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.4.1
- Philippe mentioned that a change of the DRO Size on settings page will be
saved as expected, but after new start of the GUI, the value did note be
restored properly. I have corrected the behavior
Signed-off-by: Norbert Schechner <nieson@web.de>
I personally don't think this is a great idea - so I won't document it.
It can hide hal connecting code that usually should be in a HAL file in the .axisui file.
This could easily frustrate the typical user.
But for really customized AXIS screens built by power users - this can be convenient.
it's now available from hal_glib and by python function from gcode_graphics.py
On very large programs it may add a lot of time - my need to address that later
Phillip Carter has documented code snippets that can be used
to customize AXIS. Surely hard to find knowledge that others
have often looked for. Thanks Phillip
The --names option alters the default limit (16) of
'names' instances.
Users request increased quantity of 'names' items when
using many components with twopass processing.
Example usage:
$ halcompile --names=20 --install ...
Note: current default 'names' limit is set in halcompile.g as
MAX_NAMES = 16
As long as it stays in MDI mode, interp never clears out the
`offset_map` cache of `O` offset pointers. Calling a sub in MDI
causes its `O` offsets to be cached. Editing the sub to change
the `O` offsets within the file and calling the sub a second time
results in an error:
unwind_call: call_level=1 status=INTERP_ERROR - error: 5 from execute emc/rs274ngc/rs274ngc_pre.cc:516
unwind_call leaving sub ''
unwind_call: setting sequence number=11 from frame 1
unwind_call: exiting current sub ''
unwind_call: call_level=0 status=INTERP_ERROR - error: 5 from execute emc/rs274ngc/rs274ngc_pre.cc:516
unwind_call: call_level=0 status=INTERP_ERROR - error: 5 from execute emc/rs274ngc/rs274ngc_pre.cc:534
<-- execute(): error returned, clearing remap and call stack
emc/task/emctask.cc 389: interp_error: 5: duplicate O-word label - already defined in line 4: 'o100 if [ #1 GT 5]'
5: duplicate O-word label - already defined in line 4: 'o100 if [ #1 GT 5]'
This patch clears out the `offset_map` after executing an MDI block,
forcing subs to be reread on the next call.
When these variables are cleared inside the loop, you see messages
like these, where the task name is empty:
Could not kill task linuxcncsvr, PID=3047
Could not kill task , PID=3046
Could not kill task , PID=1952
if the joint number is -1 the button will pop up right away
and you can select the setting options.
other wise there is a delay and the button is used to select an axis
as an environmental variable.
Users request increased quantity of names= items when
using many components with twopass processing.
Example usage:
$ HALCOMPILE_MAX_NAMES=20 halcompile ...
Note: current default names= limit is set in halcompile.g as
MAX_NAMES_DEFAULT = 16
make it easier to change maximum number of
names= and personality=
parameters allowed in components built by halcompile.
Note:
The current values of
MAX_NAMES = 16
MAX_PERSONALITIES = MAX_NAMES
are not changed by this commmit
Try to make testing screens more friendly.
now the sample glade file gives a message of how to
get a custom glade file to load as linucnc screen.
Moved files around to try to get out of the way for the user
loadusr commands are now executed in pass0 (formerly pass1)
before pins are created so using 'loadusr -w halcmd ...'
cannot be used to show pins in the test.
However, using 'hal show' in the last halfile suffices.
An out-of-tree application uses a realtime component (lcec)
that depends on loading of a user component (lcec_conf).
This commit causes any loadusr directive to execute in the
initial pass so if wait (-w) is specified, the user component
should be ready before any loadrt.
fixes#550
1) Change the minimum displacement calculation in PmCartLineInit to use
infinity-norm (i.e. max component) rather than the vector magnitude.
This is consistent with how Canon checks for minimum displacement
2) Apply the minimum displacement checks in canon with a threshold based
on user units, so that the cutoffs are the same for both the TP and
canon.
To be clear, this is an ugly way to fix the issue. The TP has to repeat
the work that canon does, and do so the exact same way to avoid weird
edge cases. The long-term fix needs to be more robust, perhaps with an
API change to enforce canon's choice of linear / angular or pure-angular
move.
The enable pin default is 1 for compatibility
with existing usage.
Usecase:
Some limit3 producers (in pin) may set an
in pin value before the limit3 consumer (out pin)
is enabled. Enabling the consumer may require
the consumer to handle an abrupt change on its
input.
With this commit, the signal that enables the
consumer can also be used to enable the limit3
component so the limit3 output follows its accel,vel
constraints when enabled and the abrupt transition
is avoided.
A target application uses non-kinematic 'extra'
joint(s) that use LinuxCNC homing but are managed
by external motion planner/controllers after homing.
The joint.N.homed signal is used to enable a limit3
component used for motion planning.
Uses a simple meson build file to hackily build and run the unit test
executable. Eventually, the shortcuts taken in the build file could be
fixed up (i.e. with proper object file dependencies, build flags, etc.)
In several places in the TP, we need to check if unit vectors are
parallel and / or anti-parallel. Previously, this was implemented with
dot product / arccos, which could be expensive to evaluate. This is now
implemented as a tolerance on the delta between the sum or difference of
the vectors, which is fast, and numerically robust (no divisions /
trancendentals).
Slightly redesign the acceleration ratio / maximum velocity calculation
for circular motions. For circles with small radii relative to their
requested velocity, limit the tangential acceleration to 50% of the
peak, and cap maximum velocity so that normal acceleration is 86% of
peak.
For large radius circles, allow the tangential acceleration to be
higher, since less of the acceleration budget will be used for normal
acceleration.
For convience of setting only of options related to
indicator widgets. A little easier to understand - hopefully
Also use dialogs for round action buttons
Trying to get dialogs to show permentally when that is best,
updatable if new errors some along while showing the last error.
Not quite happy but i think it's the higher level program shortcomings.
Notify would not send messages back to QtVCP, so 'show all message'
Would not work properly.
It also fixes error message:
'QSocketNotifier: Can only be used with threads started with QThread'
sent to the terminal
before this ISTAT was initialized everytime the clas was instantised.
No need to do that.
It's helpful to let users know when required INI info is missing and
that a default value is being used.
maybe I should do more of them....
polling the error channel consumes the error.
So if two objects poll the error channel one won't get it.
Now, who ever polls the error, sends the result via STATUS messages
to be processed in one place (like the ScreenOptions widget)
Error checking doesn't work properly.
surely some errors yet with probing but i see messages about the probe not tripping.
This should mean that it might work on a real machine.
Because we are blocking.. we can't check errors so we need to
find another way to check for errors while probing.
Well this doesn't work either but has potential.
linuxcnc errors are a pain. It's always a race situation because
whom ever reads the error erases it.
With probing we need to know it the probe errored so we need away
to push error messages around to widgets.
right now screen options catches errors and pushes them to STATUS.
Really STATUS should poll errors and send them, but we can't do that
if qtvcp is embeded into other screens, as the other screens expect
to process the errors....
I added a folder into gladevcp for the gladevcp files.
In the future I hope to add buitin panels for the probe routine.
At that point I will need to decide how to handle the images that are in qtvcp's folder...
fix messgae to user about no subroutines found. If there was
no python esception there was no message.
On a regular widget the close button makes no sense, but a dialog
needs it.
The gcode_editor can now edit and search through code.
It still needs work to make it friendly and consistant.
It curently display the running gcode - which we might not want..
There is also a gcodeDisplay widget that is just like the old
editor widget - it just displays gcode read only.
We also added a signal to update the percentage of the gcode that has run.
It can be connected to a scrollbar for a visual clue of amount done.
Used to swicth between displaying a widget that is in a layout, to
displaying it alone.
sample config swicthes between a small graphics viewer to a larger.
pyqt is pretty terrible about error parsing the XML file
compared to GLADE and GTK.
Try to suggest what the most common problem is if we get an excpetion
they didn't reflect changes that were done outside the widget.
I wonder if tool offset should change the zero buttons to zero
tool offset - and maybe a G43 button to apply the new offset?
An action button can be defined to run small snippets of python code
based on state. We might want to limit what it can do..I'll have to look into
that. Using the keyword INSTANCE in in the python_cmd_string allows one
to reference widgets and call handler functions.
If an indicated button is set for checked_state_text_option
then the text can automatically change when toggled.
this seems like something that should be covered by stylesheets
but it won't toggle properties after the style is intialized.
So we did it this way.
These buttons are used for Origin setting.
can zero, direct set, half or reset to last.
Direct setting is not fully functional yet.
they can be used for axis selection of jogging/HAL pins.
panels aren't specifically for running a linuxcnc cnc machine.
This commit is working it's way towards prebuilt useful panels;
such as emdedable web cam alignment or parport testing screens etc.
Might make it easier to share usefull projects.
it originally added 'shift+' and 'control+' to the keybinding
function name. We already cover shift and control in the function.
add some better error/info handling
angular axis jogging velocity and distance should be fully
covered by widgets now
action button widget
increment buttons can set angular and/or linear increments.
If you use a hi/med/low idea behind buttons then setting both makes sence.
If you use a .1/.01/.001 idea then you must separate the buttons for linear and angular.
In that case set the incr number to negative and it will be ignored.
The indicator will adjust to outside setting of the rates.
jog increment widgets
Can set option to set either linear or angular increments
if another widget sets the rate try not to lie -
set the rate in the combobox if a match is found or
set the display blank
Status Slider widget
adjustment bar widget
Now have the option to manipulate angular jog rate
Status Label widget
Now has option to display angular jog/increments
STATUS needs jog increments in machine units - I had made assumptions in the
code because of only using imperial configs.
jogIncrements will adjust STATUS jog increments if the units mode changes
because it would be assumed the showing increments would still be active.
still not caught in gladev,cp though I see
thru xtrace linuxcnc client messages are being sent.
Maybe not sent properly?
compared to the gladevcp example they seem pretty much the same.
I wonder if just having gladevcp read the forwarding ID number
from the command line like the embedding id number. Not sure
why environment variable was used.
if the user does add a screenoption widget or manually add a preference
file we should not crash - it's not critical
Feed back from Liya from forum - Thanks!
Specify the loading program in designer - this is imagined to be used
in a HAL only panel, but is the basis of INI specified embedding...
coming soon to a screen near you..
This is actually the standard way to embed.
We added this so qtvcp can embed gladevcp panels.
I couldn't figure out how to embed by giving gladevcp the window id
of qtvcp's container.
I think having qtscreen which uss qtvcp widgets might be confusing.
Originally qtvcp and qtscreen were to be separate, but since I combined
the two - qtvcp seems the best title
We can't expect users to compile these. They are not available
from repositories because python2 is supposed to die...
linuxcnc is not ready for python3 yet
There is code in there to write the file but hasn't been tested.
This is reworked code from gladevcp's tooledit widget.
A full tool editting widget needs to be written to use this new core library.
For the moment we can now get comments from a specfic tool with status_label
state indicator now can be controlled by linuxcnc status as well a HAL pin
Should probaably make it possible to do it programically too...
make the jog increments button indicate properly.
make the jog increments work properly with metric mode.
This has only been tested with an imperial config and may break on a metric one.
made it a library
made it use gstat messages
changed default file path
delete log at start of qtscreen
send the loaded gcode file name to log
some of these probably should be optional on the screenoptions widget
- for instance logging at all
when in manual mode the gcode window now displays message history.
Probably should ut some limit on how much is loaded - perhaps clear the history
each restart...each day?
This sends notification requests directly to the system notification server. If package`python-dbus.mainloop.pyqt5` is installed it will integrate with the Qt mainloop to allow notification actions to call methods in the main qt loop.
some partial sucess.... having the container window big enough to
start seems important.
mplayer work very well
gladevcp when it embeds itself doesn't resize
gladevcp when qt embeds it only works one out of ten times...
Ok weirdly enough if seems import gtk or pygtk is _not_
nessasary to fix crash.
removing the logging line in offset_origin fixes the problem on version
QT 5.5 and 5.7.
it seems importing pygtk or gtk would allow the logging line error to
pass.
even stranger in different versions of pyqt required import of gtk or import
of pygtk - use the wrong one for the qt version and it errored.
ok... moving on
In qt5_graphics.py we had to add an import of gtk to stop an error
message (that wasn't very helpful) and crash.
I think this is because pango is used by glib.py - need
to investigate further
update there to be like other widgets so the user doesn't get confused
by last-selection-wins behavior.
also overridden was spelled wrong so update ui file to reflect change.
removed Notify code that is in screen options now.
On going work to the screen for usefulness
made statusbar show and got rid of button development buttons.
moved estop and power to status box
status bar didn't work at all.
Now we can set a timeout but eror messages stay showing till the next error.
broke up preference file options in screenoptions.
This was a string originally, now changed to a python type.
The string type was difficult to parse.
Probably should have just made it a bool type...
Hopefully this didn't break any existing code.
I have no idea why this fixes the seg fault.
It seemed to be a race situation because some times it did not
seg fault. If it didn't the first time it didn't the rest of the session.
This seg fault seems to have showed up after the change to add qtvp.core
which consolidated other libraries.
here is hoping this is a permanent fix
Pyqt5 handles events slightly diffeent the pyqt4.
Pyqt5's QApplication always gives events to QtGui.QWindow first, then the widgets inside it.
Previously (in pyqt4) we assumed the widget came first.
Now we allow QWindow to process events then everything seems to match again.
qtvcp.core now holds all the usually needded classes.
broke out the action class to it's own file.
changed the name of Gstat to Status, IStat to INFO, and lcnc_Action to Action.
Hopefully to clear up the use of and less typing for the name.
so far not so good. I can embed but the embeded file doesn't
follow resizing.
Qt did away with the x11 widget that worked so good.
No idea why.
I sustect I will have to use x11 calls to work around this.
screenoption widget now adds preference file access.
Any HALIified widgets have access to it.
You could still do a preference file in the handler file
if you really wanted.
currently preference file controls options only from screenoptions
screens that didn't use the graphics program would
segfault because only the graphics program had
the command gobject.init()
I'm not sure why qt5 requires this but it seems to work.
Now hal_glib will not do this because it causes a seg fault.
but qt_glib overides this function.
add back the sample display for QtDesigner
get the view changes to work properly.
I did this be converting from the base sample way of rotation, translation
to using the linuxcnc glcannon's routines.
can't load a program yet but will plot a running program.
lighting is off - hard to see the tool
dro doesn't show if turned on.
taight glcannn to not show overlay for us
added beep to annoy people - should make it optional
fix image display option - though not in wheezy...
used a blank label to keep text in right stop if buttons are not showing
Now shows absolute machine position rather then current system.
Current system is really redundent and if you can't
otherwise see the current position, thats handy.
dialog now has some zero axis buttons for convenience.
one can use a touch screen to enter data.
This should probably be an option as it would be annoying
if using a keyboard.
This software keyboard should probably have a conversion button from
mm to inch or vice versa based on current active units
possibly nuttons for current axis position too...
Was having some trouble getting the overlay to show in an
editted custom screen - it just needed to be stretched
in Designer. But now we cam see that it is being called
to show and hide.
We are begining to win here I think
After MUCH work it was discovered that the problem
of the overlay not moving past the visible screen was because
the window flag was set as a QT.Tool widget which must not go
off screen. After a happy accident it was discovered that when
the TOOL flag was removed then it was not nessasary to move the
overlay over the window. Now it just seems to work.
There are some keypress events to trap yet but moving forward.
adding a parent programmically was broken
So was showing/hiding the optional buttons
now the test program works too
Lotsa comments
only need to fix painting when parent window is partially
off screen - not sure why that doesn't work
added some icon buttons to select macros instead of tabs
added some svg icon images - not too bad I guess
added a hole probe so I can test with my mill
starting to look a little more professional
using Andy pugh's excellent lathe macros project.
Fitting it to qtvcp
ABSOLUTELY NOT tested on a machine and in fact somethings don't work
on SIM (drilling seems to work)
Need to add a link from USER/linuxcnc/nc_file/macros/lathe to
LINUXCNC_DIR/nc_files/lathe
Still not sure about details such as save and restore states.
Andy seemed to use some gladevcp magic but some have G73 in them that might work.
Surely can adapt gladevcp's persistance if required.
Arrows in the SVG image don't show.
Andy had the spinboxes close to the reference detail - I prefer havinging it
as a list on the right, so the pix needs labels addded to serve the same
purpose.
It seems subroutine paths are harder then they should be.
O words can't seem to use directory switches directly.
O words only search paths from the INI not their folders.
It would be nicer to have the INI setting set the base paths and allow
my widget to specify the directory from there.
Or allow owords to use absolute paths
O words give terrible error messages
print is not good for debugging/logging because unless you spend the time
to put a lot of detail into each print line, it does not give you enough
information. Also since there is no way to `silence` debug prints it is a
temptation to limit their use, or even remove/comment them out, which can make
finding a problem later-on much more difficult.
This commit adds facilities for using Python's logging module to log to both
the terminal and a log file. A subclass of `logging.Formatter` is used for the
terminal handler to produce colored log levels, and optionally allow tagging
text in the log message to colorize it as well.
-tested with pyqt 4.7 ( in ubuntu 10.04 )
-must make system links from /usr/lib/qt4/plugins/designer/python
to (linuxcnc rip) /lib/python/qtvcp_widgets/widget_plugins for
all the plugins.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
fix warning from syntax check:
axis.py:3485: warning: 'msgid' format string with unnamed
arguments cannot be properly localized: The translator
cannot reorder the arguments. Please consider using a
format string with named arguments, and a mapping instead of
a tuple for the arguments.
Move functions to calculate overall (tangential + normal) and just
tangential acceleration (i.e. "along the path") to blendmath. This
approach ensures that callers get the properly-scaled acceleration
(instead of naively looking at the maxaccel field).
Someone has already updated the other Image imports so they work with both the python-imaging and python-pil packages (python-imaging is no longer available in some Ubuntu based distros), but this one was missed causing image-to-gcode to crash when loading a file.
Instead of directly altering the segment's maxaccel field (which is not
re-entrant), store an acceleration reduction parameter for
approximate tangents. This way, the actual max acceleration can be
computed on-demand (knowing the original max acceleration and de-rating
due to approximate tangency).
A nice side-effect of this is that the reductions are not applied twice,
even in the code paths do the tangency check twice. This squeezes
slightly more performance out of the blends.
ver. 1.5.11
- Leon82 mentioned, that offset page did close after editing a column and leaving
the edited cell. This was caused due to a hidden mode change to MDI because
leaving the cell would apply the change using MDI commands from
offset page_widget.py. Gmoccapy now checks the state of the "EDIT OFFSETS"
toggle button and does not react to MDI Mode switch if that button is active.
at the same time, the mode buttons etc. are disabled!
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.4
- Leon82 mentioned, that offset page did close after editing a column and leaving
the edited cell. This was caused due to a hidden mode change to MDI because
leaving the cell would apply the change using MDI commands from
offset page_widget.py. Gmoccapy now checks the state of the "EDIT OFFSETS"
toggle button and does not react to MDI Mode switch if that button is active.
at the same time, the mode buttons etc. are disabled!
Signed-off-by: Norbert Schechner <nieson@web.de>
For immediate homing, any *valid* HOME_SEQUENCE is suitable
but omitting it may have unexpected consequence of exluding
the joint from HOME ALL behavior.
Remove directive for alternate testing and use
long-standing behavior that:
"allows teleop jogging to soft limits when
non-zero external offsets are applied"
------------------------------------------------------------
make on debian buster:
...
$ halcompile --compile hal/components/eoffset_per_angle.c
Compiling realtime eoffset_per_angle.c
...
eoffset_per_angle.c:240:15: error: expected identifier or ‘(’ before numeric constant
#define fmul (0+*__comp_inst->fmul)
------------------------------------------------------------
$ gcc --version
gcc (Debian 8.2.0-12) 8.2.0
$ lsb_release -crd
Description: Debian GNU/Linux buster/sid
Release: testing
Codename: buster
------------------------------------------------------------
problem occurs for name clashes like fmul, fmull, dmull, etc.
------------------------------------------------------------
Note: the buster package: yapps2 provides /usr/bin/yapps2
but it does not work with halcompile -- likely due
to python3 implementation changes
build of LinuxCNC was tested using a /usr/local/bin/yapps
copied from 2.7 branch (fc6eb7f20 deletes it)
One difficulty of using negative adaptive feed to trigger reverse run is
that the actual scale factor has to be non-negative. With a few
additional checks, this commit handles the translation from a bilateral
input (-1.0 to 1.0) to the unilateral feed scale and direction switch
(forward or reverse).
What happens now is that a negative adaptive feed causes the TP to try
to reverse direction. If this is successful, or we're already in
reverse, then the scale factor is just the absolute value of the
adaptive feed pin. Otherwise, the scale factor is set to zero, so the TP
decelerates to a stop (allowing a direction change). A similar situation
happens for the reverse to forward transition
EDIT: fix merge conflicts 12 Dec 2018 <phillc54>
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Pausing was a lazy way to ensure that the machine absolutely was not
moving when doing a direction switch. However, a properly-written
"is-moving" function can do this same job without needing an explicit
pause from the user. One critical side-effect of this is that we can
give the appearance of smooth transitions between forward and reverse
motion with adaptive feed.
EDIT: fix merge conflicts 12 Dec 2018 <phillc54>
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Split cycles and reverse run don't play well together. This ugly fix
simply skips any split cycle calculations, since we don't need them for
reverse run (no tangent check).
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
For testing purposes, the quickest way to add reverse run functionality
to axis was through the keyboard shortcuts. Here's how it works:
"Shift + R" (During Pause): enable reverse run
"Shift + F" (During Pause): enable forward run (default)
Both commands only work when a program is loaded and paused somewhere in
the middle of the run. To see reverse run, hit "resume" or use the "S"
key to resume motion.
NOTE: when the reverse-run queue is empty (past about 20 segments), the
motion will slow down and stop, but NOT be paused. To switch to forward
run again, you need to explicitly pause, then enable forward run, then
resume.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
This fix also adds stronger prohibitions against switching motion when
not moving, so that we don't clobber motion by suddenly moving forward
during a reverse move.
EDIT: fix merge conflicts 12 Dec 2018 <phillc54>
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
When called from task, this will allow the user to set reverse run
EDIT: fix merge conflicts 12 Dec 2018 <phillc54>
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
TODO: check for non-zero velocity / other safety conditions to ensure
that a direction change happens ONLY when paused and at rest.
EDIT: fix merge conflicts 12 Dec 2018 <phillc54>
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Create supplementary hal report if LinuxCNC (or any hal application)
is running to show:
. System description and kernel version.
. Signals and all connected output, io, and input pins.
. Each pin's component_function, thread, and addf-order.
. Userspace component pins having non-ordered functions.
. Identification of unknown functions for unhandled components .
. Signals with no output.
. Signals with no inputs.
. Functions with no addf.
. Warnings tags for components marked as deprecated/obsolete in docs.
. Real names for pins that use alias names.
The command "hal show signal signame" reports _all_ signals
that match the _leading_ characters of the provided signame
leading to output errors for the get_netlist proc when the
signame leading chars match multiple signals.
Note: The only in-tree user of the proc
(lib/hallib/hookup_moveoff.tcl) does not
stimulate the error as it invokes get_netlist
for unique signames only.
if no mdi history file was present, the search for the actual iter
resulted in an python exception. Corrected that.
Signed-off-by: Norbert Schechner <nieson@web.de>
Over time, the motion man page has become a little
inconsistent in ordering so this commit:
1) Order pins listed in [MOTION],[AXIS],[JOINT],[SPINDLE]
sections in the same order as they appear for:
$ halcmd show pin
2) Joint pins in section 'DEBUGGING PINS' moved to the
'JOINT PINS' section and marked individually as '(DEBUG)'
Retain note that they "are subject to change or removal"
3) Orders parameters for [MOTION] in the order they appear
for:
$ halcmd show param
4) fix other minor omissions and inconsistencies as found
The mux_generic comp would segfault if the number of inputs was not a
power of 2. Also in FU mode the output was never written.
Signed-off-by: andy pugh <andy@bodgesoc.org>
noted problem with multiple parms attempting to test floating point
in a base thread in a sim config adapted from axis_9axis.ini using:
[EMCMOT]
BASE_THREAD = 500000
EMCMOT = motmot base_thread_fp=1 unlock_joints_mask=0x10
...
fix tested on lucid/rtai, stretch/uspace
The command "hal show signal signame" reports _all_ signals
that match the _leading_ characters of the provided signame
leading to output errors for the get_netlist proc when the
signame leading chars match multiple signals.
Note: The only in-tree user of the proc
(lib/hallib/hookup_moveoff.tcl) does not
stimulate the error as it invokes get_netlist
for unique signames only.
I was advised by Peter of Mesa that using PID's own cmd-devir
is better then using an external one.
Even worse is if a signal is connected but no pin is, then
FF1 doesn't work at all, because the PID uses black magic to know
if the pin is connected to a signal to choose behaivor.
So now we don't ever put a signal to it.
ver 2.3.3.4
- a merge of 2.7 to master resulted in a call of a widget, that does not longer
exist in master (adj_max_velocity) causing an exception on halui pin changes.
Thanks to COlger81 and Chris Morley for reporting the bug
Signed-off-by: Norbert Schechner <nieson@web.de>
To react equal to a terminal window, added a selection none and
clear entry when last element is selected an button down is pressed.
Signed-off-by: Norbert Schechner <nieson@web.de>
Replaces "Select All" button which requires user to
be familiar with copy/paste provisions of the window
manager in order to submit the information.
The created report (/tmp/linuxcnc.report) includes
all of the text widget window text and _additional_
info about the machine, operating system, etc. as
generated by the linuxcnc_info script.
NOTE: The linuxcnc script calls show_errors.tcl only
when there is no tty (terminal) or no [DISPLAY]DISPLAY
setting. This often means the user is starting linuxcnc
by a graphical interface like a desktop shortcut and
consequently there is no reporting of errors in a terminal.
font_size_tree: will modify the font size of the tree view
font_size_entry: will modify the font size of the entry
use_double_click: enables the possibility to submit commands
using the mouse double click event, this is
disabled by default, as it may result dangerous
Signed-off-by: Norbert Schechner <nieson@web.de>
on start nothing will be selected
every submit clears the selection
Escape key will also clear the selection
Signed-off-by: Norbert Schechner <nieson@web.de>
Now a key up or down will get the marked value to the entry,
it can than be modified directly without using the mouse to get
the focus back to the entry.
hal_mdi_history will now react equal to axis mdi history.
Additionally I added a feature, that the last three items will not
be added again if that entry's has not been changed.
Signed-off-by: Norbert Schechner <nieson@web.de>
configs where the INI file uses the #include instruction. (it would update
and save the ininame.ini.expanded file rather than the base file.
Signed-off-by: andy pugh <andy@bodgesoc.org>
removed legacy tooltable file syntax, added pocketno to tooltable struct so non-random changers can report the correct pocket number in the future, to fix#500
Signed-off-by: Rene Hopf <renehopf@mac.com>
of Turtle button and max_vel slider
ver. 1.5.10
- fixed a misbehavior of the turtle button
If machine and system units was not identical, the turtle button destroyed
the values set on the jog vel slider
thanks to sliptonic from linuxcnc forum
- while moving the max vel slider and units of machine and system not being
identical, results in a jumping slider, as the factor has not been taken in
account on the halui pin checking
Signed-off-by: Norbert Schechner <nieson@web.de>
"warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]"
The impact of this was that the desired bit number would be computed
incorrectly.
This checks at 'loadrt' time that the dynamic array size fits within
the static maximum size. This would detect problems like demux's
buggy "pin out bit out-## [1:personality]" which would allocate space
for at most 1 pin. Now, this generates an error like
halcmd: loadrt demux count=1 personality=32
Note: Using POSIX non-realtime
Pin out-##: Requested size 32 exceeds max size 1
demux: rtapi_app_main: No space left on device (-28)
(This doesn't add any runtime checking of the accesses like out(i) = true)
rebased to master at:
0cab36566 Thu Oct 18 22:56:02 2018 +0100
Note: eoffset_pid additions moved to a separate branch dgarr/eoffset_pid
Docs: docs/src/motion/external-offsets.txt
Hal pins (input interface is similar to wheel jogging pins):
axis.L.eoffset-enable Input (bit): enable
axis.L.eoffset-scale Input (float): scale factor
axis.L.eoffset-counts Input (s32): request is accumulated counts*scale
axis.L.eoffset-clear Input (bit): clear request
axis.L.eoffset Output (float): current external offset
axis.L.eoffset-request Output (float): requested external offset (debug pin)
motion.eoffset-active Output (bit): non-zero external offsets applied
motion.eoffset-limited Output (bit): limited by soft limit
Hal components:
eoffset_per_angle.comp
Sim configs (configs/sim/axis/external_offsets/)
eoffset_demo.ini (XYZ ext offsets)
jwp_z.ini (jog-while-pause Z)
dynamic_offsets.ini (dynamic Z)
opa.ini (X ext offset per C angle)
Notes:
1) see docs/src/motion/external_offsets.txt for usage restrictions
man updated: motion.9
new manpage: offset_per_angle.9 (auto by halcompile)
2) In canon.hh, option:
#undef STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
#define STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
forces a stop on any synch() if non-zero external
offsets.
3) In command.c, using ALT_EOFFSET_BEHAVIOR for cont/incr jogs
Squash notes:
a) eliminate synch() restrictions
Prior synch() restrictions are eliminated by changing the
way that external offsets are removed from the current position
information used by the interpreter.
Stopping on synch() with external offset applied may
be enabled at compile-time using an option defined
in nml_intf/canon.cc:
#define STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
This option will be removed in the future.
b) eoffset_per_angle.comp: support multiple instances
Note: do not merge this into master the location of compensation and
backlash is in a different place in the docs. I will update master
separately.
Signed-off-by: jethornton <jthornton@gnipsel.com>
This makes it possible to engage/disengage the spindle brake for spindles other than the default one (spindle 0) by adding an optional spindle number argument.
If ini seting [XHC_HB04_CONFIG]mpg_accels item was omitted,
error reported was misleading, example:
"Missing ini setting: [AXIS_X]MAX_ACCELERATION"
So, provide defaults so mpg_accels is not required.
Previously this patch used E to select a spindle except for G76, where the
control character was D, as E was in use. The decision was made to use $ to
avoid clashes with current or future G-codes and to make remapping simpler.
Signed-off-by: andy pugh <andy@bodgesoc.org>
This commit adds support for up to 8 spindles
G-code commands that interact with a spindle now take an extra parameter
E to determine which spindle to work with.
The exception is G76 which already used E.
The spindle control pins are changed
from motion.spindle.thing to spindle.N.thing to match the axis and joint
naming conventions (which don't mention that they belong to motion)
A demo config can be found in sim/axis/lathe_multispindle
Signed-off-by: andypugh <andy@bodgesoc.org>
I have no idea how LinuxCNC worked before
without keeping track of rtai_shm.ko as
this is required by rtapi.
rt_shm_free and rt_shm_alloc are required symbols
but these were previously missing.
Signed-off-by: Alec Ari <neotheuser@ymail.com>
The maximum length of a pin name is calculated after an internal
construction of the string, which is not obvious to the user. The error
message will now print the constructed string, so that it becomes clear
why a "component_name.pin_name" combination, that is still shorter than the
maximum allowed size, fails.
Signed-off-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
Component to trigger an output based on the commanded vs actual speed of spindle. Useful for triggering E-stop if spindle speed drops below set threshold (cutter jam) to avoid damage.
Required lowpass component to filter spindle-feedback input pin during testing.
Originally written by Andypugh, modified and tested by myself.
On some systems (debian stretch), kernel hardening
by default prevents ordinary user execution of dmesg
Example:
$ lsb_release -d
Description: Debian GNU/Linux 9.3 (stretch)
$ dmesg
dmesg: read kernel buffer failed: Operation not permitted
Using 'sudo dmesg' within the show_errors.tcl script will require
additional work to support asking for a sudo password (when it
is not cached because of a recent sudo invocation) -- man sudo.
This commit:
1) allows execution after a dmesg privilege fail in order
to continue and allow display of other information
2) gives instruction on running dmesg in a terminal
Ref:
1) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842226
2) https://unix.stackexchange.com/questions/390184/dmesg-read-kernel-buffer-failed-permission-denied
Workarounds to allow ordinary user use of dmesg (from ref):
$ sudo sysctl kernel.dmesg_restrict=0
kernel.dmesg_restrict = 0
# And to make it persists across reboots, save it as conf file:
$ cat /etc/sysctl.d/10-local.conf
kernel.dmesg_restrict = 0
When a communication error happens and a transaction is just partially
read the modbus link can get out of sync. The next transaction gets the
unconsumed data from the transaction before and so on and the link does
not recover form this. modbus_flush() prevents this behaviour.
Jin^eLD reported on IRC that the command to launch the tiny.xml PyVCP example did not work. If using halcmd instead of `halrun -I` it does work. `halrun` with the -I flag should be the same as `halcmd` (if I understand it correctly) but it does not seem to work. This may be a bug in `halrun` ...
Before this commit, the number shown in the Bar widget was always printed
with one number after the decimal place ("%3.1f").
This commit makes the number format configurable by the user, using
this syntax:
<bar>
<format>"5.3f"</format>
</bar>
The value of the format element defaults to the old built-in value of
"3.1f" if omitted.
This new Bar element duplicates the existing syntax for other PyVCP
widgets that have configurable numeric format.
Fixes#447, which was caused by the TP not correctly falling back to
parabolic blending in certain cases. There is now logic to choose either
arc blending, treating segments as tangent, or parabolic blending,
depending on which is estimated to be fastest. This way, we should avoid
corner cases, since the performance check is always done when a new
motion is queued.
on 7i73 and 7i84. Analysing the data stream indicates that the driver sometimes
wrongly gray-decodes the binary encoder data. The only plausible cause of
this is a flag being used unitialised that sets the graycode mode.
Smart serial itself does not support graycode, the flag only exists for other
modules that re-use the smart-serial pin-creation and handling code.
This patch initialises the flag properly. Checking whether this is a true fix
will take time, this is a very intermittent problem.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Removed first person writing perspective.
Removed dead links.
New calcs for determining power supply voltage/current.
Added new section on closed loop steppers.
New images added.
Delete inductance-vs-time.png
Delete voltage-vs-time.png
* origin/2.7:
docs: note that G38 probe results #5061-#5069 are in work coords
docs: refer to the G38 family of probe moves as "G38.n", not "G38.x"
docs: tidy up description of probe result params
simplify comments in canon.hh, no code changes
pid: use command-deriv when supplied
Update about-linuxcnc.txt
Docs: add more information to coolant control m code
Conflicts:
docs/man/man9/motion.9
docs/src/gcode/overview.txt
In file included from emc/rs274ngc/rs274ngc_interp.hh:20:0,
from emc/rs274ngc/interp_setup.cc:24:
emc/rs274ngc/interp_internal.hh: In constructor 'setup::setup()':
emc/rs274ngc/interp_internal.hh:775:7: warning: 'setup::disable_g92_persistence' will be initialized after [-Wreorder]
int disable_g92_persistence;
^~~~~~~~~~~~~~~~~~~~~~~
emc/rs274ngc/interp_internal.hh:770:9: warning: 'int setup::disable_fanuc_style_sub' [-Wreorder]
int disable_fanuc_style_sub;
^~~~~~~~~~~~~~~~~~~~~~~
emc/rs274ngc/interp_setup.cc:28:1: warning: when initialized here [-Wreorder]
setup::setup() :
^~~~~
This is the original M98/M99 commit from PR #151, rebased onto the
v2.7.14 tag with a few fixes added on top, into the master branch at
commit cd0833a7.
The merge has a built-in fix to the
interp/m98m99/12-M99-endless-main-program/expected.motion-logger test.
This fixes looping.
The m98 l\#<loopcount> calls have no good way of telling whether
they're entering the first iteration or a later iteration (see
`interp_o_word.cc`, `Interp::execute_call()`), so they rely on the
context `m98_loop_counter` field being reset to -1 to know when to
initialize state for a new loop.
After an abort, the call stack is unwound, leaving stale data behind.
If the context is not cleaned up, then the stale state data will break
loops when restarting after an abort.
When a looped `M98 L#<loops>` subroutine call returns after a loop,
the line number should not be incremented until after the final loop
is complete.
Fixes PP-1975
This patch implements subprograms as defined with a bare numbered
O-word, called with `M98` and returned from with `M99`. This common
style of subprogram is used in Fanuc, Haas and other controllers.
## Implementation
In essence, `M98` and `M99` are O-words. O-words are handled
specially compared to M- and G-words, both when being read
(e.g. parsed earlier in interp loop than other codes) and when being
executed (e.g. own translation unit with functions for searching and
seeking across g-code file blocks). Therefore, they are implemented
next to other O-word code, and where possible they share the same read
and execute flow. There is a major semantic difference compared to
traditional rs274ngc subroutines: Execution starts at the beginning of
the file and continues right into a program definition rather than
skipping past. Such a program definition at the beginning of the
file is the 'main program', although not treated specially by the
interpreter, and `M98` may only call subprograms following the main
program.
In the interpreter's read phase, `M98` call and `M99` return are
handled in `read_o()` at the same time as O-words in `interp_read.cc`.
`M98` is handled much like `O call`.
During execution, `M98 P1` is quite similar to `O1 call`, and they
share the `Interp::execute_call()` function in `interp_o_word.cc`.
Still, `M98` must be distinguished with the special `call_type =
CT_NGC_M98_SUB` to signal to `execute_call()` and `unwind_call()` that
parameters `#1` through `#30` are global. The call type is also used
to prevent programmers from mixing e.g. `O sub` with `M98` and `M99`.
When `M98` is followed by an L-word (repeat count), it maintains a
loop counter in the parent context `m98_loop_counter` field, and
special logic in `execute_call()` manages call return block location
for iteration.
An `M99` in the main program (top-level call stack) has a special
meaning. There is no subprogram to return from, so instead it means
to skip back to the beginning of the file and resume execution; in
other words, loop endlessly over the program. In this case, `M99` is
treated like an M-word handled by `read_m()`, and shares modal group 4
and `convert_stop()` with `M02` and `M30`.
The interpreter cannot handle endless loops because it would queue
canon commands indefinitely without a program end or a queue buster,
and never issue them to task for execution. Therefore the interpreter
distinguishes the following two subcases of the `M99` endless loop:
- Task: During real execution of a program, an `M99` in the top-level
context is treated like a queue-buster. The interpreter queue is
flushed to motion (after queuing any link segments) before looping
back to the program beginning. Task enables this special behavior
by calling `interp.set_loop_on_main_m99(true)`.
- SAI, preview, etc.: When not actually executing, an `M99` in the
top-level context is treated like an `M30`, program stop. The
assumption is that a single loop will be sufficient for
non-execution use cases, such as to render a tool path preview or
check the canon commands generated by a program. This is the
default behavior, also explicitly set by calling
`interp.set_loop_on_main_m99(false)`.
## Fanuc and rs274ngc sub call coexistence
The syntax differences create no parsing ambiguities. During
conversion the two styles share some code paths, where any differences
are handled by the O-word (or M-word) type and call style.
Additional checks ban mixing rs274ngc and Fanuc sub blocks within one
call/return cycle in hopes of reducing confusion arising from careless
mixing and the unintended side-effects of style differences.
If there is reason to disable Fanuc subroutines, do so by placing
`DISABLE_FANUC_STYLE_SUB = 1` in the `[RS274NGC]` section of the
`.ini` file.
Signed-off-by: John Morris <john@zultron.com>
Task must always set up inihal, even if emcMotionInit() fails to parse
the position file.
The inihal setup must happen outside of emctask_startup()'s
emcMotionInit() retry loop, because its functions are not idempotent.
When emcPositionLoad() fails to parse the position file, or fails to
update Motion with the information from the position file, print an
error so the user has a chance to figure out what's wrong.
namely: [AXIS_n]MAX_VELOCITY,MAX_ACCELERATION
The existing (legacy) code that reads ini files for joint
and axis items:
src/emc/ini/inijoint.cc, src/emc/iniaxis.cc
is unaware of the kinematics module in use and has no
precedent for making default value substitutions for
specific kinematics modules. Special cases supported
by the trivkins module (multiple joints allowed per
axis) impose additional complications for implementing
automatic substitutions.
The approach herein extends the existing checks made from
the linuxcnc script when the trivkins module is specified
and prints warnings to stdout. The warnings include the
(hardcoded) defaults that will be used when values are not
specified.
Updated paragraph 6 - removed references/links to Mesa at the exclusion of other brands of motion control hardware. Added links to Supported Hardware page of Wiki instead.
By using the position data from a position file and assuming that the
axes have not moved more than half a turn since the machine was powered
down it is possible to use absolute homing with resolvers.
Signed-off-by: andypugh <andy@bodgesoc.org>
In theory a joint could have different units from those set in [TRAJ] <joint_type>_UNITS if [JOINT_n] UNITS was set to something other than TRAJ units. The actual likely hood of this every occurring is very low, and may not even be possible currently. (It appears that [JOINT_n] UNITS is ignored, at least for trivkins.)
* origin/2.7:
Docs: add info about the constant e
Docs: fix broken link and man page reference
lowpass.comp: man page help for setting gain pin
Docs: change bad examples and note about comment usage with o words
Docs: Correct G28,G30. Improve G92. (2nd go)
i couldn't figure out how to show the more complicated
equations but this may help users wanting a starting
point for setting the 'gain' pin
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
(cherry picked from commit b1fb19c29e)
that follows the check that disables joint-mode jogging
for joints having a negative HOME_SEQUENCE
(The usual check is enforced for EMCMOT_JOG_CONT,INCR,ABS)
User report:
https://forum.linuxcnc.org/21-axis/34860-gremlin-view#113523
focus behavior seems ok when embedded as in reparenting test::
configs/sim/axis/ngcgui/pyngcgui_axis.ini
not sure if the standalone focus behavior is related to
the window manager in use or its focus settings
The G28 & G30 parameter count were still set to six,
from the old way of XYZABC, now XYZABCUVW so add counts.
G92 never mentioned parameters until near the end,
so I copied from G28/G30 to add to G92. Hopefully
made some other useful improvements while there too.
Signed-off-by: Kim Kirwan <kim@kimkirwan.com>
It's pretty useless as a sim or a test screen if one can't actually control it.
We add a test control panel with warning label that it's just for testing.
It would be really annoying anways as it sitd on top of the screen and needs to be
moved around to see everything.
This panel just has basic controls for jogging and cycle start.
I've only added it to this one sim for now.
GladeVCP buttons connected to an MDI_action widget ihave their enable /
disable state set by the MDI_action.
One condition is that the machine should be homed. The current test
for all-homed state gets confused if there are missing axes (such as an XZ
lathe config).
This commit uses a more flexible (though possibly less thorough) method to
detemine homed state.
Signed-off-by: andy pugh <andy@bodgesoc.org>
I don't like the idea of having two different styles
for the G-code and M-code tables, but there are just
too many G-codes available to not have it be verbose.
So I ask the user to pick the blank cells for G-codes.
I could "reverse" the M-codes table too, if consistency
between them is thought to be important.
The tables are broken up to avoid trying to print
one table 100 lines long.
Signed-off-by: Kim Kirwan <Kim@KimKirwan.com>
We don't usually build with the EMCCANON_DEBUG #define turned on, and
some of the code conditionally compiled in had bit-rotted. This commit
fixes those problems.
If the smart-serial interface reports a checksum error or similar then it
is almost certainly a bad idea to update the output pins.
It seems better to hold the last values for one servo cycle than to set
erroneous values.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Omission of [AXIS_L]MIN_LIMIT,MAX_LIMIT (for trivkins)
will lead to error if user specifies only the
[JOINT_n]MIN_LIMIT,MAX_LIMIT items.
Report the default value that is used for the missing inifile item
to assist in identification of the error cause.
.. this should be replaced with something useful, because this
document (when it exists) is linked from the issue creation page on
github under the heading "helpful resources".
ref: taskintf.cc:emcJogCont(),emcJogIncr(),emcJogAbs(),emcJogStop()
if jjogmode ==> emcmotCommand.axis = -1 (for a joint jog request)
if !jjogmode ==> emcmotCommand.joint = -1 (for a axis jog request)
so detect that:
a joint jog has been requested when current mode is teleop
or
a axis coordinate jog has been requested when current mode is NOT teleop
and make messages less opaque
Note: maintain detection of unexpected conditions such as
simultaneous negative axis_num *and* negative joint_num
if you keypress a letter while in the selection window,
halmeter will scroll to the first name that starts with that letter.
It is currently case sensitive.
It doesn't actually select the name as I couldn't figure out how to
get the cursor position to follow the selection. If you keypress picked
a name then used the cusor keys it would jump back to the previous selection.
If we update to current GTK code, could probably fix that - in the future
Recent prior commit (f192c084) that silenced some exit messages
inadvertently disallowed a reconnection after pendant removed.
Note: The LIB:xhc-hb04.tcl supported option:
[XHC_HB04_CONFIG]require_pendant=no
allows connection after startup or a reconnection after
a disconnect using the -x command option.
This commit silences long-standing but harmless reports to
stdout that occur on exit of the userspace xhc-hb04 program
when LinuxCNC is terminated:
"libusb: error [do_close] Device handle closed while transfer
was still being processed, but the device is still
connected as far as we know
libusb: warning [do_close] A cancellation for an in-flight
transfer hasn't completed but closing the device handle"
On debian stretch using libusb-0.1-4:amd64 2:0.1.12-30, there are
additional reports and backtrace:
"*** Error in `xhc-hb04': free(): corrupted unsorted chunks: 0x00005588b4f92ce0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7f7845922bcb]
..."
The additional reports/backtrace do not occur on earlier
libusb packages like:
debian wheezy libusb-0.1-4:i386 2:0.1.12-20+nmu1
debian jessie libusb-0.1-4:i386 2:0.1.12-25 i386
Some helpful clues were found here:
https://github.com/machinekit/machinekit/issues/1257
Introductory puma config that:
1) uses no positional limits, artificial vel/accel limits
2) sets coordinate offsets for user who may not know how to
touch off appropriately
3) Show "Usage:" in text displayed by the Configuration Selector
(file: puma_cube.txt)
4) provides alternate [DISPLAY]OPEN_FILE (./puma_seam_weld.ngc)
The test:
(fabs(t1) < SINGULAR_FUZZ && fabs(t2) < SINGULAR_FUZZ)
probably exists for code debugging but was causing motion
module to fail ("kinematicsInverse failed") in the master
branch (not in prior branches, ref: 4b8995385c)
per Rudy du Preez:
> The current th4 value is used. This is a typical action
> taken in most 6-axis robots.
to allow all of axis gui to display on a smaller screen
was (for axis gui): wm geometry . == 840x872+754+31
was (for axis gui): wm geometry . == 820x752+0+31
Recent changes to fix ubsan problems increased HAL memory usage of
several configs I investigated by around 8%. So that configs that
were cloes to exhausting hal shared memory before continue to work,
we need to increase the HAL shared memory size. I chose to increase
it from 75 to 85 pages, 40KiB, or about 13%.
Here are the memory usage figures I gathered from 'halcmd stats'
on an x86_64 system:
before after
axis 94560 102216 +7656 (8%)
demo_sim_cl 63392 68568 +5176 (8%)
gmoccapy_XYZAC 112360 121616 +9256 (8%)
.. because we use symbols from it, such as dlsym()!
It's not clear why this has not always been an error, but it did
become one when using gcc -fsanitize-address to build LinuxCNC:
/usr/bin/ld: objects/rtapi/uspace_rtapi_app.o:
undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
.. this is undefined behavior in C, and is exposed by gcc -fsanitize=undefined
with a diagnostic similar to
emc/rs274ngc/interp_o_word.cc:358:85: runtime error:
index -1 out of bounds for type 'context_struct [10]'
The code to check for backslash continuation characters needs
to be restricted only to cases where the line actually contains
any characters. Otherwise, with -fsanitize-undefined, diagnostics
like the following would occur:
libnml/inifile/inifile.cc:295:30: runtime error: index -1 out of bounds for type 'char [257]'
Building with 'gcc 6.3 -fsanitize=undefined', diagnostics like the
following were shown on amd64 systems:
hal/hal_lib.c:2729:20: runtime error: member access within misaligned address 0x7f2bbb53acd4 for type 'struct hal_funct_entry_t', which requires 8 byte alignment
Changing these types from 'int' (which has size 4, alignment 4)
to intptr_t (which has size 8, alignment 8) just like any pointer type
causes the diagnostic to disappear.
Since this is a structure change, the HAL ABI version is bumped.
I had hoped that this would turn the mistake in hm2_bspi_write_chan,
where an uninitialized buffer was passed, into a compile-time diagnostic,
but it does not. Still, it's more correct to specify 'const' here.
-fix component numbers on 7i92 firmware
firmware with one device should have half the components
-fix joint numbers in INI
joint number was not incremented after each joint section was made
-fix etho board loading and discovery code
discovery code used w instead of widgets
etho boards can't have firmware loaded at run time so
don't add it to loading line
-fix dicovery setting wrong driver
which then makes the card HAL loading line wrong
-fix gmoccapy theme issues
fix the running errors but then disable -
It needs more code to change Gmoccapy's preference file but
Gmocapy has an easy to use built in way to do this so maybe
I should not expose this.
Well in theory anyways
-add main/tandem to limit combobox
-add another column to comboboxes for tandem axis selection
-fix pport comboboxs
saved signals were not right
comboboxes showed duplicate columns
-reorganize humnan/HAL signal names
-spindle encoder sholdn't be in the axis column
-generalize tandem check; have INI use it too
build_INI didn't check for tandem servo signals
Twopass processing has always handled simple loadrt parameters
like those used by halcompile (names= or count=). Other
component parameters are handled but string items and complicated
parameters may cause problems.
This commit allows exclusion of a .hal file from any twopass
processing when [HAL]TWOPASS is active. Excluded files will be
sourced directly by halcmd (using -kfv options).
See twopass.txt documentation additions for usage details.
At this point, halcompile is syntax-compatible with python3
(tested by 'python bin/halcompile --help'), but on
debian stretch systems without a python3 version of yapps, it fails
with an ImportError at 'from yapps import runtime'.
An off-by-one error meant that the first character from the next page was
always appended at the end of each page. And, in the case of the last page,
the contents of random memory would be displayed.
This patch also fixes some formatting issues with escaped characters,
makes the screen clear properly at initialisation and allows the decimal-
separator HAL parameter to actually work properly.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Before this commit, the llio driver would specify the names of its IO
connectors (eg, "P1", "TB2", etc), the IDROM would specify the number
of pins per connector (eg, 24 for the standard 50-pin connectors, 17
for DB-25 connectors), and the "pins" code in the hostmot2 driver would
assign IOs sequentially to the pins on the connectors.
That doesn't work for the 7i96, and potentially for other Any-IO boards
where the mapping from IO to connector/pin is not straight-forward.
This commit introduces a new optional field that the llio driver can
provide when registering a board with the hostmot2 framework: an array
of char*, indexed by IO number, providing the string that should be
reported to the user for the connector/pin mapping of that IO.
Master has joints mode so now we use the new options with tandem stepper configs.
sets trivkins kintype to both
home sequence will flag tandem joints to finish homing together
home sequence is available to the user to specify
TODO: servo configs, tests, how to deal with limit switches for tandem joints.
ver 2.3.3.3
- editing offsets, leaded to a error output in the console, due to missing
widget btn_zero_x
Signed-off-by: Norbert Schechner <nieson@web.de>
cause surely there shouldn't be two classes named the same.
I actually don't understand how this worked at all.
maybe the Gtype being right saved it...
leaded to wrong behavior, reaching the limits, so the widget
showed 0, but the value emitted was 0.5, leading to a moving machine
even having feed override of 0
Signed-off-by: Norbert Schechner <nieson@web.de>
Conflicts:
src/hal/components/limit3.comp
tests/limit3.1/expected
tests/limit3.1/test.hal
I dropped tests/limit3.1 (it's redundant) and used Zultron's version of
limit3 from 2.7.
At 6bfc1c617e, the nonportable types such as 's16' were changed to
the portable type 'uint16_t', which has different signedness. When
negative floating point values are cast to unsigned types, the result
is undefined by the C standard, as demonstrated by this program
when compiled in a mode that detects undefined behavior:
#include <stdio.h>
#include <stdint.h>
volatile double d = -5.0;
int main() {
printf("%x\n", 0xffff & (unsigned)(int16_t)(d));
printf("%x\n", 0xffff & (unsigned)(uint16_t)(d));
}
$ clang float_int_cast.c -fsanitize=undefined && ./a.out
fffb
float_int_cast.c:6:39: runtime error: value -5 is outside the range of representable values of type 'unsigned short'
fffb
Besides causing theoretical undefined behavior, compiling it on an
armhf platform actually gives different results from x86, a problem we've
seen before in other hardware drivers:
$ uname -m; gcc float_int_cast.c && ./a.out
armv7l
fffb
0
.. this path is what it used to be, and I verified that it also
works when building from within the regular build system on uspace.
(which is enabled in the next commit)
The puma sim uses immediate homing, so vismach needs to be connected to pos-fb instead of mot-pos-fb in order to work properly after homing again.
Signed-off-by: Rene Hopf <renehopf@mac.com>
Conflicts:
configs/sim/axis/vismach/puma/puma.ini
configs/sim/axis/vismach/puma/puma_sim_6.hal
To resolve the conflicts I checked out the versions in master just
before this merge, then applied all the changes manually. I applied
the [AXIS_*]MIN_LIMIT and MAX_LIMIT to both the matching [JOINT_*] and
[AXIS_*] sections, like the update_ini script would have done.
.. this deprecated item still needs to be supplied to Python.
Later, we can remove this deprecated item from the Python API and
that will fix the diganostic for real.
This is based on inspection of rcslib-2014.04.29 but is not a direct
copy as the API was changed from taking pointers to taking copies
when it comes to inputs that are not changed. Besides the issue
discussed in #379, one of the atan2 calls is changed.
Closes: #379
testing branch for chopper79
ver 2.3.4
- introduced new keyboard shortcuts (not case sensitive)
R = run program
P = pause program
S = resume program
This keys will only work in auto mode, not being in edit mode and
a program must be loaded. Pause and resume do only work if a
program is running and / or paused.
Signed-off-by: Norbert Schechner <nieson@web.de>
Smart Serial hasn't had any I/O type pins previously, so a problem with
the logic that creates the invert pins for bit-type pins had not been seen.
Hardware input pins normally have an inverted copy for HAL convenience, and
Hardware output pins have a parameter to invert their sense. IO pins should
have neither, but were actually getting both.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Address messages from make after commits a8ac1bbba5, 896eb1c990:
"Localizing linuxcnc.pot
...
src/emc/usr_intf/gscreen/gscreen.py:4545: warning:
'msgid' format string with unnamed arguments cannot be properly localized:
The translator cannot reorder the arguments.
Please consider using a format string with named arguments,
and a mapping instead of a tuple for the arguments."
The only way to change settings on the smart-serial remotes is currently
with setsserial. This makes some sense with non-volatile parameters, but
is not useful for (for example) changing the position scale on a servo
drive.
This commit makes all smart-serial remote parameters visible
to HAL and settable using the normal "setp" command (the "setsserial
utility is no longer required for this)
Parameter changes only take place when the associated smart-serial port
tansitions from the "stopped" to "run" state.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Formerly, joint->free_tp.max_acc was always set to joint->acc_limit
at simple_tp_update() so provisional fractional accels introduced
at d69b15cfe were ignored (a bug).
Note: the joint->free-tp.max_acc item is correctly set for
command-based jogging (EMCMOT_JOG_CONT,INCR,ABS) and for
wheel jogging (handle_jjogwheels) but homing relies on the
setting here.
Conflicts:
src/emc/usr_intf/axis/scripts/linuxcnctop.py
I resolved this merge conflict by using the version of linuxcnctop.py
from Jeff's original master-based linuxcnctop-stretch-leak branch instead.
The behavior of the new limit3 component (updated for issue #240) is
slightly different than the behavior of the old component. It takes
a little longer to "lock on" to the input. This updates the test's
expected output to match the new component's behavior.
This pin was present in the master version of limit3 before the merge of
the fix for issue #240 (but it was not in the version of limit3 in 2.7,
so nothing's needed there).
The .in-limit pin is True when the limit3 output is prevented from
tracking the input by limits (position, velocity, or acceleration). The
.in-limit pin is False when the output is tracking the input perfectly.
Conflicts:
src/hal/components/limit3.comp
The limit3 conflict was because it's been modified in master (adding
.in-limit pin) and rewritten pretty much from scratch in 2.7. I resolved
it by picking the version from 2.7. I'll add .in-limit back in in the
following commit.
Conflicts:
src/hal/drivers/mesa-hostmot2/sserial.c
src/po/gmoccapy/zh_CN.po
src/po/zh_CN.po
I resolved the merge conflicts in the Chinese translations by choosing the
version in master, on the advise of Solitarily (our Chinese translator).
ver 2.3.3.1
- small changes to the code, as there was a possibility the
label was shown, even if auto tool measurement was not used
Signed-off-by: Norbert Schechner <nieson@web.de>
For the master branch, the axis gui:
a) attempts to allow alternate jogging methods (wheel jogging,halui)
when the mdi tab is selected.
b) avoid bad behavior observed at commit: 4f90341177
This commit attempts to address cooperating guis that issue
mdi commands as noted in issue 361 and the transient pulsing of
halui.mdi.is_manual when selecting the mdi tab as noted in issue
285.
If the axis mdi tab is active *and* an mdi command has been
issued, cooperating guis that issue jog commands must set to
manual mode (pulse halui.mode.manual for instance).
Note:
The behavior for axis gui tabs was changed in 2.8~pre (master)
because it was inconvenient for users to try to wheel jog when
the axis gui tab was at mdi. With this commit, it will be
possible but user ancillary guis will need to address setting
mode to manual if an mdi has been issued.
ver 2.3.3
- added a label at the button of the preview window to show the actual
block-height value
- the value is stored in the preference file and will be reloaded on start up,
the corresponding hal pin is set to that value
- the block-height label is only visible, if the "use auto tool measurement"
check-box is active!
Thanks to Rubenv and crislacuf for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
Out of curiosity, I clicked on the large batch.
Apparently the original .po source was Spanish.
The Spanish jumped out at me when I happened to see it.
I came up with a translation from the lines above, but
original poster Solitarily should approve first.
Thanks.
Signed-off-by: Kim Kirwan <Kim@KimKirwan.com>
force tcl arithmetic for computing *.jog-accel-fraction
to yield floatpoint result
problem occurs if an mpg_accel item and its corresponding
[AXIS_L]MAX_ACCELERATION item are *both* specified without a decimal
point so tcl arithmetic returns integer result for computed
fraction (e.g., 0)
New twopass support for fpga boards that may use config modparam items
that have multiple num_item=value settings enclosed by quotation marks.
Tested on hardware with 7i92 using:
loadrt hm2_eth config="num_encoders=2 num_pwmgens=2 num_stepgens=3" board_ip=10.10.10.10
instead of mulitplexing reduced accels to
ini.*.max_acceleration.
Notes:
1) the prior multiplexing to ini.*.max_acceleration pins
required a helper script (scripts/xhc-hb04-accels) since
the ini pins are not available until task started.
2) the fractional accel settings apply only to wheel
jogging (not other forms of jogging using nml commands)
new motion hal pins:
axis.L.jog-accel-fraction
joint.N.jog-accel-fraction
Hal pins specify reduced acceleration for wheel jogging to reduce
impulsive motion when jog count changes occur at low frequency.
The pins specify a fraction (between 0 and 1) of the corresponding
ini setting for [*]MAX_ACCELERATION. Values less than zero or
more than 1 are ignored.
When jog-counts are increased/decreased slowly, the use of full
acceleration can cause disconcerting motion or shaking on machines
with high acceleration capabilities. This feature may be used
with or without auxiliary lowpass filtering of the *.jog-counts
inputs.
Note: Lowpass filtering of jog-counts smooths motion when
jog-counts changes are sustained but is less effective for single
event or low frequency count changes because the leading/trailing
accel occurs at the ini setting for max_acceleration.
Specify the file character set as utf-8
The way to see the problem is simply to "next" through all the steps of stepconf. The problem occurs when trying to write a non-ASCII string to a file. The popup with the python traceback doesn't have
The internet is divided on whether changing the default encoding in this way is a good idea or not. I looked into changing all the places we write data to properly encode it as UTF-8 instead, and that requires a lot more changes overall.
ver 2.3.2.3
- display message as dialog, when critical errors do avoid the start of gmoccapy
not only report in terminal
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.2
- added a new label to toolinfo box, showing the cutting speed Vc
it uses the tool diameter on mill and the x-relative value for lathe
- first code updates to the new string formating (not % but .format),
as this will be needed to switch over to python 3
Signed-off-by: Norbert Schechner <nieson@web.de>
The fix in 2.7 for the situation when the EPP cards were passed a blank
config string required a rather untidy workaround in case any existing
config was relying on the existing behaviour. The chances are almost zero
that anyone was relying on it so for master it seems appropriate to remove
the special handling.
Signed-off-by: andy pugh <andy@bodgesoc.org>
Conflicts in gmoccapy were resolved by taking the file verbatim from
the master branch:
src/emc/usr_intf/gmoccapy/gmoccapy.py
src/emc/usr_intf/gmoccapy/release_notes.txt
Since Tk8.6, Tk switched from using real events like <Left> to using
virtual events like <<PrevChar>>. This allows them to switch
the layer at which support for e.g., emacs-style ctrl-b is handled,
but it caused a regression with the way AXIS causes the arrow keys
to sometimes control jogging and other times navigate within entry
fields like MDI.
This is the motion type, such as G0/G1/G2/G38.x. Restoring G0
and G1 work fine (they don't need any axis letters to appear
on the same line), but restoring arc modes doesn't work
("R i j k words all missing for arc"), nor does restoring a
probing mode ("all axes missing with motion code").
ver 2.3.1.9
- dialogs, changed entry_dialog check for integer before show_all
This was only a cosmetic change
- Solved bug in lathe mode, changing the size of DRO, did not
change the Y DRO (D). Thanks to Partic T for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
tl;dr
Prevent spurious errors from
motion/command.c:check_axis_constraint()
for unused axis coordinates. These unused axis
coordinates have axis.max_pos_limit==0 and
axis.min_pos_limit==0. Tiny (1e-323) input
target values may trigger error detection.
Example: during testing of a custom xyz config:
1) estop off, machine on, home
2) mdi: g0 x1
Errors reported on unused (ABCUVW) coordinates:
"Linear move on line 0 would exceed A's positive limit"
"Linear move on line 0 would exceed B's positive limit"
...
3) add some test code to
motion/command.c:check_axis_constraint()
to report target values triggering above errors:
"target=1.976e-323 id=0 axis_no=3 axis_name=A nl=0 pl=0"
"target=6.942e-310 id=0 axis_no=4 axis_name=B nl=0 pl=0"
...
The tiny reported target is above the positive limit
(pl = 0) but the tiny value is physically
unrealistic.
4) The reported target values are smaller than the
IEEE minimum normalized double precision values
(2.2e-308), ref:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
5) In the test custom kins module, these small values are
due to the subtraction of nominally equal values
6) The problem observed in the test custom kins module
can be reproduced using the trivkins.c and adding a
tiny value to the A coordinate in its kinematicsForward()
function:
- case 3: SET(a); break;
+ case 3: SET(a) + 1e-323; break;
Test as above using configs/sim/axis/axis.ini:
a) estop off, machine on, home-all
b) mdi: g0 x1
c) reports error on the A axis (SET(a) above)
d) similar results using BCUVW coordinates
7) More tests in trivkins.c:
+ case 3: SET(a) + 1e-320; break; --> shows problem
+ case 3: SET(a) + 1e-323; break; --> shows problem
+ case 3: SET(a) + 1e-324; break; --> noproblem
8) reproduced modified trivkins example on:
Debian GNU/Linux 8.2 (jessie)
4.1.0-0.bpo.2-rt-amd64
gcc (Debian 4.9.2-10) 4.9.2
Wheezy, 3.4-9-rtai-686-pae (VirtualBox)
Mint 18.1, 4.4.0-53-generic (VirtualBox)
Stretch, 4.9.0-3-rt-amd64 (VirtualBox)
ver 2.3.1.8
- made dialogs a Class and enable gobject signals with the dialogs
Now a sound will be played if a dialog pops up.
This is a first step to modify all the handling within the GUI to
make most parts react to signal and slots.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.1.7
- minor bug in self periodic, forgot to change an AUDIO_AVIABLE setting
- some work on tool handling, i.e. not possible to delete tool in spindle
any more and after applying changes the tool in spindle will be marked
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.1.6
- solved the bug, that the decimal separator was changed after starting
the gui, this was related to the import of gst, as this import does
change the value of locale.localeconv()["decimal_point"]
I do not know why, but the import of gst prior to locale setting
solves the problem
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.1.5
- some code clearance, as the tooleditor stuff was reparted on several places
Now it is together in _init_tooleditor.
This is the beginning of finding the bug of decimal separator handling
Push reload will replace the German "," with the "." Why = ?????
Signed-off-by: Norbert Schechner <nieson@web.de>
If you write to 59 Temple Place you're unlikely to get a response.
Let's realign the address with a more up-to-date one from [1].
[1] https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
This is purely a cosmetic change, doesn't affect the meaning of the
license. Done to make rpmlint happy.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Notes:
1) params n0,n1,n2,d1,d2 are still available for
direct specification of coeficients for type==0
(but using type>0 and specifying f0,Q is most
common method to specify)
2) s1,s2 are internal state for debugging
I accidentally found that to achieve immediate homing, [AXIS_n]HOME should be equal to [AXIS_n]HOME_OFFSET. Otherwise, the machine would move a distance of (HOME - HOME_OFFSET) on the corresponding axis before changing current G53 coordinate to [AXIS_n]HOME, thus breaks "immediate homing".
Use-case:
Some hal components can use the units-per-mm
([TRAJ]LINEAR_UNITS) to reduce user required
configuration items.
(viz. eoffset_pid internal gain scaling)
Note:
1) simpler to implement as an inihal pin but
delayed creation not acceptable for intended usage
exclusion of LIB: halfiles worked when the
restriction was introduced at commit:
2f785439 2015-04-17
but ceased working at commit:
70c89f55 2015-07-27
because halfilelist became a fullpath (excluding the text
searched for ("LIB:") in the unprocessed halfile filename)
Allowing search for setp commands in LIB: halfiles is
advantageous to applications that may require user ini file
items in conjunction with LIB: hal files that are provided
to establish required items and enforce consistency in hal
connections and naming. (e.g., external_offsets eoffset_pid
reference design examples)
Note: emccalib.tcl reads halfiles only to find/validate
candidate items for tuning; updating writes are done only to
user inifiles (never to user or LIB: halfiles).
Formerly, calibration with emccalib.tcl only supported
ini file items like:
[JOINT_N]name=value
Now support additional stanza names:
[JOINT_N]name=value (suffix N is a joint number)
[AXIS_L]name=value (suffix L is an axis letter)
[TUNE]name=value (no suffixes for the [TUNE] stanza)
As before, a HALFILE using a setp command for one
or more of the supported stanza items is required.
Notes:
1) related code updates:
a) forgo use of 'global' commands by
using single array (::EC()) for most
global variables
b) var names made from concatenated strings
like 'joint$j-$lowername' are
now array items like
::EC(value,$tabno,$lowername)
c) forgo use of 'array set' commands by using
conventional associative array naming
2) fix writing of extra empty lines in proc saveFile
3) restore display of wizard logo
4) removed some dead code
Commits summary:
1) negative [JOINT_N]HOME_SEQUENCE items
disable *joint* jogging for specified joints
2) new hal pins ini.N.home_sequence allows runtime
alteration of joint home_sequence to circumvent
restriction of 1)
3) new hal pin motion.homing-inhibit allows integrator
to disable homing when undesirable (for example
due to temporary use of 2)
Tested: all sim configs with negative HOME_SEQUENCE items:
sim/configs/axis/gantry.ini
sim/configs/axis/gantry_mm.ini
sim/configs/gmoccapy/gmoccapy-JA/Gantry/gantry_mm.ini
Plus user pkmcnc tested on a parallel kinematics machine
Some complicated systems take advantage of the
provisions for synchronizing the final joint homing
moves as controlled by negative [JOINT_N]HOME_SEQUENCE=
ini file items. Candidate systems include gantries
with two motors for an axis, delta robots, hexapods,
etc.
By default, the synchronization provisions also
disallow *joint* jogging prior to homing in order to
prevent jog activity that (unless executed with much
care) can misalign the machine (gantry racking for
example).
System integrators may want to allow *joint* jogging
prior to homing with some hal logic that dynamically
alters the [JOINT_N]HOME_SEQUENCE= items. Such logic
can assert the motion.homing-inhibit pin to ensure
homing is not initiated under certain conditions.
Example: synced joints 0,1 using sequence -1 for
synced homing with a switch (allow_jjog) to select sequence 1 for
*joint* jogging before homing (partial hal code):
setp mux.in0 -1
setp mux.in1 1
net home_seq <= mux.out
net home_seq => ini.0.home_sequence
net home_seq => ini.1.home_sequence
net hsequence_select <= allow_jjog
net hsequence_select => mux_sel
net hsequence_select => motion.homing-inhibit
Note that ini hal pins are not available until milltask
starts so execution of the above hal commands may need
to be deferred using an [APPLICATION]APP= script or a
a postgui halfile.
Thanks to pkmcnc for suggestion.
Use case:
1) Config uses a negative home_sequence for synchronized
homing final move (used on some gantry configs).
Jogging of joints in the sequence is disabled
(recent modification).
2) User may want a method to jog joints prior to homing
without requiring a config stop/edit/restart.
With this commmit, joints configured for synchronised homing
by negative [JOINT_N]HOME_SEQUENCE values can be temporarily
allowed to joint jog by setting hal pins (ini.N.home_sequence)
to non-negative values. Non identity kinematics should be
used (trivkins kinstype=B for KINEMATICS_BOTH).
Note: as with all ini hal pins, changes are acknowledged
when not performing coordinated motion.
tldr: no *joint* jog if negative home_sequence
Problem Statement:
------------------
Using the trivkins kinematics module with duplicated coordinates
is useful for a gantry using two motors to move a single axis
because it allows synchronization of the final homing move for
the joints involved.
However, use of duplicated coordinate letters creates problems
that are dependent on the kinematics type (as defined by the
trivkins module kinstype= parameter) and gui conventions:
1) Using kinstype=1 (KINEMATICS_IDENTITY the default) creates
numerous problems with the axis gui because it always hides
the distinctions of joints and axes for IDENTITY kinematics.
Restrictions include:
a) An axis with duplicated coordinate letters cannot
be homed individually (Home-all must be used)
b) Prior to homing, jogging a duplicated coordinate
will move only one of the joints used for the
duplicated coordinate letter.
2) Using kinstype=B (KINEMATICS_BOTH) clearly distinguishes
joints and axes and clarifies the need to HOME the machine
before operating in world coordinates for conventional
cartesian jogging and execution of mdi commands and gcode
programs.
But -- unwary operators may jog one of the joints used for
a duplicated coordinate letter excessively and rack the
machine prior to homing.
Solution:
---------
a) For any kinematics type, disable joint jogging for a joint
when it uses a negative [JOINT_n]HOME_SEQUENCE to
synchronize the final homing moves on related joints.
b) For KINEMATICS_BOTH, a request to jog a joint with a negative
HOME_SEQUENCE causes motion to report an error.
b) For KINEMATICS_IDENTITY, a request to jog a joint with a
negative HOME_SEQUENCE causes motion to reports an error
and suggests the requirement to Home the machine
With this change, gantry users can be encouraged to use
KINEMATICS_BOTH since the problem of racking is eliminated with
the use of negative HOME_SEQUENCE on synchronized joints.
Show tool rotations could apply a negative rotation incorrectly
for example:
XY-ZA
would be processed as
XY-Z-A
when rendering the tool
Signed-off-by: Tom Schneider <cts@cs2corp.com>
Impact is only for configs with more than one rotational axis.
Expectation is that rotations will be applied in the order of the GEOMETRY
attribute in the INI file. However when GEOMETRY is read in it is reversed.
This causes the tool rotations to be applied as -BA rather than A-B
Signed-off-by: Tom Schneider <cts@cs2corp.com>
This patch adds some pins useful for binary-encoded tool turrets and also corrects
some behaviour with out-of-range tool numbers.
Signed-off-by: andypugh <andy@bodgesoc.org>
ver 2.3.1.4
- if no sound is available make the sound selecting widgets on the settings page
not sensitive, Thanks to Rene for reporting this misbehavior
Signed-off-by: Norbert Schechner <nieson@web.de>
[TRAJ]CYCLE_TIME and [EMCMOT]COMM_WAIT. This patch prevents their useless
propagation into the indefinite future.
Signed-off-by: andypugh <andy@bodgesoc.org>
python-gstX.XX needed to play sounds, no side effects,
if that module can not be loaded
It is only needed to play alarm or waring sounds.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.3.1.2
- rodw reported that gmoccapy reported a wrong error if JOINT was mentioned
in the error report. That was caused due to an old change from Joints to axis
in _show_errors.
Signed-off-by: Norbert Schechner <nieson@web.de>
This removes [TRAJ]CYCLE_TIME from all sample configs and test configs,
from the docs, and from the config-generating programs stepconf and pncconf.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
The userspace part of Motion (which is responsible for sending messages
to the main realtime part of Motion) reads an ini variable named
[EMCMOT]COMM_WAIT, and manages an internal variable holding the value,
but it is never used. Remove it.
There is a short sleep in the "wait-for-ack-from-realtime-Motion" loop
of usrmotWriteEmcmotCommand(), but it's hardcoded to 25 microseconds,
it ignores this ini variable.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
There was a try exept throwing an SystemExit Error, So trying to load
a file containing a CombiDRO widget could not be loaded any more
with Glade.
Signed-off-by: Norbert Schechner <nieson@web.de>
.. by moving this extern declaration out of the anonymous
namespace. It appears that g++ makes the later definition
of rtapi_is_realtime have "C" linkage, but clang++ does not.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. to the newest version supported by ubuntu precise, the oldest
platform we support for master branch
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The comminications threads could loop indefinitely without sleeping
while waiting for transactions to complete.
Added 1ms sleep.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
The PIN_NAMES option allows you to specify names for each individual
pin, instead of consecutive numbers
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
- Undefine debugging as default
- Add spi_debug to do enable run-time debuging (map-page updated)
- The cookie is 3 words, but we want to read 4 to catch the IDROM offset, subsequently used to read the board's ID
Signed-off-by: Bertho Stultiens <bertho@vagrearg.org>
* Fix some comments for content and grammar.
* Direct VPU clock open error to info level. It is not a real error if the core clock can be read.
* Fix wrong sizeof() in platform detection (test was always false). Buffer is allocated now.
Signed-off-by: Bertho Stultiens <bertho@vagrearg.org>
- Use correct synchronized register access
- Improve driver performance by utilizing the controller's fifos
- Add module parameters to set write/read speed
- Add module parameter to probe different CEs and SPI0/1
- Allow up to 5 boards on SPI0/1 and CEs
- Add pull-up/down enable/disable module parameter
- Use dynamic memory for RPI version detection
- Only use one (io)mmap'ed area for register access
- Update man-page to describe all module parameters and suggested usage
Signed-off-by: Bertho Stultiens <bertho@vagrearg.org>
.. to better preview ungrounded gcode, axis issued a
"g53 g0 <coordinates>", which didn't work when there was a locking
rotary because it is not permitted to specify other axes to move
at the same time.
Instead, issue each move as a separate line, to satisfy the constraints
of locking rotaries.
This will work fine right up until the moment that the interpreter or
preview starts validating that the part program doesn't go outside
some complicated work volume ;-)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
currently there are inconsistencies in the way the keyboard shortcuts operate for the above
this patch causes the following operations:
if the joints radiobuttons are visible then 012345678 activate the corresponding joint
if the axes radiobuttons are visible then `1234567890 set feed override from 0% to 100% in 10% increments
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
as selected by jogging radiobuttons
The axis gui hides distinctions of joints and axes for
identity kins so when joint jogging (typ before homing),
it must determine a joint number based on the displayed
axis coordinate letter for the jogging radiobutton
selected by the user.
trivkins allows:
a) omission of axis letters from the default sequence
b) duplicate axis letters (gantry usage typ)
Before this commit, joint jogging failed for some identity
kinematics configs which explictly specified coordinates=
with omitted axis letters because the joint number used
was based on default coordinates for trivkins (xyzabcuvw).
Example (fails joint jogging for w):
[KINS]KINEMATICS = trivkins coordinates=xyzw
[TRAJ]COORDINATES = XYZW
This commit selects the joint number for joint jogging for
trivkins with identity kinematics based on the letters
specified by [TRAJ]COORDINATES (local var is trajcoordinates).
Note: as documented (docs/src/getting-started/updating-linuxcnc.txt),
it is important that the coordinates specified with the trivkins
coordinates= parameter agree with [TRAJ]COORDINATES.
Note: for duplicate_coord_letters, the joint for the first letter
specified will be used.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This is "documented" as setting a particular default modal group.
However, until now the implementation did not match the documentation.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The compiler is warning that the 'attribute((aligned))'
specification of hal_float_t is ignored. Ignoring it is
harmless (the whole intent is to strip these qualifications,
including the volatile qualifications, away; so silence the
diagnostic.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The compiler is warning that the 'attribute((aligned))'
specification of hal_float_t is ignored. Ignoring it is
harmless (the whole intent is to strip these qualifications,
including the volatile qualifications, away; so silence the
diagnostic.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
In each case I reviewed the code and determined that it was
the indentation that was misleading. I reindented the code
to match the behavior.
These diagnostics were all seen with
gcc version 6.3.0 20170516 (Debian 6.3.0-18)
on debian stretch.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Formerly, the xhc_hb04_util.comp acceleration multiplexer selected
reduced accel settings according selection pin: is-manual
A new pin (amux-enable) is added to the xhc_hb04_util.comp and now
the acceleration multiplexer is enabled by the logical operation:
is-manual AND amux-enable
The helper script (xhc-hb04.tcl) connects the new amux-enable pin
to halui.mode.is-teleop. This connection disables reduced
accelerations during homing and joint mode jogging.
Users noted stopping problems when highly reduced accels were used
during homing since the stopping distance (after triggering the
home switch) is inversely proportional to the acceleration in effect:
stop_distance = 0.5 * velocity^2 / acceleration
Prior behavior, if wanted (unlikely), may be restored by unlinking
the amux-enable pin and setp'ing it to 1.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
for required halui.* and motion.* OUT pins
If a [HAL]HALFILE executed prior to this file (LIB:xhc-hb04.tcl)
specified a signal name for a needed halui or motion output pin,
then use that name. (Prior behavior gave warning message and
continued).
Note: no attempt is made to accomodate existing signal names for halui
_input_ pins since a claimed input pin presumably means an output for
the signal is already made (or intended). As before, a message is
is given and and execution continues.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Corrections for PR changes requested.
Changes to set radiobutton to active axis when keyboard jog starts.
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
This causes problems with environments and developers that like to
recognize "***" as denoting a build error, as in
make: *** You don't exist. Go away.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This led to the build proclaiming
cp: cannot stat ‘../docs/src/hal/:images/simulate_probe.png’: No such file or directory
../docs/src/Submakefile:466: recipe for target '.html-images-stamp' failed
make: *** [.html-images-stamp] Error 1
and elsewhere,
Image 'hal/:images/simulate_probe.png' not found
I don't know why this is, but pulling the alt= to be all on
one physical line of the source fixed it.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Since linuxcnc can have only one program poll errors,
this code made other independant programs not get the errors
consistantly.
Need to think of a better way.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Now we return to something like the status quo ante in 2.7:
filesystem operations are done as the user, but the real and
effective user IDs are always root when running in realtime.
The rtapi_do_as_root API has been deleted, but it was never
documented and never in a released version.
This is unfortunate but necessary since calling setreuid() causes
loss of realtime on PREEMPT_RT and hard locks in RTAI.
I verified this to still work with PCI and ethernet hostmot2 cards
on Debian Jessie, which covers most of the in-tree places where
the "as root" functions were used. Furthermore, I verified
(using a non-commited, interactive test) that rtapi_spawn_as_root
still spawns with EUID=RUID=0 even though they are now nothing
more than wrappers that directly call posix_spawn.
Finally, I verified that the RTAI hard locks were resolved.
I was uanble to duplicate the report of missed realtime deadlines
when starting halscope on preempt-rt after thread creation,
testing with 4.9.0-0.bpo.2-rt-amd64 on Debian Jessie.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Currently if a sserial remote transmits a data-type that is unrecognized by the
driver then an error message is printed every servo thread.
Signed-off-by: andy pugh <andy@bodgesoc.org>
change the continuous_jog function to do_jog to fit better - before someone uses them!
add a function to get jograte to go with the set jograte function
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
The forced update function should emit status regardless if it's true or false
With the 'if' statements some programs would start out of synch untill status
changd again.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
on a trivkins config with kinstype of not both such as sim/axis/lathe that is not homed:
the axes radiobuttons are deselected when any jog stops
using the axes activate keys (XYZA) does not show on the radiobuttons
tested on sim/axis/ lathe, historical_lathe and axis
no ill effects appear on sim/axis/ gantry, ldelta or rdelta
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
when jogging in joint mode from the keyboard direction keys, if the
joint number is larger than the number of axes then the joint will
not jog
this shows up in sim/axis/gantry when trying to jog joint 3 with the
left/right bracket keys
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
fixes jogging error on a lathe with the axis gui when using plus/minus
keys on the keyboard or plus/minus buttons within the gui
Signed-off-by: Phillip Carter <phillcarter54@gmail.com>
remove: axis.py: def jnum_for_aletter()
note: glcanon.py has and uses a viable jnum_for_aletter()
function
Attempt to expand/improve comments about duplicate_coord_letters
for special case where one switches to joint mode after homing.
The behavior that the commentary describes can be shown with
configs/sim/axis/gantry.ini -- an XYZY machine with kinstype=both
The warning note is intended for implementers/users of (future)
custom kinematics modules for machines that might need to support
duplicate axis letters and use the axis gui. The handling of
duplicate letters by trivkins is simple but not necessarily a
model for other uses.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Try some clarifications:
Guis (like axis) attempt to hide the distinctions
of joints and axes for machines with identity kinematics,
but homing is usually still important for most machines.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver 2.3.0
- joint axis branch did change the handling between joints and axis. Previously
it was needed to include a unused Y axis for a lathe and now that is not longer
needed. There are some more changes, that needed some additional changes to
gmoccapy. I have passed a lot of code over to get_ini_info.
- all config files have been changed to support the new behavior. I tried to make
all the code compatible with older configs. Some might need the not used axis
to be included in homing entries in the ini files.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.2.5.2
- if the GUI tries to reload a tool on restart and that tool was not found in
the tool table, the GUI remained in MDI mode, while it was showing the manual
view. This leaded to the problem, that jogging was not possible, but users
thought they where in MANUAL mode, where jogging should be allowed.
Signed-off-by: Norbert Schechner <nieson@web.de>
Would error out if there was a problem with theme links - even
if the themes were not being used.
Now we just silently ignore them.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Some screens don't have th eselection widgets for search options.
Instead of erroring we now use reasonable defaults.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Now we use the theme's color for highlight of text.
when searching text we highlight, select and grab focus
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
This widget use to set the background directly to white.
In some themes the text color would be white so couldn't be seen.
Now it follows the theme suggested background colors.
I took the background color away from the liststore since it caused
an error message when blank.
As there was no helper function, I doubt this option was exercised.
One can still change the background directly with python.
It does require more code and more knowledge to do.
I could avoid the error message by filling in the liststore color
with the system/theme color when realized, but it seems alot of fooling
around for little - the theme background is probably the way to go always..
If people complain I will look into it again.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
The keycode output from this component is missing the
7i73's nochange and allup codes. This adds the nochange.
The allup will take more thought and so far this works for what I need.
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
One couldn't add HAl pins in the handler file because the
HAL prefix name was defined after the handler file was initialized.
Meaning the pins in the handler file would have a different prefix
the the pins made in commands.py
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
"man --warn" (run by lintian) let us know that ".R" is not a valid macro.
It was not clear to me what groff macro the author intended there,
so I just removed it. The manpage renders fine and legible to me,
and without warnings.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
In Asciidoc a string in square brackets is an 'attribute list' that gets
passed to the code that deals with the following block element.
This commit changes the attribute lists of a couple of 'paragraph'
block elements. Paragraph blocks expect their attribute list to identify
which paragraph style to use.
'Note' is not a known paragraph style, so asciidoc complains:
asciidoc: WARNING: gmoccapy.txt: line 680: missing style: [paradef-default]: Note
It then renders the following paragraph in the default style.
This commit changes the attribute from "Note" to "NOTE" (in all caps),
so that asciidoc uses the "NOTE admonishion" paragraph style for those
paragraphs.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
ver 2.2.5.1
- added a new dictionary self.joint_axis_dic to maintain the relation between
joints and axis. This was tested with gantry and non identical configs. There
might be configs out there witch won't work with gmoccapy.
I found that the only way to get gantry XYYZ and i.e. XYZCW config to work
with the homing button and the DRO settings
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.2.5
- this repairs the parts I broke on glade applications and the former used
code in CombiDRO moved in a similar mode to gmoccapy. Now after the merge of
sequential homing branch it is easier to use a gantry config with gmoccapy.
There is still need to adapt the "on_btn_homing_selected" part of the GUI, as
now a XYZC config will not allow homing of C, as the joints are not ordered
correctly
Signed-off-by: Norbert Schechner <nieson@web.de>
The 'Usage example' was correct, the syntax spec had
a misordering of joint-flag and axis-or-joint-number
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
#230 reports incorrect behaviour if no [TRAJ]MAX_VELOCITY exits.
#236 reports too-general reformatting of some setp commands
Signed-off-by: andypugh <andy@bodgesoc.org>
1) before this commit, hal pins axis.L.pos-cmd were
only valid for teleop, now update in
control.c/output_to_hal() so pins are valid for
coordinated motion too.
2) rename to conform to actual implementation:
was: axis.L.vel-cmd
is: axis.L.teleop-vel-cmd
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ToDo: How to avoid on a gantry machine the change back to joint
mode after homing, as at this state jogging one joint
could cause serious damage to the machine.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver 2.2.3.2
- solved a bug caused due to an unappropriated merge of Sebastian Kuzminski
causing a hal pin to be created twice.
Signed-off-by: Norbert Schechner <nieson@web.de>
for joints that have a negative [JOINT_n]HOME_SEQUENCE value
and home together with a synchronized final move
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
A convenience HALFILE for configs that demonstrate wheel jogging.
Enable wheel jog pins for all axis letters and up to 9 joints.
Errors due to missing joints are ignored.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver 2.2.4
- introduced a check for double axis letters in [TRAJ]COORDINATES = X Y Y Z
to set the homing button of the double mentioned axis. This is to protect
a gantry from being damaged homing only one joint of two.
Thanks to rodw for insisting to solve the misbehavior
Signed-off-by: Norbert Schechner <nieson@web.de>
(v10 rebase to master at 9e23976 2017-02-15 17:53:46 -0700)
For all joints sharing a matching _negative_ HOME_SEQUENCE like:
[JOINT_i]HOME_SEQUENCE = -n
[JOINT_j]HOME_SEQUENCE = -n
[JOINT_k]HOME_SEQUENCE = -n
... etc.
homing one of these joints will home the others too.
So:
Homing JOINT_i will also home JOINT_j, JOINT_k, ... etc
Homing JOINT_j will also home JOINT_i, JOINT_k, ... etc
Homing JOINT_k will also home JOINT_i, JOINT_j, ... etc
Note:
With joints_axes incorporation, negative home sequences
specify synchronization of the final move to [JOINT_i]HOME.
Formerly this synching was as available only with Home-ALL.
This commit applies the synchronization when homing for
any of the matching joints.
runtests note:
This commit conforms to docs/src/config/ini-homing.txt
"If HOME_SEQUENCE is not specified then this joint will not be
homed by the HOME ALL sequence".
To comply, the tests/motion/jogwheel-axis/motion-test.ini was
adapted by providing missing [JOINT_n]HOME_SEQUENCE= items
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
as in 2.7 (at current commit e4aa855 2017-01-28)
was changed inadvertently (typo,cut/paste?) in early ja work at commit:
1adc33f 2010-01-02 01:40:41 +0100
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
and
add notes about homing sequences for coordinates
with multiple joints.
use slower homing velocities to aid visualization
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
+ver 2.2.3.1
- solved the reload tool on start up bug after homing twice
if there is already a tool in spindle, the user
homed the second time, unfortunately we will then
not get out of MDI mode any more
That happen, because the tool in spindle did not change, so the
tool info is not updated and we self.change_tool will not be reseted
Thanks to timmert for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
1) detect joint_type only for jointcount quantity ([KINS]JOINTS)
2) detect axis_type with proper case of [AXIS_%s]
3) specify missing ini items by name
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
+ver. 2.2.3
+- added patch from gmoccapy 1.5.7
+- new hal pin gmoccapy.ignore-limits so that this function can be
+ handled from hardware switch
+ Ask by some users, done because of a wish of Timothy Snowden
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.2.2
- When running a program, press pause, then stop, the axis will make a jump to
a unknown position, (I think related to read ahead). I added a additional
command.aboard(), even that this command is already called within hal action.
I do not know why, but this solved the issue as far as I can see.
Thanks to racedirector for reporting
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.2.1
- if linuxcnc is restarted without shutting down gmoccapy, it was not possible
to close gmoccapy (except from comandline with killall -9 gmoccapy
I added a check to status.poll and now a raise SystemExit will be called.
as this also applies to CombiDRO a added that there too.
I added gmoccapy to the linuxcnc script to be killed on restart
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.2.0.3
- changed the height and width adjustments for the window size in the
glade file, as width was limited to 1280 pixel.
Now the max limit is 3920 pixel.
Signed-off-by: Norbert Schechner <nieson@web.de>
The functionality to return `INTERP_EXECUTE_FINISH` in a python
remap function has always existed, but was broken until PR #135.
The fix revealed a bug in the standard remap `change_epilog()`
function, which was not written as a python generator function.
Thanks to @dhwiezel for discovering and reporting this bug. Fixes
#217.
Signed-off-by: John Morris john@zultron.com
Some png image files were removed with commit 9bf4a39 2017-01-01
but gmoccapy-hu.txt was not updated so docs build fails.
Note: Changes are marked in-place with 'FIXME', other changes may
be needed to update this Hungarian language file to synchronize
with its English language precursor (gmoccapy.txt).
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
+ver. 2.2.0.2
- if no MACROS was given in INI file, the getiniinfo returns a NONE,
leading to an exception in gmoccapy, corrected that
Signed-off-by: Norbert Schechner <nieson@web.de>
+ver. 2.2.0.1
+- make the reload tool option a selectable feature on the
+ settings page. It will be on by default!
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.2.0
- gmoccapy will save the tool in spindle on every change in its
preference file and reload that tool with it's length offset
till now only tested for mill!
This will not work if NO_FORCE_HOMING is used, because with such
a configuration the signal "all_homed" will not be emitted.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.1.6.5
- changed the expanding way of the widgets in the INFO box
to better appearance on 16:9 screens, the tool info will
not grow alone, but also spindle and vel info boxes
Signed-off-by: Norbert Schechner <nieson@web.de>
added the patch from ver. 1.5.6.9
- if no MACROS where given, or the paths where not correct, the Keyboard button
in MDI mode was not any more in the most right position, leading to wrong
order in horizontal hal button handling
Signed-off-by: Norbert Schechner <nieson@web.de>
Added the onTreeNavigateKeyPress function which handles key presses in all three tree view widgets. The tab and right arrow keys will accept the current value in the cell and progress to the next visible cell to the right. If there is no cell to the right then it moves to the first visible cell in the row. The left arrow key is the same except it moves left. The enter key and the down arrow key accepts the current entry in the cell and moves to the next row same column. If on the last row then it will move to the top row. Up arrow key is the same but moves up instead.
Signed-off-by: Jim Craig <jimcraig5615@windstream.net>
Prior to joints_axes incorporation, homing velocities
(search, latch, final) honored the [JOINT_N]MAX_VELOCITY
setting -- e.g., [JOINT_N]MAX_VELOCITY clamps if larger
values are specified for the homing velocities:
[JOINT_N]HOME_SEARCH_VELOCITY
[JOINT_N]HOME_LATCH_VELOCITY
[JOINT_N]HOME_FINAL_VELOCITY
Bisect: the clamp on search and latch velocities was
lost (inadvertently ?) in joints_axes3 with commit:
b413513 2009-12-16 Merge branch 'master' into joints_axes3
Thanks to Sam Sokolik for spotting the problem and testing
this patch.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.1.6.3
- Dawey Garret changed the init_glcanondraw() behavior, making
some changes in gmoccapy and getiniinfo. That is why I changed the
release number
Signed-off-by: Norbert Schechner <nieson@web.de>
1) update hal_gremlin.py to
a) invoke init_glcanondraw()
b) find an inifile if running within a standalone
gladevcp app (providing linuxcnc is running)
2) remove (now uneeded) call to init_glcanondraw() in:
gscreen.py
gmoccapy.py
gremlin_view.py
3) clarify init_glcannondraw() parameter name
was: kinstype, is: kinsmodule
With joints-axes, glcanon.py uses: [TRAJ]COORDINATES, [KINS]KINEMATICS
to handle special cases for display. In the future, these items could
be included in linuxcnc.stat and eliminate need to find a running
instance of linuxcnc for standalone gladevcp apps.
Note about insufficiency of existing stat items:
stat.kinematics_type gives info about KINEMATICS_IDENTITY,
KINEMATICS_BOTH, etc. but doesn't identify the
kinematics module name which is used for setting joint-axis
relationships for _known_ kinematics modules names (viz. trivkins)
stat.axis_mask gives info from [TRAJ]COORDINATES but
does not address possibility for duplicated coordinate
letters (sometimes used for gantrys like xyyz)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.1.6.1
- bug handling of G96 CSS, related to the update of the
real spindle speed label
Thanks to Hakan for reporting this
- Jumping spindle speed label due to a calculation error between
two functions, and double setting of a label, Solved!
Signed-off-by: Norbert Schechner <nieson@web.de>
g74 (left-hand), g84 (right-hand)
- assumes spindle running cw(g84), ccw(g74)
- feedrate > 0
- takes optional P word (dwell at bottom of hole before feedrate retract)
canon: add optional wait_for_atspeed parameter
normally, turning the spindle on makes the next feed move wait for spindle
at speed. A floating tap needs an immediate reverse feed out, so the
wait needs to be suppressed in this case.
Pass this from canon through task to motion, and do the right thing in
motion. Also adapt gcodemodule.cc,saicanon.cc for new calling convention,
and make task pass it on to motion from canon.
Tests for G84/G74 Floating tapping cycles
Closes#120.
Signed-off-by: Tero Kaarlela <tero.kaarlela@eka-sorvaus.fi>
.. these are needed for save/restore of these enables to work right
in canned cycle tests with g74/g84
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Multi-turn encoders should never wrap, and a false detection of a wrap may
lead to permanent offsets that can not be removed without a restart
This commit adds an extra flag for SSI BiSS and Fanuc encoders.
Signed-off-by: andypugh <andy@bodgesoc.org>
Formerly, the proc save_hal_cmds created an equivalent hal
commands file (*_cmds.hal) using the halcmd 'save allu' to
record a complete hal state record. A complete record must
include a setp command for unconnected hal input pins that
are altered (from their default value) by setp commands
evaluated before the save command. The 'save allu' command
creates setp commands for all unconnected input pins
including ones where the pin default value is unaltered. For
the purposes of basic_sim.tcl, this makes many more setp
statements than required for reproducing hal state.
With this commit, the save_hal_cmds proc uses the halcmd
'save all' (which does not make setp commands for
unconnected input pins) and adds setp cmds only for the ones
issued explicitly within sim_lib.tcl.
ref: 1418b55 basic_sim.tcl: create equivalent halcmds halfile
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Use the halcmd save command with the "allu" type
to save the state of unconnected hal input pins that
have been set with setp statements.
The halcmd save "allu" type has been added with a prior commit"
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
"unconnectedinpins"
make a setp command for all unconnected input pins
"allu"
save for these types:
comp,alias,sigu,netla,param,unconnectedinpins, and thread
Use 'save allu' to save state when setp commands have been
used on unconnected input pins (prior to issuing the
'save allu' command).
New types are added (unconnectedinpins,allu) preserving backwards
comatibility.
see also:
1418b55 basic_sim.tcl: create equivalent halcmds halfile
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
--install-suggests is the default on ubuntu, which is what travis
uses; switching to --no-install-suggests saves a few hundred megs(!)
of installed package size, 425MB vs 1053MB.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
the main benefit is that DOC_DEPENDS is being broken out,
but a lot of repetition is also removed, and stanzas related
to unsupported distribution have been deleted.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Conflicts:
docs/src/config/ini-config.txt
docs/src/getting-started/updating-linuxcnc.txt
lib/python/gladevcp/combi_dro.py
src/emc/usr_intf/gmoccapy/getiniinfo.py
src/emc/usr_intf/gmoccapy/gmoccapy.py
src/emc/usr_intf/gmoccapy/release_notes.txt
gmoccapy_2_1_6 - merged the changes I made to 1.5.6.5 to 1.5.6.8
Signed-off-by: Norbert Schechner <nieson@web.de>
Improve support for Mint 18 (LTS), and
anticipate support for future 18.x (LTS) releases.
(Why doesn't Mint just call the first one 18.0? Bah.)
Added during Oct 2016 Fest in Wichita. Thanks, Seb!
Signed-off-by: Kim Kirwan <Kim@KimKirwan.com>
In addition to converting Roll and Pitch commands to dual motor commands,
convert dual motor feedback to Roll and Pitch feedback.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
-reinsert lines for backward compatibility for old versions (?, i think is better)
-my own typo -> Rapid Override"::"
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
german/auf deutsch: Es war ein bisschen tricky im Menü "Ansicht". Nur noch die Hotkeys "j", "q", "x" und "y" waren eigentlich frei zur Verwendung, darum (vorerst) die Notlösung mit den Hotkeys in Klammern für Benutzer die kpl. mit Hotkeys arbeiten wollen ...
Einige Hotkeys waren auch (durch Noch-Nicht-Übersetzung) doppelt vergeben -> wurde so gut es geht auch gleich mit korrigiert.
.. otherwise, after running debuild, this file is removed
and git will urge you to commit the removal.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
prior to Tk 8.4 (?), radiobutton and checkbutton widgets had a
motif-style appearance that looked unusual compared to the
typical style of radiobuttons. I included a hack for placing
images over the button indicators. But in current versions of
Tk, these widgets look about like one expects, so the hack can be
dropped.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
fix1:
wrong path indication, all images are not displayed in the skin
solved: "../gscreen/images/" -> replaced with -> "../../images/"
------------
fix2:
in auto-mode / edit
added:
->missing: replace - entry field
->missing: replace all - check button
->missing: ignore case - check button
->missing: replace text - button
with this second fix, the buttons "search bwd" and "search fwd" then work again
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
github appears to sniff the contents of the COPYING file to determine the
project license; The result of their sniff is "LGPL-2.1", which is wrong
because for making decisions about incorporating LinuxCNC "in bulk" into other
software you would need to know that portions of it are GPL-2.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This makes the default DRO format be just like the old non-configurable format,
and fixes the spaces so the columns align again.
Signed-off-by: Chris Radek <chris@timeguy.com>
in auto-mode / edit
added:
->missing: replace - entry field
->missing: replace all - check button
->missing: ignore case - check button
->missing: replace text - button
with this fix, the buttons "search bwd" and "search fwd" then work again
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
addresses error with different comp_id seen on one buildslave in
test results.
rip-jessie-rtpreempt-i386/build/tests/twopass:
FAIL: result differed from expected
Different comp_ids might result from a race in hal processing,
this commit uses halcmd -s (scripting) to show component
name instead of comp_id
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
For better recognizability of the left as a link and in harmony with the other links in the section of the interfaces.
The site (pico) supports both formats: with and without -www- ...
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
also trailing
noticed by failure in check_config validating mandatory
item [KINS]KINEMATICS= if leading whitespace present
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This restores hm2_eth to working on debian jessie after the
privilege handling changes in rtapi uspace.
It also makes hm2_eth work on mint 18, where /bin/sh is in the habit
of setting the effective user id to the real user id.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This will be necessary, for example, when hm2_eth does its
ioctls to manipulate the static ARP table.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
These are not quite a simple composition of WITH_ROOT
and posix_spawn{,p}, because some implementations of /bin/sh
set the effective user id to the real user id as a hardening
measure (https://bugs.launchpad.net/ubuntu/+source/dash/+bug/1215660)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
setfsuid is nonportable, and it feels like the way we do priviege
switching with it is contributing to the hm2_eth problems on mint
18.
The new code is based off
https://www.gnu.org/software/libc/manual/html_node/Setuid-Program-Example.html
assuming _POSIX_SAVED_IDS (all the world's a VAX).
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
the >>>.titles<<< are normally used for the description of the image. Here in this case, but as a heading for the next example.
This irritates and the false old tags are removed.
Signed-off-by: Thoren Seufl <t_seufl@gmx.de>
configuration is:
KINEMATICS_IDENTITY
with
duplicate_coord_letters (like xyyz used for a gantry with
two joints for a single coordinate letter)
At axis gui startup, report condition and do not create menu items
for home/unhome for duplicated coordinate letters
When 'Home' key is used to try to home a duplicated coordinate letter,
decline attempt and report condition to stdout.
This commit attempts to mitigate the bad behavior described
in forum post:
https://forum.linuxcnc.org/forum/38-general-linuxcnc-questions/31598-random-motion-and-lost-steps-after-upgrade?start=10#81253
-------------------------------------------------------------------
To handle individual coordinate letter homing when there are
duplicated coordinate letters assigned to separate joints will require
new protocols and implementation in src/emc/motion/homing.c (and
elsewhere). To date, homing has been supported for
a) a single joint (joint_num)
b) all joints (joint_num == -1)
Such changes are not attempted herein but if implemented will require
additional work to accomodate such protocols in the axis gui.
Notes:
Using KINEMATICS_BOTH allows homing of individual joints. However, a
gantry user might want to home a single coordinate with two joints while
honoring the HOME_SEQUENCE specified in the ini file.
Using 'Home All' functionality works with all combinations of
KINEMATICS_IDENTITY or KINEMATICS_BOTH and with duplicated coordinate
letters and obeys defined HOME_SEQUENCE ini items.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
write_one_axis() receives a parameter for an axis letter
so it need not be derived as if all axis letters present
for XZ lathe configs, error was:
an [AXIS_Y] section was created
when it should have been [AXIS_Z]
This resulted in use of default MIN_LIMIT, MAX_LIMIT for [AXIS_Z}
triggering an error in check_config() in the linuxcnc script
that attempts to validate limits for machines with identity kinematics
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.1.5
- halui spindle override bug, caused by a race conflict
Thanks to pippin88 and dinkata to help solving his one
Signed-off-by: Norbert Schechner <nieson@web.de>
write_one_axis() receives a parameter for an axis letter
so it need not be derived as if all axis letters present
for XZ lathe configs, error was:
an [AXIS_Y] section was created
when it should have been [AXIS_Z]
This resulted in use of default MIN_LIMIT, MAX_LIMIT for [AXIS_Z}
triggering an error in check_config() in the linuxcnc script
that attempts to validate limits for machines with identity kinematics
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Requests to add more (or fewer) significant digits to the DRO for specific
machines or to force a + sign are not uncommon. This commit saves users
from the horror of editing the Python code themselves.
A basic validity check is made, but otherwise no restrictions are made:
hexadecimal, binary, exponent notation are all possible.
Signed-off-by: andypugh <andy@bodgesoc.org>
Conflicts:
tests/rs274ngc-startup/test-ui.py
tests/startup-state/test-ui.py
These two conflicted because the wait_for_linuxcnc_startup() function
moved from the test-ui.py scripts to lib/python/linuxcnc_util.
It's correct in linuxcnc_util; while moving the code there is when
I noticed the problem.
ver. 2.1.4
- lathe wear offsets has been displayed by default, IMHO that
disturbs most users, as the wear offsets do only work with
remaped code. That part is only weak documented.
- If the user wants to use wear offsets, he will have to include
in [DISPLAY] LATHE_WEAR_OFFSETS = 1, otherwise the additional tabs
will be hidden.
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.1.3
- mode change was possible with keyboard shortcuts, even if the
interpreter was running.
- if the user changed with keyboard shortcut a mode and after that to
an other mode with button, it was not possible to change to the
previous mode with the keyboard shortcut, as the last key event
is recorded. Now the hal status event will reset the key event
Signed-off-by: Norbert Schechner <nieson@web.de>
Have just one copy of this test, in the linuxcnc_util module.
And fix a silly cut-n-paste error while I'm at it...
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
There is no level-5 heading available in asciidoc (even though
there is in HTML). Introduce a definition list instead.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The previous version of the script would find #[COMMENTED_SECTION] when
scanning for custom sections, and then get stuck if it found another.
Commented sections are now ignored, but will tend to get copied accross
anyway as part of the section immediately above. This is probably what
users want.
Signed-off-by: andypugh <andy@bodgesoc.org>
In cases where a single pin is replaced by two pins, for example the mpg
jogging pins which now have separate joint and axis versions, the script
would put both new pins in one "setp" statement, leading to a HAL parsing
error.
I tried to avoid creating the bad statements in the first place, but it is
harder than it seems, so now the code simply repairs them.
Signed-off-by: andypugh <andy@bodgesoc.org>
Eventually all man pages will be asciidoc in docs/src/ and
the troff pages in docs/man/ will be auto-generated. But
that may take a while, and in the meantime troff pages in
docs/src/ aren't usable. When the move comes in the future
this page can move with all the rest.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
gcc 4.9 warns:
hal/drivers/hal_bb_gpio.c:410:29: warning: iteration 91u invokes undefined behavior [-Waggressive-loop-optimizations]
if(port->output_pins[i] == NULL) continue; // short circuit if hal hasn't malloc'd a bit at this location
^
and similarly for the other arrays.
This happens because the array size was (PINS_PER_HEADER * HEADERS)
and the loop was on 1 <= i <= HEADERS*PINS_PER_HEADER, i.e.,
one-based thinking. I don't know how thoroughly this 1-based
counting is baked into the component, but allocating just four more
pointers is no big deal and fixes the possibility of running off
the end.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. due to insufficient care on my part, I added part of the
'halonly' build system tweaks at 1070a8ae44 when I committed the
beagle bone gpio driver.
This didn't show up locally because I did not start with a clean
source tree to test.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
If the GPIO bank (1, 2, or 3) associated with a requested
pin is disabled, the driver would crash due to bus timeout.
This patch tests the bank enabled/disabled status before
attempting to access the bank. If the bank is disabled,
it prints a (hopefully) helpful message before exiting
cleanly.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
Based on work in MachineKit by:
Alexander Rössler <mail.aroessler@gmail.com>
Charles Steinkuehler <charles@steinkuehler.net>
Ian McMahon <imcmahon@prototechnical.com>
Michael Haberler <git@mah.priv.at>
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This was incorrectly removed at e996a30f96, and the consequence
is that messages from realtime would not appear until shutdown
(and a small limit is imposed on the total number of messages
per session). Whoops!
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
emcMotionUpdate() polls for a new config struct from Motion (setting
the "new_config" flag True if so), then (among other things) calls
emcJointUpdate() and emcTrajUpdate().
emcJointUpdate() checks the "new_config" flag and if it's set, iterates
over the configured joints (the ones between 0 and stat->traj.joints),
copying information from the emcmotStatus struct (from Motion) into the
emcStatus struct (to the user interfaces).
emcTrajUpdate() updates various emcStatus fields from the emcmotConfig,
including the one named "traj.joints" which is used by emcJointUpdate().
Before this commit, during bootup, only the first joint would get updated
by emcJointUpdate(), because stat->traj.joints was not updated yet and
had its default value of 1.
This commit changes emcMotionUpdate() to call emcTrajUpdate() before
emcJointUpdate(), so that stat->traj.joints has the correct joint count
by the time we use it.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
The original test would give differing results on different
sytems due to floating point rounding.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
Unit test checks:
- M62-M68 remapping, python and ngc
- Recursivity
- Plumbing through interp, task and HAL
Signed-off-by: John Morris <john@zultron.com>
There's a difference in floating-point rounding on different platforms
that makes this test's correct output inconsistent. Skip the test until
we figure out how to deal with it.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
The 'in-limit' pin is false when the output is exactly
tracking the input, and true when position, velocity,
or accel limit causes the output to differ from the
input.
Also replaced test limit3.1 (which was a duplicate
of limit3.0) with a more complete test that verifies
accel and velocity limitation and the 'in-limit' pin.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
The new output pins are only created if called for by
'personality', so change is backwards compatible.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
The limit value inputs were parameters, but are more
flexible if implemented as pins. The change is pretty
transparent, since setp will set either a param or a
pin. This change was done for limit3 in 2010, just
bringing the other two up to date.
Signed-off-by: John Kasunich <jmkasunich@fastmail.fm>
ver. 2.1.1
- starting with estop-reset, caused some errors, because it is not
possible to JOG_STOP with machine in OFF state
Signed-off-by: Norbert Schechner <nieson@web.de>
When a python epilog returns `INTERP_EXECUTE_FINISH`:
- Set the executing block call type to `CT_REMAP` so the next `read()`
skips, and
- Return control to task.
The next call to `execute()` will resume epilog execution.
Signed-off-by: John Morris <john@zultron.com>
`mdi_interrupt` is useful for forcing execution of an ngc file as
though it were a subroutine. Python routines are not ngc files, and
don't need this.
Signed-off-by: John Morris <john@zultron.com>
Fix segfault when calling `self.execute()` after reentering a python
remap, caused by entering a new remap level.
There's no need to save/restore the current block: if the return value
is `INTERP_OK`, then the block is done executing and no longer needed;
if the return value is `INTERP_FINISH_EXECUTE`, that will immediately
be passed up the stack and out the top-level `execute()`, and the next
`execute()` call will resume the python generator, where the last
block is irrelevant.
A `self.execute(command)` within the python does need to have
`command` read; temporarily set call state to `CS_NORMAL` so `read()`
won't skip reading.
Signed-off-by: John Morris <john@zultron.com>
The new sequence as seen by strace is:
1 open("sim.var.new", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
2 open("sim.var", O_RDONLY) = 5
3 [read sim.var and write sim.var.new]
4 fdatasync(4) = 0
5 unlink("sim.var.bak") = 0
6 link("sim.var", "sim.var.bak") = 0
7 rename("sim.var.new", "sim.var") = 0
Now, the contents you get by reading sim.var change atomically at step 7.
Because of the fdatasync at step 4, it is even robust against whole-system
crashes; without it, it would be possible ot get a zero-byte file instead.
https://lwn.net/Articles/322823/http://oss.sgi.com/archives/xfs/2012-03/msg00056.htmlCloses#54
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Add strut length correction for non-captive screw actuators with
universal (cardanic) joints, provide parameters for joint axes unit
vectors and screw lead, add pins to show correction values.
Update kins.9 manpage.
Signed-off-by: Andrew Kyrychenko <amkyrychenko@gmail.com>
Add spindle-offset pin to facilitate adjusting spindle position.
Convert pins to parameters where possible.
Document new pins.
Signed-off-by: Andrew Kyrychenko <amkyrychenko@gmail.com>
ver. 2.1.0
- reworked Combi_DRO to fit the needs of JA requierements
- some configs must be adapted to the new hal pin names, as they are
put together in groups, so all stuff with jog is in that group
- Hiding the jog button in world mode is possible with a command line argument
- reorderd some code to be more understandable
- deleted a lot of debug prints
- still having problems with matchbox-keyboard, it is found, but not shown
on every config, need more testing.
Signed-off-by: Norbert Schechner <nieson@web.de>
All mesa SPI boards include onboard eeprom/flash which is programmed via
mesaflash, not at runtime like older PCI/EPP boards.
this also fixes a scan-build diagnostic:
hal/drivers/mesa-hostmot2/hm2_rpspi.c:529:12: warning: ‘hm2_rpspi_program’ defined but not used [-Wunused-function]
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This merge was done with the "ours" merge strategy, so the resulting
tree is identical to master before this merge. In other words, the
changes from 2.7 are discarded.
The 2.7 changes since the previous merge of 2.7 into master consist solely
of the revert of the invasive, regression-prone changes I made to Task.
This merge skips those changes, so the Task updates (with all their
known regressions, the fixes for those regressions, and all potential
unknown problems) are still in master.
Several tests (including hm2-idrom and module-loading) rely on
capturing output of a halrun session and grepping inside it; this in
turn creates an assumption about how output from rtapi_app (startup
and loadrt-time) and halcmd is interleaved.
With the introduction of the message queue, this assumption was
broken. Attempt to put back the assumption by bypassing the message
queue when the message is being printed from the "main thread",
i.e., the one that creates the App() object and responds to
load/unload/etc commands.
Comparing pthread_t objects to 0 or to another pthread_t with == is
not portable, but on common platforms it's either an integral type
or a pointer (verified by compile on linux and glance at header on
freebsd, plus
http://stackoverflow.com/questions/30867779/correct-pthread-t-initialization-and-handling
which has to cite something weird like dgux for an exception)
Before this change, tests/module-loading/pid/num_chan=16 failed with
a frequency of between 1-in-100 and 1-in-500 runs on my odroid u3.
After this change, it succeeds for 3000+ iterations without error,
the same as before merging the uspace-plus branch.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
You can enable them by
debian/configure uspace rtai xenomai
or enable just one with e.g.,
debian/configure uspace xenomai
uspace has to come first; none, one or both of rtai and xenomai may follow.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
"uspace+xenomai" means using the uspace realtime model together with
xenomai (posix skin) APIs to enter real-time mode.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
"uspace+rtai" means using the uspace realtime model together with
rtai (lxrt) APIs to enter real-time mode.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
In uspace realtime, MODULE_EXT is .so, but kernel modules for
module_helper are always .ko (in linux anyway)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This is needed because while we seem to get away with calling
C printf() and fprintf() in uspace-posix, this is not OK in
uspace-rtai.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This was apparently new in Boost 1.53 from 2013.
[http://www.boost.org/users/history/version_1_53_0.html]
This copy is from libboost1.55-dev with a small modification
to work when used in conjunction with older boost.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
ver.2.0.26
- bugfix: if toggle button user tabs was active and the user changed the mode
(Manual,MDI or AUTO) the user tabs button staid active, but the screen
layout changed to the corresponding mode, letting the button pressed.
- if embedded tabs was set in the INI file, the toggle button user tabs
got active, even if no tab was configured for "ntb_user_tabs", changed this
and sorted the code to be together with the rest of user tabs
- error in getiniinfo.get_increments, default values contained "," instead "."
Signed-off-by: Norbert Schechner <nieson@web.de>
1) allow absence of whitespace before/after the '=' character
2) ignore additional args after filename (as supported for haltcl files)
to prevent error that precludes handling of subsequent .hal files
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
these are unlikely to change, but it's an attractive nuisance
that could cause user-developers to specify the numeric values
instead of using the enums.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
hal_mdi_history used the hal_action_base.is_all_homed
to decide if it should be sensitive or not.
As this function does check for axis not for Joints it will not work
on non identity kinematics and for machines with "non used axis"
If you define a machine with COORDINATES = XYZAC
and JOINTS = 5 what should be possible, axis C will never be homed,
as it is axis 6 but will use Joint 5
Just defining 6 Joints as it has be done for identity machines,
will bring additional Joint Jog buttons, causing confusion for
the users.
Signed-off-by: Norbert Schechner <nieson@web.de>
- now hal status will report the homed status for Joints
and not any more for axis
- introduced a new signal to report motion mode changes,
so GUI can react accordingly
Signed-off-by: Norbert Schechner <nieson@web.de>
ver.2.0.25.1
- some changes to support new homing by joints, not by axis
still work to do!
- do not allow any more the change to mdi or auto in Joint Mode!
Signed-off-by: Norbert Schechner <nieson@web.de>
ver.2.0.25
- introduced hal pin to jog joints, make sure not to
allow joint jogging in world mode and vice versa
- renamed most hal pin, so they are better organized,
kept together in groups
- big bug in all homed signal of hal_glib avoid pushing to master
Signed-off-by: Norbert Schechner <nieson@web.de>
commit 92ca9a20cc stopped issuing interpreter resets when (re)loading a
part program. This also fixes another bug in which the "term[ination]
con[dition]" was reset, rather than tracking execute gcode.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
commit 92ca9a20cc stopped issuing interpreter resets when (re)loading a
part program. This also fixes another bug in which the "term[ination]
con[dition]" was reset, rather than tracking execute gcode.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This is available on wj200-vfd.N.heatsink-temp and is a float value
of the current temperature reading of the VFD in Celsius.
Signed-off-by: James Waples <jamwaffles@gmail.com>
Reads register 0x1003 (Output current monitor) from VFD and
binds it to wj200.N.output_current HAL pin
Signed-off-by: James Waples <jamwaffles@gmail.com>
This commit adds the --device option to the wj200_vfd HAL component.
It allows the user to select which device to use for Modbus communication
to the VFD. For example, to use a USB to RS485 converter on /dev/ttyUSB0
you would run this command:
loadusr -W wj200_vfd --device /dev/ttyUSB0
The default is /dev/ttyS0 if --device is not specified.
Signed-off-by: James Waples <jamwaffles@gmail.com>
ver. 2.0.22
- corrected the reading of preferences, under some circumstances
as bool written settings, couldn't be read correct from file,
leading to wrong settings. This is a known bug in ConfigParser.
I went over to write all bool settings as string, this way it
works like a charm. At the same time all bool values must be
read with type = bool!
Signed-off-by: Norbert Schechner <nieson@web.de>
This module uses the pre-existing "linuxcnc" python module to provide
higher-level helper functions. These functions were all developed for
and used by the existing test suite. Putting them all in a python module
reduces code duplication.
For now this module only deals with Task via NML, and does not do any
HAL jiggery-pokery.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This commit fixes a bug in the previous commit: it now keeps Motion in
Free mode until the machine is all homed, even on id-kins machines.
Without this, you can't home (since homing requires Free mode).
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Before this commit, switching Task to Manual mode would cause Task to
switch Motion to Free mode. This was because historically, Free-mode
jogging worked better than Teleop-mode jogging (at least on id-kins
machines).
After the JA merge, Teleop-mode jogging now works great on all kins.
This commit causes Task to prefer Teleop-mode jogging whenever possible,
ie if the machine is all homed, or if the machine uses id kins.
Only un-homed non-id-kins machines go to Free for Manual.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Since the recent modifications of the linuxcnc runscript, we are
guaranteed that RIP systems have all the environment variables set
by rip-environment.
This reverts commit 5668382e67.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
ver. 2.0.21
- added Joint Jog Button, _init_joints_btn will show only
the needed button, so from now on gmoccapy supports 8 Joints
and 5 axis
- still problems with the initialization of optional stops
- some button renaming to distinguish joints and axis jog button
due to special case 4th and 5th axis
- reworked on_jog_btn_pressed and released to support joint jogging
could be done better, will need some additional rework
- deleted some print messages
Signed-off-by: Norbert Schechner <nieson@web.de>
[EMC]MACHINE item (as in configs/sim/axis/minimal_xyz.ini)
was failing with "can't read "varval": no such variable"
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The configuration selector supports creating a desktop shortcut
for RIP builds but the invoking shortcuts don't not know how to
source rip-environment. Some scripts need to find
LinuxCNC-specific tcl packages conventionally using the
tcl global list ::auto_path.
For affected scripts:
When parented by the linuxcnc script, use
::env(LINUXCNC_TCL_DIR) if ::env(TCLLIBPATH) is not defined (as
it would be if rip-evironment was properly sourced) as the
leading item in the ::auto_path. Provide error messages for
unexpected environments.
Thanks to pkmcnc for noticing this problem
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The change that is being reverted here caused AXIS to send a mode change
to MDI before each MDI command, breaking queing.
This will regress the (unreleased) JA-feature of jog-while-mdi, but the
regression of queued MDI is much more severe.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Make each paragraph of the DISCLAIMER its own block-bold.
Whitespace and markdown changes only, no word changes.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Since we have broken the ABI for custom RTOS implementations
anyway (by adding several new virtual methods), it's a good time
to remove this facility that is replaced by something better.
As far as I'm aware there are no out-of-tree uspace RTOS
implementations anyway.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The old way for them to have extended information was via 'void *appspecific',
but subclassing is a better solution.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
haltcl can't be used at this point because realtime hasn't been
started.
check_config uses haltcl just to get the inifile read into global
variables. Cut and paste parse_ini as an easy fix; a proper fix
would put it in a library file that both could access.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Check for:
1) some mandatory items (per mandatory_items_list)
2) inconsistent joint,axis limits if known identity
kinematics, namely trivkins
(includes checks if multiple joints per
coordinate letters are specified (e.g., gantries))
Terminate with error if a check fails
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This appeases the build, which otherwise announces
asciidoc: WARNING: updating-linuxcnc.txt: line 625: missing section: [sect5]
asciidoc: WARNING: updating-linuxcnc.txt: line 631: missing section: [sect5]
asciidoc: WARNING: updating-linuxcnc.txt: line 651: missing section: [sect5]
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
this is intended to function the same as when the twopass
feature is enabled in a linuxcnc inifile, but without starting
linuxcnc.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Make 'on_soft_limit' available to task and avoid abort looping if
'on_soft_limit'. A switch to joint mode may be needed for recovery
(as noted in error messages).
Note:
IF
1) KINEMATICS_IDENTITY
AND
2) System misconfigured such that joint limits are more
restrictive than axis limits
AND
3) User gui provides no means to switch to joint mode
THEN
System will probably need to be restarted and configured
correctly when a misconfigured soft limit is encountered.
(Expert users may use halui mode pins and halui jog pins
and/or joint-mode wheel jogging pins to recover).
Note: There may be undiscovered side effects if there are
errors in addition to the 'on_soft_limit' error
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Replace all instances of '#!/usr/bin/python' with '#!/usr/bin/env
python'; in FreeBSD the python binary lives in /usr/local/bin/.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
The conditions preventing changes to feed override were unnecessary
and caused unexpected behavior when feed override slider moved for a
non-identity kinematics machine operating in joint mode (slider
would reposition to former postion after operator set slider)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
feed override was mistakenly applied when velocity mode active
(set by hal pin axis.N.jog-vel-mode) since initial creation
of function: handle_ajogwheels() for joints_axes
causing unexpected behavior (compared to 2.7.x wheel jogging
for identity kinematics)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.0.20
- small bug in _reset_override in rapid handling,
as it would reset to 100 % on change to any state,
instead only on pin.get()
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.19
- deleted the settings to hide axis 4 if used as tool changer
as that is not longer needed on Joint Axis branch
- corrected a DRO display issue on 4 axis config
- deleted unneeded handlers for axis touch off to zero
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.18
- deleted adj_jog_vel and use spc_jog_vel
- If a user uses analog input signals
(i.e. gmoccapy.jog-speed.analog-enable) the 100 % button will be hidden
as pushing this buttons will lead to unsynconized state between GUI and
hardware. Also the turtle and rabbit jog velocities can not be different
in there porcentage, as the can be using a joug wheel.
we will also hide the plus and minus button of the widgets, as they also
can not be used together with analog input
- changed pin name from jog-speed to jog-velocity
- changed back the override frames to original orderver. 2.0.18
- deleted adj_jog_vel and use spc_jog_vel
- If a user uses analog input signals
(i.e. gmoccapy.jog-speed.analog-enable) the 100 % button will be hidden
as pushing this buttons will lead to unsynchronized state between GUI and
hardware. Also the turtle and rabbit jog velocities can not be different
in there percentage, as the can be using a jog wheel.
we will also hide the plus and minus button of the widgets, as they also
can not be used together with analog input
- changed pin name from jog-speed to jog-velocity
- changed back the override frames to original order
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.17
- deleted adj_feed and use spc_feed
- corrected a strange way of updating spindle override values
- corrected a lot of typos in release_notes.txt and gmoccapy.py
Signed-off-by: Norbert Schechner <nieson@web.de>
.. for in-tree components, enforce that they have Unix-style
line endings by specifying the new --unix commandline option.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
ver. 2.0.15
- finally found a way to avoid jumping DRO size of axis 4 and 5
if the amount of numbers change, i.e. from 99.999 to 100.001
as it need more space.
- added a togglebutton to switch from joint to teleop, this button
will be hidden on identity kinematics machines
- small bug in spc_spinlde handling
(to many get and set leaded to jumping values)
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.14
- deleted adj_spindle and changes the code to use directly the settings
of the SpeedControl widget. This way we save resources, because we
need one adjustment less. I will change the code also for the rest of
the sliders.
Signed-off-by: Norbert Schechner <nieson@web.de>
libmodbus version 3.1.2 introduced backwards incompatible API changes in
modbus_set_response_timeout and modbus_set_byte_timeout functions. This
patch adds conditional compilation to use the API appropriately based
upon the result of the LIBMODBUS_VERSION_CHECK macro.
Issue: https://github.com/LinuxCNC/linuxcnc/issues/105
Signed-off-by: Dale Lukas Peterson <hazelnusse@gmail.com>
selection in AXIS for non-identity configs after homing #104"
For unknown reason, at startup, the space key can activate
the radiobuttons for joints and axes setting the ::ja_rbutton
value to 0 -- the mechanism is not understood by me. This
commit addresses by forcing focus in set_mode_from_tab()
Comparable behavior can be shown in 2.7 for the radiobuttons
at startup:
1) build 2.7 at commit 755235e 2016-07-03
2) start configs/sim/axis/vismach/hexapod-sim/hexapod.ini
3) F1,F2
4) press radiobutton for joint 5
5) put cursor in large open area below (or many other places)
6) press SPACE key (Ctrl not required)
7) radiobutton for joint changes to 0 (unexpectedly)
8) select MDI tab
9) select Manual tab
10) repeat 4),5), 6) -- behavior is now ok
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.0.12
- bug in touchscreen slider if machine units and display units not equal
- corrected some strange entries in ini files
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.11
- some small changes in INI configs
- changed the DRO Size settings depending on number of axis
- set the init_colors of the combi DRO to hex values instead of names
like green, as different desktops do interpret the names with
different color values
Signed-off-by: Norbert Schechner <nieson@web.de>
by me at 3e93bfa (it is used in axis.tcl view menu)
and coordinate all vars.teleop_mode.set() through set_motion_teleop()
Note: there is a bug where the '$' key may not be acknowledged depending
upon opening of an axis menu (any menu i think).
It seems to be related to loss of keyboard focus, e.g., clicking
outside the axis window, then returning to the axis window
restores focus and '$' key works.
This behavior can be observed in recent 2.7 at 7ba74b8 using hexapod.ini
so it is not recent.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ver. 2.0.7
- bug in key handling of F12 (switch mode)
as mode was also changed in IDENTITY kinematics
- bug in _init_extra_axes
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.6
- corrected some small bugs, avoiding gremlin to switch
to fullsize preview,
- got back some missing handlers in the glade file
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 2.0.5
- merged with the touchscreen slider version
- deleted unneeded INI entries
- Attention: Hal pin names have changed during change from 1.n to 2.0
Signed-off-by: Norbert Schechner <nieson@web.de>
This fixes these test failures observed in Ubuntu 16.04:
interp/pymove
interp/python-self
interp/value-returned
remap/fail/body-py
remap/fail/canon_error
remap/fail/epilog
remap/fail/prolog
remap/introspect
remap/oword-pycall
remap/predefined-named-params
remap/variable-injection
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
We fixed this back at commit 9d6a5bc but with the merge of
joints-axes it appers some cases of it were added back in.
I can't test, but it looks good by eyeball.
Closes#100.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
update() only needs to call set_motion_teleop() in manual
mode when something has switched to COORD
this guard was added to improve behavior with multiple
guis changing modes but may no longer be required
also: remove unused function set_teleop_mode()
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
hal_stream_XXX return negative errno codes and do not
set errno, so calling perror() without setting errno
ourselves gives poor error messages.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
When testing, I noticed that if X detected an unusually low screen
DPI, the size of the graph area in latency-histogram would be small
relative to the rest of the window.
This is because the default size of a blt barchart is in inches! By
specifying pixel sizes, the window will get the same layout no
matter the screen's detected DPI. The numbers chosen are close to
the original values if DPI=96, a typical value assumed for normal
computer monitors (for instance, a 23" full HD monitor or a 15",
720p monitor)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
I made a mistake when rebasing nicokid's branch for issue #33, and
lost the changes for these files. I simply took the ones from that
branch with the command
git checkout gh-nicokid/master -- ./axis[uv].glade
while in the src/emc/usr_int/stepconf directory. at that time,
the branch pointed at
6747746 Merge branch 'master' of https://github.com/nicokid/linuxcnc
This time I carefully looked over all the differences shown by
git diff 6747746 44c5fb9 -- src/emc/usr_intf/stepconf/
and they are changes deliberately introduced by me to fix or work around
stepconf bugs, plus the differences that this commit pulls in.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
as no example I am aware of, does use sensible signal names, I would
like to get rid of the special grouping for signals.
(Which makes it really hard, to read dot-delimited signal names)
I'm able to propose a standard-naming scheme, which would make configs
much more readable - just had not time, to adapt some of the sample
configs.
Signed-off-by: Florian Kerle <flo.kerle@gmx.at>
this code is intended to change the text to red when invalid
(less than or equal to zero?) values are entered. However, on
my system it had the effect of changing the widgets in question to
white-on-white in all my axis tabs.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
I made a mistake when rebasing nicokid's branch for issue #33, and
lost the changes for these files. I simply took the ones from that
branch with the command
git checkout gh-nicokid/master -- ./axis[xyza].glade
while in the src/emc/usr_int/stepconf directory. at that time,
the branch pointed at
6747746 Merge branch 'master' of https://github.com/nicokid/linuxcnc
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
precedent for naming ini [TRAJ] items established
in commit cdc073dc6 "early Joints/Axes work"
[TRAJ]MAX_LINEAR_VELOCITY
[TRAJ]DEFAULT_LINEAR_VELOCITY
[TRAJ]MAX_LINEAR_ACCELERATION
[TRAJ]DEFAULT_LINEAR_ACCELERATION
gmoccapy not modified as developer is working on ja updates
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Joints Axes expects MAX_LINEAR_VELOCITY but most existing configs
use MAX_VELOCITY. This change attempts to use whichever exists as
MAX_LINEAR_VELOCITY
Signed-off-by: andypugh <andy@bodgesoc.org>
An early joints_axes commit made corresponding code changes but
only a few ini files in tree were ever updated.
These renames clarify current functionality and should decrease future
ini updates if provisions are added to specify ANGULAR value items.
[TRAJ]MAX_VELOCITY --> [TRAJ]MAX_LINEAR_VELOCITY
[TRAJ]DEFAULT_VELOCITY --> [TRAJ]DEFAULT_LINEAR_VELOCITY
[TRAJ]MAX_ACCELERATION --> [TRAJ]MAX_LINEAR_ACCELERATION
[TRAJ]DEFAULT_ACCELERATION --> [TRAJ]DEFAULT_LINEAR_ACCELERATION
It is possible that some existing ini files may need different values.
Ref:
http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=commitdiff;h=cdc073dc6068ec0e003b9d29ff1acaeb1a2c13b0
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
error made in misplacement of code line when adapting
from original pdf
noted in clang report: "Value stored to 'dz' never read"
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
New ini file setting: [JOINT_n]HOME_ABSOLUTE_ENCODER = 1
Values:
0 (default) (not an absolute_encoder)
1 absolute_encoder with the usual final move to [JOINT_n]HOME
2 absolute_encoder with no final move
When asked to home, immediately set next state to
HOME_SET_SWITCH_POSITION
and set joint pos & fb to the [JOINT_n]HOME_OFFSET value
and then make the usual final move to [JOINT_n]HOME
So if HOME_OFFSET is 0, the abs encoder value is exactly
the same as the joint value
if HOME_OFFSET is x, x is the difference between the
absolute_ encoder value and the
desired joint position value
Notes:
a) [JOINT_n]HOME_IS_SHARED item is ignored
b) for negative [JOINT_n]HOME_SEQUENCE, the check for entering
the HOME_FINAL_MOVE_START state is not necesary
motion.h:
Add homing flag HOME_NO_FINAL_MOVE
Add homing flag HOME_NO_REHOME, set for any:
HOME_ABSOLUTE_ENCODER >0
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
No affirmative responders to requests for joints_axis updates
and ongoing maintenance
Ref:
http://article.gmane.org/gmane.linux.distributions.emc.devel/16213http://article.gmane.org/gmane.linux.distributions.emc.user/64404
Notes:
1) *.nml files continue to ref xemc (former name of xlinuxcnc)
2) Obsolete configs not updated:
configs/sim/*/orphans/*.ini
configs/attic/*/*.ini
3) Add notes to indicate that tklinuxncc gui may be useful for
isolating suspected OpenGL problems
packaging: remove deps related to removed UIs
packaging: Removing libXaw stopped indirectly depending on libXmu
xlinuxcnc removal pkging: del app-defaults/XEmc JA
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
restores commit b536f9c with simplifications to synchronize
local vars.teleop_mode to motion_mode (as updated by motion
module upon successful homing)
Thanks to pkmcnc noticing: jog slider values were not honored when
teleop jogging an angular coordinate on an all-linear-joints
hexapod after initial homing (locally selecting teleop by gui
and halui mode alterations were correctly acknowledged).
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
thanks to forum user mjohnsonsa for report
Note: Current pncconf/stepconf support identity kinematics
only.
Options for machine configurations using multiple joints
assigned to a single axis coordinate (typically a gantry)
are not currently supported.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Update calling args from numbers (like 0 for X, 1 for y)
to coordinate letters (X,Y,Z...):
emc_abs_cmd_pos
emc_abs_act_pos
emc_rel_cmd_pos
emc_rel_act_pos
emc_tool_offset
emc_probed_pos
Update known callers of these commands:
tklinuxcnc.tcl
Set_Coordinates.tcl
ngcgui.tcl
Note:
emc_probed_pos -- no known callers in tree
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
clarify error message (parameter is a coordinate letter not an integer)
accomodate both lower/upper cases
Note: tklinuxcnc.tcl already complies
(numerous other commands still use a number for a parameter
to specify an axis coordinate)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
wrongly removed. Without this call, motion_mode remains
as COORD at program conclusion (normal or abend) and
increases complexity of another gui (e.g., halui) jogging
or use of wheel jogs
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
when reloading a file after running (task_mode AUTO)
or when loading a different program
to avoid msg:
"can't do that (EMC_TASK_PLAN_SYNCH) in auto mode
with the interpreter idle"
and restore prior task_mode
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
cherry-pick:
c0bbc79 2016-05-21 linuxcncmodule: fix repeated calls to program_open()
And fix motion-logger expected files (test-ui.py:import linuxcnc sigh)
This problem was exposed by the change at ad06db2 which removed all the
other interpreter-related NML calls when hitting reload. Before that,
the other commands such as mode changes returned the interpreter to its
closed state. (Closes#62)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
to allow teleop jogging after recovery in joint mode
(non-identity kinematics)
Also:
If KINEMATICS_IDENTITY and MISconfigured such that
a joint limit is more restrictive than a corresponding
one-to-one axis limit, like:
[JOINT_0]MAX_LIMIT < [AXIS_X]MAX_LIMIT
then machine hitting a soft limit with a teleop jog may not
be able to be moved as the gui may not provide a means
to joint jog in order to back off.
For this situation, amplify the reporError() message
to indicate something is wrong joints vs axis limits.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The update_ini script now converts halui pins. It assumes that most people
care more about axes than joints.
The commit also incidentally incorporates a fix to a capitalisation error
in the axis.L style pin names.
Signed-off-by: andypugh <andy@bodgesoc.org>
Through the iterations of this file the handling of the coordinates=
modparam had become rather convoluted. This patch adds a specific flag to
say whether the modparam is needed rather than relying on the existence or
otherwise of the list.
Signed-off-by: andypugh <andy@bodgesoc.org>
The previous commit used temp0, temp1 etc as placeholders for a second
stage of substitutions. On reflection these were quite likely to collide
with user-chosen signal names, which would be incorrectly substituted.
The temporary placeholders are now called hings like @ax0@.
Signed-off-by: andypugh <andy@bodgesoc.org>
For a trivial kins machine you almost certainly want to link your handwheel
to the world-mode jog pins. (axis.Y.jog-enable etc). For a non-trivial
machine we will still leave that decision to the integrator.
Signed-off-by: andypugh <andy@bodgesoc.org>
Systems with non-identity kinematics may need to rehome
using ini hal pins ini.N.home_offset and/or ini.n.home for
calibration (perhaps iteratively)
In emc/motion/command.c,
emcmotCommandHandler()
switch(emcmotCommand->command)
case EMCMOT_JOINT_HOME with joint_num==-1
sets emcmotStatus->homingSequenceState = HOME_SEQUENCE_START
to initiate a complete (all joints) homing sequence
However, in emc/motion/homing.c
do_homing_sequence()
has never reset the individual joints home flag using:
SET_JOINT_HOMED_FLAG(joint,0)
I think this problem has not been detected earlier because rehoming
has not been expected to be required and/or tested often. Plus it is
not readily detectable when using (sim) configs with 'immediate'
homing.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
If the kins is gentrivkins then there was an attempt to access a variable
called trivkins. I don't know how my testing failed to show that.
Signed-off-by: andypugh <andy@bodgesoc.org>
Cease substitution of linear item values for angular
items when said angular items are not specified.
The former silent substitutions are more consequential for
non-identity kinematics which often use rotary joints.
Derive 'has_angular_joint_or_axis' and 'has_linear_joint_or_axis'
from existence of [JOINT_n] stanzas and [TRAJ]COORDINATES
respectively and use to determine fail/warning conditions
for missing items
Forgive omission of angular items (for now) with:
1) warning message
2) substition of small value (1unit/sec typ 1deg/sec)
Also: clarify some varnames
Note: some debug prints can be deleted in future
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The mistakenly omitted local update caused repeated, redundant
updates to motion when ini.N.home_offset was altered from its
startup value.
thanks to pkmcnc
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Fix config that was broken after conversion to use consecutive
joint numbering in kinematics. Use some #defines for
more clarity.
Notes:
1) named 5 axis but implementation is 6 joints (1 for W)
2) min,max,vel,accel limits in ini file probably need attention
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
when motion switches to teleop after homing
or when another gui (halui) alters
as well as honoring local joint/world radio buttons
and binding key '$' for toggling for non-identity kins
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) cut/paste error in taskintf.cc
2) test for special_case_sync_all needs to be done
after handling of sequences having mixed +/-
values for same abs(sequence_number)
thanks to pkmcnc for hexabot tests
3) fix error that occurred in rebase ja13->ja14
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The tklinuxcnc gui doesn't have a home-all button so
each joint is homed individually.
When checkAllHomed() condition detected, local homing_flag
must to be cleared in order to deassert emcmotStatus->homing_active
which is checked by jog commands.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Retains backwards compatibility to existing, supported configs prior
to joints_axes which use KINEMATICS_IDENTITY
Future work required if anyone wants to use this gui
for non-identity kinematics or to support switching
joint/teleop modes within the gui.
Note: lightly tested (because it is mystery to me), but jogging
before and after homing uses the appropriate motion mode.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Retains backwards compatibility to existing, supported configs prior
to joints_axes which use KINEMATICS_IDENTITY
Future work required if anyone wants to use this gui
for non-identity kinematics or to support switching
joint/teleop modes within the gui.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Retains backwards compatibility to existing, supported configs prior
to joints_axes which use KINEMATICS_IDENTITY
Future work required if anyone wants to use this gui
for non-identity kinematics or to support switching
joint/teleop modes within the gui.
Note: For wheel jogging in joint mode, connect corresponding
(one-to-one) joint and axis letter pins:
joint.N.jog* and axis.L.jog* pins
(see configs/sim/touchy/ngcgui/hwsim.sh for typical connections)
Note: For testing, the examples in configs/sim/touchy/ngcgui/
provide sim_pin guis to simulate jog buttons and wheels
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
credit to Rudy du Preez
conversion from orig to asciidoc
Notes:
Efforts with latexmath failed to build on some buildbot hosts.
An asciidoc file that built both pdf and html docs
successfully on jessie would not build on wheezy
and precise -- so png files are used for equations
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note that many guis typically jog in JOINT mode
Note that guis continue to support existing identity kinematics
Identify where non-identity kinematics and special cases
are supported.
Add/update info for guis wrt joints_axes:
axis gui
tklinuxcnc
touchy
gscreen
gmoccapy
keystick
xlinuxcnc
mini
linxcnclcd
linuxcncrsh
minor: relocate Halui paragraphs
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This reverts commit f78de34b16ce838f8971a63b308ceb0eafdce68e.
Prior attempt to standardize gmoccapy sim configs to a 2 joint
(XZ) configuration failed more thorough testing.
This indicates that there are some built-in assumptions in code
relating to historical lathes configured with trivkins and three
axes letters as used for lathes prior to joints_axes.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This was lost at commit fa39c10 "get proper joints count and fix
Machine->Homing and Unhoming menu" possibly during conflict resolution
of a rebase.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
a correct error was detected (teleop && axis_num<0) and 'abort' set
but later test reported different (incorrect) error
+fix small typos
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Brief: Joints with negative HOME_SEQUENCE synchronize final move
Prior behavior is not changed
Tested: jt: gantry, dg: xyzc,xcz, rudy: hexapod
Note from testing: too low search velocity when using
search/latch with same sign may expose
problems due to switch bounce
Ref: Ini file setting: [JOINT_n]HOME_SEQUENCE = SEQNO
If any joint (say m) as a negative SEQNO value (== SEQNO_m)
Then synchronize the start of the final move to [JOINT_n]HOME
for all joints having ABS(SEQNO_n) = ABS(SEQNO_m)
Special case:
Since 0 is not negative and we preserve prior behavior, the
method to synchronize all joints' final move in a single
sequence is:
[JOINT_n]HOME_SEQUENCE = -1
for ALL joints
-------------------------------------------------------------------------
Examples for a 3 joint system
Example 1: two sequences (0,1), no synchronization (backwards compatible)
[JOINT_0]HOME_SEQUENCE = 0
[JOINT_1]HOME_SEQUENCE = 1
[JOINT_2]HOME_SEQUENCE = 1
Example 2: Like Example 1 but synchronize j1,j2 final move
[JOINT_0]HOME_SEQUENCE = 0
[JOINT_1]HOME_SEQUENCE = -1
[JOINT_2]HOME_SEQUENCE = -1
Example 3: only one sequence, no synchronization (backwards compatible)
(HOME_SEQUENCE may be omitted since 0 is default)
(but see Note 2) )
[JOINT_0]HOME_SEQUENCE = 0
[JOINT_1]HOME_SEQUENCE = 0
[JOINT_2]HOME_SEQUENCE = 0
Example 4: only one sequence, all joints synchronized
[JOINT_0]HOME_SEQUENCE = -1
[JOINT_1]HOME_SEQUENCE = -1
[JOINT_2]HOME_SEQUENCE = -1
Example 5: two sequences, mixed signs behave as in Example 1
[JOINT_0]HOME_SEQUENCE = 0
[JOINT_1]HOME_SEQUENCE = 1
[JOINT_2]HOME_SEQUENCE = -1
-------------------------------------------------------------------------
Notes:
1) Beware in testing that some sim configs have special requirements
because of their methods for simulating home switch make/break
2) Some guis (axis gui for instance) require [JOINT_0]HOME_SEQUENCE
in order to homeall
homing_order_defined = \
inifile.find("JOINT_0", "HOME_SEQUENCE") is not None
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This is primarily a refactor to allow reuse of the switch-to-teleop code,
but it also slightly changes it:
Before this commit, the code would modify a bunch of state to indicate
the switch from free to teleop mode, *then* check if teleop was allowed
(by checking for unhomed joints and non-identity kins). If teleop was
not allowed it would only partially restore the state it had modified.
This commit moves the check to the beginning, and doesn't modify any
state at all if Teleop mode is not allowed.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
also: new emcJointUpdateHomingParams()
to update home & home_offset only
Thanks for the suggestion by pkmcnc (Andrew K)
Background:
An intrinsic problem of parallel robots is that there are
almost always some geometry errors in adapting the
mathematical model to a physical realization. Moreover, when
using index homing, the exact location of the index may be
unknown.
Unlike a trivial kinematics machine, it is not always possible
to directly measure or compute exact values for [JOINT_*]HOME
& HOME_OFFSET.
A practical homing method for such cases is to:
1) home to precalculated values for HOME & HOME_OFFSET
2) manually move the platform to the correct home position
3) calculate the difference in joint positions (with some hal
components for example)
4) update HOME_OFFSET (probably also HOME) to the corrected values.
3) home again
Adjusting home position this way could be useful for some
identity kinematics machines as well.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
and for tlo changes (tnm6g43) so that the offsets will show on
the DRO tab
Note: the DRO tab tlo does not update at t0m6
It will after another g43
This stat() behavior exists in 2.7 & master
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
formerly was only handling ini file [AXIS_*]TYPE items
joint_type[] from [JOINT_*]TYPE (default: LINEAR)
axis_type[] from [AXIS_*]TYPE (default: xyzuvw:LINEAR, abc:ANGULAR)
For reference (unchanged) axis sliders search (first one found wins):
Jog Speed (linear)
max
[DISPLAY]MAX_LINEAR_VELOCITY
[TRAJ] MAX_LINEAR_VELOCITY
[TRAJ] MAX_VELOCITY
1.0
default
[DISPLAY]DEFAULT_LINEAR_VELOCITY
[TRAJ] DEFAULT_LINEAR_VELOCITY
[TRAJ] DEFAULT_VELOCITY
1.0
Jog Speed (Angular)
max
[DISPLAY]MAX_ANGULAR_VELOCITY
[TRAJ] MAX_ANGULAR_VELOCITY
[TRAJ] MAX_VELOCITY
use_linear_value
default
[DISPLAY]DEFAULT_ANGULAR_VELOCITY
[TRAJ] DEFAULT_ANGULAR_VELOCITY
[TRAJ] DEFAULT_VELOCITY
use_linear_value
Max Velocity
max
[DISPLAY]MAX_LINEAR_VELOCITY
[TRAJ] MAX_LINEAR_VELOCITY
[TRAJ] MAX_VELOCITY
default
same_as_max
Notes:
1) Curently, the Jog (linear & angular) and Max Velocity
sliders apply to both joints and axes (this may not
be what is wanted for non-identity kinematics)
2) The system default values are
./emc/nml_intf/emccfg.h:#define DEFAULT_JOINT_MAX_VELOCITY 1.0
./emc/nml_intf/emccfg.h:#define DEFAULT_JOINT_MAX_ACCELERATION 1.0
./emc/nml_intf/emccfg.h:#define DEFAULT_AXIS_MAX_VELOCITY 1.0
./emc/nml_intf/emccfg.h:#define DEFAULT_AXIS_MAX_ACCELERATION 1.0
(These are small if mm machine)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Before this commit, if this setting is not included, when
open_file_guts() tries to fetch it, the 'try' block fails
and results in the unhelpful notification message:
"Nonetype object has no attribute 'rfind'"
So make its inclusion mandatory.
Note: the code provides a default so requiring this item
may not be needed in every gui
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Formerly, if the ini item for [TRAJ]LINEAR_UNITS or ANGULAR_UNITS was
missing, task main() loops over emcMotionInit() and guis (like axis
gui) time out and exit with unhelpful message: "waiting for s.joints ..."
So:
1) iniTraj(): print info
2) axis gui: detect missing [TRAJ]LINEAR_UNITS and print message
instead of traceback.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
for consistency, remove boilerplate, unused iteme
maintain axis.ini,axis_mm.ini with all comments
mv check_constraints.hal to lib/hallib/check_xyz_constraints.hal
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This appears to be a long-standing omission that had no consequences
prior to joints_axes. In joints_axes, properly setting
emcmotDebug->coordinating = 0
when the mode is changed to teleop eliminates discontinuous
positions if free mode jogging has occurred. Such discontinuities
can lead to a joint following error.
This commit remove workarounds in axis.py that forced joint mode
before mdi, task_run, program_open operations because of
the potential for position discontinuities
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ini file items [JOINT_n]TYPE and [TRAJ]LINEAR_UNITS (if available) in
order to reduce time for simulated homing for inch units --
otherwise use sim_home_switch defaults.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) This commit addresses problems observed in testing hardware (servo)
configs (xyzc,xzc identity and kinematicsBOTH using trivkins kinstype=both)
where occasional Following Errors at touchoff, program load, or mdi. The
FEs only sometimes depending upon how the joint was moved prior to the
next action. The changes herein are marked as 'workaround' as there
may be a better solution in motion/control.c & command.c
2) Consolidate setting of teleop mode with a new global function:
set_motion_teleop()
to:
update vars.teleop_mode
issue c.teleop_enable(), c.wait_complete(), s.poll()
note: retain TclCommands set_teleop_mode() (uses new set_motion_mode())
3) When using no opening file ([DISPLAY]OPEN_FILE="") and non-identity
kinematics, motion mode was switching back to joint mode so make
these funcs finish with teleop mode set:
touch_off_system()
touch_off_tool()
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Formerly: determineMode() returned EMC_TASK_MODE_AUTO
if traj mode was teleop
The former behavior caused unexpected switch of task mode when
traj mode changed. maybe there were reasons for this preJA,
but i have not observed bad behavior with this change.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
using basic_sim.tcl
not done:
configs using custom hal files:
ldelta.ini, ldelta_demo.ini, rdelta.ini
configs with special homing:
gantry.ini, gantry_mm.ini
legacy preservation for lathe:
historical_lathe.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
which handles all common components/connections for sim
configs with 'any' number of joints/axes.
Also: mark lib/hallib/core_sim9.hal as declining usage
since it is no longer used in-tree
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
to use:
[KINS]
KINEMATICS = trivkins coordinates=xz,
JOINTS = 2
[HAL]
HALFILE = LIB:basic_sim.tcl
...
Note: use of basic_sim.tcl required the addition of
one hal delsig in gmoccapy_postgui.hal
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Discuss historical lathe configs with unused coordinate (Y)
and explain and recommend use of
[KINS]KINEMATICS = trivkins coordinates=XZ
for lathes with joints_axes incorporation
also: move stricter syntax section
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also: use require_pendant=no on sim configs to allow startup
testing and hal configuration without a pendant
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
for use with basic_sim.tcl
mandatory items: [KINS]KINEMATICS
[KINS]JOINTS
[TRAJ]COORDINATES
also:
1) For lathe configs using trivkins, require parameter: 'coordinates='
This intentionally precludes historical lathe configs from using
basic_sim.tcl
historical lathe configs use:
3 joints (x==>joint_1, y==>joint_1 UNUSED, z==>joint_2)
and
specify trivkins without the coordinates= parameter
2) For trivkins using coordinates=, warn if number of coordinates
specified differs from [KINS]JOINTS
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also:
put trivkins first in list (otherwise order alphabetically)
and at least mention all kins available in the distribution
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
credit to Rudy du Preez
Adapt from Rudy's files:
1) convert .c files for sequential joint usage (eliminating
joints for unused axis letters)
2) locate sim configs in
configs/sim/axis/vismach/5axis/table-rotary-tilting
3) update ini files for joints_axes ini requirements
and use [KINS]AUTO_TELEOP=
4) use basic_sim.tcl to configure joint cmd-->fb connections,
homing, ddts, estop loop, tool-change loop
5) include vismach gui hal connects within inifiles
6) include boat-xyzac.ngc,boat-xyzac.ngc in ./examples/
7) convert test-xyzac.ngc,testxyzbc to ngcgui-compatible
subroutines with user-alterable settings and make
ngcgui tabs
8) remove dos line endings in .ngc files
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Preparatory to adding additional 5axis sim configs
Simplify and consolidate sim config:
0) place as new subdir (configs/sim/axis/vismach/5axis/bridgemill/
1) use joint numbers in sequence (.c & .py files)
2) use basic_sim.tcl and [HAL]HALCMD= instead of halfile
3) remove unused items and boilerplate from ini file
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
For known identity kins (namely trivkins, nee gentrivkins), xhc-hb04.tcl
connects corresponding (one-to-one) joint and axis wheel jog pins
maintaining compatibility with pre-JA configs in both joint and teleop
motion modes.
For unknown kins (expected to be non-identity), this commit allows
connections for any kinematics for the axis coordinates wheel jog pins
specified by the usual ini file setting:
[XHC_HB04_CONFIG]coords=
To use the pendant for world jogging AND for joint jogging of selected
joints, see the added information in the README accompanying the
xhc-hb04 sim configs.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
addresses ugly bug sequence:
1) run program (normal end or abend)
2) jog (gui, kb, halui, or wheel)
3) switch to mdi tab -- postion jump to
position at program termination
Pre-JA: joint mode was true prior to mdi switch.
0_ensure_mdi ('AUTO', 'STATE_ON', 'TELEOP', 'IDLE')
1_ensure_mdi ('MANUAL', 'STATE_ON', 'FREE', 'IDLE')
2_ensure_mdi ('MDI', 'STATE_ON', 'COORD', 'IDLE')
3_ensure_mdi ('AUTO', 'STATE_ON', 'TELEOP', 'IDLE')
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Notes:
xlinuxcnc.txt formerly referred to
[AXIS_0]MIN_LIMIT_SWITCH_POLARITY
which does exit in any current code
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) AXIS_N --> JOINT_N
2) use njoints=[KINS]JOINTS not naxes=[TRAJ]AXES
3) skip [JOINT_N] section if stepper and no STEPGEN_MAXVEL
4) use period==0 if no [EMCMOT]BASE_PERIOD
5) use abs() for period check
6) make it executable
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
these files used [AXIS_0]UNITS to determine units
when there is no ini file item for[TRAJ]LINEAR_UNITS
for ja, AXIS_0 becomes AXIS_X typically but note that
there are no code references to [AXIS_n]UNITS otherwise
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
For non-identity kins, after homing, allow switching
joint->world->joint->world...
using the joint/world radiobuttons.
tested with:
configs/sim/tklinuxcnc/xz_both.ini
configs/sim/axis/ldelta.ini
(using [DISPLAY]DISPLAY=tklinuxcnc
Note:
contemporaneous use of halui.mode.joint,teleop
may interfere
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
remove identity assumptions and make pos-fb commands,etc.
for $number_of_joints
Also:
1. only make xy,xyz velocity hal pins for known kins (trivkins)
having xyz coordinates
3. remove eval from loadrt commands for better twopass compat
4. report limit if no. of ddts exceeds .comp limit (=16)
(can occur for 9 axis config requesting vel,acc ddts)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
for min/max in soft_limts()
This seems more compatible and allows configs with no
[AXIS_N]MIN_LIMIT,MAX_LIMIT
settings to run a program without complaint of
'Program exceeds machine ..."
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) try: init_glcanondraw() for all configs (formerly
was attempted only for some configs)
2) Add tests to limit error messages that occur on the
sim config configs/sim/gscreen/gscreen_custom/9axis.ini
(The problem may be with the sim config not with gscreen.py)
The messages also may occur in debugging defective configs
and the rapid and persistent issue of messages seems
to hang the system attempting to handle unlimited, repeated
popups.
Tests use new globals:
excepthook_msg_ct = 0
excepthook_msg_ct_max = 10
update_spindle_bar_error_ct = 0
update_spindle_bar_error_ct_max = 3
Ref: configs/sim/gscreen/gscreen_custom/9axis.ini
repeatedly issues messages about 'No widget 's_display2'
same behavior in git master (669f5fe)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
AXIS_1,2,3 --> AXIS_A,B,C
joints_axes ini item for num_joints is [KINS]JOINTS
Note: [TRAJ]JOINTS never existed (as far as i can tell)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
preparatory to work on hal_gremlin compatibility
1) improve readability of logic for parsing posstrs and the
handling of special cases:
lathes (xz and historical xyz with 3 joints and dummy 2==y)
identity kinematics cloaking of joint/teleop modes
display of limit,home icons (joint items) when identity kinematics
2) show home and limit icons on left when self.get_show_offsets()
for consistency and simpler code
3) for non-identity kinematics
if allhomed and teleop mode: show (new) allhomedicon on Preview
if any limit sw and teleop mode: show (new) somelimiticon on Preview
Note: hal_gremlin overrides dro_format()
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
since they duplicate items shown on the Preview Tab (managed in
glcanon.py)
The number of cases (joint/teleop, identity/nonidentity,
xzlathe/historical-xyzlathe) make it increasingly problematic
to maintain.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
is specialcase
joints 012 --> xyz axes, but joint1==Yaxis not used
so limit switch for z is on joint 2
also: remove unused function aletter_for_jnum()
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Retain man pages for gantrykins,gentrivkins -- add note that these
modules are superseded by trivkins and point to trivkins (kins) man page
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
hexapod.hal: update for halui name changes:
halui.0.pos-feedback --> halui.axis.x.pos-feedback
etc.
hexapod.ini: use [KINS]AUTO_TELEOP for automatic switch to teleop
add note about [TRAJ]HOME z coordinate for this config
remove boilerplate comments
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
old mistake not noticed because the hal pins affected
(halui.axis.L.pos-commanded, pos-feedback, pos-relative) are seldom used
(hexagui.hal only known user in distribution)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The hexapod sim config (configs/sim/axis/vismach/hexapod-sim/hexapod.ini)
has been broken in joints_axesNN branches since joints_axes8 (at least)
while it works in recent master (SHA 669f5fe).
After starting the sim, a switch to world mode (before or after homing)
results in all 'nan's for the world coordinates. The same behavior
can be shown in master by removing the ini setting:
[TRAJ]HOME = 0 0 20 0 0 0
e.g,. the sim config fails using default zero values for [TRAJ]HOME.
In testing, the sim config succeeds for many values for the z coordinate,
like:
#nan HOME = 0 0 0 0 0 0
#ok HOME = 0 0 10 0 0 0
#ok HOME = 0 0 1 0 0 0
#ok HOME = 0 0 .1 0 0 0
#ok HOME = 0 0 .0001 0 0 0
#nan HOME = 0 0 .00001 0 0 0
#ok HOME = 0 0 -1 0 0 0
#ok HOME = 0 0 40 0 0 0
#ok HOME = 0 0 100 0 0 0
#ok HOME = 0 0 1.23 0 0 0
The problem is due to a failure of a matrix inverse computation when the z
coordinate==0 in the kinematicsForward() function of genhexkins.c (note it
works for z=0.0001 but not 0.00001).
For JA, the code to read and use inifile item [TRAJ]HOME was omitted years ago
so this commit restores it making it possible to use non-zero values for the
[TRAJ]HOME z coordinate.
This problem may be solvable in genhexkins.c --only the omission of
inifile item [TRAJ]HOME is addressed with this commit.
The problem is likely only reproducible when using kinematics modules that use
iterative algorithms in kinematicsFowrward(). The genhexkins.c is the only
current kinematics module that does this.
Also: taskintf.cc: removed superseded use of: EmcPose home
Note: The vismach model view is not correct for the hexapod sim in JA, it looks
ok in master.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This config formerly used LIB:core_sim9.hal for convenience even though it is a
four joint configuration. Using core_sim9.hal worked with the former trivkins
(all axis letters) but breaks when trivkins updated to what was formerly named
gentrivkins.
This commit:
relocates the config to a subdirectory
adds a simplified hal file for the four joints
uses immediate homing
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Occasionally seen: s.kinematics_type not valid at startup
so move using code so it is after check for s.joints
and add a check to that existing check.
Observed on a working kins (trivkins), on uspace
Also: now trivkins (formerly gentrivkins) returns invalid
kinematics_type until set
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
and make work with updated trivkins (sequential joint
assignment to axis letters, formerly gentrivkins)
Prior to joints_axes, many configs used a lathe config
with a dummy joint0/Yaxis. This was done, I believe,
largely for convenience of hal setups (core_sim.hal and
friends). This type of config is also used in lathe
configs in the by_machine and by_interface directories.
This commit removes an earlier hack for such lathes and
adds a new detection to handle:
is_lathe && coordinates=="XZ" && joints==3
This allows the update_ini script provide a working config
from the historical lathe configs and retention of
halfiles that assume dummy joint0/Yaxis for lathes, namely:
LIB:core_sim.hal
LIB:simulated_home.hal
LIB:lathe.hal
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Describe status of distribution provided configurations
Describe automatic invocation of the update_ini script for user
configurations and note that:
1) common ini and halfile items are converted
(basic machines using identity kinematics)
2) less common items may not be converted
(locking indexers, non-identity kinematics, wheel jogging, haltcl files)
3) subsequent document sections identify changes that
may require additional user edits
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
xyzx.ini uses a sim_pin app to simulate mpg jogging
xyzx-xhc-hb04.ini requires an XHC-HB04 18 button pendant
(the config will start without a pendant
using the ini setting:
[XHC_HB04_CONFIG]require_pendant=no)
Notes:
Use of the LIB:xhc-hb04.tcl script requires _known_ kinematics (namely
trivkins or gentrivkins) and connects hal pins for jogging joints and axes
having the expected one-to-one correspondence.
A config with multiple joints assigned to an axis letter like
the ones added herein, requires additional hal connections to
support joint mode jogging of the the additional joint assigned to
the duplicated axis letter (for xyzx, this is joint 3).
These connections are demonstrated in a postgui hal file (xhc-hb04-postgui.hal)
but it is not clear that jogging such a joint is a realistic requirement when:
1) it is expected that appropriate homing logic will set up the machine
and allow automatic switching to teleop mode (using [KINS]AUTOTELEOP=)
2) independent jogging of the joints for duplicated axis letters is likely to
cause racking and other problems if not used with extreme care.
If joint mode jogging for joint_3 is not required, the pendant rotary
switch fourth ('a') position can be used for an addtional rotary axis
(an xyza trunnion config for example)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
For joints_axes, by convention (update_ini, axis.py) anticipate inifile
items:
[KINS]
KINEMATICS=kinematics_module_name [optional_kinematics_parms ...]
And Hal files use commands like: loadrt [KINS]KINEMATICS
Haltcl files use commands like: loadrt $::KINS(KINEMATICS)
For kinematics modules using (optional) parameters like:
KINEMATICS=gentrivkins coordinates=xyzb kinstype=BOTH
twopass.tcl needs to process the multiple loadrt parameters passed in the
first arg by haltcl (arg1) and escaped (\{,\}) as:
arg1split=\{gentrivkins coordinates=xyz kinstype=BOTH\}
So, test arg1 and if necessary, rearrange loadrt parameters to make theargs
a proper tcl list
Also: catch errors while executing loadrt commands
and print message for debugging
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
without requiring user intervention.
The issue: 'ja: surprise switch to World mode when turning on #40'
was addressed by commit 'axis.tcl set_mode_from_tab no ensure_manual JA#40'
(SHA: d8e83bd9 in the joints_axes12 branch)
A side effect prevented teleop wheel jogging after running a program because
motion_mode remained as EMC_TRAJ_MODE_COORD. It was necessary for user to
manually intervene with a keyboard jog (axis gui) or by selecting
EMC_TRAJ_MODE_FREE or EMC_TRAJ_MODE_TELEOP with another gui (halui).
This commit checks for s.motion_mode==COORD to establish correct
TRAJ mode following:
set_mode_from_tab() (axis.tcl) --> ensure_manual() (axis.py)
to allow wheel jogging after running a program (while avoiding the
unexpected behavior reported in issue #40).
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Was: key bindings for "[","]" ("bracketleft","bracketright") hardcoded
for axis_number==3.
Is: find axis letter from ini [TRAJ]COORDINATES=
Note: No current method to accomodate preceding duplicate axis
letters (like XYYZB). For such cases, workaround is to
use .axisrc (or [DISPLAY]USER_COMMAND_FILE, example line:
bind_axis("bracketleft, "bracketright", 4)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
disallow for an axis(teleop) designated as having a LOCKING_INDEXER
joint and for that LOCKING_INDEXER joint
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Temporary sim configs to demonstrate:
a) wheel jogging for IDENTITY kins configs where the hal pins
for joints and axes jogging are connected together
b) omitted axis letters (xyzb omits a)
c) duplicated axis letters (xyyzb duplicates y)
d) locking indexer on AXIS_B (the joint number depends on kins uses)
e) automatically set mode to teleop after homing ([KINS]AUTO_TELEOP)
xyzb_trivkins.ini trivkins with omitted axis letter (a)
xyzb_gentrivkins.ini gentrivkins with ommitted axis letter (a)
xyyzb_gentrivkins.ini gentrivkins with ommitted axis letter (a)
and duplicated axis letter (y)
and auto teleop after homing
The xyyzb_gentrivkins.ini uses the gentrivkins kinstype option
to set the kinematics type to KINEMATICS_BOTH (not IDENTITY) to
demonstrate jogging and teleop jogging and the AUTO_TELEOP capability.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
whac-a-mole to work better with permutations of
trivkins with omitted axis letter (example: xz lathe with dummy y)
gentrivkins with duplicated axis letters (example: gantry)
Known JA Issue:
An axis coordinate may specify a corresponding
locking indexer joint. Jogging is not allowed
on this joint. Currently, the axis can be jogged
in teleop mode. This should be disallowed too.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Was coredumping if motmod unlock_joints_mask= parameter set wrong.
This commit detects and issues clue if pin data missing.
For more info, see docs section:
"Locking rotary indexer (updates for joints_axes)"
in file:
docs/src/getting-started/updating-linuxcnc.txt
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This would have prevented the failure of certain tests with
non-converted inifiles and trivial checkresult scripts from being
silent failures.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. this will allow the linuxcnc script to treat cancel differently than
failure to run the script to completion (e.g., when running without a
DISPLAY from runtests)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Where applicable, update tests/ inifiles to use LIB: file specifiers so that
lib/hallib files will be found automatically by the linuxcnc script and its
search rule.
This change also reduces the number of symlinks which already pointed to
lib/hallib files.
Explicit use of LIB: may also help to catch future errors occurring in the
lib/hallib files used in the tests/ tree.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Numerous tests that use an ini file have not been exercised recently in the
joints_axesNN branches because the linuxcnc script invokes the update_ini
script which (when running non-interactively) exits with a tkinter error but ok
(0) status. Thus, the tests are not executed (nor is an updated ini file created
by the update_ini script).
This commit was created by manually using the update_ini script to convert the
unconverted ini files (eg those that do not have VERSION=1.0), then some manual
edits, etc.
Ini files in directories marked with a 'skip' file were updated even though not
currently active:
tests/g0/motion-test/
tests/linuxcncrsh-tcp/
Also:
Use symlinks for core_sim.hal throughout the tests/ directory
to --> lib/hallib/core_sim.hal (using relative links)
However, if the required core_sim.hal file is unique, rename it
to mod_core_sim.hal:
tests/toolchanger/m61/
tests/tlo/
Note: The directory tests/trajectory-planner/ does not use the files
required by runtests (per tests/README test.sh or test.hal)
so that directory is not updated with this commit.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
If teleop, then update &axes[n]->teleop_tp.curr_pos
in set_operating_mode() when motion not enabled
also: remove axis.py onoff_clicked tmp modifications
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
attempted restart after forced ferror in sim would fail because
the axis gui would restart in teleop mode
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
before this commit, joint wheel jogging would not work at
startup with axis gui (but worked after gui or keyboard jogging
or other stimuli from gui)
note: motion.teleop-mode hal pin indicated it was not in teleop so
it should be in joint mode-- not sure why it needs to be
set explicitly by axis gui
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
linuxcnc script: detect [DISPLAY]DISPLAY=linuxcncrsh and accommodate its
getopt handling of '--' to separate cmdline parameters
This prevents confusing warning: "linuxcncrsh -i invalid option"
reported on forum by user k-1
emcrsh.cc: The '--' token may be used to separate cmdline parameters
for emcrsh.cc:main() and its call to LinuxCNC:emcGetArgs().
So skip parameters used for emcrsh.cc:main() when it
calls emcGetArgs()
Note: no changes for compatibility, runtests passes, better conformance to
documentation: 'linuxcncrsh --help' and 'man linuxcncrsh'
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
reduce operator surprise for sequence:
homed, estopped, set joint mode, restarted
will not be surprised if there are new side effects due to this change
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Display of homeicon,limiticon on the axis gui Preview tab:
1) for Joint DRO: show each joint homeicon if joint is homed
2) for World DRO:
if KINEMATICS_IDENTIY:
show homeicon for each individual axis letter if corresponding
joint is homed
else (not identity):
display homeicon for ALL axis letters if ALL joints are homed
Similar display of homeicon,limiticon on the axis gui DRO tab
Note:
1) when axis gui menu/view/show_offsets selected, limiticons are
not shown on Preview tab (same as pre JA)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
due to earlier correction of typo in taskintf.cc for
emcmotCommand.maxLimit & emcmotCommand.minLimit
Note: motion-logger.c needs additional future work
to separate joints and axes items
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
last JOG message type to convert for joints_axes teleop mode
No known users in configs but used with halui analog jogging
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
situation: Teleop jogging exceeds joint soft limit (can occur if ini hal
pins used to alter joint limits for instance).
before: Joint soft limit detected but doesn't prohibit subsequent
teleop jog moves.
Note: A gui override facility is not necessarily be available as
they are normally provided for hard limits (physical
switches) not soft limits. (axis gui for example)
after: When on_soft_limit detected and teleop, stop jog and
SET_MOTION_ERROR_FLAG().
Decline to start a subsequent teleop jog (EMCMOT_JOG_*).
Decline to start a subsequent ajogwheel (on_soft_limit)
To move off soft limits, user must switch to joint mode so
include hint in error message
Also: For clarity was: jog_ok(), is: joint_jog_ok()
Remove redundant "axis->teleop_tp.max_acc ="
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) support configs with identity kins that use duplicated axis letters
(use [TRAJ]COORDINATES in jnum_for_axisnum() instead of axis_mask)
2) decline to jog for misconfiguration of too many coord letters
in [TRAJ]COORDINATES.
Note: the primary gui should protect (axis gui does)
3) reject attempts to joint jog for non-identity kinematics
(jog by letter is still possible in axis gui: switch to teleop
mode with $ hotkey)
Note: in general, no rule exists for converting an axis number to
a joint number for non-identity kinematics so determining
a joint number is not possible for non-identity kins.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note: It's complicated for kins with duplicated axis
letters etc. as there are several ini file
items that must be consistent, example:
[KINS]KINEMATICS = gentrivkins coordinates = ****
[KINS]JOINTS = ****
[TRAJ]COORDINATES = ****
This imperfect check reacts to:
number_of([TRAJ]COORDINATES) > [KINS]JOINTS
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
the -1 setting was lost when struct CanonConfig_t was created
for joints_axes in emc/nml_intf/canon.hh
observed testing canterp:
canon.rotary_unlock_for_traverse is 0 when it should be -1
resulting in segfaults in tp.c:tpActivateSegment() which expects -1 if
no joint selected not active
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
new: emctaskmain.cc:allow_while_idle_type() for these
immediate command types:
EMC_JOG_CONT_TYPE
EMC_JOG_INCR_TYPE
EMC_JOG_STOP_TYPE
EMC_JOG_ABS_TYPE
EMC_TRAJ_SET_TELEOP_ENABLE_TYPE
Tested with axis gui for:
wheel jogs (teleop & free)
halui jogs (teleop & free)
Notes:
In axis.py: no 'task_mode detect and switch tab' as
behavior seems better without when other guis (halui)
pulse halui.mode.* pins. Prior behavior can be restored
for testing with enable_tab_change var in LivePlotter:update()
Keyboard jogging with mdi tab would require additional
work for key binding and widget focus. (not envisioned)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
supports identity kins with an axis_mask (viz. gentrivkins)
(before ja, support for trivkins only, no non-consecutive axes spec)
ini file: updated using scripts/update_ini script (pre-ja to ja)
and edits to:
use gentrivkins coordinates=xz (non-consecutive joints)
remove hardcoded user dir for PROGRAM_PREFIX
amend MIN_,MAX_LIMITS so default program is within limits
halfiles: was:axis.0.* is:joint.0.* (identity kins joint0==>axis x)
was:axis.2.* is:joint.1.* (identity kins joint1==>axis z)
duplicate wheel jog connections for axis jogging
commands.py: use jjogmode,j_or_a per motion_mode
Notes:
tested with provided sim config: panelui-demo.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
value returned by:
root_window.call(widgets.jogincr._w, "curselection")
is 'str' for tcl8.5/python2.6.5
is tuple for tcl8.6/python2.7.9
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also: try to improve text, update example
also: fix misinformation for [JOINT_n]LOCKING_INDEXER=
(it is required in addition to [AXIS_L]LOCKING_INDEXER_JOINT=)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This documentation file has not been updated recently (years) and included
numerous items like "Obs: not used ..." so this is a restart based on current
emc.hh
Not included:
NMLTYPE number
details
If someone wants to update details, this could be a start point, otherwise
it just lists current message items from the source: emc.hh
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
to prior (pre-joints_axes) behavior
for activate_ja_widget_or_set_feedrate()
for manual_ok() and KINEMATICS_IDENTITY in teleop mode:
`(backtick),1,2,3,...,8 select corresponding coordinate letter
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
i mixed up forward and inverse kinematics direction
in earlier commit (axis.py: Warn for duplicated coords (kins Inverse))
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
letter: select jnum from trajcoordinates (return if not identity kins)
else: use asis (int)
fixes home_joint() used by Home key binding
also unhome_joint() (no callers)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Kins which support duplicated coordinates (gantrykins and
gentrivkins kinstype=BOTH for instance) currently return
the value of the highest joint number for a duplicated
axis letter. Moving a joint may not show as movement on
the display if there is a higher numbered joint for a
(duplicated) axis letter.
Alternatives inverse kinematics could be considered for these
'general-purpose' kinematics:
Example: compute the average of all joint values in use for a
duplicated axis letter.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
before: computing trajcoordinates could result in blank menu
item for 'Homing' and 'Unhoming' joint numbers:
Machine/Homing/(Un)Home Joint n
since duplicated letters weren't counted.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note: The xhc-hb04.tcl script supports known identity kins only --
currently: trivkins, gentrivkins
This commit connects the multiplexed accels specified by the ini item:
[XHC_HB04_CONFIG]mpg_accels
to the ini pins for both joints and axes (identity kins assumption):
ini.L.max_acceleration (L == coord letter)
and
ini.N.max_acceleration (N == joint number for L)
so that wheel jogging functions in both joint and teleop modes.
The axis gui uses teleop for keyboard jogging (for identity kins);
other guis may behave differently.
This commit preserves pre-joints_axes behavior so that reduced accels
are used for _all_ manual moves including homing. Since homing is a
joint-specific activity, an alternative method could use higher valued
joint accels for acceleration during homing. This could be
implemented by setting ini.N.max_acceleration (no multiplexer) to
[JOINT_N]MAX_ACCELERATION but would require additional
functionality to force teleop mode for wheel jogging in keeping
with the expected axis gui behavior.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Notes:
create,check hal ini joint pins for actual number of joints used
(numjoints not EMCMOT_MAX_JOINTS)
clarify internal names where there could be confusion with joints/axes
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also:
use [JOINT_N]JOGGING_POLARITY ( not [AXIS_N]
clarify jjogmode with define JOGJOINT
joints_axes notes:
1) trivkins required (same as pre-joints_axes assumption)
2) only X Y Z supported (same as pre-joints_axes)
3) only JOGJOINT used (doesn't matter since trivkins enforced)
Bring me a rock.
This rock?
No, a different rock.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
[KINS]KINEMATICS = trivkins|gentrivkins only
Tthis commit for joints_axes supports more configs than
pre-joints_axes (viz. gentrivkins) but no additions were
made to support other, non-identity kinematics types.
The gui jogs according to teleop/joint mode (which may
be changed by other guis (halui for example))
The pre-joints_axes code has numerous hooks for additional
joint/world support -- these were not used pre-joints_axes
and not exploited herein.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
use s.joints when Joint radiobutton active
use s.axis_mask when World radiobutton active and display only masked axes
Note: s.axes is deprecated
Also: include as /usr/bin/teach-in in deb
(previously, only available for RIP)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note:
If multiple guis are active, it is possible for one of the
guis to send a jog command for the wrong mode (joint, teleop)
if the mode has been changed by the other gui.
While this should be checked first in each gui, the code in
command.c has some provisions to guard, abort on the error,
and print a message.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
to show use of joints.N.* not axis.L.*
Touchy historically has had no provisions to switch to teleop mode
and this is not changed for joints_axes -- so joint jogging is
described.
Examples describe the trivkins fixed joint-axis assignments
(x-->0, y-->1, z-->2, etc.)
To use trivkins with ommitted axis letters in [TRAJ]COORDINATES=,
use a dummy (empty) [JOINT_n] stanza.
Note: No provisions currently exist for non-identity kinematics.
Also: use script (hwsim.sh) to simulate the buttons and mpg
hardware that can be used with touchy (consolidates
use of sim_pin in ngcgui/pyngcgui*.ini files)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
motion-logger.c and runtests update for joints_axes
tests/halui/jogging/postgui.hal joints_axes hal pin names
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Modify jogging commands (continuous,incremental,stop):
to support free (joint) and world (teleop) jogging:
was: set jog joint_number speed
is: set jog joint_number|axis_letter speed
was: set jog_incr joint_number speed increment
is: set jog_incr joint_number|axis_letter speed increment
was: set jog_stop
is: set jog_stop joint_number|axis_letter
Note: Test for teleop mode using command: 'get teleop_enable on|off'
if TELEOP_ENABLE=YES, use axis_letter
else use joint_number
Also:
rebranding within emcrsh.cc
update manpage, expand example, plus some rebranding
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
known kins with KINEMATICS_TYPE=KINEMATICS_IDENTITY
1) known kins are: (trivkins, gentrivkins)
2) To support free (joint) mode and teleop (world) mode
jogging for the supported identity kins:
Connect to both sets of hal pins
axis.L.jog-counts, joint.N.jog-counts
axis.L.jog-scale, joint.N.jog-scale
where N is the joint number for the (1:1) corresponding
axis (letter L)
3) add example config for testing with omitted axes names:
(xhc-hb04-layout2-gentrivkins.ini)
(also move TRAJ,KINS stanzas to .inc files)
3) remove 'experimental' plus-minus mode (this provision had
some support for halui jogging -- probably never used)
With added support for world mode wheel jogging in
joints_axes, the halui modes are superfluous.
Note: Support for non-identity kins not currently planned --
the driver can be wired up in hal without the
xhc-hb04.tcl script of course.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Support configs with known kins having KINEMATICS_IDENTITY
moveoff_gui:
use jnum (joint number throughout)
align joint number to axis name per rule
(use proc joint_number_for_axis{})
linuxcnc.in:
export TRAJ_COORDINATES (inifile: [TRAJ]COORDINATES
export KINS_KINEMATICS (inifile: [KINS]KINEMATICS
lib/hallib/util_lib.tcl:
new proc joint_number_for_axis{}
return joint number for know kins
with KINEMATICS_IDENTITY
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
in halfiles as: loadrt [KINS]KINEMATICS
Improve consistency and avoid some config errors:
1) The update_ini script creates [KINS]KINEMATICS,JOINTS items
so these items are expected in (updated) user configs.
2) Early adaptions of pncconf and stepconf use these [KINS]
items as precedent as well.
3) Guis may require or validate [KINS]JOINTS=n
4) Guis can check for KINS[KINEMATICS] item in inifile and note
handle (fail?) for inconsistencies.
5) Potential conflict of kinematics options for setting kins
coordinates (like gentrivkins coordinates= parameter) and
[TRAJ]COORDINATES are isolated to a single ini file instead
of both the ini file and a halfile.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note: tklinuxcnc is seldom used but provides an alternative gui
to rule out opengl problems
shcom.cc,hh, emcsh.cc: jog functions prototypes use jjogmode (joint/axis)
emclcd.cc,emcrsh.cc: updated not tested
tklinuxcnc.tcl:
use jjogmode in jog calls (joint/axis) according to joint/teleop mode
user for loops over ::MAX_JOINTS instead of hardcoded 0...8
use inifile [KINS]JOINTS (numjoints)
use [TRAJ]COORDINATES to support omitted axis letters
(also: allow "X Z" or "XZ" like initraj.cc does for axis_mask)
if KINEMATICS_IDENTITY: show axes only
if KINEMATICS_IDENTITY: no world/joint radiobutton
popupAxisOffset: enforce teleop mode for popupAxisOffset
popupAxisOffset: display correct axis letter
modify some var names for more clarity of joints/axis distinctions
Note: no 'auto switch to teleop' supported (no Home-all button in gui)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
detected by runtests
formerly: a_indexer was boolean
now : a_indexer_jnum is the number of the joint
(-1 ==> not in use)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Two keyboard jog modes are available: joint,teleop.
For these guis, force to JOGMODE=1 (joint)
until someone updates gui for JOINTS_AXES.
Note:
The axis gui (JOINTS_AXES) selects jogmode according to the current
teleop_mode and always uses teleop mode for configs with
KINEMATICS_IDENTITY. For non-identity kinematics, it supports
switching between joint/teleop modes and uses appropriate JOGMODE for
keyboard jogging.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ini-config.txt update for joints/axes
core-components.txt update motion joints/axes
refer to motion man page instead of
listing pins in two places
iniaxis.cc remove unused items:
[TRAJ]AXES no longer used
[AXIS_n]HOME
inihal.cc remove some refs
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Test with axis_9axis.ini (uses locking_indexer for axis B)
For joints_axes, a locking indexer must be a joint for homing
and must be unlockable for G0 gcode moves. The joint number
to use for an axis cannot be predicted for arbitrary,
non-identity kinematics.
Imlementation:
1) Use motmod unlock_joints_mask= parameter to create hal pins:
joint.n.unlock, joint.n.is-locked
Example:
[EMCMOT]motmod unlock_joints_mask=0x10 (joint 4)
3) Specify the joint to use for an axis with inifile item:
[AXIS_L]LOCKING_INDEXER_JOINT=
Example:
[AXIS_A]LOCKING_INDEXER_JOINT = 4 (joint 4)
Note: There must be a one-to-one correspondence between the
specified joint and the axis (A,B,C)
Also:
clarify joint/axis notation in numerous function prototypes
(dont refer to parameter as axis, use jnum etc.)
Update configs/sim/axis/axis_9axis.ini
WRAPPED_ROTARY,was: AXIS_3, is: AXIS_A ...
axis.py: accomodate num_joints >= len(trajcoordinates)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Unlock pins:
joint.N.unlock
joint.N.is-unlocked
may be needed for locking indexers (typically a rotary joint).
Previously, unlock pins were created based on the convention
for rotary axes (A,B,C).
For joints_axes branch, use a parameter to cause creation
of the unlock pins.
New parameter: unlock_joints_mask=
Example: loadrt motmod ... unlock_joints_mask=0x38
for joints 3,4,5
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Notes:
Use gentrivkins with coordinates= parameter
Set joint no.s for gentrivkins sequential joint numbering
For halui-based jogging, use teleop jogging (halui.axis.*)
For wheel-based jogging, use teleop jogging (axis.*.jog*)
Tested with the axis gui which supports:
1) machines with KINEMATICS_IDENTITY by hiding details
about joints/axes from the user:
a) the axis gui uses teleop for jogging
b) the axis gui DRO shows xyz always (not 012)
2) The key binding for toggling joints/teleop ('$') is inactive
because there is no need to switch
Tested xyz, xz, xyza for loading (after commenting out
hm2 items in halfile)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
With gentrivkins, joints are assigned sequentially according
to the coordinates= parameter (man gentrivkins)
Example: loadrt gentrivkins coordinates=xz
Assigns: joint0 --> x, joint1 --> z
This commit adapts hardcoded joint assignments to the
gentrivkins sequential numbering; further simplifications
to take advantage of the sequential joint number assignment
are feasible.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
to allow for missing coordinates
example: loadrt gentrivkins coordinates=xz
[TRAJ]COORDINATES = xz
joints will be 0,1
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
for homing and unhoming as 'Axis', else label as 'Joint'
to be consistent with axis gui hiding joints/axes details when
kinematics is identity
Note:
use print formats with named arguments to prevent:
"warning: 'msgid' format string with unnamed arguments cannot
be properly localized"
moved some associated startup code below assignment of s.linuxcnc.stat
in order to use s.kinematics_type
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Tested with the axis gui which supports:
1) machines with KINEMATICS_IDENTITY by hiding details
about joints/axes from the user:
a) the axis gui uses teleop for jogging
b) the axis gui DRO shows xyz always (not 012)
2) The key binding for toggling joints/teleop ('$') is inactive
because there is no need to switch
Tested xyz case with 'simulated hardware configuration' option.
Observations:
1) axis gui: 'home all' only homes x but each joint can
be homed individually (probably expected) ?
2) keyboard jogging works
3) mdi works
4) program runs (after touch-off z)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
to just two instances.
So, this ini be used to test keyboard, wheel, and halui
jogging in both joint (free) and teleop (world) modes.
A) select teleop mode (halui.mode.teleop)
teleop x,y,z, wheel simulate (halui.joint.N.jog-counts,...)
teleop x,y,z, halui jog cont (halui.joint.N.plus,...)
B) select joint mode (halui.mode.joint)
joint 0,1,2, wheel simulate (halui.axis.L.jog-counts,...)
joint 0,1,2, halui jog cont (halui.axis.L.plus,...)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Halui now supports teleop jogging resulting in some
changed pin names and numerous new names for jogging-related
pins.
Two pins were renamed to clarify usage (joint or axis):
was: halui.jog-speed is: halui.joint.jog-speed
was: halui.jog-deadband is: halui.joint.jog-deadband
The corresponding new pins for axis jogging are:
new: halui.axis.jog-speed
new: halui.axis.jog-deadband
All pins for joint jogging were renamed for specificity:
was: halui.jog.N.plus is: halui.joint.N.plus
was: halui.jog.N.minus is: halui.joint.N.minus
... etc ... etc
where N is a joint number (0 ... num_noints-1) or 'selected'
for the joint selected by the halui.joint.N.select pins.
The corresponding new pins for axis jogging are:
new: halui.axis.L.plus
new: halui.axis.L.minus
... etc
where L is a letter corresponding to one of the axes
specified by [TRAJ]COORDINATES using an axis_mask or 'selected'
for the axis selected by the halui.axis.L.select pins.
Aditional pin renames for consistency to related pins:
was: halui.joint.selected.is_homed
is: halui.joint.selected.is-homed
was: halui.joint.selected.on-soft-limit
is: halui.joint.selected.on-soft-min-limit
If no axes are specified, make pins for all (mask=0xffff)
While the pin halui.joint.selected value is the number of
the joint selected, the pin halui.axis.selected is the index
of the corresponding axis (0:x 1:y 2:z 3:a 4:b 5:c 6:u 7:v 8:w)
since hal pin values must be numbers not letters.
Fixed bug: at startup,joint0/axis0(X) is used for selected
axis/joint but halui.joint.0.is-selected/halui.axis.x.is-selected
was not set.
Changed int sendJog*() to static void sendJog*() (return was never tested)
Remove comment section in halui.cc that is redundant to man page
Updated halui man page.
Notes:
1) No pin has ever been created for accessing the selected
analog input for joint jogging (e.g.,
halui.joint.selected.analog), so no corresponding pin
was created for axis jogging.
2) axis pins are created for all axes (xyxabcuvw) but
jogging commands are sent iff the axis_mask applies,
e.g., [TRAJ]COORDINATES values are enforced.
2) some prints remain for debugging "...unexpected_n..."
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Based on ldelta.ini (thanks to jepler), adds:
AUTO_TELEOP -- switch to teleop after homing
Adds simple popup guis to demonstrate:
wheel JOINT jogging for Joint 0
halui JOINT jogging for Joint 2
wheel AXIS jogging for X Axis
wheel AXIS jogging for Y Axis
and a gui using halui to switch modes joint/teleop
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Support Jog wheel teleop jogging (aka world, 'axis')
Creates jog pins for all axes Letters (L= [x,y,z,a,b,c,u,v,w])
(akin to the pins used for joints jogging):
axis.L.jog-enable
axis.L.jog-scale
axis.L.jog-vel-mode
axis.L.jog-counts
axis.L.kb-jog-active
axis.L.wheel-jog-active
For trivkins (kinematicsType == KINEMATICS_IDENTITY), to jog
both joints and axes with same jog wheel, make hal connections like:
net sig_0_to_x joint.0.* axis.z.*
net sig_1_to_y joint.1.* axis.y.*
...
For other kins with kinematicsType=KINEMATICS_IDENTITY) (for example,
gentrivkins with no kinstype parameter (or with kinstype=I)), axes letters
may be omitted (nonconsecutive), so connect as:
net sig_0_to_first_letter joint.0.* axis.first_axis_letter.*
net sig_0_to_second_letter joint.1.* axis.second_axis_letter.*
...
For the more general case of kins with kinematicsType=KINEMATICS_BOTH (for
example, gentrivkins with kinstype=B), axis letters may not necessarily
have any one-to-one correspondence to joint numbers so axis.L.* jog pins
and joint.N.* jog pins must be connected individually as required.
Examples sim configs:
configs/sim/axis/gentrivkins/xz.ini gentrivkins,KINEMATICS_IDENTITY
configs/sim/axis/gentrivkins/xz_both.ini gentrivkins,KINEMATICS_BOTH
configs/sim/axis/gentrivkins/xz_both_auto.ini gentrivkins,KINEMATICS_BOTH,
with auto switch to teleop
Many sim trivkins configs can be tested by changing the HAL specified kins from:
loadrt trivkins
to
loadrt gentrivkins #for KINEMATICS_IDENTITY)
or
loadrt gentrivkins kinstype=BOTH #for KINEMATICS_BOTH
An excellent sim config for testing with non-trivial kinematics is
configs/sim/axis/ldelta.ini (includes a vismach app) (thanks to jepler)
Also: revise halui.cc sendJog*() to use param jjogmode (1:joints,0:axis)
in anticipation of adding teleop jogging to halui someday
Notes:
1) motion.c test for creation of '*unlock' pins not right for joints_axes
2) wheel teleop jogging uses use axis vel_limit, maybe there needs
to be a pin to adjust velocity.
(kb jogging makes use of item in message: emcmotCommand->vel)
3) halui currently supports joint jogging only (no teleop jogging)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This fixes some bugs in halui, relating to jogging of the selected axis.
See SF bug #449.
Before this commit, when an axis is jogged using the
"halui.jog.selected.plus" pin (or the ".minus" pin), and then the selected
axis is changed (by sending a rising edge to a "halui.joint.N.select"
pin), then the old joint would keep jogging, and the new joint would
not start jogging.
In addition, if you later drive "halui.jog.selected.plus" (or ".minus")
false, the jogging joint would not stop jogging.
This commit fixes all of these bugs.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
New for testing: configs/sim/axis/gentrivkins/xz*.ini
Summary:
1) src/emc/nml_intf/
names changed to reflect Joint jogging:
was: sendJogIncr(),... is: sendJogJointIncr(),...
for emcJogCont(),emcJogIncr(),emcJogStop(),emcJogAbs(),
add jjogmode parameter to indicate jogging type:
jjogmode == 1 ==> joint jogging
jjogmode == 0 ==> axis (teleop) jogging
(Note emcJogAbs() not updated (not used anywhere?)
2) src/emc/task/
src/emc/motion/
support jjogmode parameter to distinguish joint/axis jogging
ignore wheel jog for teleop
3) src/emc/usr_intf/halui.cc
clarify naming for support of joint jog modes
rename sendJogInc(),... to sendJogJointIncr(),...
use jjogmode to deterine joints jogging
note: currently no pins are created nor support
incorporated for axis (teleop) jogging
4) src/emc/usr_intf/emclcd,emcrsh,emcsh,shcom,xemc,keystick
names changed to reflect Joint jogging:
was: sendJogIncr(),... is:sendJogJointIncr()
support jjogmode parameter to distinguish joint/axis joggint
(not tested)
3) axis gui: src/emc/usr_intf/axis/extensions/emcmodule.cc
new constants linuxcnc.MAX_JOINTS,MAX_AXIS
jog() new parameter jjogmode to distinguish joint/axis jogging
4) axis gui: src/emc/usr_intf/axis/scripts/axis.py
use linuxcnc.MAX_JOINTS and linuxcnc.MAX_AXIS
derive trajcoodinates from s.axis_mask
set axis.tcl globals from axis.py (::MAX_JOINTS, etc)
joints_mode() now independent of kinematics_type
for KINEMATICS_IDENTITY, force teleop for jogging (get_jog_mode())
for KINEMATICS_IDENTITY, force teleop for touchoff also
pass jjogmode parameter to jog()
new functions: ja_from_rbutton(),all_homed(),go_home()
set_teleop(), get_jog_mode()
new convenience functions get_states(),motion_modename(), etc.
distinguish axes/joints naming several places
for instance, current_axis (var for radiobuttons for axis/joint
selection) is now named ja_rbutton
use ini [TRAJ]COORDINATES for axis indices
use parm 'no_joint_display' if KINEMATICS_IDENTITY for dro display
new option [KINS]AUTO_TELEOP to set teleop after homing (with timelimit)
change some names to clarify joints/axes
home_all_axes() --> home_all_joints()
home_axis() --> home_joint()
home_axis_number() --> home_joint_number()
unhome_axis_number() --> unhome_joint_number()
unhome_axis() --> unhome_joint()
unhome_all_axes() --> unhome_all_joints()
activate_axis() --> activate_ja_widget()
activate_axis_or_set_feedrate() -->
activate_ja_widget_or_set_feedrate()
different key binding for activate_ja_widget() for axes xyza
use AXIS_A not AXIS_3 for a_axis_wrapped etc.
use AXIS_%s not AXIS_%d for finding SCALE
use linuxcnc.MAX_JOINTS not 9
probably a few more ...
5) axis gui: share/axis/tcl/axis.tcl
rename varname for joints/axes selection radiobuttons (now ja_rbutton)
for joints: ja_rbutton values are joint _numbers_
for axes: ja_rubtton_values are axis _letters_
consolidate radiobuttons and grid for joints & axes with for loops
use constants set from axis.py (remove hardcoded items: STATE_ON,...)
expand complex if tests to multiple lines for readability
initialize ::ja_rbutton in joint_mode_switch{}
6) lib/python/rs274/glcanon.py
posstrs() add parm 'no_joint_display' for use with IDENTITY kins
improve location of homeicon for lathe (based on 'Dia')
7) new dir: configs/sim/axis/gentrivkins with example configs:
xz.ini KINEMATICS_IDENTITY
xz_both.ini KINEMATICS_BOTH
xz_both_auto.ini KINEMATICS_BOTH with AUTO_TELEOP after homing
(these configs use [DISPLAY]LATHE=1 for testing dro display)
8) lib/hallib/sim_lib.tcl
compute axis indices for kins used in sim examples (trivkins,gentrivkins)
handle [KINS]KINEMATICS= with parameters
Notes:
a) Not changed:
Currently, only joint jogging available for:
wheel jog pins (joint.N.jog*)
halui jog pins (halui.jog.N*, halui.jog.selected.*,halui.jog-*)
b) Potential problem/nuisance:
Some kins may use/require coordinates=value
(Example: loadrt gentrivkins coordinates=xz)
The kins parameter: coordinates=value
must agree with: [TRAJ]COORDINATES=value
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This (perhaps interim) change allows sim configs for lathes
in gscreen and gmoccapy to execute mdi (without hanging) after homing
Note:
The lathe sim configs use dummy JOINT_1 with immediate homing
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
problems:
gmoccapy_lathe.ini,gmoccapy_lathe_imperial.ini: can't mdi after home
gmoccapy_4_axis.ini: added dummy JOINT_3,4 but can't mdi after home
summary: work required on homing status
in hal_glib.py and elsewere ?
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
problems: gscreen_lathe.ini,gscreen_custom/industrial_lathe.ini
homeall: results for halui.joint.[012]is-homed are true
but message "not-all-homed" and mdi hangs ?
summary: work required on homing status
in hal_glib.py and elsewere ?
note:
gscreen_gaxis.ini requires a dir named ~/.themes to start
tester.ini ?
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
keystick.ini modified for consistency,
no changes to keystick.cc (doesn't use [TRAJ]AXES)
xlinuxcnc.ini modified for consistency
no changes to xemc.cc (uses #define XEMC_NUM_AXES 3)
is xemc.cc worth the trouble?
mini.ini not modified (mini.cc uses [TRAJ]AXES)
mini.cc doesn't work with tcl8.6:
Error in startup script: cannot use geometry manager grid inside .top.left
which already has slaves managed by pack while executing
"grid $position -row 1 -sticky ew -padx 2 -pady 2"
(file "/data/git/linuxcnc-dev/tcl/mini.tcl" line 1197)
mini.cc does seemm to work with tcl8.5.8 (on lucid)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
When looking for [SECTION] headings in the old ini file, only count
the ones that are at the beginning of a line (so it skips commented-out
section headings).
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
.. from loadTraj down to emcTrajSetAxes. emcTrajSetAxes now computes
the "right" value for compatibility, so there's no need to pass a
computed value in.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
the header emcmotcfg.h includes the noted definitions. The other
items were not intended to be part of the public NML interface.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Most of these are initialization and copy, to maintain compatibility
for code that ultimately uses the deprecated value.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Users that need to simply copy it to maintain compatibility with another
layer may use the aliased field DeprecatedAxes to avoid a compile-time
warning.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Users that need to simply copy it to maintain compatibility with another
layer may use the aliased field deprecated_axes to avoid a compile-time
warning.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This number is eventually exposed in the stat buffer, and many UIs
have used it to choose how many axes to display.
The more modern axis mask is preferable, because it allows UIs to correctly
show the right axes when some are missing. But for better operation of
old UIs (as well as code in task that may incorrectly rely on the value
of Axes), correct the setting so that it includes all axes specified
by the axis mask.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
axis/lathe.ini: homing works, homeicons in correct place, mdi & auto work
Notes:
0) Lathes are commonly configured as XZ machines
1) The simplest, non-custom, distro-supplied kinematics available is
trivkins so it has commonly been used for XZ lathes
2) trivkins kinematicsInverse() is hardcoded:
joints[0] = pos->tran.x;
joints[1] = pos->tran.y;
joints[2] = pos->tran.z;
3) To use trivkins (using XZ only), add dummy stanza for [JOINT_1]
making it home immediately.
ref: src/config/ini-homing.txt: Immediate Homing
[JOINT_1]
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
also specify 3 joints:
[KINS]
JOINTS = 3
4) Common sim hal files (namely core_sim.hal, simulated_home.hal)
assume 3 axes so use:
[TRAJ]
AXES = 3
COORDINATES = X Z
Asides:
a) An XZ kinematics would be simpler but it is (and has been
in the past) convenient to use existing trivkins
and existing halfiles for sims.
b) The setting [TRAJ]NO_FORCE_HOMING=1 can be used to
eliminate the need for the [JOINT_1] stanza.
(The XZ coordinates can still be homed)
c) In prior, non-joints_axes branch (e.g. 2.7), a mask is used
so that homing is enforced only for coordinates in
use. A similar feature could probably be applied in
joints_axes (but not by me)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
with configs/sim/axis/lathe.ini
was:
homeicon was appearing in Vel: position
homeicon would appear (at Z: position) when homing nonused joint1
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
configs that were previously created for joints_axes:
sim_xyzbc
gantry_mm
1) move to configs/axis/ dir for consistency with inis with DISPLAY=axis
2) set VERSION = 1.0 for consistency with converted ini files for joints_axes
other:
in sim_xyzbc.ini, use POSITION_FILE = pos_sim_xyzbc.txt
since the former name (sim_xyzbc.txt) is expected to be a documenting
file by the pickconfig.tcl
cleanup autoconvert text in axis/lathe.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
already done:
touchy/touchy.ini (set VERSION = 1.0 for consistency)
modified:
touchy/gladevcp/touchy.ini
touchy/gladevcp/gladevcp_touchy.ini
touchy/ngcgui/pyngcgui_touchy.ini
touchy/ngcgui/pyngcgui_touchy_lathe.ini
touchy/ngcgui/pyngcgui_touchy_gcmc.ini
touchy/ngcgui/pyngcgui_touchy_moveoff.ini
Note: a fix for a regression in pyngcgui, gremlin_view is pending
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
already modified:
keystick.ini (update VERSION for consistency)
xlinuxcnc.ini (update VERSION for consistency, add KINENMATICS=trivkins)
updated:
mini.ini -- updated mini.tcl for AXIS_ --> JOINT_
but mini.ini is not runnable due to a regression in mini.tcl:
mini.tcl is not working on debian jessie (not joints_axes):
Error in startup script: cannot use geometry manager grid inside .top.left
which already has slaves managed by pack
while executing "grid $position -row 1 -sticky ew -padx 2 -pady 2"
(file "/data/git/linuxcnc-dev/tcl/mini.tcl" line 1204)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Note:
pyngcgui*.ini are updated for joints_axes but need a fix for a
regression related to pgrep in package:procps)
(change options -lf and -a)
not fixed yet (but not part of these configs)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
configs already compliant, set VERSION = 1.0 for consistency:
axis/vismach/puma/puma560.ini
axis/vismach/scara/scara.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Also includes a number of bug fixes:
Ignores missing values rather than putting "None" in the INI
Works from anywhere in the tree, not just the config directory
Fixes a {} [] confusion.
Signed-off-by: andypugh <andy@bodgesoc.org>
to scripted use.
force (-f) means that it performs the best-guess behaviur with no prompting
dialog (-d) gives a user some information about what is going to happen, and
the option to opt out.
The script also now makes a complete backup of the config.
in -f mode this is deleted after successful completion
The script brings back the [EMC]VERSION flag, and this particular iteration
is allocated the tag VERSION = 1.0.
Some limited thought has been given to future extensibility.
usage update_ini myconfig.ini
It shuffles the INI file sections to suit the new format, and also changes
the HAL pin names where necessary.
Signed-off-by: Andy Pugh <andy@bodgesoc.org>
4.7. in Todo-2.6 says: test jog speed - Tomaz T reports on emc-users 2013-10-10
or so that ja3 jogging speed is not controllable
This was my screwup while fixing another bug where the jog speed was not
limited to the AXIS maximum; this change does both by capping the jog speed
request.
Commit 0662094ae97f32b2201b437e4c6d32e8f694bb3a merges master into
joints_axes3. That merge commit (and all other merges) was dropped
during the rebase of joints_axes3 to joints_axes4.
That merge commit in ja3 also introduces the unrelated change contained
in this commit; this commit was added to ja4 (in the same place as
the 0662094ae merge, relative to the other commits in the branch) to
introduce the new patch introduced during the merge.
This parameter is used to accomodate serial joints which do
not rotate with the previous joint. This type of linkage is
common in some robot types (notably silicon wafer handlers).
In general, the parameter will be 0 (no compensation), 1 (add
prior joint position), or -1 (sibtract prior joint position).
It is possible to set it to any integer value, and other values may
make sense (if there is gearing, for example)
new thing is that there are now soft limits for teleop jogging
(for now definable in inifile)
at task level commands are unified for free and teleop jogging
at motion level they are handled regard of current mode
Axis modifications to make use unified jogging commands
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
- remove dead code
- fixed comments
- slight reorganisation of source code
- remove unused variables
- convert unnessesary global varables to local
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
- trivial kinematics
- existing axes can be added as a load time params
- available ony m->n (m = n) mapping of axes to joints
- with no params this is simple trivkins functionality
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
IRC user ickalB reported that his program encountered problems
due to a missing implementation of knot_vector_creator. I am
unable to reproduce his report.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
If the carousel was jogged before being homed and with no tool selected
the component never knew when to stop.
So now it stops when it is homed, then maybe re-starts next time.
Signed-off-by: andypugh <andy@bodgesoc.org>
I misread the shmctl manpage, and tried to use shmctl IPC_SET
with the SHM_LOCK bit set in shm_perm.mode. Instead,
the right way to do this is shmctl SHM_LOCK, and then check
for the SHM_LOCK bit.
Only do this in rtapi_app when rtapi_is_realtime(), because
it doesn't matter if a segment can't be locked by a non-
realtime process. This also prevents needing to raise the
locked memory limit, because rtapi_app has used its root
powers to raise RLIMIT_MEMLOCK.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
I created a sim configuration with all defaults, but it didn't run because
postgui_call_list.hal didn't exist. It appears this would have affected any
configuration that didn't set the pyvcp option.
It doesn't appear critical for the condition to match the one under which
lines that *do things* are written to pyvcp_options.hal, because that file
is created unconditionally just below the context of this change.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Currently this pins do not provide live/actual values of fifo.
If halsampler (ULAPI) is reading fifo after sampler is disabled then fifo-depth is altered which is not updated on this pin; Similarly if fifo was full before diabling it and then halsampler emptied it, still sampler will show that fifo is full.
Signed-off-by: Rushabh Loladia <rushabh.loladia@gmail.com>
This is a refactor of the shuttle driver guts, to make it easier to
add support for other devices with similar interfaces and protocols
(coming in the following commits).
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
and increase the max delay to 999,999,999ns (1 second minus 1ns),
which is the biggest value that can be trivially supported via
clock_nanosleep without extra arithmetic.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Reportedly, freebsd(11) has dlopen in libc, and there is no libdl, so
-ldl is a compile-time error.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Tested-by: Edward Tomasz Napierała <trasz@FreeBSD.org>
The get_current_dir_name() is a nonportable GNU extension.
Use getcwd(NULL, 0) instead; it's nonstandard too, but it's
widely supported.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
typedefs like these don't seem to be idiomatic C++ code (since 'class T'
makes it possible to delcare 'T t', the typedef is redundant), and a
later definition of the destructor as
setup::~setup() { ... }
caused errors in clang and doesn't seem to be standards-compliant.
Reported-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
It turns out that shmctl IPC_CREAT does not apply umask to the provided
mode. Since there's no easy way to access the current umask, apply
owner-only permissions.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
It turns out that shmctl IPC_CREAT does not apply umask to the provided
mode. Since there's no easy way to access the current umask, apply
owner-only permissions.
Reported-By: Edward Tomasz Napierala <trasz@FreeBSD.org>
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. whether a component using this will load depends whether the rtai
implementation actually provides exp() or not.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This fixes build on FreeBSD, which doesn't define them in <math.h>.
Those were taken from glibc.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Without it, it fails with:
emc/rs274ngc/interp_internal.cc:76:44: error: cast from pointer to smaller type 'char' loses information
for (n = 0, m = 0; (item = line[m]) != (char) NULL; m++) {
^~~~~~~~~~~
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Without this patch loading modules fail due to accessing
uninitialized memory, like this:
halcmd: loadrt meh
<stdin>:1: module 'meh' not loaded
<stdin>:1: execv(...): No such file or directory
Thanks to Jeff Epler for figuring out the right fix.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Now when the font is changed the column title and tab font change too.
There are also separate functions to set the title and/or tab font
separately.
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
Task allows Open in Manual mode now. It's Run that needs Auto, and Axis
does that switch as needed.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
It's already allowed in all the non-On States, and in On/MDI and
the appropriate On/Auto sub-Modes, so in On/Manual doesn't seem like
a stretch.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This doesn't solve the problem of being unable to call
c.program_open in some circumstances, but it does get rid of some
black magic which is good.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This reverts commit 5fb0e81784.
Task allows EMC_TASK_PLAN_OPEN in any Mode if the machine State is Off,
Estop, or Estop-Reset. But if the state is On, Task only allows it
if Mode is Auto. So not switching to Auto here means it fails to open
files in some situations...
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Before this commit, Task used to only allow the UI to sync the Interpreter
if the machine was in the On state, and Task was in the Manual mode.
This commit makes Task also allow the UI to sync the Interpreter in
Estop, Estop-Reset, and Off states, and in the On state with Task in
the MDI mode.
On/Auto is still disallowed because I don't need it for now.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Before this commit, Axis would switch Task modes to MDI, then Auto, when
opening a file (such as the splash gcode). These Task mode switches
cause an Interpreter sync (and the associated var file write) as a side
effect, which is what Axis wants (so its' internal interpreter can run
from the same state as the real Interpreter in Task).
Both the MDI and Auto Task modes require Motion to me in Coordinated mode.
On identity kins machines this is no problem, since they can switch
between Free and Coordinated mode at any time, but on non-identity-kins
machines Coordinated mode is only available when the machine is homed.
A bug in Motion would incorrectly allow this change to Coord to happen,
because at Axis start time the joints haven't been marked 'active' yet.
This commit changes Axis to use the new task_plan_synch() function
instead, which just requests an Interpreter sync in Task, without the
problematic Motion mode switch.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This sends the EMC_TASK_PLAN_SYNCH message to Task, which forces an
Interpreter sync and a var file write.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This function might have served a purpose long ago, but now it's just
confusing-looking dead cruft.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
i couldn't figure out how to show the more complicated
equations but this may help users wanting a starting
point for setting the 'gain' pin
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This reverts commit c43b6dd2b6.
The equations looked ok in a terminal but not in the generted pdf or
html files.
Maybe someone else knows how to do put equations in a man page
(groff eqn .EQ,.EN macros maybe)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
and examples for setting 'gain' to match a zero-order-hold
equivalent of a single pole low pass filter
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The resolved conflict looks like a mess in git diff, the result
needs to be double-checked.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Conflicts:
docs/src/getting-started/updating-linuxcnc.txt
There were two problems introduced at commit 2b6c8ad710. First,
the logic when the Hal type was an integer and the Python type
was not int or long was wrong. Second, in a place where the Hal
type was float, the C type was incorrectly an integral type.
Closes: #43
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Reportedly, using /dev/stdout as the destination of objcopy fails in a
docker container. This may be docker/docker#11462. This reformulation,
which uses a temporary file, is expected to work around the problem.
For more background, see machinekit/machinekit#876.
Reported-by: Michael Haberler <mah@mah.priv.at>
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Could be confusing to users as panelui's INI file was
shown but is not valid to load a machine config.
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
Build userspace components found in hal/user_comps/*.comp
Thanks to Jeff Epler for fixing my initial broken version of this commit.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This component computes the temperature indicated by a thermistor.
It uses the Beta-parameter variant of the Steinhart-Hart equation,
described here:
http://en.wikipedia.org/wiki/Thermistor
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
uses an INI file to designate commands and/or HAL pins.
allows a handler file to add custom commands in python
buffers keyboard scan codes in a shared memory buffer
current design expects sampler to fill the shared mem.
expected that the sampler wuill be connected to a
mesa 7i73 or matrix_kb component for scan codes.
Thanks jeppler for your help on this
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
built for sim testing of panelui.
makes 64 input pins for buttons repersenting 8 rows and 8 columns
converts them into keyscan code compatible with panelui, matrix_kb,
and with output equivelent to MESA 7i73
Thanks jeppler for bug fixes.
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
now the color zones are applied on negative or positive values if
the upper and lower limts are set the same (aside from neg and pos)
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
I needed momentary buttons with LED like visual aids
It should work as before if is_momentary is false (default)
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
--require-license became the default (and only) mode some time ago, so
there's no need to specify it now.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
These variables are intended to be used in milltask. However, because
the emcmotglb object file was linked to the modmod realtime component,
there was a separate and unininitialized copy of these values there as
well.
This leads only to confusion, such as with the (now modified)
initialization of emcmot structure fields from VELOCITY and ACCELERATION
values that would always be equal to 0.0.
For the same reason, remove it from the set of public header files.
This confusion also tripped up Moses when he tried to initialize a new
emcmotglb.c field "inhibit_probe_errors" from task and then use the value
in motion.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. so that hypothetically these can be used to stream to or sample from
a special-purpose component like a serial device.
Since the runtests use sampler and streamer extensively, I think that's
a good sign that the code is right.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
- Change `.ini` file parameter
- Rename from `PERSISTENT_G92_OFFSET` to `DISABLE_G92_PERSISTENCE`
- Change type from `bool` to `int`
- Fix docs
Signed-off-by: John Morris <john@zultron.com>
This implementation of `G52` is intended to be compatible with Fanuc,
including sharing offset registers with `G92`.
LinuxCNC rs274ngc persists `G92` offsets across machine startup, M02
and M30, but Fanuc does not. Because users familiar with Fanuc may
expect the offset to be volatile, and be surprised (perhaps badly)
when the offset persists, this patch adds a `.ini` file option to
disable it.
Other implementation details:
- `G52` shares registers with `G92`, `#5210` (flag) and `#5211`
through `#5219` (9 axis offsets)
- `G52` offsets are applied in the same way as `G92`, after workpiece
coordinate offsets and rotation.
- `G52` and `G92`/`G92.n` may be freely mixed, and in the light of the
shared registers, interactions behave as expected.
- `G52 X0 Y0` zeros the offsets, but does not reset the `#5210`
flag. This is not expected to cause unexpected behavior; the flag
apparently exists only to implement `G92.2` and `G92.3`.
- `G52` and `G92` share DRO readouts and preview offset display.
- `G92` offset persistence may be disabled by setting
`PERSISTENT_G92_OFFSET = false` in the `[RS274NGC]` section of the
`.ini` file. By default, `G92` is persistent.
Signed-off-by: John Morris <john@zultron.com>
is detected as error with tk8.6:
"Error in startup script: cannot use geometry manager grid
inside .top.left which already has slaves managed by pack"
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
global: #<_remaining_features:> indicates the number of features
remaining after the current feature. A value of zero indicates that
the current feature is the last feature.
A user subroutine (or preamble or postamble) can test
value to display count of remaining features and/or to test
if the current feature is the last feature in a sequence.
Also: include debug prints in some examples
Credit to RickG for suggestion on the LinuxCNC forum
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
By moving python related stuff out of line, the lightweight
header object_fwd can be used here now.
On the same i5 laptop as my earlier measurements,
timing
touch emc/rs274ngc/*; make -j4
this further reduces user+system CPU time by 68s,
elapsed time by 33 seconds, and page faults by
1.4 million (5.6GB)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
again, this makes it safe against arguments with side effects.
It also uses std::nearbyint in preference to the open-coded
variant; if there are any differences, the behavior of
the standard function is probably equally defensible if not
more so.
(n.b. both have undefined behavior if the rounded FP value
is outside the range of int; and I happen to know that
the actual behavior on gcc is different between x86 and
arm. blech.)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
this way, the array members are not special cases, but
instead their initialization can be in with all the other
non-array fields.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. in favor of C++11 constructs. These generally have
lower compile-time overhead. Hoewver, the measured improvement
is slight, <1 second sys+user CPU time, <1 seecond elapsed time;
and a slight increase in page faults (+245, +1MB)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This includes
- preferring forward declarations where possible
- moving using namespace and namespace= out of headers
- preferring more specific headers
- using std::end in preference to boost::end
This is beneficial because just including boost/python.hpp
adds a lot of time and memory to compiling a file. On an
underpowered platform (rpi2), the increase from an empty
C++ source file to one that includes <boost/python.hpp> is:
469MB more maximum resident set size (50% of total RAM!)
51s more elapsed time
object_fwd.hpp adds only ~6MB and <1s.
object.hpp adds about 26s and 298MB. Most other boost/python
header files include object.hpp indirectly.
On a higher-powered system (i5 laptop, 4 cores, 8GB RAM),
this patch reduces the compile time of
touch emc/rs274ngc/*; make -j4
by 82 user+system CPU seconds, 23 elapsed seconds, and 1.24 million
page faults (5GB of page faults)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Two settings were added:
NO_PROBE_JOG_ERROR
NO_PROBE_HOME_ERROR
Each one disables the corresponding error. The disable for homing is
useful if the probe input is the same as a home switch.
Signed-off-by: Moses McKnight <moses@texband.net>
These lines were added in 2005 when linuxcnc 2.x got support for
user-defined M-codes. But in linuxcnc 2.x never had a setuid task
program. (Some version of emc1 might have)
Simply remove the call, which caused a compile-time warning on some platforms.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
One difficulty of using negative adaptive feed to trigger reverse run is
that the actual scale factor has to be non-negative. With a few
additional checks, this commit handles the translation from a bilateral
input (-1.0 to 1.0) to the unilateral feed scale and direction switch
(forward or reverse).
What happens now is that a negative adaptive feed causes the TP to try
to reverse direction. If this is successful, or we're already in
reverse, then the scale factor is just the absolute value of the
adaptive feed pin. Otherwise, the scale factor is set to zero, so the TP
decelerates to a stop (allowing a direction change). A similar situation
happens for the reverse to forward transition
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Pausing was a lazy way to ensure that the machine absolutely was not
moving when doing a direction switch. However, a properly-written
"is-moving" function can do this same job without needing an explicit
pause from the user. One critical side-effect of this is that we can
give the appearance of smooth transitions between forward and reverse
motion with adaptive feed.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Split cycles and reverse run don't play well together. This ugly fix
simply skips any split cycle calculations, since we don't need them for
reverse run (no tangent check).
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
For testing purposes, the quickest way to add reverse run functionality
to axis was through the keyboard shortcuts. Here's how it works:
"Shift + R" (During Pause): enable reverse run
"Shift + F" (During Pause): enable forward run (default)
Both commands only work when a program is loaded and paused somewhere in
the middle of the run. To see reverse run, hit "resume" or use the "S"
key to resume motion.
NOTE: when the reverse-run queue is empty (past about 20 segments), the
motion will slow down and stop, but NOT be paused. To switch to forward
run again, you need to explicitly pause, then enable forward run, then
resume.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
This fix also adds stronger prohibitions against switching motion when
not moving, so that we don't clobber motion by suddenly moving forward
during a reverse move.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
TODO: check for non-zero velocity / other safety conditions to ensure
that a direction change happens ONLY when paused and at rest.
Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
Before this commit, if the "pin" argument passed into count_instances()
was not found (because it was greater than the number of pins available,
or less than 0), then the "this_instance" argument would never get set,
and the calling code (in hm2_ioport_gpio_export_hal()) would use an
uninitialized value.
This commit fixes that problem.
This commit also renames a bunch of internal variables for clarity.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This verifies that the math functions declared in rtapi_math.h are all
actually available at load-time.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
I actually wasn't able to determine what platform *did* ever support
asm/msr.h in userspace. It is still legitimately used by rtai with
the kernel threads model.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The version which uses gcc intrinsics is suitable for all
architectures and all supported gcc versions.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This header always stated its declarations are "INTERNAL to the
RTAPI implementation, and should not be included in any application
modules." and it is not in turn included by any other header in the
public interface.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
this simplistic test increments a counter that is protected by the rtapi
mutex. If the mutex works properly, the counter is equal to a known
value (number of iterations times number of threads). If the mutex
doesn't work properly, the counter can have a value other than that
known value.
This test passed 10,000 trials on an x86_64 machine and 10,000 trials on
an ARM machine. It readily fails when no-op mutex operations are
substituted instead. This gives us a level of confidence that the mutex
primitives are correct.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
When I extracted content from our old Joomla website, i added the History
notes that i found there to our "Getting Started" document. But Chris
Radek just pointed out to me that we already had a copy of the history
notes in our docs, in common/emc-history.
This commit copies the good parts of my second copy into the original
copy, and removes my second copy.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Possibly affected sites were identified by
git grep '^[^#]*=.*#' -- "*.ini"
This was accomplished by the vim substitution
:%s/^\([^#].*=.*[^ ^I]\)\s*\(#.*\)/\2^M\1/g
where ^I and ^M are literal control characters.
One location where the value was intended to contain a literal # was manually
not replaced.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
this will break inifiles, because before now this text was just
ignored by anything that uses the 'typed' interface to InfFile::Find.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This fixes a merge conflict resolution error I made in the previous
merge commit. Thanks to Balestrino for the correction.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This commit causes the HTML links to be validated every time the HTML
docs are built, using the W3C "checklink" program from the
w3c-linkchecker package.
This validation was optional before, because Lucid doesn't have the
w3c-linkchecker package, so we couldn't build-depend on it. Now that we
don't support Lucid any more, we can finally add this build dependency.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
before this commit, ::watchfile would be appended with
missing item names resulting in blank lines in display
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
halshow watchfiles created with the menu item: 'File/Save Watch File'
may require numerous clicks in the selection tree widget and
are created as one long line which can complicate modifying
or creating a watch file when editing by hand.
This commit makes it easier to hand-edit a halshow watchfile:
o items can appear on multiple lines
o blank lines are ignored
o lines beginning with # character are ignored
Example:
$ cat tst.halshow
# comment_1
pin+axis.0.pos-hard-limit
param+iocontrol.0.tool-prep-index
# comment_2
sig+estop-loop
$ halshow tst.halshow
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
It is easier to write code that is portable between Python 2.7 and
Python 3.x, which will become important soon as Python 2.7 is EOL'd
in 2020.
Support for older versions of Python was only required on Ubuntu
10.04 "Lucid Lynx", which is no longer supported in this branch.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
--disable-python has not worked, at least since we started using python
for the interpreter remap feature. Remove the broken configure option.
This commit is best viewed with 'git show -w' because a large block had
its indentation level changed.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This workaround was only required on Ubuntu 10.04 "Lucid Lynx",
which is no longer supported in this branch.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Ubuntu Lucid reached EOL in April 2015. We will end support for it when
we reach EOL on our 2.7 release series.
Accordingly, don't build this combination on the buildbot.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. by introducing an extra .#. part of the aliased name when the same
gtag/unit/pin is associated with more than one GPIO.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This can occur either because a user has an existing alias (not likely)
or because the same unit/function/pin is output on the same GPIO. This
latter case actually happens in the field e.g., for firmwares designed
to work with 7i48/7i54.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
On my test rig, this creates aliases like the following excerpt:
$ halcmd show alias
Parameter Aliases:
Alias Original Name
hm2_7i92.0.pwmgen.00.out0.invert_output hm2_7i92.0.gpio.001.invert_output
hm2_7i92.0.pwmgen.00.out0.is_opendrain hm2_7i92.0.gpio.001.is_opendrain
Where possible, I tried to model the naming after the related software
implementations (stepgen, pwmgen).
I did not cover all gtag and sec_tag combos; the ones that aren't covered
will not create aliases. Mostly the combos not covered were marked
as not supported in hm2_get_pin_secondary_name.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Gmoccapy is a popular choice now.
The pyvcp panel option is stepconf doesn't make sense with
Gmoccapy, I will address that soon.
This is just basic support for Gmoccapy there may be more options
required/desirable.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
For those who use wear offset remap options, this separates
the wear offsets from the tool offsets on different tabs
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
gscreen -F will send internal function docs to
standard output
Still more docs to make but my head hurts..
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
This is in preparation for any new config changes needed when upgrading
from 2.7 to 2.8 (or 3, or whatever the next version will be).
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
.. such as aarch64. On these systems, there is no
suitable definition of inb/outb to be had, as there is no I/O
memory space distinct from the regular address space.
Implement these functions such that inX returns zero,
outX does nothing.
(In retrospect, it's surprising that 32-bit arm has
sys/io.h, inb/outb and the rest, but apparently for certain early
ARM systems such as the NetWinder, inb/outb were mapped onto a
certain range of memory addresses known as the "footbridge"; that
lives on in glibc to this day despite the fact that all the netwinders
are probably in landfills by now)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. the old method doesn't work on aarch64 and apparently caused problem
with powerpc back in the day. The new method has been tested to work on
amd64 and aarch64 and is expected to be more portable: it is the normal
method used to select the symbols visible in a shared library.
(I don't have a powerpc to test with)
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
(cherry picked from commit a4b4f6c93b156a7bd8e0068d1f65ed9076f36e51,
in the liblinuxcnc-ui branch)
The changes were based on the axis_foam sample and forum info.
I have not tested on a real machine - just in simulation
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
ver. 1.5.2.2
- if a user did reduce spindle override to zero and switched on the
spindle, gmoccapy produced a division by zero error. Fixed!
reported by "tekmobile"
Signed-off-by: Norbert Schechner <nieson@web.de>
The asciidoc markup format is way simpler than the *roff format natively
used for manpages.
This commit allows manpages to be written in asciidoc format, and
automatically converted at build time.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
both mode 0 and mode 3 (MPG)
I haven't live tested as I don't have the card.
Compared HAL output to user suplied text.
Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
if the firmware was last on the list it would be found
but pncconf decide it wasn't found and showed a default firmware.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
including info for hi and low range gear settings
we get some useful in-between spindle fb signals:
feedback in RPM
feedback in RPM absolute
remove spindle test as the test commands position not velocity
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
This commit only changes whitespace, to get adjacent lines to line up
on the same column (given 8-character tabs).
Some nearby lines use tabs instead of spaces so the diff looks off,
but in an editor with 8-char tabs it looks right, and i didn't want to
replace all the tabs.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
ver. 1.3.2
- fixed a small bug PAUSE button did not get active on M01
Thanks to Rick (LAIR82) for pointing on it.
Signed-off-by: Norbert Schechner <nieson@web.de>
with apropriate defaults, home-all selection is not required,
the unused axes will not trip home-all because the position stays at zero.
docs are probably helpful...
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
ver. 1.3.1
- fixed very serious bug PAUSE / RESUME / STOP issue
Program jumped to strange positions if STOP has been pressed
while PAUSE was active.
Thanks to Mael (papaours) for finding it.
ver. 1.3.0.1
- corrected a bug, toolchange velocity hal pin have not been
presseted with values, if the user worked with the
default values, so a probing with vel = 0 was possible,
resulting in an error
- corrected an error in notifications.py, as the text to be
displayed has not been checked for correct pango format, a
message like "vel <= 0" resulted in an error. Now the necessary
check is done
Signed-off-by: Norbert Schechner <nieson@web.de>
emcMotionInit() may be called multiple times if something goes
wrong so avoid confusing messages from unneeded repeated
calls to ini_hal_init()
Note: ini_hal_init* fails are reported but not fatal
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This test is expected to fail in the case that configure selected
conflicting versions of libtcl and tclsh/wish executable.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
.. so load it like one. This allows the removal of delays and postgui
hal file tricks to use the ini.* pins
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Applies to variable lines only (not to SECTION lines).
Max number of lines to extend is MAX_EXTEND_LINES (20)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
make stepconf remember last config name, link, shortcut,
and sim hardware options for next time started.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
One can build an arbitrary sized simulated machine.
one can test stepconf's configs on a non realtime computer.
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
These are for making simulated configs with stepconf.
The parport component is a passthrough that stands in for the realtme parport component.
sim_axis_hardware creates limit and homing switches based from current joint position and
info plugged into it (expected to come from the INI file)
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
also:
parse_time(): consider inputs as lower case
to support uS,mS, etc.
also: allows testing single thread using either "-" or 0 for other period
as mentioned in commit 5829d4cb
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
The LinuxCNC issue tracker is to report bugs in the software.
If you have a question about how to use the software, use one of the other methods detailed on our community support page: http://linuxcnc.org/community/
(delete this section before submitting your bug report)
## Here are the steps I follow to reproduce the issue:
1.
2.
3.
## This is what I expected to happen:
## This is what happened instead:
## It worked properly before this:
(If the behavior changed after making a particular change in hardware or
software, describe the change you think is responsible. E.g., "after upgrading
from LinuxCNC 2.7.3 to 2.7.4")
## Information about my hardware and software:
* I am using this Linux distribution and version (often, shown by `lsb_release -a`):
* I am using this kernel version (shown by `uname -a`):
* I am running ...
* [ ] A binary version from linuxcnc.org (including buildbot.linuxcnc.org)
* [ ] A binary I built myself
* [ ] A binary version from some other source besides linuxcnc.org
* I am using this LinuxCNC version (shown in package manager or, for git versions, `scripts/get-version-from-git`):
* I am using this user interface (GUI) (e.g., AXIS, Touchy, gmoccapy, etc):
* I am using this interface hardware vendor and chipset (e.g., parallel port, ethernet port, FPGA card):
LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3D printers, laser cutters, plasma cutters, robot arms, hexapods, and more. https://linuxcnc.org/
# DISCLAIMER
**THE AUTHORS OF THIS SOFTWARE ACCEPT ABSOLUTELY NO LIABILITY FOR ANY
HARM OR LOSS RESULTING FROM ITS USE.**
**IT IS _EXTREMELY_ UNWISE TO RELY ON SOFTWARE ALONE FOR SAFETY.**
**Any machinery capable of harming persons must have provisions for
completely removing power from all motors, etc, before persons enter
any danger area.**
**All machinery must be designed to comply with local and national
safety codes, and the authors of this software can not, and do not,
take any responsibility for such compliance.**
This software is released under the GPLv2, with some parts under the LGPL.
See the file COPYING for more details.
# The Build Process
Refer to the file 'docs/src/code/building-linuxcnc.txt' for information
about building and running the software, or look here:
LinuxCNC controla máquinas CNC. Puede manejar fresadoras, tornos, impresoras 3D, cortadores láser, cortadores de plasma, brazos de robot, hexápodos y otras. http://linuxcnc.org/
# DESCARGO DE RESPONSABILIDAD
** LOS AUTORES DE ESTE SOFTWARE NO ACEPTAN ABSOLUTAMENTE NINGUNA RESPONSABILIDAD POR NINGÚN DAÑO O PÉRDIDA RESULTANTE DE SU USO. **
** ES _EXTREMADAMENTE_ IMPRUDENTE CONFIAR LA SEGURIDAD SOLO AL SOFTWARE. **
** Cualquier maquinaria capaz de dañar a las personas debe tener prevista la desconexion completa de energía de todos los motores, etc., antes de que las personas entren en cualquier área peligrosa.
** Toda la maquinaria debe estar diseñada para cumplir con las normas y códigos de seguridad locales y nacionales, y los autores de este software no pueden, y no lo hacen, asumir cualquier responsabilidad derivada de dicho cumplimiento. **
Este software se lanza bajo licencia GPLv2, con algunas partes bajo LGPL. Vea el archivo COPYING para más detalles.
La traduccion al español de este software queda adherida a este descargo y a las licencias GPLv2 y partes LGPL.
# El proceso de construcción
Consulte el archivo 'docs/src/code/building-linuxcnc.txt' para obtener información sobre cómo construir y ejecutar el software, o vea:
Esta configuración es para una máquina de corte por plasma con control "paso a paso", junto con conexiones ClassicLadder a algunas de las IO de LinuxCNC.
Se basa en la configuración de muestra de classicladder, pero también incluye una bomba de carga y un sistema de control de altura de antorcha para los sistemas de Bob Cambells THC300 y CandCNC THC.
Los pinouts paso a paso son para tarjetas breakout/combo estándar provista por Bob Campbell.
Esta configuración está desactualizada y no se ejecutará sin actualización, ya que
utiliza freqgen, que se ha eliminado desde Linuxcnc 2.6.
Demo_mazak es un conjunto complejo de controladores HAL. Incluyen la tarjeta de movimiento Motenc-Lite, una tarjeta parport PMDX y una tarjeta IO ISA de propósito general.
Esta configuración se usa para la Mazak V5 de Cardinal Engineering y se incluye aquí como un ejemplo de una manera de distribuir las habilidades HAL en varios dispositivos.
Esta demostración incluye un ejemplo del uso de un puerto paralelo para leer un codificador de volante. Trae ClassicLadder para manejar la mayor parte de la lógica de la
máquina para el cambio de velocidades y herramientas.
No espere poder ejecutar esto tal como está a menos que tenga un conjunto de hardware coincidente. Sin el conjunto exacto de dispositivos, aún puede estudiar los archivos hal
Esta configuración utiliza la placa GM6-PCI de General Mechatronics, que puede controlar máquinas de hasta 6 ejes. Tiene una amplia capacidad de expansión de E/S: interruptores home aislados y finales para cada eje, E/S digital 4x8, módulos de E/S analógica y digital aislados para el bus de campo RS485.
Para más información, lea la sección del driver GM6-PCI del Manual del integrador o visite:
www.generalmechatronics.com
Descripción de las configuraciones de muestra:
Servo de 3 ejes:
Esta configuración muestra cómo configurar el DAC del codificador y del eje, y cómo conectarlos al módulo PID hal. Los 3 ejes utilizan un interruptor home y dos interruptores de límite. La entrada de fallo de alimentación está conectada al pin hal E-stop.
3 ejes, de pasos:
Esta configuración muestra cómo configurar el módulo stepgen. Los 3 ejes utilizan un interruptor home y dos interruptores de límite. La entrada de fallo de alimentación está conectada al pin hal E-stop.
This configuration drives a 3-axis servo machine using a Mesa AnythingIO board with the HostMot2 firmware. The config will only run if you have the card installed and have installed the firmware.
See the HostMot2 section of the Integrators manual for more information.
See LinuxCNC_Documentation.pdf - 11.4 Mesa HostMot2 Driver section for more information.
All 3 axes use a home switch. All home switches are connected to a single shared input pin. X and Z home without encoder index, Y homes with encoder index.
Esta configuración controla 3 servomotores en 3 ejes utilizando una placa Mesa AnythingIO con el firmware HostMot2.
La configuración solo se ejecutará si tiene la tarjeta y el firmware instalados.
Vea la sección LinuxCNC_Documentación.pdf - 11.4 Driver Mesa HostMot2 para más información.
Los 3 ejes utilizan interruptor home. Todos los interruptores home están conectados a un solo pin de entrada compartido. home X e Z sin índice en codificador, home Y con índice en codificador.
No se utilizan interruptores de límite.
Estas configuraciones tienen 3 codificadores, 3 PWM y 0 StepGens
This configuration drives a 3-axis stepper machine using a Mesa Anything IO board with the HostMot2 firmware. No limit switches are used, so this should work with very basic hardware. The config will only run if you have the card installed and have installed the firmware.
See the HostMot2 section of the Integrators manual for more information.
See LinuxCNC_Documentation.pdf - 11.4 Mesa HostMot2 Driver section for more information.
These configs have 0 Encoders, 0 PWMs, and 3 StepGens
@ -2,4 +2,4 @@ This configuration is to show how to connect the Mesa THCAD card with LinuxCNC o
There are two configurations, the plasma-5i20 that requires you to have a Mesa 5i20 installed and the plasma-demo using parallel port. The plasma-demo version is just to show how this config looks and is not a good candidate for the THCAD card due to the slow update speed when using a software encoder with the parallel port.
The subroutine touchoff.ngc is used with a floating head and the probe input to set the torch to the initial height of the cut. The example files x-trim.ngc and touchtest.ngc demonstrate the use of touchoff.ngc. The usage of touchoff.ngc requires you to have the probe input and and Arc Ok input. It uses M66 to wait for the Arc Ok input after lighting off the torch. Three parameters are passed to touchoff pierce height, pierce delay, and cut height. In actual use you will need to adjust the height to raise the torch after touch off to Z0 to match your actual setup.
The subroutine touchoff.ngc is used with a floating head and the probe input to set the torch to the initial height of the cut. The example files x-trim.ngc and touchtest.ngc demonstrate the use of touchoff.ngc. The usage of touchoff.ngc requires you to have the probe input and Arc Ok input. It uses M66 to wait for the Arc Ok input after lighting off the torch. Three parameters are passed to touchoff pierce height, pierce delay, and cut height. In actual use you will need to adjust the height to raise the torch after touch off to Z0 to match your actual setup.
Some files were not shown because too many files have changed in this diff
Show more