Machsupport Forum
Mach Discussion => Brains Development => Topic started by: CJEls on March 17, 2009, 03:10:04 AM
-
Hi All
Is it possible to write a brain that will latch when pressing a button to open the chuck on a lathe and stay open. You will have to interlock it with the spindle so you can not open it while the spindle is turning. When pressing the button again it should close the chuck again.
Thanks
CJ
-
Yes you can, but it is a pain in the butt, the Latching is "Broken" in Brains.........
so you can do that in macro pump instead. User INPUT4 and OUTPUT4 and UserDRO 2000
I.e.
'macropump.m1s
If Not(GetOEMLED(164)) and Not(GetOEMLED(165)) and IsActive(INPUT4) and (GetUserDRO(2000) = 0) then
ActivateSignal(OUTPUT4)
SetUserDRO(2000,1)
end if
If Not(GetOEMLED(164)) and Not(GetOEMLED(165)) and IsActive(INPUT4) and (GetUserDRO(2000) = 1) then
DeActivateSignal(OUTPUT4)
SetUserDRO(2000,0)
end if
'scott
-
Hallo Scott
Thank you for the reply. I do have a question or 2.
What is getoemled(164 ) and 165 ,is it cw and ccw led some were on the screens and is user dro2000 created by you also on a page I do not understand where you got these from because I tried to look with screen 4 but could not fine it on the1024 iset for a lathe or is this on one off your lathe screens
thank you
CJE
-
leds 164 and 165 are the CW and CCW spindle running LEDs, Udro 2000 is just a random dro i picked in a high range to make sure it
does not interfere with any of your wizard ranges....
In mach Even if LEDs and DROs DONT exist on the screen, they are still there, they are there all the time.
So when you go spindle CW LED 164 will Be ON weather it is on your screen or not........
so, tell me how the macro works for you.
scott
-
Hallo Scott
i tried running the Macro but it does not work on my set up.Then openning the macro and stepping into it the output wil only switch on and off. I did enable the mmacro pump in the gen config and restarted the system. Any other advise.
CJE
-
Hallo Scott
Is There any way off checking the macropump when the machine is on to see if it is running.I did a stupid macropump If input4 is on then switch output 4 on. That works fine as a macropump so I Know it is working.
CJE