Hello Guest it is December 10, 2019, 04:56:44 AM

Author Topic: Brain Timing and "Latches"  (Read 4812 times)

0 Members and 1 Guest are viewing this topic.

HimyKabibble

• 1,687
Brain Timing and "Latches"
« on: August 18, 2008, 11: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.
Regards,
Ray L.

poppabear

• 2,233
• Briceville, TN, USA
Re: Brain Timing and "Latches"
« Reply #1 on: August 30, 2008, 05:20:58 PM »
Brains runs with machs update loop.

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

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

dmoore

• 27
Re: Brain Timing and "Latches"
« Reply #2 on: March 02, 2009, 12:00:07 AM »
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?

I too also have the same question about what the latch function does....  Anyone?

poppabear

• 2,233
• Briceville, TN, USA
Re: Brain Timing and "Latches"
« Reply #3 on: March 03, 2009, 08:38:05 AM »
If memory serves......

the "Lathed" function is so that when your conditions are met from 2 or more inputs, that once they become True, then the box will "Latch" itself into an ON state even when the Inputs become false, per run of Mach.

If is for if you have a certain pattern of inputs/conditions that when they occur (even Once), that the result will Stay on.....

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

CJEls

• 69
Re: Brain Timing and "Latches"
« Reply #4 on: March 17, 2009, 04:13:24 AM »
Hallo Scott

Do you have a example of a latching circuit.  How do you reset the latch.

Thank you

CJ
« Last Edit: March 17, 2009, 04:27:38 AM by CJEls »