Machsupport Forum
Mach Discussion => Brains Development => Topic started by: Douglas770 on November 03, 2009, 01:25:22 PM
-
Hi All,
Short story long, I wrote a short macro to home tool changer to a switch, then set a Dro with the Slot number. So far so good, as this was early in the process I had not written the M6 macro yet(No way to move the changer turret from the home position). So, since there is a manual index push button on the machine that I had wired and mapped , I made a brain that activated the turret while the button was pressed. The brain moved the turret like I wanted, but now the turret home macro did not work. If I disable the brain the macro will work. My question is, should a brain disable a macro?
Thanks
Doug
-
if your brians and maco are both active, make sure you are not fighting over the same data point(s)........ expecially conflicts
liike one turning this on, and the other turning it off. If you waiting on stuff in the macro, or the like, and the data point do things
during execution, then the VB tthread may be Erroring out.
scott
-
Hi Scott,
Thanks for the reply. The only thing common between the two, is the output for the turret motor run relay. It is activated and deactivated in the macro based on the tool position 1 prox switch. The brain only has one line, if the push button input is make activate the output. It's not a huge deal as the brain was just for my convenience and will not be used in the final version. I guess my big question is it a bad idea to mix and match control logic between brains and macros?
Thanks
Doug
-
no, it works well together, just more of a pain for you to track it.
scott
-
Hi Doug,
I have the same problem in regards to output not activating when brain is running, Where you able to resolve the problem? i have made a macro that AcivateSignal(output1) and a simple brain turning Output1.
Thanks
Renato
-
just a side note here, make sure in Ports/Pins you have that output ENABLED!!!
scott
-
hello Scott,
Thanks for the reply. I was able to find a solution to fix the problem.
Thanks for the support
Renato