Hello Guest it is March 28, 2024, 12:39:24 PM

Author Topic: BigTexBlue Screen.. modify gcode?  (Read 4216 times)

0 Members and 1 Guest are viewing this topic.

BigTexBlue Screen.. modify gcode?
« on: November 01, 2014, 11:25:28 AM »
I'm pretty new to Mach and GCode so go easy on me please..

I'm trying to utilize BigTex's BlueScreen's Auto tool zero and I see that it says that it zeroed in "Metric" when I ran it.

I have 2 questions:

1) How do I edit the GCode in Bigtex's screen for the speed in which it auto zero's, etc.?

2) If I can't edit the GCode can I change it to inches?

Thanks,

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: BigTexBlue Screen.. modify gcode?
« Reply #1 on: November 01, 2014, 06:20:55 PM »
I am not familiar with that screen but likely it is script in the button that you need to change, you will need to know VB for that. You can do it by going to config menu ten Edit Button scripts. All te VB buttons will be flashing, click the one you want and the editor will open with the script from that button ready for you to edit.
Hood
Re: BigTexBlue Screen.. modify gcode?
« Reply #2 on: November 01, 2014, 06:53:18 PM »
Ah, thanks Hood.. that should get me started.

Adam,

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: BigTexBlue Screen.. modify gcode?
« Reply #3 on: November 01, 2014, 08:45:18 PM »
yes you have to go through vb to open the scrip the descend and retract speed is easy to find if I rember correctly it should not matter what the machine is set to as it has metric and inch settings in it
Re: BigTexBlue Screen.. modify gcode?
« Reply #4 on: November 18, 2014, 10:38:44 PM »
I'm trying to work through a problem with the Macro in Big Texas' Blue screen... it seems like the math is not calculating correctly. I'll try to explain what's happening..

I have set my plate offset to +.0625, I believe this is DRO(2), my settings are in inches.

In an attempt to Zero my "Z" axis after the initial touch off my "Z" jumps an inch "+" as it should but instead of heading back to the plate moving towards "-" or the touch-off plate it heads towards the "+" side. In stepping through the code associated with the "Z-" button on the screen the math seems to be incorrectly calculated and I'm uncertain as to why?

I stepped through the code and in this section ZNew was set to (.444...) it then bumps an inch towards the "+".

Quote
ZNew = GetVar(2002)          'read the touch point   (current setting .444...)
Code "G0 Z" &ZNew +.1      'move back  +.1 to hit point in case there was overshoot +.1
While IsMoving ()
Wend

Then it gets to this part and sets ZNew to (.77....)  which I don't understand, why is ZNew increasing and not decreasing ?? The feed rate decreases as it should but instead of heading towards the touch-off plate it's going the opposite direction, I'm confused.  ???

Quote
      
Code "F2"                          'slow down feedrate to 2 ipm
ZNew = GetDro(2) - .25      'probe move to current z - .25 inches  (current setting .77...)
Code "G31Z" &ZNew


Adam,


************************************************************************

Total Code

Quote
Rem   VBScript To probe In the z axis    


If GetOemLED(16)<>0 Then 'Checks for machine coordinates
        code "(Please change to working coordinates)"
Else


   If GetOemLed (825) <> 0 Then       'check to see if the probe is already grounded or faulty
      Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
   Else
      Code "G4 P1"         'pause 1 seconds to give time to position probe plate
      PlateOffset = GetUserDRO(1151)   'get plate offset DRO
      CurrentFeed = GetOemDRO(818)    'get the current feedrate to return to later
      Code "F10"         'slow down feedrate to 10 ipm

      Rem Probe In the z direction
         ZNew = GetDro(2) - 6      'probe move to current z - 6 inches
         Code "G31Z" &ZNew
         While IsMoving()      'wait for probe move to finish
         Wend
   
         ZNew = GetVar(2002)       'read the touch point
         Code "G0 Z" &ZNew +.1      'move back  +.1 to hit point incase there was overshoot +.1
         While IsMoving ()
         Wend
   
      Rem End add lines   
      Rem .444 - .25 = .77***
      Code "F2"         'slow down feedrate to 2 ipm
      ZNew = GetDro(2) - .25      'probe move to current z - .25 inches
      Code "G31Z" &ZNew
      While IsMoving()      'wait for probe move to finish
      Wend

      ZNew = GetVar(2002)       'read the touch point
      Code "G0 Z" &ZNew       'move back to hit point incase there was overshoot
      While IsMoving ()
      Wend

      If PlateOffset <> 0 Then
         Call SetDro (2, PlateOffset)   'set the Z axis DRO to  plate thickness
         Code "G4 P0.25"       'pause for Dro to update.
         'ZNew = PlateOffset + 3.6315   'calc retract
         'Code "G0 Z" &ZNew       'put the Z retract height you want here
         Code("G53G0Z-0.5")      'Z retract

         While IsMoving ()
         Wend
         Code "(Z axis is now zeroed in English Units)"    'puts this message in the status bar
      
      End If

      Code "F" &CurrentFeed       'returns to prior feed rate
   End If
End If         

 

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: BigTexBlue Screen.. modify gcode?
« Reply #5 on: November 18, 2014, 11:03:39 PM »
Code: [Select]
ZNew = GetVar(2002) 
This is the Z position at your touch plate, and will change every time you probe. It's in work coordinates, and the value can vary greatly, depending on the current Z offset.

Code: [Select]
Code "F2"                          'slow down feedrate to 2 ipm
ZNew = GetDro(2) - .25      'probe move to current z - .25 inches  (current setting .77...)
Code "G31Z" &ZNew

This is a second, slower probe move. DRO(2) is the current Z position, so it's probing down .25".

When you are stepping through the code, if your not actually probing, you may get strange results.

Also, make sure your in Absolute Mode (G90) when you run this macro, or you'll also get strange results.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: BigTexBlue Screen.. modify gcode?
« Reply #6 on: November 19, 2014, 09:37:15 AM »
Thanks Gerry,

Quote
This is a second, slower probe move. DRO(2) is the current Z position, so it's probing down .25".

Yes, exactly as I interpreted it. The problem is the Z axis is going up instead of down... which is why I'm confused???

Quote
Also, make sure your in Absolute Mode (G90) when you run this macro, or you'll also get strange results.

Can you tell me how to make sure I'm in the Absolute Mode (G90)?

Adam,
Re: BigTexBlue Screen.. modify gcode?
« Reply #7 on: November 20, 2014, 07:05:50 AM »
So let me see if I understand how this is working...

         **********************************************************************************************************************************
Code: [Select]
        ZNew = GetDro(2) - 6       'Reads the current Z from the DRO(2) or "DRO Z" and subtracts 6" from it. This is the range to search for the touch off plate
         Code "G31Z" &ZNew 'Starts the probe headed towards -Z from the current Z
         While IsMoving()       'wait for probe move to finish
         Wend
  
         ZNew = GetVar(2002)     'Found the touch point and set a variable GetVar(2002) to that touch point called ZNew
         Code "G0 Z" &ZNew +.1          'move Z to ZNew + 1"
         While IsMoving ()                      'wait for the process to take place
         Wend
         Code "F2"         'slow down feed rate to 2 ipm
         ZNew = GetDro(2) - .25              'Set variable ZNew = the current Z read from DRO(2) or "DRO Z" and subtracts .25" from it.  
                                                'Would this make more sense to be the same as above, ZNew = GetDro(2) - 6 or at least greater than 1" to offset the 1" added to Z from above???

         Code "G31Z" &ZNew                      'Start another probe headed towards -Z from the current "DRO Z" that has been increased by 1" going -.25
         While IsMoving()     'wait for the process to take place
         Wend

         ZNew = GetVar(2002)       'Found the touch point and set a variable GetVar(2002) to that touch point called ZNew
         Code "G0 Z" &ZNew       'Move to GetDro(2) - .25, This should be Z zero I think????
         While IsMoving ()                      'wait for the process to take place
         Wend

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: BigTexBlue Screen.. modify gcode?
« Reply #8 on: November 20, 2014, 07:39:57 AM »
Quote
'move Z to ZNew + 1"

The code is actually moving 0.1, not 1.

If it moved  up, the second probe move would never hit the plate, as it only moves down 0.25.

This answers your next question.

Quote

ZNew = GetVar(2002)             'Found the touch point and set a variable GetVar(2002) to that touch point called ZNew
Code "G0 Z" &ZNew             'Move to GetDro(2) - .25, This should be Z zero I think????
While IsMoving ()                      'wait for the process to take place
Wend


When the probe hits the plate, it will overshoot a small amount from decelerating. The above moves it back to the point that it hit the plate. It's not Z zero. Z zero has not been set yet, and it should be set to the bottom of the plate. This is usually accomplished be setting this location to Z= Plate Thickness.



You can check if your in G90/G91 with

Code: [Select]
CurrentAbsInc = GetOemLED(48)   ' Get the current G90/G91 state
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: BigTexBlue Screen.. modify gcode?
« Reply #9 on: November 23, 2014, 11:44:23 AM »
Is there a trick when saving your edited macro?

When I edit the button macro and save it Mach doesn't seem to save it, its kind of spotty sometimes it does and sometimes it doesn't... Deleting all the macro information then re-pasting and exiting Mach seem to help so I'm guessing I'm missing something on "How to save your edits"?

Any information you can shed?

Thanks.

Adam,