585,660 active members*
3,368 visitors online*
Register for free
Login
Results 1 to 16 of 16
  1. #1
    Join Date
    Feb 2007
    Posts
    67

    Issue with macro variable #3002

    Good day folks,

    I've exhausted all my search options and found nothing that address my specific issue.

    I have a 35i milling control. I am trying to use the #3002 hour timer to extract cutting times. From what I've read, I reset #3002 to zero before the start of my cutting path. At the end, set another non-volatile variable to the value of #3002. I'm expecting this value to be expressed in some expected format. I don't actually know what I'm getting.

    At around the 15 minute mark after I've reset the #3002 variable to zero, the elapsed time (by setting another NV variable to #3002's value) is reading a value of .00099111111. I can't even imagine what this is telling me. I thought it was supposed to be expressed as hours in a decimal format...say 15 minutes would be .25. Obviously this isn't the case. I'm not a newby as far as macro programming, but this has me baffled.

    Can anybody fill me in on what I'm seeing and what to do with it?

    Many thanks!

  2. #2
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    #3002 is a read/write variable.
    Its value is preserved even after a power cycle.
    It measure ON time of CYCLE START lamp in 1-hr increment.

  3. #3
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    Have you tried using something like this:

    #500=[#3002*60]

  4. #4
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    It would give 60, 120, 180 etc.

  5. #5
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    sinha_nsit,
    No disrespect intended but we do this all the time. Is something different with the 35i control?

  6. #6
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    I do not think it is control dependent. Same behaviour is expected.

    The manual says "1-hr increment". Without checking, I just assumed that fractional time is not stored.
    Thank you for useful information.
    So, for 15 minutes, #500 stores 15?

  7. #7
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    Quote Originally Posted by sinha_nsit View Post
    I do not think it is control dependent. Same behaviour is expected.

    The manual says "1-hr increment". Without checking, I just assumed that fractional time is not stored.
    Thank you for useful information.
    So, for 15 minutes, #500 stores 15?
    For 15 minutes #500=.25

  8. #8
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    I have a doubt.
    When the time is in hour, and you multiply it by 60, it should be in minutes.
    How to explain 0.25 for 15 minutes?

  9. #9
    Join Date
    Feb 2007
    Posts
    67

    Re: Issue with macro variable #3002

    .25 hour = 15min.

    Thank you all for your posts. I have decided to use a millisecond timer instead since it is giving me output that I expect.

    Obviously you may all continue this discussion if you believe it is productive.

  10. #10
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    Quote Originally Posted by Hardym1 View Post
    For 15 minutes #500=.25
    It should be 0.25 WITHOUT multiplying by 60. Please check and confirm. I am relying on what is written in Fanuc manual. But, mistakes can be there.

  11. #11
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    Quote Originally Posted by sinha_nsit View Post
    It should be 0.25 WITHOUT multiplying by 60. Please check and confirm. I am relying on what is written in Fanuc manual. But, mistakes can be there.
    There are 60 minutes in 1 hour which means that if you run your machine for 60 minutes then #500 would equal 1 (for 1hr), but anything less than 60 minutes is now equivalent to 1/3600 (the 3600 is the # of seconds in 1 hr.). So if you run your machine for 6 minutes #3002 will equal .0002777778 x 6 (.0016666668). You then have to multiply that by 60 to get the portion of the hour the machine was running. In this case #500 would equal .1 (.0016666668 x 60), if you run your machine for 15 minutes then #3002 equals .0002777778 x 15 (.004166667). Multiply that by 60 and #500 would equal .25 (.004166667 x 60).

  12. #12
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    What you are saying is correct with regard to #3002.
    But, #500 is not same as #3002.
    You have defined #500 as #3000 x 60

  13. #13
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    Quote Originally Posted by sinha_nsit View Post
    What you are saying is correct with regard to #3002.
    But, #500 is not same as #3002.
    You have defined #500 as #3000 x 60
    Your right, #3002 is not the same as #500. #3002 is a system variable (you can not see this). #500 is the common variable where we store the data so we can see it.

  14. #14
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    Because #500 is #3002 multiplied by 60, what you are saying about the value stored in #500 is not correct.

  15. #15
    Join Date
    Feb 2013
    Posts
    21

    Re: Issue with macro variable #3002

    Quote Originally Posted by sinha_nsit View Post
    Because #500 is #3002 multiplied by 60, what you are saying about the value stored in #500 is not correct.
    This is now becoming unproductive. I do this everyday on my machines as does every other machinist that works here, I don't just read it in a manual.

  16. #16
    Join Date
    Feb 2006
    Posts
    1792

    Re: Issue with macro variable #3002

    Somehow I am not able to convey to you what I have in my mind.
    Never mind. Let us stop this unproductive discussion.

Similar Threads

  1. Accessing Macro Variable from another macro
    By ex-egll in forum Mach Wizards, Macros, & Addons
    Replies: 1
    Last Post: 02-01-2014, 06:52 AM
  2. Macro b variable order
    By Diggitdude in forum Parametric Programing
    Replies: 4
    Last Post: 01-13-2014, 06:02 AM
  3. Macro Variable #500
    By DruMor in forum Haas Mills
    Replies: 1
    Last Post: 11-28-2013, 03:50 PM
  4. Macro/Variable Programing
    By chadr03 in forum WinCnc
    Replies: 1
    Last Post: 02-02-2011, 02:00 PM
  5. macro error 3002
    By Dinger89 in forum Fanuc
    Replies: 6
    Last Post: 01-21-2010, 12:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •