Hello Guest it is November 22, 2019, 03:05:41 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 - TPS

1281
Hi,

sorry, i am not realy shure what you want to tell me (may be caused of my bad english).


Thomas, thank you so much for taking time to look at this.  I haven't done any Mach scripting in a couple of years and had been banging my head against a wall for a few hours when I posted.

Contrary to TP's opinion I do RTFM but the programmers reference manual only has this:

SystemWaitFor
Sub SystemWaitFor(Signal As Integer)
This function it is used to tell Mach that a macro script is ending, and that any further
GCode execution should wait for the Signal to go active. If used, this function should
always be the last line in a macro and it should never be used within a loop.
Arguments:
SignalID must be one of the pre-defined Mach3 CB output signal constants (see
CB Constants), or other value or expression that evaluates to one of those values.
Return Value:
None
Example:
See also:

Since the manual does not contain the CB Constants it refers to I assumed, wrongly, that Poppa bear's use of ReStart was a constant.  After leaving it alone for a few hours I reread his example.  I missed a line of code:

ReStart = IsActive(INPUT4)            'this is input signal 4

I like your code, thanks again

simple question  working yes/no.

Thomas

1282
General Mach Discussion / Re: Modify A Macro File Throuht A Screen!
« on: March 11, 2015, 06:21:39 AM »
just put a digital inputbax in your main screen,
format it to only 4 digits , for example OEMDRO 2000.

in the macro you can read the dro with

timer=GetOEMdro(2000)
sleep(timer)

Thomas

1283
Hi rhtuttle,

i think now what you tryed to do.
Pause is not working because there is no movement.

Try this:

Code: [Select]
Sub main
  'Domed Winding check
  '0.5614 fixture diameter
  '0.2804 fixture radius
  '0.725 Raw NickelBlank Dia
  Message "(Mount back cut tool)"
  DoOEMButton(1003)
  WaitForStart

    DoOEMButton(1003)
  Message "(Jog to Fixture surface)"
  WaitForStart

  ' Set Z to Fixture Radius
  setDro(0,0.2807)
  DoOEMButton(1003)
  Message "(Mount Front Cut Tool, position to back edge of mounted nickel)"
  WaitForStart

  setDro(2,0.000)
  ' set spindle speed to 400
  DoOEMButton(1003)
  Message "(Turn Spindle on to 400RPM)"
  WaitForStart

  code "m3 S400"
  code "g01 f2 x0.285"
  code "g0 x0.3625"
  While Ismoving()
   sleep(200)
  Wend
  
  DoOEMButton(1003)
  Message "(stop spindle)"
  WaitForStart
  code "M5"

  Message "(finshed)"
  
End Sub
 
Sub WaitForStart
Sleep(300)
While Not GetLed(4) 'check Start LED
Sleep(200)
Wend
End Sub



Thomas

1284
OK let's try,

first of all let's get a resadble code:

Sub main
  'Domed Winding check
  '0.5614 fixture diameter
  '0.2804 fixture radius
  '0.725 Raw NickelBlank Dia
  DoOEMButton(1001)
  code "(Mount back cut tool)"
  systemWaitFor(restart)
  DoOEMButton(1001)
  Code "(Jog to Fixture surface)"
  systemWaitFor(restart)
  ' Set Z to Fixture Radius
  setDro(0,0.2807)
  DoOEMButton(1001)
  code "(Mount Front Cut Tool, position to back edge of mounted nickel)"
  systemWaitFor(restart)
  setDro(2,0.000)
  ' set spindle speed to 400
  DoOEMButton(1001)
  Code "(Turn Spindle on to 400RPM)"
  code "m3 S400"
  systemWaitFor(restart)
  code "g01 f2 x0.285"
  code "g0 x0.3625"
  code "M5"
  DoOEMButton(1001)
  code "(stop spindle)"
  systemWaitFor(restart)
End Sub

main  

ok let's do some documentaion's to the code


Sub main
  'Domed Winding check
  '0.5614 fixture diameter
  '0.2804 fixture radius
  '0.725 Raw NickelBlank Dia
  DoOEMButton(1001)
  code "(Mount back cut tool)"   'what does this code mean ?? ???
  systemWaitFor(restart)            'where/or what is restart  ???
  DoOEMButton(1001)
  Code "(Jog to Fixture surface)" 'what does this code mean ?? ???
  systemWaitFor(restart)            'where/or what is restart  ???
  ' Set Z to Fixture Radius
  setDro(0,0.2807)
  DoOEMButton(1001)
  code "(Mount Front Cut Tool, position to back edge of mounted nickel)"  'what does this code mean ?? ???
  systemWaitFor(restart)             'where/or what is restart  ???
  setDro(2,0.000)
  ' set spindle speed to 400
  DoOEMButton(1001)
  Code "(Turn Spindle on to 400RPM)"  'what does this code mean ?? ???
  code "m3 S400"
  systemWaitFor(restart)   'where/or what is restart  ???
  code "g01 f2 x0.285"
  code "g0 x0.3625"
  code "M5"
  DoOEMButton(1001)
  code "(stop spindle)"     'what does this code mean ?? ???

  systemWaitFor(restart)       'where/or what is restart  ???

End Sub

main  

i am just talkin like MACH3 processor.

Thomas

if you try to get an answer post the real code.


1285
Brains Development / Re: Brains writing wrong values to DRO's
« on: March 10, 2015, 04:27:15 PM »
Hi Bob,

But I do appreciate the help given by guys like you and Thomas, even if it wasn't directed at me.  I wish I had just some of the knowledge you guys have on this subject, I wouldn't have spent so many months fumbling my way through it.

all of the knowlege, i have got of this system (ok sometimes it's not very much), i got on the same route you do for the moment.


it was all try and error.

Thomas

1286
General Mach Discussion / Re: Toggle output from button input?
« on: March 10, 2015, 11:03:54 AM »
ok got it now.

Thomas

1287
General Mach Discussion / Re: Toggle output from button input?
« on: March 10, 2015, 08:28:00 AM »
Hello Ian,

- it's just trigger MACROS that have the "turned up late for work" problem).

sorry my english is to bad to translate ("turned up late for work" problem) this correctly, could you please explain ?

Thank You Thomas

1288
General Mach Discussion / Re: Toggle output from button input?
« on: March 10, 2015, 07:07:41 AM »
Hello Ian,

thank you for this information, never tryed this.

So the only possibilities during running the machine will be

macropump and brain (but brains are also courious sometimes).

Thomas

1289
General Mach Discussion / Re: Toggle output from button input?
« on: March 10, 2015, 04:40:08 AM »
Hi Bob,

looks like i have missed some posts yesterday.
glad to read that you got the Macropump running.

if you whant to try out other thing#s just let us know,
and we will give you a hand to find the way.

Thomas

1290
General Mach Discussion / Re: Toggle output from button input?
« on: March 09, 2015, 04:06:56 PM »
ok cncbobuk,

i am not a friend of the macropump road.
can i get you into my OEMTRIGGER road as described in my small tutorial (PDF) ?

yust let me know.

Thomas