Hello Guest it is March 29, 2024, 03:11:49 AM

Author Topic: Code execution and input signals question  (Read 2646 times)

0 Members and 1 Guest are viewing this topic.

Code execution and input signals question
« on: August 30, 2012, 05:56:47 PM »
Alright folks, let me detail below what I want to do.  I have part of it figured out but I have not been able to figure out how to do all of the moves without loading a new file manually and how to count and display.

Here is what I want to do.  I have three input switches:   

I want the first switch to execute a section of gcode each time the button is pressed.  I would also like to count the number of times this switch is pressed and display that count.

I want the second switch to execute a different section of gcode and reset the counter for the first switch.

I want the third switch to execute yet another different section of code.


what I am working on is a tool for punching a material and inserting the punched portions into a set of tubes.   the three motions mentioned before control some critical parameters of the process.  I have not figured out how to do all of the above without manually loading different code at certain times, and I would preferr to automate the process more.

any help is appreciated,
thanks
Greg
Re: Code execution and input signals question
« Reply #1 on: August 31, 2012, 08:17:12 AM »
Put each block of code behind it's own button and use the input to trigger the button.  You can put any code you want behind the buttons, including code to increment a count.  Put a DRO on the screen to display the count.  Doesn't sound like it would be too hard to just automate the whole thing using a single script.
Re: Code execution and input signals question
« Reply #2 on: August 31, 2012, 09:33:32 AM »
Interesting.  I will have to look into how to do that.
Re: Code execution and input signals question
« Reply #3 on: August 31, 2012, 09:51:18 AM »
One quick question, how does one actuate the custom button with the external switch?  I see the ability to actuate the OEM codes with a switch but I am not seeing how to configure that for a custom button without an OEM code
Re: Code execution and input signals question
« Reply #4 on: September 01, 2012, 07:09:54 PM »
Put your code in macros then from a macropump, look at the inputs and execute the macros accordingly.