Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 06:17:17 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Brain Timing and "Latches"
Pages: 1   Go Down
Print
Author Topic: Brain Timing and "Latches"  (Read 121 times)
0 Members and 1 Guest are viewing this topic.
HimyKabibble
Active Member

Online Online

Posts: 258



View Profile
« on: August 18, 2008, 10:32:06 PM »

I'm assuming brains are run periodically, like every pass through the main loop of Mach3?  I've become quite expert at writing brains that end up in endless loops, madly toggling things, or, in too many cases, hanging Mach completely, so I have to re-boot the machine.  Are brains evaluted/executed at a fixed time interval?  Is this why the "Timer" lobes are provided, to prevent race conditions?  If so, what is an appropriate delay to prevent races? 
Also, what does the "Latch" lobe function do?  I've found no explanation anywhere.
One last question - Are functions limited to arithmetic expressions, or can we use logical expressions as well?  For example, if I want to have a lobe output one of two numeric values, based on the value of a boolean input, how would I do that?

Regards,
Ray L.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Online Online

Posts: 770


Briceville, TN, USA



View Profile WWW
« Reply #1 on: August 30, 2008, 04:20:58 PM »

Brains runs with machs update loop.

you can do values, via formulas feed by booleen results into the formula.

scott
Logged

All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!