- How to get local variables to reset to null like fanuc does
-
Member
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:
-
-
Member
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.
- How to get local variables to reset to null like fanuc does
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
-
Forum Rules