Hello Guest it is April 25, 2024, 05:12:11 AM

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 - stirling

1561
Well said RICH. Whilst I think I understand Ramsey's frustration I have to agree that if he thinks he can find a better controller for the money he's going to be sadly disapointed. Like many other folks I'm sure, I've tried just about every similarly priced or free controller out there and yes that includes EMC and IMHO none of them come close to Mach. Yes the standard screens are a bit messy but as we know, you can make your own and yes the documentation is not the best but that is more than made up for by this forum.

Ian

1562
General Mach Discussion / Re: Enternal E-STOP Leds
« on: June 22, 2010, 01:42:44 PM »
LOL - NOW you tell us you're using a charge pump circuit.... aaaaaaaaaaaaaaggggggggggggggghhhhhhhhhhhh

only kidding - glad you got it sorted.

Cheers

Ian

1563
General Mach Discussion / Re: Enternal E-STOP Leds
« on: June 22, 2010, 11:45:13 AM »
Mach deactivates all outputs when in reset condition. So if you create a macro with the single line activateSignal(OUTPUT#) and append it to the initialization string you'll have the state change you need. Whether you choose active high or low depends on how you want to power your LEDs as PP outputs can sink as well as source current and they usually can sink a lot more than they can source. Depends on your PP and LEDs current specs as to which is the best way to go.

Ian

1564
General Mach Discussion / Re: Plasma , new macro code
« on: June 22, 2010, 06:19:34 AM »
Terry - yes - it just did that to me too - funny because I've run it 20 or so times and it behaved perfectly and then suddenly - there's the gcode running all by itself - scaaaaaary. I'm with you - I don't think Mach's anywhere near trustworthy enough for this. Reminds me of my probing routines - that's why I ended up coding a .DLL so I could use as little VB in there as possible.

Ian

1565
General Mach Discussion / Re: Plasma , new macro code
« on: June 21, 2010, 02:53:58 PM »
Hi Dave - yes that's the whole code (well as long as you copied it all - I make it 87 lines) - as I said it works just fine here.
Strange - the (elapsed) time - if that's what you mean shouldn't run at all as that should only run if you run your gcode program. Try editing the macro and change all the G1 to G0 and see what happens. Or try changing the feedrate - i.e. is a feed of (terry's default) 30 enough on your system or is it just way to slow? - mines metric so I whacked it up to 3000. My version is R3.042.020 but this code is so simple it should run on any version - frankly if this is version dependant I think we might as well pack up and call it a day.

Ian

1566
General Mach Discussion / Re: Plasma , new macro code
« on: June 21, 2010, 06:18:30 AM »
Hi Terry - I think the main problem lies with suspending execution until the toolpath regen has finished. This can be tested with isLoading(). So anyway - hope you don't mind but I've done a bit of a re-jig of your code which seems to work for me at least.

Code: [Select]
'Macro To AUTOEXTENTS
Response = MsgBox("Is Your Z HEIGHT Safe To Travel?", 4 )
If Response = 7 Then
  MsgBox("Move Z To A Safe Position And Restart")
  Exit Sub
End If

DoButton(8)      'ZeroX
While isMoving()
Wend

DoButton(9)      'ZeroY
While isMoving()
Wend

DoOemButton(160)   'Regen ToolPath
While isLoading()
  sleep 100
Wend

feed = 30      'Sets feed
dwell = 3       'Sets Dwell Time

xmin = Getoemdro(4)
xmax = Getoemdro(10)
ymin = Getoemdro(5)
ymax = Getoemdro(11)

Code"F" & feed
While Ismoving()
Wend

Code"G1 X" & xmin & " Y" & ymin
While Ismoving()
  sleep 100
Wend

Code"G4 P" & dwell
While isMoving()
  sleep 100
Wend

Code"G1 X" & xmin & " Y" & ymax
While Ismoving()
  sleep 100
Wend

Code"G4 P" & dwell
While isMoving()
  sleep 100
Wend

Code"G1 X" & xmax & " Y" & ymax
While Ismoving()
  sleep 100
Wend

Code"G4 P" & dwell
While Ismoving()
  sleep 100
Wend

Code"G1 X" & xmax & " Y" & ymin
While Ismoving()
  sleep 100
Wend

Code"G4 P" & dwell
While Ismoving()
  sleep 100
Wend

Code"G1 X" & xmin & " Y" & ymin
While Ismoving()
  sleep 100
Wend

Code"G4 P" & dwell
While Ismoving()
  sleep 100
Wend

Code"G1 X0.000 Y0.000"
While Ismoving()
  sleep 100
Wend


Cheers

Ian

1567
General Mach Discussion / Re: worm gear cad design
« on: June 20, 2010, 12:17:05 PM »
Here's a quick play around. X is axial and A is rotational Z gives the radius. The idea is that X moves in steps of a thou along the 2 in and the loop calculates the new rotation of A to vary the pitch. A starts at the .25 in pitch and finishes at the .75 in pitch.

pseudo code:

a = 1.44 (degrees)
x= 0.001 (inches)
G91
for int i = 0 to 2000
  G1 Xx Aa
  a = a - 0.00048
next

g-code:

#1000=1.44
G0 X0 Z1 A0
G91
M98 P1 L500
G90
M30
o1
M98 P2 L4
M99
o2
G1 X0.001 A[#1000]
#1000=[#1000-0.00048]
M99

Just kind of a starter describing the general idea. (I use two loops to give 2000 iterations because the limit in Mach of a loop seems to be around 998 or so).

Ian

EDIT: typo: I'd set Z to 10. Of course it should be 1 (as it now is)

1568
what microstepping value are your drivers set to?

Ian

1569
if stepper motor is 4 wire > bipolar
if 5,6,8 wire > Unipolar
Not quite true Amir. Yes a 4 wire motor is called a bipolar motor because it can ONLY be wired bipolar. 5 wire motors ARE unipolar. BUT 6 wire motors can be wired either half winding bipolar, serial bipolar or unipolar. 8 wire motors can be wired half winding bipolar, serial bipolar, parallel bipolar and unipolar.

helow - I assume your intention is ultimately to control the motors from Mach. One problem is that unless you can iscolate and interface directly to the driver circuitry with step and direction you're stuck. The data that comes from the parallel port for a printer is NOT step and direction like Mach, it's pcl (printer control language). The printer buffers the commands and then internally interprets/converts that via a microprocessor to ultimately control the motors etc. So what I'm saying is connecting the existing centronics connector on your board to the PC parallel port controlled by Mach is never going to work.

Ian

1570
No problem. I do have another question though, is there a way to trigger a script when an input goes high?
Triggers do exactly this but unfortunately IMHO are not very well documented nor particularly intuitive in the way they're implemented. I think this is why we see a lot of macropumps monitoring inputs and it's just not the best way to do it - again just MHO. The link Tweakie's pointed at covers it but makes a bit of a meal of it I think. Here's a quick guide.

Let's assume you want three active input pins to fire 3 different actions.
1) In ports n pins set up your pin assignments for OEM trigger #1, #2, #3.
2) in Config/system hotkeys set Trigger # OEM code to 301 for all three triggers.
3) Create a macro e.g. M665.m1s with the one line of SetTriggerMacro(666) Note: any free numbers you like will do for 665 and 666.
4) Add M665 preceeded by a space to the initialization string on the Config/General Config page
5) Now the buisness end - Create macro M666.m1s - something like:

If isActive(OEMTRIG1) Then
  message "trig 1"
End If

If isActive(OEMTRIG2) Then
  message "trig 2"
End If

If isActive(OEMTRIG3) Then
  message "trig 3"
End If

Now when you activate the appropriate input pins you'll get the appropriate message. Change M666.m1s to suit.

Hope this helps

Cheers

Ian