Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Kently on July 16, 2009, 11:46:52 PM
-
What is the refresh rate of a brain? Brains are said to run fast, but how often do they run?
-
That really depends on whose brain you're talking about. I know mine runs slower and slower as I get older.... :-)
Regards,
Ray L.
-
10Hz I seem to recall.
Hood
-
Is there a way to confirm the 10 Hz rate? Second question would be is there any way to change the refresh rate, which I am guessing there is not. I wrote a brain to detect a count difference on two encoders to detect racking of a gantry and then e-stop if the difference is greater than a given amount. Works great except that the gantry may be travelling at 10 inches per second. If the brain refresh rate is 10 Hz, that means the gantry will rack by an inch before the brain issues the e-stop.
-
No way to change it as far as I know, I will ask Art what the refresh is for sure.
Hood
-
10Hz I seem to recall.
Hood
10Hz is for the Macropump.
As far as I understand, the Brains run at KHzs or 10s of KHz, possibly even faster.
That was the big improvement over the macropump.
Cheers,
Peter.
-
Brains runs with the update loop of Mach3, currently 10hrtz, in reality the Macro pump runs about 4 - 8 hrtz (even though it should also run with machs update loop). The difference being that the Brains are kinda run like a plugin in a way.
also, brians are a "state" machine type, ie, if you bring in an input that maps to the Estop, and that external estop is pushed, then it will push your Mach3 estop.
but, when the button is released externally, and the input goes back to 0, it does not RePush and take the machine out of estop. You would have to toggle your Estop button to get it to repush. So, in essence the brain looks at changes in single state only. You would have to write other logic in your brain to handle the Estop reseting to stay in synch with your external button, OR, put some Code that always runs in the back ground with your Macropump.
Scott
-
Well there you go, I learned something else today. :)
-
Yep, confirmed by Art, will be much faster in Rev4 though :)
Hood
-
Thank you guys for the answers. Thanks Hood for confirming the answer. I will just look forward to version 4. Any idea of when it will be released?
-
Should be soon but what the definition of soon is I cant say ;D
Hood
-
I posted the following question to the Brains forum, but it seems that not many monitor that thread. So I'll ask it here.
"What is the OEM code to write text to the "Status" area located at the bottom of Mach's Program-Run screen?"
I'd like to write a status message when the "Racking Control" brain issues an e-stop so that I know why the system was stopped.
-
Not sure how you would accomplish that from a Brain but you could have a macropump looking out for a signal from a Brain and have it write to the Status window.
The VB for that is
message("your text here")
You could also have a message box pop up on screen that you have to click Ok to, I find them better as it assures you have seen it, I often dont see status messages for a while :D
MsgBox("your text here")
Hood