Hello Guest it is November 21, 2019, 05:06:51 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Daregone

Pages: 1
1
VB and the development of wizards / Re: scripted email notification
« on: June 11, 2015, 12:43:06 AM »
Sorry to dig up an old thread - but can someone explain how to do this a bit more thoroughly?

Thanks!

2
SmoothStepper USB / Smoothstepper and motor tuning
« on: April 02, 2015, 02:09:16 AM »
I recently had to re-install Mach3.  Now, when I try to set everything back up, I am having a problem with configuring things in motor tuning.  

I am using Mach 3 Version R3.043.066 and I have tried SmoothStepper ESS_v10r2d1d through ESS_v10eb1a.

When I (re) install Mach3, then test to see if I can access the settings for Motor Tuning, everything seems fine - allowing me to change values, etc..  However, when I install the ESS plugin and attempt to change velocity (for example) in Motor Tuning it will jump to 0.  The curve will become distorted...

I have re-installed Mach multiple times..


Any help would be greatly appreciated.

THanks,

Jason

3
Hi,

I was hoping someone would give me a little help with a problem I have. 

I want to activate a remotely controlled outlet that turns my dust collector on an off.  The remote has momentary switches for both the on and off functions.  I have connected these switches to a relay board that is connected to my pmdx-126 board. 

So, my question is, how do I get a m7 call to trigger one relay on the board long enough to fire the remote, then turn that relay back off.  When the call is made to turn the dust collector off, a second relay (the one connected to the off button on the remote) is also momentarily triggered.

Thanks!

Jason

4
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 11:51:22 PM »
I think I am on the right track now. I set the general config to automatic. That removes the call to the m6end script. I then combined the two scripts together. I made the old m6end script into a subroutine in the m6start. Then I added a pop message box that prompts the user to change tools. This replaces the cycle start that is forced when you use "spindle stop and wait" option in general config.tool

Ok, all of that means..... I can now build in the conditions for markers to be automatic and still have normal tool change calls. Yay!

This is what I am currently playing with:

Code: [Select]
OldTool = GetCurrentTool()           'Get tool # That is in the spindle             
Tool = GetSelectedTool()             'Get Tool# of the New tool

If Tool <99 Then
If OldTool >99 Then
MsgBox ("Need to Dock and Retract") 'Add code to go to the aux z-axis dock and restract it.
End If
Code "G53 G0 X" & TCX & " Y" & TCY
While IsMoving()
Wend

MsgBox "CHANGE to TOOL  #" & tool &"    then press OK", 0, "Change Tool"
SetCurrentTool( tool )
Call End1()
Else

If OldTool <100 Then
MsgBox ("Need to Dock and lower") 'Add code to go to the aux z-axis dock and lower it.
End If



Select Case Tool
case 100
Message"Tool Changed to Black Marker" 'Will Run Code for Black Marker
Call End1() 'Calls old m6end macro - now a subroutine
case 101
Message"Tool Changed to Red Marker" 'Will Run Code for Red Marker
Call End1()  'Calls old m6end macro - now a subroutine
case 102
Message"Tool Changed to Blue Marker" 'Will Run Code for Blue Marker
Call End1() 'Calls old m6end macro - now a subroutine
End Select

 End If
SetCurrentTool( tool )
 

5
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 03:33:12 PM »
I think the issue is not how to select the the tool -(ie, using "If-Then") .   I am pretty sure I understand how to do that.

The problem is in how mach3 works when a M6 is called.  In the general configuration tab, there are 3 options for how to handle m6:

   1. Ignore it
   2. Stop the spindle and wait for a cycle start.  This seems to be when it runs m6start.m1s, waits for the cycle start, then runs m6end.m1s
   3. use ATC.  I believe this only runs m6start.m1s.

I am currently using these two macros' with a setting of "Stop Spindle, wait for cycle start":

m6start.m1s
Code: [Select]
Sub Main()

Dim XScale, YScale, ZScale
Dim ZClear, Zoffset, ZClearMach
Dim ClearAllow
Dim Response

If GetOEMLED(1866) Then Exit Sub

If GetOEMLED(801) Then ' On = English Measure INCH

ClearAllow = 0.125 ' Max Z Travel = .125in below Machine Z zero

Else ' Off = Metric Measure MM

ClearAllow = 2.0 ' Max Z Travel = 2mm below Machine Z zero

End If

Zclear = GetOEMDRO(1814) ' Get Z Clearance Plane from DRO

Zoffset = GetOEMDRO(49)

ZClearMach = Zoffset + Zclear

CurrentAbsInc = GetOemLED(48) ' Get the current G90/G91 state

'Get Axis Scale factors
XScale = GetOEMDRO(59)
YScale = GetOEMDRO(60)
ZScale = GetOEMDRO(61)

'Set All Axis' Scale to 1
Call SetOEMDRO(59,1)
Call SetOEMDRO(60,1)
Call SetOEMDRO(61,1)
Sleep(250)

tool = GetSelectedTool()
SetCurrentTool( tool )
SetVar(1, GetOEMDRO(800))
SetVar(2, GetOEMDRO(801))
SetVar(3, GetOEMDRO(802))
TCX=GetOEMDRO(1200)
TCY=GetOEMDRO(1201)
TCZ=GetOEMDRO(1202)

If TCZ>0 Then
MsgBox "Tool Change Z Position" & (Chr(13)) & "can NOT be above Z=0"& (Chr(13)) & "System going in to E-Stop",16,"Tool Change Z Position Error!!!!!"
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub 'ERROR! exit the macro
End If

If ZClearMach>0 Then

Response = MsgBox ("Warning !!!" & (Chr(13)) & "Z Clearance Plane is Above Z Axis Home Switch." & (Chr(13)) & "Press OK To Retract Safely Below Switch" & (Chr(13)) & "Or Press Cancel for E-Stop",49,"Insufficient Z Clearance!!")

If Response = 1 Then ' If OK
ZClearMach = 0 - ClearAllow ' Retract to Z Machine zero - .125in or 2mm
ElseIf Response = 2 Then ' If Cancel
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub
End If
End If

Code "G90"
If ZClearMach > TCZ Then
Code "G53 G0 Z" & ZClearMach
While IsMoving()
Wend
Else
Code "G53 G0 Z" & TCZ
While IsMoving()
Wend

End If

Code "G53 G0 X" & TCX & " Y" & TCY
While IsMoving()
Wend

If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If

Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)

End Sub
  

and

m6end.m1s
Code: [Select]
Sub Main()


' Based on the macros written by Big-Tex November 29 2010
' and modified by Poppa Bear, with Greolt's and Arbo's changes 08Dec2010


If GetOEMLED(1866) Then Exit Sub

Dim XWork, YWork, ZWork, XMachine, YMachine, ZMachine
Dim XScale, YScale, ZScale
Dim ZNew, ZPlate, Zplatetomaterial
Dim TCZ
Dim XPlate, YPlate
Dim ZClear, ClearAllow, ZMaxRetract
Dim FirstProbeDist, FirstRetractDist, SecProbeDist
Dim CurrentFeed
Dim CurrentAbsInc
Dim Response, CurrUnit

TCZ=GetOEMDRO(1202)
XWork = GetOEMDRO(800) ' Get current X Work Coordinate
YWork = GetOEMDRO(801) ' Get current Y Work Coordinate
ZWork = GetOEMDRO(802) ' Get current Z Work Coordinate
XMachine = GetOemDRO(83) ' Get current X Machine Coordinate
YMachine = GetOemDRO(84) ' Get current Y Machine Coordinate
ZMachine = GetOemDRO(85) ' Get current Z Machine Coordinate
XPlate = GetUserDRO(1811) ' Get X Machine Coordinate of Fixed Plate
YPlate = GetUserDRO(1812) ' Get Y Machine Coordinate of Fixed Plate
CurrentFeed = GetOemDro(818) ' Get Current Feed Rate
Zplatetomaterial = GetUserDRO(1813) ' Get calculated material offset
ZClear = GetOEMDRO(1814) ' Get Z Clearance Plane
CurrentAbsInc = GetOemLED(48) ' Get the current G90/G91 state


'Get Axis Scale factors
XScale = GetOEMDRO(59)
YScale = GetOEMDRO(60)
ZScale = GetOEMDRO(61)

'Set All Axis' Scale to 1
Call SetOEMDRO(59,1)
Call SetOEMDRO(60,1)
Call SetOEMDRO(61,1)
Sleep(250)



'//////// the block below will set all your reusable vars depending on Inch or mm.
'//////// this sets the vars so you only need ONE large block of probing code.

If GetOEMLED(801) Then ' On = English Measure INCH
FirstProbeDist = 6.0 ' Probe Down 6 inches
FirstRetractDist = 0.05 ' Then Retract .05 inches
SecProbeDist = 0.25 ' Then Probe down .25 inches
FirstProbeFeed = 10 ' First Probe Feed @ 10 ipm
SecondProbeFeed = 1 'Second Probe Feed @ 1 ipm
ClearAllow = 0.125 ' Max Z Travel = .125in below Machine Z zero
CurrUnit = "inches"
Else ' Off = Metric Measure MM
FirstProbeDist = 150.0 ' Probe Down 150 mm's
FirstRetractDist = 1.0 ' Then Retract 1 mm
SecProbeDist = 6.0 ' Then Probe down 6 mm's
FirstProbeFeed = 250 ' First Probe Feed @ 250mm/min
SecondProbeFeed = 25 ' Second Probe Feed @ 25mm/min
ClearAllow = 2.0 ' Max Z Travel = 2mm below Machine Z zero
CurrUnit = "mm's"
End If

'//////// Error Condition checking code

If GetOemLED(16)<>0 Then 'Checks for machine coordinates
MsgBox "Must be in Working Coordinates - Putting System in Reset",16,"Machine Coordinates!!!!!"
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub 'ERROR! exit the macro
End If

If GetOemLED(825)<>0 Then
MsgBox "Z Plate is Grounded - Putting System in Reset",16,"Plate Grounded Error!!!!!"
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub 'ERROR! exit the macro
End If

If ZClear <=0 Then
'MsgBox "(Clearance Plane Must be > 0 - Putting System in Reset)",16,"Clearance Plane Error!!!!"
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
'DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
'Exit Sub 'ERROR! exit the macro
'End If


Response = MsgBox ("Warning !!!" & (Chr(13)) & "Z Clearance Plane <= 0 !!!" & (Chr(13)) & "Press OK To Set Retract Plane To  " & Cstr(ClearAllow) & " " & CurrUnit & (Chr(13)) & "Or Press Cancel for E-Stop",49,"Clearance Plane Less Than Or Equal To Zero!!")

If Response = 1 Then ' If OK
ZClear = ClearAllow ' Retract to .125in or 2mm above fixed plate
ElseIf Response = 2 Then ' If Cancel
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub
End If
End If

'//////// Start Probing Code, Probe In -Z direction.
'//////// The vars will be Inch or Metric from above if/else statment

Code "G90"  ' Change to Absolute Distance Mode
Sleep(100)

Code "G53 G0 Z" & TCZ ' Move to Tool Change Z Position - Should already be there

While IsMoving()
Wend

Code "G53 G0 X" & XPlate & " Y" & YPlate ' Move to Fixed Plate Location

While IsMoving()
Wend

If GetOemLED(825)<>0 Then
MsgBox "Z Plate is Grounded - Putting System in Reset",16,"Plate Grounded Error!!!!!"
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub 'ERROR! exit the macro
End If

Code "F" & FirstProbeFeed ' Set Feedrate to 10 ipm, or 300 mm/m

Code "(Probing for Z Zero....)"

Zplate = (GetOEMDro(802) - FirstProbeDist) ' Probe move to Current Z - 6in, or 150mm
Code "G90 G31 Z" & Zplate

While IsMoving()
Wend

Zplate = GetVar(2002) ' Read the Touch Point

Code "G1 Z" & (Zplate + FirstRetractDist) ' Move up .05 in, or 1mm in case of overshoot

While IsMoving()
Wend

Code "F" & SecondProbeFeed ' Set Feedrate to 1 ipm, or 25mm/min

Zplate = (GetOEMDro(802)- SecProbeDist) ' Probe move to Current Z - .25in, or 6mm

Code "G90 G31 Z" & Zplate

While IsMoving()
Wend

Call SetOEMDRO(802,Zplatetomaterial) ' Set Z axis DRO to Calculated Offset, making tool tip @ Z=0
Sleep(500) ' Pause for Dro to update


'Make Sure Z Clearance Plane is below Home Switch. If not, Notify User and Proceed.

If GetOEMLED(85) <= Zplatetomaterial + ClearAllow Then

ZMaxRetract = Abs(GetOEMDRO(85) - Zplatetomaterial + ClearAllow)
Else
ZMaxRetract = Abs(GetOEMDRO(85)) + Zplatetomaterial - ClearAllow
End If

If ZClear > ZMaxRetract Then

Response = MsgBox ("Warning !!!" & (Chr(13)) & "Z Clearance Plane is Above Z Axis Home Switch." & (Chr(13)) & "Press OK To Retract Safely Below Switch" & (Chr(13)) & "Or Press Cancel for E-Stop",49,"Insufficient Z Clearance!!")

If Response = 1 Then ' If OK
ZClear = ZMaxRetract ' Retract to Z Machine zero - .125in or 2mm
ElseIf Response = 2 Then ' If Cancel
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub
End If
End If


If ZClear <= Zplatetomaterial then 'Plunge into Fixed Plate !!!!

Response = MsgBox ("Warning !!!" & (Chr(13)) & "Z Clearance Plane is Below Fixed Plate!!!" & (Chr(13)) & "Press OK To Retract " & Cstr(ClearAllow) & " " & CurrUnit & (Chr(13)) & "Or Press Cancel for E-Stop",49,"Plunging Into Plate!!")

If Response = 1 Then ' If OK
ZClear = Zplatetomaterial + ClearAllow ' Retract to .125in or 2mm above fixed plate
ElseIf Response = 2 Then ' If Cancel
'Reset Scale before E-Stop
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
DoOEMButton(1021) ' Put Mach3 in Reset to end Tool Change
Exit Sub
End If
End If


Code "G0 Z" & ZClear 'Retract to Z Clearance Plane
While IsMoving ()
Wend

Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous Position prior to M6 being called

While IsMoving()
Wend

Code "F" & CurrentFeed ' Reset Feedrate

If GetOEMLED(801) Then 'ON = English Measure INCH
Code "(Z Axis is now Zeroed in Inches)" ' Puts this message in the status bar
Else 'OFF = Metric Measure MM
Code "(Z Axis is now Zeroed in mm's)" ' Puts this message in the status bar
End If

If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If

Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)

If Not FileName() = "No File Loaded." Then
If GetOEMLED(1865) Then
MsgBox "Start Spindle, then press OK to Continue",48,"Start Spindle"

' g-code should have an M3 after the M6, so the following commented code is not required

'Else
'DoSpinCW()
'While IsMoving()
'Wend

End If
End If


End Sub  
              

These are the macro's included with the 2010 screensets.

It works fine for doing manual tool changes.  Mach3 encounters a m6 call, it will stop the spindle, move to the tool change position for a manual change, operator hits cycle start, then it checks tool height and continues on...

However, if I put in additional code that looks for certain tools - the ones I want to designate for the markers, then it will still wait for a cycle start entry.  It will still run the m6end macro.

I want it to operate like normal when it encounters any tool number other than the 3 I assign to the markers.  When it encounters those three, it will automatically set the correct marker and continue to run without any additional input from the user.

So, in short,
Markers -are automatic and do not require user input, will automatically change and complete their portion of the g-code file.
other tools (endmills...) will require a manual tool change - will require the use of cycle start to complete the user actions, before completing that tools portion of g-code.

Thanks,

Jason

6
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 03:28:49 AM »
You are close to getting what I am trying to do .  I really appreciate the time you have taken. 

I will try to be clear.  I am currently using the modified  Big Tex m6start and m6end macros.  I want to add code similar to what you have written to the existing macros. 

Currently, when a tool change is encountered, the machine will go to a defined location and wait for the  manual tool change.  It will not continue until user hits the start cycle button.  Once the start cycle button is hit, the machine activate the m6end macro and perform the tool height check, the proceed with the rest of the g-code.

I want to keep thieves features (tool height, tool change position, etc...) when  it encounters a m6 and is not a marker.  But if it is a marker, I want it to select according to something like your code.

Basically, I want markers to be used without manual interference (even hitting cycle start) and cutting tools to go through ta full tool change sequence (pause, go to tool change position ). And prompt for the cycle start, then the perform a height check, before continuing with the g-code.

7
VB and the development of wizards / Re: Act sometimes
« on: September 02, 2014, 03:44:56 PM »
Thank you for comments, perhaps someone else has some ideas.

What I am really trying to do is use the m6start and m6end scripts that are part of the 2010 screenset (they are based on the macros written by Big-Tex November 29 2010
' and modified by Poppa Bear, with Greolt's and Arbo's changes 08Dec2010)  

I have set up my machine with 3 markers that I want to be considered tools and that can be activated by g-code and not require any intervention by an operator.  If the g-code calls for some other tool (an endmill, for example) then the the code will proceed as normal (going to a tool change position, checking tool height, etc...)

Here is a video of the mechanical components (a bit rough, but demonstrate how I would like it to work.)
http://youtu.be/-Pu8RzoEMLY

8
VB and the development of wizards / Re: Act sometimes
« on: September 02, 2014, 11:49:44 AM »
Thanks,

Would I setup it up in general configuration to "automatic tool changer only"?

By doing so, It will not call the m6end macro  when m6start is finished- correct?  So if I want the commands that are currently in the m6end macro to work, I will need to move them to m6start and add them as part of the "tool not present" condition - correct?


9
VB and the development of wizards / Act sometimes
« on: September 02, 2014, 03:09:33 AM »
Hi,

I am trying to work out how to make an automated tool change occur.  I have been reading up on many different examples here, but I cannot seem to find a feature I would like. 

I would like mach to  go to a tool change location and wait for a manual change if a tool does not exist in the rack of prepared tools.  This would use the m6end macro and prompt for a cycle start after the change.

However, if the tool is present, I want the machine to make the change and not ask for a cycle start- but just continue with the new tool.

Any insight on how to do this?

Thanks,

10
VB and the development of wizards / Re: New Wizards ??
« on: August 29, 2014, 06:43:22 PM »
Hi,

I am new to the board, but have been playing with a router table that I built last year.  My programming has not caught up with my mechanical skills (such as they are...)

Anyway, I have a set up that I could really use some help with.  Here is a video of what I have:
https://www.youtube.com/watch?v=-Pu8RzoEMLY&list=UU_ussNmpn-JU0PWC8ZoBVgw

I made an attachment for my z-axis that holds 3 (possibly more) retractable sharpie markers. 

I would like to automate the use of the sharpies in my setup. There are a few things I want to modify on the mechanical setup, but generally, I think the concept is sound.

In an ideal scenario, I would like to have a g-code file that contains the triggers that sets the use of the pens in motion.  It would work a bit like an automatic tool changer - bit with different colored markers, instead of cutting tools.

So, for example, a situation might look like this:

Setup: I have placed material on the router bed and zero'd the z to the top surface of the material. 
The actions I would like to see:

1. a g-code file contains instructions to cut a 4"x6" square with a 1/2" hole in the middle. There will be a marker note in red that indicates the 6" dimension, a note in blue that indicates the 4" direction and a black note that indicates the diameter of the circle.
2. Machine starts out with the router holding a 1/4 dia endmill and the sharpie unit in the up/retracted position.
3. Upon start of the file, the machine goes to the sharpie dock and lowers the pens into the writing position.
4. The machine then goes to the pen selection position and engages the red sharpie.
5 The machine draws the notes for the red
6 The machine returns to the pen selection position for red/disengages pen.
7 The machine goes to the selection position for blue and engages
8 The machine then draws the notes for blue
9 The machine returns to the pen selection position for blue/disengages pen.
10 The machine goes to the selection position for black and engages
11 The machine then draws the notes for Black
12 The machine returns to the pen selection position for black/disengages pen.
13 the machine goes to the sharpie dock and moves the pens into the up/retracted position.
14 The machine then cuts the pattern with the router

So we would have know the following:

locations for the dock. 
We would know how much the z-axis needs to move to the change the pen positions from high (not writing) to low (writing). 
We would know the relative spacing between the pens  and so account for the offsets among them .
We would know position of the nub that will depress the button on the appropriate sharpie.

What do you think?  This is a setup that most people can build out of scrap in their shop, and it would provide some interesting features.



Pages: 1