518,300 active members
2,959 visitors online
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fagor Automation > How to get local variables to reset to null like fanuc does
Results 1 to 2 of 2
  1. #1
    Registered
    Join Date
    Aug 2017
    Posts
    3

    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.

  2. #2
    Registered
    Join Date
    Aug 2017
    Posts
    3

    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.

Similar Threads

  1. please, help with local variables
    By deadlykitten in forum Okuma
    Replies: 28
    Last Post: 11-25-2019, 08:24 PM
  2. Local variables
    By underthetire in forum Haas Mills
    Replies: 3
    Last Post: 07-02-2012, 09:36 PM
  3. Local Variables?
    By TURNER in forum NCPlot G-Code editor / backplotter
    Replies: 2
    Last Post: 03-03-2008, 01:25 PM
  4. Local variables
    By jorgehrr in forum G-Code Programing
    Replies: 4
    Last Post: 02-19-2007, 10:03 PM
  5. G65 local variables help
    By FanukRC in forum G-Code Programing
    Replies: 7
    Last Post: 07-26-2006, 12:00 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
  •