Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 23, 2008, 10:17:34 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Brains Development
How to do a Counter in Brains.............
Pages:
«
1
2
Go Down
« previous
next »
Author
Topic: How to do a Counter in Brains............. (Read 1354 times)
0 Members and 1 Guest are viewing this topic.
dhookings
Active Member
Offline
Posts: 21
Re: How to do a Counter in Brains.............
«
Reply #10 on:
February 07, 2008, 05:59:21 AM »
Thanks both.
So the Brain (at least as far as inputs are concerned) is not only polling every 100 milliseconds but is acting as a positive going edge triggered interrupt. Sort of:-) That would certainly explain the action of input#2 resetting the dro.
As I see it now, the moment input#1 is pressed, a flag is set in Mach. Within the next 100 ms the Brain is started, which, seeing the flag, carries out the logic of incrementing the DRO. The timer part is acting outside of the Brain, holding the input high for another 100 ms. The Brain, of course, clears the flag. On the next running of the Brain, although the input#1 is still high (held by the timer), it is ignored because the flag is still clear. When the timer times out input#1 is forced low, and if the finger is still on the button the flag will be set again, leading to another increment on the next running of the Brain.
Or, instead of using a flag, the positive action on the input switch could start the Brain immediately.
Am I getting closer?
Regards
Dave Hookings
Logged
dhookings
Active Member
Offline
Posts: 21
Re: How to do a Counter in Brains.............
«
Reply #11 on:
February 07, 2008, 06:16:30 AM »
Oh dear!
On re-reading Brett's posting I'm back in the dark.
The bit about the brain missing a quick press without the timer does not equate with an edge triggered interupt.
But then, that means that the timer must be operating outside of the Brain and reintroduces my problem with input#2.
Dave
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 766
Briceville, TN, USA
Re: How to do a Counter in Brains.............
«
Reply #12 on:
February 07, 2008, 08:58:48 AM »
Dave,
The action is in the timer, it is acting as a "One Shot", it will ONLY pulse ONCE for only the pulse duration as long as the input is held down, it will NOT pulse again even if held down all day. BUT, once you release the input (finger OFF the button), and then you repress it, it triggers a ONE SHOT 100ms pulse.
From my perspective, I know longer know what to tell you, someone else will have to step in here, Perhaps Brain or Art who knows the inner workings of Mach. I don't know the inner workings, I just know what works with Brains to do what I want it to do.
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
2
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...