Hello Guest it is December 09, 2024, 05:16:38 PM

Author Topic: Tailstock Macros  (Read 5644 times)

0 Members and 1 Guest are viewing this topic.

Tailstock Macros
« on: March 01, 2009, 06:43:50 AM »
I asked about this earlier and I did get some help, but there are some matters here that still don't make sense to me. I am using Turn.  I have placed two buttons and an LED on my Cycle Screen (Image included with this post)... One button to extend the tailstock and another to retract it.  I have set the buttons to use vbscript. I have the following two vbscript files in my C:\Mach3\macros\JRowlandLathe\ folder
   TS_On.m1s
         ActivateSignal(Outut4)
   TS_Off.m1s
         DeactivateSignal(Outut4)
I am using Output 4 to operate the tailstock.

The LED is associated with OEM Function 77, which is supposed to be 'Output 4 Active LED'

How to I tie the two buttons to the two scripts?
Nothing seems to be working...

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Tailstock Macros
« Reply #1 on: March 01, 2009, 07:21:28 AM »
You dont, what you do is go to Operator menu then down to Edit  Button Scripts, your buttons will flash, clcik on one and then put the appropriate code in it then exit, do the same again for the next button and you are done.
 You only need to place macros in the macro folder if you wish to use from within your code, if you want to do that then you will have to name them similar to M101.m1s and M102.m1s then when you called those m codes from code your tailstock would work.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Tailstock Macros
« Reply #2 on: March 01, 2009, 07:26:47 AM »
You could also, if you wished, just have one VB button to toggle between extend and retract, the code in it would be as follows

If GetOemLED(77) Then
DeactivateSignal(OutPut4)
 Else
ActivateSignal(OutPut4)
 End If



Hood
Re: Tailstock Macros
« Reply #3 on: March 01, 2009, 07:40:32 AM »
Oh That's SO COOL!
Thank you sooo much for all your help.
I think I'm in business now
You just made my day!