Tracking Machine Time Using G Code

11/10/2015


From original questioner:

Hi All.

Is there a way to track the time it takes to run a job using G code or ? I have a Biesse Arrow with an OSAI control that will do all kinds of stuff but I can't figure this out.

Any ideas?

From contributor Ma


Not sure if this will work on your version of the control but try this

Place the following at the head of the program (select E variables you arent using!)

(DIS,TIM)
E10=TIM
Place this at the end of the program

(DIS,TIM)
E11=TIM

When you look it up in the variables table, the difference between the two would be the total in seconds of execution of the code. Or I guess you could get really cute and do E12=E11-E10.

Hope this helps

Mark T.



From contributor Dr


Thanks Mark.



From contributor Dr


I guess I could put E13=E12*.0333 to calculate billing per sheet. :)

From contributor Dr


OK, how about a way to cutting time and distance on a specific router bit?

From contributor Ma


That's a little more "involved", typically higher end CAM systems figure all of this out for you.
For the individual tool time, you could follow the basic same logic. The variables used to trigger the time could remain the same variables and placed at the head and end of each tool block. Directly below the "E11" for each tool block, you would have to assign and place a sub program call for each tool relating the name of the subprogram to the tool # would probably be the easiest route. Within in each sub program you would do the math. The "E10" and "E11" can continue to be used in the main program as the trigger within each tool black, but the calculations within the sub would have to have discreet E variables for each tools sum time. To do that you would also need to construct a counter within the sub program
Counter
E12 =E12 +1
E13=E11-E10
E14=E12*E13
So the first time it runs, it multiplies the total by 1, the second time by 2, etc.
E14 would be the variable where the sum is store and would also have to be different for each tool block.
I did this off the "cuff" but hopefully you get the main "jist" of the logic.
As for measuring tool path distance, that would be a lot more involved

Hope this helps

Mark