Hello Guest it is August 20, 2019, 02:07:06 AM

Author Topic: Toggle output from button input?  (Read 8644 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Toggle output from button input?
« Reply #20 on: March 09, 2015, 11:43:15 AM »
Strange, it is working fine here when I simulate Input 1.

If you attach your xml and the macropump I will try out here.

Hood
Re: Toggle output from button input?
« Reply #21 on: March 09, 2015, 11:50:32 AM »

Files attached, many thanks for your assistance, much appreciated.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Toggle output from button input?
« Reply #22 on: March 09, 2015, 11:53:53 AM »
Is that the name of the macro you have?

It needs to be called Macropump.m1s.


Hood
Re: Toggle output from button input?
« Reply #23 on: March 09, 2015, 12:00:03 PM »
Thank you, Thank you, Thank you, Thank you, Thank you,

Why am I such a Div?  ???

Now works perfectly, on to the next step  :)

As a matter of interest then, if I want to use another macro how do I name that one, or does it all have to be done in the same one?

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Toggle output from button input?
« Reply #24 on: March 09, 2015, 12:05:57 PM »
Done in the same one if it to be constantly monitoring something.

If it is just  for something you want to do and call from MDI or code then you can make a macro and name it m101.m1s (or a greater number)

For example I have a macro called m123.m1s  it is to move to a safe position, remove the tool currently in the spindle and set the height offset to H0, I just call it from MDI or code with m123

Hood
Re: Toggle output from button input?
« Reply #25 on: March 09, 2015, 12:11:10 PM »
Understand!

And would you believe it your tool change macro is exactly what I wanted to do after I get the system up and running. (Cheeky mode on) Any chance of a copy?  ;) (Cheeky mode off)

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Toggle output from button input?
« Reply #26 on: March 09, 2015, 12:15:30 PM »
Probably wont be much use for you as it basically just sends the axes to a set position and then sends signals to my PLC which then does the rest but here it is

Code "G53G0Y310Z-5M3S200"
 While IsMoving()
 Wend
 
 If GetInput(2) Then
 SetModOutput(17,1)
  Sleep 1000
SetModOutput(17,0)
SetModOutPut (29,1)
  Sleep 1000
SetModOutPut (29,0)
Else
SetModOutput(18,1)
  Sleep 1000
SetModOutput(18,0)
SetModOutPut (29,1)
  Sleep 1000
SetModOutPut (29,0)
End If
 
setoemdro(824,0)
Code "M5G43H0"   



Hood

Offline TPS

*
  •  1,375 1,375
    • View Profile
Re: Toggle output from button input?
« Reply #27 on: March 09, 2015, 04:06:56 PM »
ok cncbobuk,

i am not a friend of the macropump road.
can i get you into my OEMTRIGGER road as described in my small tutorial (PDF) ?

yust let me know.

Thomas
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Toggle output from button input?
« Reply #28 on: March 09, 2015, 04:26:33 PM »
Hi Thomas,

Many thanks for your support, the macropump does seem to work ok now that I understand a little more about it. I am however open to suggestion so would be interested to try your route as well as this will be an education for me anyway. I may well need some hand holding along the way, as although I can handle the electronics without problems the programming is a bit of a nightmare for me. Let me know what you think.

Regards, Bob.

Offline TPS

*
  •  1,375 1,375
    • View Profile
Re: Toggle output from button input?
« Reply #29 on: March 10, 2015, 04:40:08 AM »
Hi Bob,

looks like i have missed some posts yesterday.
glad to read that you got the Macropump running.

if you whant to try out other thing#s just let us know,
and we will give you a hand to find the way.

Thomas
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.