Hello Guest it is April 25, 2024, 06:33:14 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

951
LOL - top lines or bottom? - go on Tweakie - you can do it  ;D

Ian

952
Modbus / Re: Arduino (UNO) ModBus and Mach3
« on: May 15, 2012, 09:04:59 AM »
Wow as a moderator you are a really helpfull guy

LOL - I suspect there may be a few reading this who are now choking on their beer - but thanks anyway.

Ian

953
General Mach Discussion / Re: m03 floating head programing
« on: May 15, 2012, 07:39:20 AM »
OK I've re-formatted your code so we can read it a tad easier (There's no charge for spaces - feel free to use them ;))

Plus this is what I meant by #code tags (see the # button on the regular reply screen - not the quick reply)

Code: [Select]
PierceHeight = GetUserDRO(1000)
CutHeight = GetUserDRO(1001)
PierceTime = GetUserDRO(1002)
zoffset = GetUserDRO(1003)

If GetOEMLed(836) Then
  MsgBox "Torch on surface"
Else
  Code "G28.1 z0"
  While IsMoving()
  Wend

  Code "G92 z0" 'set z 0
  While IsMoving()
  Wend

  Code "G0 z" & zoffset' move to surface,inc switch free play
  While IsMoving()
  Wend

  Code "G92 z0" 'set z 0
  While IsMoving()
  Wend

  Code "G0 z" & PierceHeight' move to pierce height
  While IsMoving()
  Wend

  Code "G4P" & PierceTime'pierce delay
  While IsMoving()
  Wend

  DoSpinCW()' Turn torch on
  While IsMoving()
  Wend

  Code "G0 z" & CutHeight'move to cut height
  While IsMoving()
  Wend
End If


Now then....

What do you mean by...

I have it in as a m3 macro at the start of a cut file but it doesn’t always run consistently. If I run it step by step in the VB editor it runs OK.

i.e. what EXACTLY does it NOT do that you'd like it to do and what EXACTLY does it DO that you DON'T want it to do? - I'm a tad down on my psychic capabilities at the moment  ;D

Ian

954
Modbus / Re: Arduino (UNO) ModBus and Mach3
« on: May 15, 2012, 07:16:48 AM »
Okay I hear what you are saying, I think I was side tracked here perhaps, I was following a thred from some guys blog and understood he did his milling machine this way. 
I know some folks use an Arduino running a gcode interpreter to drive their mills but personally I think they're making hard work of it. Why would you do that when far superior PC based software like Mach/LinuxCNC is available? anyway - each to their own.

So I have 3 x sparkfun easydriver boards and  3 x stepper motors, I will attempt to run the sparkfun stepper motor boards directly of the Parallel port instead of the Arduino board, there should be enough juice from the Parallel port.
Easydriver inputs, Arduino inputs/outputs, Parallel port's inputs/outputs  - all TTL and similar current sourcing/sinking specs. You'll be fine.

Just remember the easydriver motor outputs can only source 750mA max so you're not exactly talking big power here - hope your mill's only a tiddler.  ;)

Thank you Stirling, you have been a great help "eye openner" and I very much appreciate your help.
No probs - have fun.

Ian

955
General Mach Discussion / Re: m03 floating head programing
« on: May 15, 2012, 06:07:19 AM »
Heh He - I know Terry has a thing about wait states but to suggest this is why the original code you posted "doesn't work" is frankly pushing things a bit.

1) As pointed out you were using the letter "O" instead of a zero in several places.
2) It may be an artifact of how the forum translated the code text you posted but the quotes ("") are not syntactically correct as far as the interpreter is concerned. Please post code using the #code tags in future - this will help a lot in debugging.
3)  Code”G92 Z0” (set z to 0) is incorrect syntax. You're using GCODE style comments in CB. This will cause the CB interpreter to fail. Either use Code "G92 Z0 (set z to zero)" (look where the closing quote is) OR preferably use CB comments i.e. Code "G92 Z0" 'set z to sero.
4) Code”G4P”&Pierce Time (Pierce delay) is a syntax error (the space between Pierce and Time. (as well as the reason in 3) above. (The missing spaces are also syntax errors but may again be an artifact of you posting the code on the forum without #code tags.

If you did indeed run the code you posted step by step then there is NO WAY it ran OK - impossible.

As far as putting wait states after a FUNCTION call like PierceHeight=GetUserDRO(1000). This is completely pointless. Unlike a SUB call from CB to Mach which can be ASYNCHRONOUS, a FUNCTION call by its very nature is always SYNCHRONOUS.

Ian

956
I look forward to the challenge.... come tooled up  ;)

Ian

957
Modbus / Re: Arduino (UNO) ModBus and Mach3
« on: May 15, 2012, 04:45:19 AM »
Hi

Mach is running thousands of Mills etc. around the world without an Arduino in sight. That's what Mach does. Can you explain what it is that you want the Arduino to bring to the party?

Ian

958
Modbus / Re: Arduino (UNO) ModBus and Mach3
« on: May 15, 2012, 04:01:30 AM »
What exactly are you trying to do with the Arduino?

By default - Mach controls your stepper drivers via the PARALLEL PORT - NOT via modbus (serial or TCP).

If alternatively you're trying to use your Arduino as a USB based motion controller for Mach - i.e. like the Smoothstepper et al, then you'll need to write a plugin for Mach and the firmware for the Arduino.

Either way Modbus has nothing to do with it. To put it another way, you appear to have your Arduino configured OK as a modbus slave but that has NOTHING to do with (axis) motor control.


959
General Mach Discussion / Re: G31 command.
« on: May 14, 2012, 10:40:22 AM »
Hi Tweakie - Can I throw in a suggestion? Restrict your question to G31 issued from gcode and the MDI ONLY. Otherwise I think your waters will be muddied (not a pleasent thought  ;D) by things that went wrong with G31 in a macro that likely had nothing to do with G31 itself.

example: do a macro based code G31 followed by a code G1 with and without a while isMoving() construct between them. What happens next is entirely version dependant and in those cases where the G31 fails it generally has nothing to do with the G31 command itself.

Ian

EDIT: Maybe I've misunderstood and you're interested in G31 in scripts in particular - sorry!

960
Nice one Tweaks - That pcb is as dinky as a dinky thing with a first class honours degree in dinky.

Ian