qtDragon toolchange and toollength setting

More
4 years 11 months ago #227012 by cmorley

Does anybody know how to read variables from qtDragon?

In the change.ngc there are lines like this:
if [#<_hal[gmoccapy.searchvel]> LE 0]
The ngc file then reads values as they are entered in textfields in the gmoccapy settings screen. That way the values are dynamic and not static as they are in an .ini file.
if [#<_hal[qtdragon.searchvel]> LE 0] was not the solution ;)

How do I read these values in qtDragon, most of the needed variables are already present there to make this working.
 
Can you list all the references you require?
Versaprobe in qt doesn't have the HAL pins - but I could add them.
 

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #227015 by ikkuh



Can you list all the references you require?
Versaprobe in qt doesn't have the HAL pins - but I could add them.


 

They could be hal pins indeed.

git.cnckloon.nl/PeterT/qtDragonNew/src/b...ap/macros/change.ngc


#<_hal[gmoccapy.toolmeasurement]> ; indicate no tool measurement 0 or nonzero for proceeding

#<_hal[gmoccapy.probevel]>

#<_hal[gmoccapy.searchvel]>

#<_hal[gmoccapy.probeheight]>

#<_hal[gmoccapy.blockheight]>


Take a look at linuxcnc.org/docs/html/gui/gmoccapy.html...uto-tool-measurement for the meaning and purpose of those variables.

I marked the corresponding values in picture:

 

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #227043 by cmorley
Ok I pushed the work to add HAL pins to Versa probe.
Code:
qtdragon.versaprobe-blockheight qtdragon.versaprobe-enable qtdragon.versaprobe-probeheight qtdragon.versaprobe-probevel qtdragon.versaprobe-searchvel

To be clear these represent the settings on the Versa tab page - not on QtDragons settings page (as you posted an image of)
The following user(s) said Thank You: ikkuh

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #227058 by ikkuh

Ok I pushed the work to add HAL pins to Versa probe.

Code:
qtdragon.versaprobe-blockheight qtdragon.versaprobe-enable qtdragon.versaprobe-probeheight qtdragon.versaprobe-probevel qtdragon.versaprobe-searchvel To be clear these represent the settings on the Versa tab page - not on QtDragons settings page (as you posted an image of)      
 
Code:
Great! Will be at the  machineshop in a few hours and will try them. Question though, there is a lot of information duplicated on the VersaProbe. BasicProbe and settings screen. Would it be possible to have all the settings for the probescreen routines on one tab? I would prefer the settings tab as they are already there. You could conditionally hide values for a specific probe if it is not in use. A lot of duplicate functioning pins can be removed that way, easier maintenance :) (as you did with all the duplicated pins in qtDragon) The space that will be available after removing the variables from the probe screens could be used to make the buttons larger and easier to use.
Last edit: 4 years 11 months ago by ikkuh.

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #227062 by ikkuh
Will be cleaning up the files and posting them here for others to use.

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #227082 by ikkuh

Ok I pushed the work to add HAL pins to Versa probe.
 
 
Cool! it works. But I do prefer that there is one special place (settings page) where these values are stored.
And btw the qtdragon.versaprobe-enable pin does not make sense (sorry), I need the values for a M6 remap and then this button is in the wrong place.
The adjusted macro:

Code:
o<change> sub ;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>;) ;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>;) ;otherwise after the M6 this information is gone! #<tool> = #<selected_tool> #<pocket> = #<selected_pocket> ; we must execute this only in the milltask interpreter ; or preview will break, so test for '#<_task>' which is 1 for ; the milltask interpreter and 0 in the UI's O100 if [#<_task> EQ 0]         (debug, Task ist Null) O100     return [999] O100 endif ;first go up F #<_hal[qtdragon.versaprobe-searchvel]> G53 G1 Z[#<_ini[CHANGE_POSITION]Z>] ; then move to change position G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>] ; cancel tool offset G49 ; using the code being remapped here means 'use builtin behaviour' M6 ;O200 if [#<_hal[qtdragon.versaprobe-enable]> EQ 0] ;O200 return [3] ; indicate no tool measurement ;O200 endif G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>] F #<_hal[qtdragon.versaprobe-searchvel]> G53 G1 Z[#<_ini[TOOLSENSOR]Z>] O300 if [#<_hal[qtdragon.versaprobe-searchvel]> LE 0] O300 return [-1] ; indicate searchvel <= 0 O300 endif O400 if [#<_hal[qtdragon.versaprobe-probevel]> LE 0] O400 return [-2] ; indicate probevel <= 0 O400 endif F #<_hal[qtdragon.versaprobe-searchvel]> G91 G38.2 Z #<_ini[TOOLSENSOR]MAXPROBE> G0 Z2 ; This is commented out only for sim. F #<_hal[qtdragon.versaprobe-probevel]> G38.2 Z-4 O500 if [#5070 EQ 0] G90 O500 return [-3] ; indicate probe contact failure to epilog O500 endif G90 G53 G1 Z[#<_ini[CHANGE_POSITION]Z>] #<touch_result> = #5063 #<probeheight> = #<_hal[qtdragon.versaprobe-probeheight]> #<blockheight> = #<_hal[qtdragon.versaprobe-blockheight]> (DEBUG, #<touch_result>  #<probeheight>  #<blockheight>;) G10 L1 P#<tool> Z[#<touch_result> - #<_hal[qtdragon.versaprobe-probeheight]> + #<_hal[gmoccapy.blockheight]>] G43 ;G10 L1 P#<tool> Z#<touch_result> ;G10 L2 P0 Z[#<workpieceheight> + #<probeheight> + #<touch_result>] ; signal success be returning a value > 0: o<change> endsub [1]
I managed to get a pin programmed and to show up from qtdragon_handler.py. But I can not get a decent value to show up in LinuxCNC, maybe my half a day experience with python is a little too short.
Code:
pin = QHAL.newpin("ton", QHAL.HAL_FLOAT, QHAL.HAL_IN) pin.value = float(self.w.lineEdit_search_vel.text()) pin.value_changed.connect(self.search_vel_changed)
Last edit: 4 years 11 months ago by ikkuh.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.265 seconds
Powered by Kunena Forum