Hello -
I am trying to figure out how to write some macros in my g-code program that does the following regarding cycle times:
1 - Stores cycle time for each tool every time they are ran.
2 - Stores entire program cycle time.
3- Stores the last ten program cycle times so they can be easily reviewed.
Here is what I have figured-out thus far:
The program has five tools and has permanent common variables up to #699 so I thought it could go like this:
#601 is for T1's cycle time
#602 is for T2's cycle time
#603 is for T3's cycle time
#604 is for T4's cycle time
#605 is for T5's cycle time
#606 is for accumulative cycle time
#607 thru #616 would store the last 10 cycle times
So to get and store cycle times for each tool and to get and record the entire cycle time, I would just do this:
(First tool runs...)
M6 (Dont' know if I should put the following before or after the tool change)
#602=#3001 (cycle time for this tool)
#606=#606+#3001(Accumulated time)
#3001=0
(Next tool runs)
#603=#3001
#606=#606+#3001
#3001=0
(Last tool runs)
<< Same thing with the macro but #3001= happens before the shuttle, not after an M6>>
(Part shuttles out, is changed, and cycle start is hit)
M6
(beginning of program)
#600=#3001 (tells you how long it took to switch parts and start up machine"
#607=#606+#3001 (Stores entire cycle time in #607)
#606=0
#3001=0
So I'm thinking I will have to do a conditional statement somewhere in the macro, with a counter, etc in order to get and store the next nine cycle times in variables #608-#616, but I can't figure it out. Can someone nudge me in the right direction? I'll continue working on it as I wait for a reply.
Any help is appreciated ... thanks.
I am trying to figure out how to write some macros in my g-code program that does the following regarding cycle times:
1 - Stores cycle time for each tool every time they are ran.
2 - Stores entire program cycle time.
3- Stores the last ten program cycle times so they can be easily reviewed.
Here is what I have figured-out thus far:
The program has five tools and has permanent common variables up to #699 so I thought it could go like this:
#601 is for T1's cycle time
#602 is for T2's cycle time
#603 is for T3's cycle time
#604 is for T4's cycle time
#605 is for T5's cycle time
#606 is for accumulative cycle time
#607 thru #616 would store the last 10 cycle times
So to get and store cycle times for each tool and to get and record the entire cycle time, I would just do this:
(First tool runs...)
M6 (Dont' know if I should put the following before or after the tool change)
#602=#3001 (cycle time for this tool)
#606=#606+#3001(Accumulated time)
#3001=0
(Next tool runs)
#603=#3001
#606=#606+#3001
#3001=0
(Last tool runs)
<< Same thing with the macro but #3001= happens before the shuttle, not after an M6>>
(Part shuttles out, is changed, and cycle start is hit)
M6
(beginning of program)
#600=#3001 (tells you how long it took to switch parts and start up machine"
#607=#606+#3001 (Stores entire cycle time in #607)
#606=0
#3001=0
So I'm thinking I will have to do a conditional statement somewhere in the macro, with a counter, etc in order to get and store the next nine cycle times in variables #608-#616, but I can't figure it out. Can someone nudge me in the right direction? I'll continue working on it as I wait for a reply.
Any help is appreciated ... thanks.