Hello Guest it is February 24, 2021, 09:49:33 PM

Author Topic: Tool sensing with ATC  (Read 3675 times)

0 Members and 1 Guest are viewing this topic.

Re: Tool sensing with ATC
« Reply #10 on: February 14, 2015, 02:29:43 PM »
Well, I think 10 times a second should be ok.

I was able to make a quick simple little brain that took the input, and created a timed one shot control of an output.

I'll pass through the gate, and then read whether the output is on or not.

I'm waiting on some opticals big enough for my largest tool to pass through. Once they get here, I'll give it a shot.


Thanks for all your help

Royce

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: Tool sensing with ATC
« Reply #11 on: February 14, 2015, 02:57:28 PM »
10 hz is not very fast but only testing will actually tell the story. In the worse case all you would need to do is slow down the pass through the gate.

Another thought, Using the Brains it will be HARD to set a flag. Doing it from a macro you can store the flag as a #var >500  and < 600 and it will be available anytime you need it.

Keep us up to date (;-),

(;-) TP
« Last Edit: February 14, 2015, 03:00:49 PM by BR549 »
Re: Tool sensing with ATC
« Reply #12 on: February 15, 2015, 10:21:04 AM »
br549

Originally, I was planning to use a variable like #501 etc. But when I looked into brains, it only shows Local Variables, and I'm not familiar with them. Do they work the same?

I use variables in many of my programs, but I've never worked with the local variables. In brains, variables used as a termination, it lists V1 through V99. It also talks about using bits. I'm not sure I would know how to set it up. I do have an old Fanuc 6T control on a Hardinge CHNC and I've read various parameters which are listed through bits. IE for a particular parameter, bit 3 would be the 5th one from the left and it would be a 1 or 0 for on or off.

Would the Local Variables be similar? If so, how would I read them in a Macro? It's always the language and syntax that gets me.

What I was able to come up with using brains is this:

1. I made a brain, a really simple one, that watched the input for my optical switch. When it sees the trip, it uses a timer to turn on an output for 5 seconds.
2. In my macro for the tool change, I can program all the moves to go to and pass through the gate.
3. Immediately after passing through the gate, I can use an If-Then statement to read the output that is held high for 5 seconds, and then program accordingly.

I can use this whether I need to see a tool or not, and I don't need to reset it as it turns back off after a programmable time.


I'm  very interested in your methods for using the variables. I like to learn, and doing it both ways will help me to learn more than just using one. I think I can make the brains side of it work, but if you could point me in the right direction to do it using macros and variables, I'd really appreciate it.

Just a note about me. I'm definitely a rookie with all this special programming and I don't have any formal CNC training. I do learn well, and am not afraid of work. I built from scratch most of the machines that I use.

I look forward to any direction you have to offer.


Thanks

Royce

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: Tool sensing with ATC
« Reply #13 on: February 15, 2015, 11:04:18 AM »
The brains local var is just that a local var that does not exist outside of the brains.


The macropump ( the CB/vb side of mach3) reads at the same rate as a brain. It is a continuous loop, when it ends it starts again.  The macropump has access to ALL of the Mach3 programable functions. BUT if really large in size it CAN carry more overhead for mach3.

Code in the macropump could look for the signal and trip a flag as well and store it as a #var . #var 500-600 are persitant vars. They remain IF mach3 is shut down. The pump could also drive a LED for you to visually see if it tripped.

The advantage of teh brain is it runs at kernal speed internally where as the machrpump is limited to 10 hz internally. BUT both read the inouts at the same speed 10hz.

The advantage of the macropump is it has access to all mach3 internal functions. It can also call other macros into play.

(;-) TP