Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: plasmashine on March 17, 2018, 09:33:27 AM
-
My first post here.
I have built a Plasma table from scratch which works well.
I am now adding some extra functionality to it.
It uses a UC400ETH notion controller.
I wish to add a custom button to my mach screen.
I am using the spindle relay on my breakout board to trigger my plasma, I would like that when the custom button is clicked another output operates whenever the spindle does.
Reason for this, I have mounted a visible laser to the plasma torch and i want the laser to operate instead of the plasma cutter, giving a visual 'Dry run'.
I know I can do this with a mechanical switch but I would like to use Mach3 to control it.
I have used Machscreen to add a button and then I assume I need to write a brain or some VB to complete the task.
If someone could point me in the right direction I'd very much appreciate it.
-
declare Standard code of your button as 34 (execute Basic stript)
then einter this vb code to script
If IsActive(OUTPUT1) Then
DeactivateSignal(OUTPUT1)
Else
ActivateSignal(OUTPUT1)
End If
-
Thanks for the prompt reply.
-
I tried this with some success, I could turn output 3 on but it didn't turn off again.
Output 1 and 6 did nothing.
What am I missing?
-
sorry Little mistake, right code:
If IsOutputActive(OUTPUT1) Then
DeactivateSignal(OUTPUT1)
Else
ActivateSignal(OUTPUT1)
End If
it will only work for Outputs witch are enabled in Config -> Ports&Pins -> Outputs
-
Thanks Again