Posts Tagged ‘Write’

This is a millisecond timing variable

to (Read & Write or R/W)


Variable Number Description


This is a millisecond timing variable, with


the count of one millisecond at a time The


#3001


counting starts from zero when the power is


busbar Machine


turned on, and continues up to 655350


milliseconds, then starts from zero machine bending again It


counts all the time


This is an hour timing variable, with the


count of one hour at a time The counting


starts from zero when the cycle start is first


#3002


pressed, and continues to the 114534612


hours, then starts from zero again Timer is


updated only angle machine when the cycle start lamp is


turned in (in cycle start mode only)


This variable contains the current date, in the


form of year, month, day (format is


#3011


YYYYMMDD) A given date, for example,


December 7, 2005, will be displayed as


20051207


This variable indicates current time, in the


form of hours, minutes, seconds (format


#3012


HHMMSS) A time, for example, 8:36:17


pm, will be displayed in a 24-hour format


as 203617


Timing an Event


An event may be timed us ing ei ther the #3001 or #3002 sys tem vari ables The fol low ing ex –


am ple does not do very much in prac ti cal terms, but it is de signed in such a way that the ex pected


re sult may be cal cu lated


Copyright 2005, Industrial Press Inc, New York, NY – wwwindustrialpresscom


FANUC CNC Custom Macros


192


Chapter 14


Eval u ate the en closed com ments or try at the control to see how the timer works ex actly:


O8017 (TIMING AN EVENT)


(PART –ONE– USING #3001)


#3001 = 0


Reset to zero (start counting from zero)


G91 G01 X-1000 F2000


Duration of this motion is 30 seconds


X1000 F4000


Duration of this motion is 15 seconds


N999 (THIS MUST BE AN EMPTY BLOCK) An empty block to prevent look-ahead !!!


#101 = #3001


Returns calculation of 45632000 (milliseconds)


#102 = #3001/1000


Returns calculation of punching machine 00045632 (seconds)


M00


Temporary stop to check variables


(PART –TWO– USING #3002)


#103 = #3002


Reset to zero (start counting from zero)


G91 G01 X-1000 F2000


Duration of this motion is 30 seconds