Hello Guest it is March 28, 2024, 10:32:21 PM

Author Topic: outputs  (Read 4789 times)

0 Members and 1 Guest are viewing this topic.

outputs
« on: February 15, 2013, 01:50:06 PM »
I have tried to get infomation on how to use the outputs in Mach. I read the manual, but it does not explain them other than spindle control.
What I would like to do is use output 2 (pin 14) to turn on and off a laser crosshair, using the "L" button on the keyboard. I have a relay setup that will take care of everything after the BOB. Can someone please help with how to set that up.

Thanks in advance

Ray

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: outputs
« Reply #1 on: February 15, 2013, 03:04:47 PM »
You would have to assign a hotkey (for L ) to a button on screen and that button would need to be a VB button and the code in the VB button would be as follows.


If GetOemLED(853) Then
DeActivateSignal(OutPut2)
Else
ActivateSignal(Output2)
End If


Hood
Re: outputs
« Reply #2 on: February 15, 2013, 03:47:14 PM »
Thanks, but hat is way above me. Is there a "Buttons for Dummies" book availlable? I just tried reading the VB script manual on the Mach page, and I was lost in 2 sentances.

Thanks

Ray

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: outputs
« Reply #3 on: February 15, 2013, 04:11:25 PM »
That is the problem, the manuals are written by programmers as you have to be a programmer to be able to write them. Problem is programmers cant speak/write in laymans terms ;D

To put a button on the screen you will have to use a screen editor (MachScreen or Screen4) and then assign it as a VB button and also assign your hotkey. Once done you saveas a different name and then open Mach and load that renamed screenset from the View menu. Then you can go to Operator menu and select Edit Button Scripts, the button you produced will be flashing, click it and the editor will open and you can paste the code I have above, save and exit and thats it.

Sounds complicated but it is in fact very easy to do :)
Hood
Re: outputs
« Reply #4 on: February 15, 2013, 04:42:25 PM »
I wil try over the weekend, but will probably be back for more answers.

Thanks for the help.

Ray

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: outputs
« Reply #5 on: February 15, 2013, 04:46:13 PM »
Will give all the help I can :)
If you had just been wanting to use a screen button and didnt use coolant or spindle then it would be very easy but because you want to assign a hotkey then you really need to at least open the screenset in the designer and at least modify the hotkey.
Hood
Re: outputs
« Reply #6 on: February 15, 2013, 07:11:54 PM »
Using a screen button is fine, and I don't use the coolant. But as I recall ( I am at work right now) the outputs for the coolant are only pins 1-6. I am using a zylotex board, and will have to see what outputs are availlable through that. I know I set up my relay system to pin14 because it was one that was availlable.

Ray
Re: outputs
« Reply #7 on: February 15, 2013, 08:15:26 PM »
I might have just figured something out. The output signals refered to for the coolant ( #1-6) I thought were the pin #'s, but they are the output#'s... this makes more sense now. Still going to try to make a button......

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: outputs
« Reply #8 on: February 16, 2013, 09:25:06 AM »
Yes thats what I was meaning you could use flood or mist coolant and use the button on screen or call with M8 or M7 and switch off with M9.

Hood

Offline Vogavt

*
  •  260 260
    • View Profile
Re: outputs
« Reply #9 on: May 23, 2013, 04:50:57 PM »
I too want to control a relay that will turn on/off, but I want it to be through a macro. Say M28-ON & M29-OFF (or another set of numbers not used).
I may want the HotKey assigned as well.

My plans are to turn on a red revolving ight when the mill is cutting and off when finished (or a buzzer when finished), but that doesn't really matter what I want to use it for. I just cant' figure out how to assign the pin to an M-code.

I have no plans to use my mill in counter-clockwise rotation so I tried to use the M4 and changed the output # on the Spindle tab, and the pin configuration to match, but it still turned on the spindle. I did not however restart Mach afterwards. I'd still prefer some other set of M code as stated above.

Any help would be appreciated. Long holiday weekend and I've been wanting to finish up my control box, etc. while I'm off work.