Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jve on October 24, 2009, 11:59:06 AM

Title: how i can write a message
Post by: jve on October 24, 2009, 11:59:06 AM
 hi guys
to day i finish my toolchanger and now i need a message that come up when i have input 3 activate i need this because i have a lube pump and it give you a contact when it is empty so it will be nice to have mach3 to tell you to fill it up , i am sure that this was done before but i cannot find any example of a vb to do that
can some one help me to do that
regards
jekran
Title: Re: how i can write a message
Post by: melee on October 24, 2009, 12:33:50 PM

Message ("Your lube needs topping up")
Title: Re: how i can write a message
Post by: HimyKabibble on October 24, 2009, 12:40:02 PM

Message ("Your lube needs topping up")

You can also use MsgBox("Your lube needs topping up"), which will put up a separate dialog, requiiring the user to click the OK button to proceed.

Regards,
Ray L.
Title: Re: how i can write a message
Post by: jve on October 24, 2009, 12:47:15 PM
how can i do that when i have input 4 active
Title: Re: how i can write a message
Post by: jve on October 24, 2009, 01:04:28 PM
sould i do it this way ?
 If IsActive(INPUT3) then
MsgBox("Your lube needs topping up")
end
Title: Re: how i can write a message
Post by: Hood on October 24, 2009, 02:17:31 PM
Will be End If at the end of it, also you will need that in the macro pump so that it appears as soon as the input becomes active.
Another way to do this and probably the way I would do it is have it tied to your Start button, that way it will not appear whilst cutting but will only appear when about to start, I would do it that way as I would also have it so that I could not start any code unless the oil is topped up, I have a similar setup in the start button to detect whether I have the manual disable switch for my spindles servo drive active.

Hood
Title: Re: how i can write a message
Post by: jve on October 25, 2009, 01:47:55 AM
good thinking !!!!!