Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 10:04:28 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Stuck on brain
Pages: 1 2 3 »   Go Down
Print
Author Topic: Stuck on brain  (Read 1550 times)
0 Members and 1 Guest are viewing this topic.
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« on: November 26, 2010, 10:54:52 AM »

I know I can turn things on and off based on conditional logic, but what I need to do is set a userDRO = to an OEMDRO if OEMLED(36) or torch lit input is active.  In an if statement it would look like this...

If "Torch Lit" then
   USERDRO(2000) = XPOSITION
End If


Another possible way to do this would instead of continously updating the USERDRO(2000), just set it to XPOSITION the moment "Torch Lit" is lost.

In the brain editor I see an input for "torch lit" and I see the DRO's, just not sure how to connect them all in a brain.   

TIA
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #1 on: November 26, 2010, 06:01:36 PM »

Give this a try, X Axis value should be written to the user DRO (1234) when OEM LED36 is on.
Hood

* rrc1962.brn (2.1 KB - downloaded 89 times.)
Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #2 on: November 26, 2010, 06:31:52 PM »

That's what I've been trying to do.  I just can't seem to figure out how to set up that logic in a brain.  I can do it in a macro pump, but I like the low overhead of the brains.  Things like this always seem to run smoother in brains.
Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #3 on: November 26, 2010, 06:33:15 PM »

Sorry Hood.  I didn't see the brain file you attached.  I'll give it a try.  Thanks very much.
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #4 on: November 26, 2010, 06:39:13 PM »

Should work fine, if not let me know.
Hood
Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #5 on: November 26, 2010, 06:51:50 PM »

That's pretty close.  What's happening is that the user DRO is changing to 0 when the LED goes out.  What I'm after is for the user DRO just stop recording when the LED goes out so I know the exact point at which arc OK was lost.  You gave me a good starting point.  Is there a good manual on brains somewhere?  I haven't been able to find anything other than a doc in the user section about setting up brains with modbus.
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #6 on: November 26, 2010, 06:57:40 PM »

Ah OK never thought of that, will mess a bit and see if I can figure something out.
Regards the brains manual, not that I know of, I just mess around and view the Brain as  I operate the triggers and see what happens. I have attached the SRO brain I use which might give you an idea about Modbus.
Hood

* SROTest.brn (5.55 KB - downloaded 63 times.)
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #7 on: November 26, 2010, 07:32:35 PM »

Try this
Hood

* rrc1962Two.brn (3.63 KB - downloaded 64 times.)
Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #8 on: November 26, 2010, 07:53:08 PM »

Hmm...Interesting...I noticed this earlier when I was playing around with the AND and OR statements.  When it increments the user DRO, it only increments the whole number, not the decimal.  IE:  Everything between 3 and 3.9999 on the oem dro shows as 3.0000 on the user dro.
Logged
Hood
Active Member

Offline Offline

Posts: 17,362


Carnoustie, Scotland


View Profile
« Reply #9 on: November 26, 2010, 07:57:39 PM »

Never noticed that as the DRO I was writing to on the screen was one I was messing about for my toolchange macro so had no decimals in it.
Dont know what can be done there, will have a mess about and see if I can figure something out.
Hood
Logged
Pages: 1 2 3 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!