Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: druckgott on October 18, 2015, 12:15:32 PM

Title: Output aktivate bevor Start of Programm
Post by: druckgott on October 18, 2015, 12:15:32 PM
Hallo, i have Connected on output pin 16 my vacuum cleaner.

AT the Moment IT will bei Start wich the cooling aktivation, But what i want to have is,that the programm will not start if the Output on pin 16 is not aktivated. is there auf way to do this without an extra input. so i will only get a information if pin 16 is not aktive. I also Do not need that it will be aktivated with cooling. I only want to have a button to start it and a reminder if its not on.

thx
Title: Re: Output aktivate bevor Start of Programm
Post by: rcaffin on October 20, 2015, 06:25:33 AM
You will need to do a little bit of programming, but this is quite possible. The key routine is
If IsOutputActive(output16 Then
 ....
Else
  DIE
End If

Cheers
Roger
Title: Re: Output aktivate bevor Start of Programm
Post by: druckgott on October 20, 2015, 01:28:58 PM
ob thx
Title: Re: Output aktivate bevor Start of Programm
Post by: Hood on October 20, 2015, 05:17:00 PM
I needed similar on my lathe, I altered the Start button to be a VB button. I then entered VB in that button. It looks to see if an input is active(actually a few different inputs) if they are then it will proceed with the Start function. If they are not active then it will pop up a message box telling me what is wrong.

Hood
Title: Re: Output aktivate bevor Start of Programm
Post by: Hood on October 20, 2015, 05:21:29 PM
Here is the VB, I am using modbus for these inputs so it wont be the same, you would have to use the code for the output as rcaffin suggested but the code below should show you what is possible.

If GetInput(23) And (GetInput(10) Or GetInput(11)) Then
DoOemButton(1000)
Else
DoOemButton(1003)
MsgBox("Engage Headstock or Enable Spindle")
End
End If   
Title: Re: Output aktivate bevor Start of Programm
Post by: rcaffin on October 20, 2015, 05:22:28 PM
Exactly what Hood said.

In my case, I check that the spindle PS is on before I start to move the milling cutter. Saves a lot on broken cutters!

Cheers
Roger