Hello Guest it is March 28, 2024, 07:55:08 PM

Author Topic: Assigning a port/pin to "torch up/torch down"  (Read 22713 times)

0 Members and 1 Guest are viewing this topic.

Re: Assigning a port/pin to "torch up/torch down"
« Reply #20 on: January 07, 2009, 03:03:43 PM »
Hood,
I get the same in Mill and Turn. Only runs from the editor.
I open 2 editor windows on the diag screen...m303 and m505
They run good from the editors.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #21 on: January 07, 2009, 03:04:53 PM »
What Rev of Mach are you using as I cant get it to work at all in Mill. I have R3.043.000
Hood
Re: Assigning a port/pin to "torch up/torch down"
« Reply #22 on: January 07, 2009, 03:11:49 PM »
3.042.020

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #23 on: January 07, 2009, 03:38:06 PM »
that may be the difference then, will try with an lder version.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #24 on: January 07, 2009, 04:04:27 PM »
Well just the same with an older version for me went to 42.018 and works fine in turn but not mill.
Hood
Re: Assigning a port/pin to "torch up/torch down"
« Reply #25 on: January 07, 2009, 04:13:20 PM »
Strange.  I dont get it. I wrote one that didnt use the DoSpin....just a DElay then activate the input for the spindle relay. They all act the same way..ignoring the delays.
 
Oh yes...and I recall on Yahoo back about  020 to the last lock-down much talk about scripts but didn't delve into it.
« Last Edit: January 07, 2009, 04:15:29 PM by Overloaded »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #26 on: January 07, 2009, 04:57:04 PM »
RC put a few message boxes in your macro and see if you get the messages when you M3, that will let you know the macro is running, just its not working right ;)

To do that you just put these in your code
MsgBox("Its Running")

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #27 on: January 07, 2009, 05:09:31 PM »
RC have a look see if you have a M3.mcc in the macro folder.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Assigning a port/pin to "torch up/torch down"
« Reply #28 on: January 07, 2009, 05:37:51 PM »
Well RC I have it working fine with OutPut 1 as the spinlde relay and OutPut3 as the one being switched on in the macro. If I use OutPut2 then I cant seem to get it to work but I cant even get the LED to light if I just call ActivateSignal(OutPut2) directly from the editor so maybe for some reason the LED is just not being lit. I dont have a PP in this computer so cant physically check it with a meter to see if the real output is switching.
Anyway I put this in the M3 to save me having to switch them off again and it works for me, as I said OP for spindle relay is set to 1.

ActivateSignal(Output3)
Code ("G4P5")
While IsMoving()
Wend
Sleep(10)
DoSpinCW()
MsgBox("It's Alive shame Brett isn't")

Code("G4P5")
While IsMoving()
Wend
sleep(10)
DeActivateSignal(Output3)
Code("G4P5")
While IsMoving()
Wend
sleep(10)
DoSpinStop()

See if that works for you
Hood
« Last Edit: January 07, 2009, 05:48:32 PM by Hood »
Re: Assigning a port/pin to "torch up/torch down"
« Reply #29 on: January 07, 2009, 05:43:53 PM »
Hood, I think I found the problem here. I have macros in three places. Macros folder and in a sub called Mill macrosand another called Turn macros.
So there are 3 M3's, 2 of which are like the original.
Will sort them out shortly but that looks like the prob.
I see no .mcc files.
RC