How to get local variables to reset to null like fanuc does


Results 1 to 2 of 2

Thread: How to get local variables to reset to null like fanuc does

  1. #1
    Member
    Join Date
    Aug 2017
    Location
    United States
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default How to get local variables to reset to null like fanuc does

    Hi all,

    I'm pretty familiar with programming macros for fanuc, getting more familiar with fagor macro programming, but I do have one issue, is there a way to get the local variables to reset to null, it just seems very dangerous to me for those to stay persistent, it makes it so I can't tell if those numbers were just entered, and there for I can use them, or if they were left there from some previous run.

    Thanks

    Examples

    I have a test program for G503

    this is all it does right now

    P101 = P3
    P102 = P11
    P103 = P5
    P104 = P19

    but right now there is no way for me to tell if you have entered any of the following

    G503
    G503 D3
    G503 D3 T2
    G503 L4
    G503 P1 T2 D2 L4

    As of right now, I don't see a way to know what was actually ran, and I wan't my macro to behave differently based on what variables are entered, or if no variables are entered, and I definitely do not want it to use what is currently in say p11 if there was no L specified.

    Similar Threads:


  2. #2
    Member
    Join Date
    Aug 2017
    Location
    United States
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: How to get local variables to reset to null like fanuc does

    I have figured it out.
    Looking at the G501 HSC mode subroutine that is supplied by Fagor, I saw that it also has optional values that you can put in, so I looked at that to see how they do it.

    V.C.PCALLP_{OPTIONAL PARAMETER} = 1 if you supplied a parameter, = 0 if you didn't

    if you put that in the call out, it will run what follows, if not it will go to the next step.




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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

How to get local variables to reset to null like fanuc does

How to get local variables to reset to null like fanuc does