What's new
What's new

Out-put cycle times to text file

TurboGuy

Plastic
Joined
Dec 9, 2015
Hi all!

We are trying to track machine up-time on our Haas mills. Does anyone know if there is a way to log program run times in the controller??? We are trying to compare theoretical capacity to actual capacity and would like to have the machine log the final runtime of a program to a log of sorts that we can either look up on the control or output to a USB or something like that.

Any ideas????

thanks

mike
 
Should be one of the variables...I don't know off the top of my head which one it is though. Check the book.

May be more trouble though than just looking at the control which...at least on my control...shows the previous two cycle times always. That is the one I go off of.
 
Hi all!

We are trying to track machine up-time on our Haas mills. Does anyone know if there is a way to log program run times in the controller??? We are trying to compare theoretical capacity to actual capacity and would like to have the machine log the final runtime of a program to a log of sorts that we can either look up on the control or output to a USB or something like that.

Any ideas????

thanks

mike

Hello Mike,
Macro System Variables #3001(Millisecond Timer) and #3002(Hour Timer) can be read before and after a program cycle is completed and saved (accumulated) in a Common, Nonvolatile Macro Variable(=> #500). System Variables #3012 through #3025 can also be used depending on exactly how you want to achieve your result. Once saved to a Common, Nonvolatile Variable, it can be viewed at the control, or output to a text file via the Macro Function DPRNT.

Regards,

Bill
 
Should be one of the variables...I don't know off the top of my head which one it is though. Check the book.

May be more trouble though than just looking at the control which...at least on my control...shows the previous two cycle times always. That is the one I go off of.

Don't forget to calculate load/unload time. It may or may not make a difference. If you are loading fixtures in the machine for low volume it will probably be more significant than if you are swapping parts in a vise, or loading offline, etc.
 
Thanks Bill,

Do you know if there is a way to output to a text file on a USB stick? Or do I have to go through the RS232 Serial Port? Seems like the default output for DPRNT is the Serial Port, I’m wondering if POPEN can change the location to the USB or Ethernet port.
 
Thanks Bill,

Do you know if there is a way to output to a text file on a USB stick? Or do I have to go through the RS232 Serial Port? Seems like the default output for DPRNT is the Serial Port, I’m wondering if POPEN can change the location to the USB or Ethernet port.

Hello Mike,
No. DPRNT sends text to the Serial Port.

POPEN and PCLOS are not required on the Haas machine. They have been included so that programs from different controls can be sent to the Haas control. But for consistency, I would still use these Macro Functions.

Setting 70 can be set to control whether the POPEN and PCLOS statements in macros send DC control codes (DC1 and DC3) to the serial port. When it is set to OFF, the control codes are suppressed. The default value is ON.

Regards,

Bill
 
Don't forget to calculate load/unload time. It may or may not make a difference. If you are loading fixtures in the machine for low volume it will probably be more significant than if you are swapping parts in a vise, or loading offline, etc.


I agree however it seemed the OP was only asking for actual run time
 
I don´t know how to do it on the control.

But for a 50$ gimmick, a relay output driven from an extra output at the control will drive anything, and any 50$ gizmo will write anything over ethernet, bluetooth, wifi, whatever.

Use a PLC/separate gizmo, just use the control to trigger something/anything.

ALL The cnc controls *should* provide easy integration stuff, but don´t, I think, afaik.

If You think it seems hard, anyone from the arduino/linux/et al crowd can make something for 50$ in hw and some hours.
(I could do it .. but am not volunteering.
I know how to, but am slow, out of SOTA, and have no time, and my rates are 10-100x the hobby-arduino crowd.)

I myself would outsource this, and for 500-1000$ have a running piece of hw+sw, with a simple config tex file, accessible over SSH.
I myself could get it done for 200-300$ over a linux box of any type (beagle, whatever).

If linux and integration is not your thing, You are much better off paying more, and getting a more packaged solution.
I often buy such, simply because my time is worth very much more than the savings.
Ie I would rather buy a 900$ gizmo than spend 6 hours at it.

I suspect with the new Haas linux control, at some point this type of stuff will be trivial and common.
Anything-linux makes this kind of thing very easy, and, potentially, very good and very secure.

99% basic kit today is not good or secure - does not means it cannot be and won´t be.
And yes, I used to be at SOTA at this stuff, and make significant $$$ doing so, for major stuff.


Fwiw..
The connotations, permutations, and complications of doing this type of stuff commercially, well, are mind-boggling.
There are several thousands of combos of ms networking making this type if thing work/not work well/not well, for many, many, many reasons.

Lately, Microsoft switched, in their arrogant style, the default ms-net aka network neighbourhood aka ms lan to name-signin to nw encryption- required on MS server 2012.
Of course this was not documented or commented.
Of course many older stacks of Win 7 / Win XP wont cannot support this.

Took 4 tries at 3-8 hours each, and 3 months, to find root cause.
 
Last edited:
Hi TurboGuy,

I don't have experience with Haas controls but it appears they operate very much like Fanuc controls in this regard. Here is what I do on Fanuc controls:

At beginning of program:
#3001=0 (Reset millisecond timer to zero - the millisecond timer will run continuously throughout the cycle)
#3002=0 (Reset hourly clock to zero - this timer will only run when the cycle start button is on)

NOTE: You don't have to reset the clocks, you could just read the times where they are and do something like this:

#690=#3001 (Store the present time from millisecond clock)

...then at the end of the cycle...
#691=#3001
#692=[#691-#690] (Calculate the total time in milliseconds)

If you reset the millisecond timer to zero at the beginning, then place this where ever you want to record the time to:
#601=#3001 (Save time, in milliseconds, to a non-volatile common variable)
#606=[[#601]/1000]/60 (Convert milliseconds to minutes)

To log the last cycle times, do this:
( NOTE: This macro would be entered BEFORE the most recent cycle time capturing )

( #602 thru #606 are the last 5 cycle times, #606 is most recent )
#1=1
WHILE[#1LT5]DO1
#[601+#1]=#[601+[#1+1]]
#1=#1+1
END1

(The above Macro was taught to me by Bill (angelw).)

If you want to store the average of the last 5 cycle times:
#607=[#602+#603+#604+#605+#606]/5

I also record the time that the machine was running only with the hourly clock (#3002) and store it in a non-volatile common variable:
#616=#3002

Then log the last 5 the same as above.


Then you can look at the stored values on the control in the non-volatile common variables you assigned to store the captured times, and/or have the data output automatically via DPRNT external output commands. The DPRNT command is used to format a line of data to be output. On Fanuc controls, and from what I've read, on Haas controls, it could look like this:

POPEN(Not needed on Haas controls)
DPRNT[******TIMES*FOR*THE*LAST*PART******]
DPRNT[TOTAL*CYCLE*TIME*..............#606]
DPRNT[MACHINING*ONLY*TIME*...........#616]
DPRNT[]
DPRNT[****AVERAGES*FOR*LAST*5*CYCLES*****]
DPRNT[TOTAL*CYCLE*TIME*..............#607]
DPRNT[MACHINING*ONLY*TIME*...........#617]
PCLOS(Not needed on Haas controls)

On Fanuc controls, the default input/output device is set by the I/O CHANNEL setting data (so the data can be sent to a USB Memory Stick or to a Serial Port, etc.). I'm assuming something similar is achieved with a Haas controller.


Regards,

Paul
 
All,

Outputting date/time/cycletime data is very easy on any Haas, as well described above. On the new Haas NGC control (post January 2016) you can easily DPRNT system variable, macro user variable (which includes all probing and tool setting data and is the same on pre-2016 controls) to either RS232 (which is the most reliable) or write to a file on the local drive. That file can then be shared or mapped over the network like any PC. This is nearly identical to how Mazaks, Siemens and P-series Okuma's work. Very handy and simple to setup on a Haas.

To make the data collection process a snap, there's a product that been around for a number of years called CNC Reporter. It will collect, display, and graph all probing and tool setting results, and also has built in time study and machine utilization. Everything's already in Excel and PDF.

Hope that helps.
 








 
Back
Top