Hello Guest it is April 26, 2024, 10:30:35 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

1311
General Mach Discussion / Re: Hood.....where is he?
« on: April 29, 2011, 05:02:26 AM »
Best wishes Hood

Cheers

Ian

1313
General Mach Discussion / Re: Engraving text
« on: April 22, 2011, 02:50:11 AM »
A dodge I've used before to pass a string to a macro is to gcode something like:

...
(some text)
M750
...

Then in the macro use the apparantly undocumented "getMessage" function. You should probably plate this up a tad like:

(%some text%) and check for the %s just in case an otherwise generated message springs up and overwrites the message before you read it.

Ian

1314
General Mach Discussion / Re: Engraving text
« on: April 21, 2011, 01:53:10 PM »
Andrew - I've taken a look at the relevant macros and I reckon what you want to do is possible but it'll involve a fair amount of hacking. Depends how much you want it I guess.

Cheers

Ian

1316
General Mach Discussion / Re: Engraving text
« on: April 20, 2011, 06:21:51 AM »
Hi Andrew - using your current method (the write wizard) how do you determine where you want the position of your text to be? Is your chosen font a monotype? Does the position depend at all on the length of the text?

Ian

1317
Hi Terry

From what you've said, Z works fine with an accel curve i.e. with THC OFF, doesn't work fine without an accel curve, i.e. with THC ON. Also, used to work at 50% of max vel, but now doesn't work with 20%. Assuming you havn't changed max vel then...

Sh1t in the Z. (that's a diagnosis BTW - not an instruction  ;D)

Cheers

Ian

1318
General Mach Discussion / Re: Manual button for auto zero
« on: April 18, 2011, 09:56:11 AM »
You can't call a macro from a macro....can you?

Well.... you can, but there be dragons. Best avoided.

Ian

1319
General Mach Discussion / Re: Manual button for auto zero
« on: April 18, 2011, 06:43:12 AM »
Ian

The advantage of using a brain is the timer safety.   If the switch/button is held for less than the specified time (2 sec) then nothing happens.

Can you give us an example of how to do this in the trigger macro.  It would be very handy to know how this is done.

Would it be an if/then with a pause and recheck input?

Greg

Hi Greg - see my suggested example in my previous post. FWIW using the macro method I don't think there's a need for checking IsMoving and Enable like in your Brian because Mach ignores macro generated movement whilst already in motion and doesn't execute macros whilst in reset. That would just leave your spindle check which could be done the macro equivalent way as the Brian i.e. by checking LED 116.

So my example macro 666.m1s above might look something like this: (change trigger #s to suit)

Code: [Select]
'wait before doing checks so that a trigger must still be active after 2 secs for the following to succeed
sleep 2000

'if T1 is still active i.e. button is still pressed after 2 secs and spindle is off
If isActive(OEMTRIG1) and not getOEMLED(116) Then
  'paste your Z axis tool setting code here
End If

'if T2 is still active  i.e. button is still pressed after 2 secs and spindle is off
If isActive(OEMTRIG2) and not getOEMLED(116) Then
  'paste your A axis tool setting code here
End If

Let me know how you get on.

Cheers

Ian

1320
General Mach Discussion / Re: Manual button for auto zero
« on: April 17, 2011, 01:24:44 PM »
OK Rick and Greg - I misunderstood the requirement - Mea culpa.

However Rick if you do want to have a go via a trigger macro then yes you should be able to code in any safety features you like. See http://www.machsupport.com/forum/index.php/topic,15120.msg101160.html#msg101160 where if for example you put a "sleep 1000" as the first line of the example code, it would test whether you held the button that fired the trigger for more than a second before doing whatever.

Ian