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