586,103 active members*
2,767 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Question about Custom Macro AGAIN!!!!!
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    10

    Question about Custom Macro AGAIN!!!!!

    I have this Custom Macro Program in my

    Miyano TSV-21 Controll Fanuc 0M-A

    O9003
    N50
    N100 G65 H81 P800 Q#1000 R1;
    N150 G65 H81 P800 Q#1004 R1;
    N200 G91 G28 Z0 M89;
    N225 G49;
    N250 G65 H82 P250 Q#1001 R1;
    N300 M80;
    N350 G65 H82 P350 Q#1006 R1;
    N400 G30 Z0;
    N450 G65 H82 P450 Q#1003 R1;
    N500 M82;
    N550 G65 H82 P550 Q#1004 R1;
    N600 G28 Z0;
    N650 G65 H82 P650 Q#1002 R1;
    N700 M81;
    N750 G65 H82 P750 Q#1005 R1;
    N800 M99;

    As we know this is Custom Macro A.

    First Question :

    I just wanna know that where can I find the variable "#1000-#1006" in the program which are Input interface variable.

    Where can I found in the controller? If they located in Diagnostic, please inform me the no. I want to check the status of them.

    Last Question :

    "N750 G65 H82 P750 Q#1005 R1;"

    This line shows us that if #1005 is not equal to 1 jump to N750.
    If #1005=2 ,this will loop only in this line. Am I right?

    Thank again for all people that both help and have kindness for me.

    Best Regards,

  2. #2
    Join Date
    Feb 2006
    Posts
    1792
    I have never used macro A, but based on my experience with macro B, I would suggest to store the values of desired system variables in some local/common variables for reading these on macro-variable screen.

    Sinha

  3. #3
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by ixoxi999 View Post

    As we know this is Custom Macro A.

    First Question :

    I just wanna know that where can I find the variable "#1000-#1006" in the program which are Input interface variable.

    Where can I found in the controller? If they located in Diagnostic, please inform me the no. I want to check the status of them.
    If you set bit 5 of parameter 0011 to 1, every macro statement can be executed in single block mode. This will allow you to step through the program and be able to check the value of the macro variables, prior to and after the execution of the macro statement.

    As Sinha stated, store the value of the system variable in a local or common variable, one that's not being used elsewhere, for example #1, and you will be able to see the value of the system variable by observing variable #1 you've used to store its value.

    Place the following Macro statement before the Macro statement containing the system variable you're interested in.

    G65 H01 P#1 Q#1000
    N100 G65 H81 P800 Q#1000 R1;

    Quote Originally Posted by ixoxi999 View Post
    "N750 G65 H82 P750 Q#1005 R1;"

    This line shows us that if #1005 is not equal to 1 jump to N750.
    If #1005=2 ,this will loop only in this line. Am I right?
    Yes, that's correct.

    Regards,

    Bill

  4. #4
    Join Date
    Oct 2007
    Posts
    6
    The G65 stores values of letters:
    A=#1
    B=#2
    C=#3

    So Q#1000 is stored in #17

    Try to find Nc Plot by Scott Martinez, very helpful reading.

  5. #5
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by stoffomatic View Post
    The G65 stores values of letters:
    A=#1
    B=#2
    C=#3

    So Q#1000 is stored in #17

    Try to find Nc Plot by Scott Martinez, very helpful reading.
    When passing a value as an argument with G65 in User Macro B, the "#" character does not necessarily have to be used. The format can be:
    G65 P__ Q1000
    where:
    P = the Macro Program Number

    In the Macro program, the local variable #17 would be assigned the value 1000, or if #1000 is used in conjunction with the address Q, the value of #1000 is passed to #17 in the Macro. #17 will retain its value locally though.

    The example in Post #3 is User Macro A. User Macro A does not have Local variables, only Common variables; accordingly, the variables are not passed as argumnets. In user Macro A, the G65 indicates a Macro statement and the H specifies the Macro function.
    Regards,

    Bill

Similar Threads

  1. Fanuc custom Macro Question????
    By ixoxi999 in forum Fanuc
    Replies: 9
    Last Post: 12-08-2011, 11:31 AM
  2. "difference between Custom Macro A and Custom Macro B"
    By arulthambi in forum Parametric Programing
    Replies: 4
    Last Post: 10-05-2009, 09:34 PM
  3. custom macro question
    By sinha_nsit in forum G-Code Programing
    Replies: 28
    Last Post: 04-18-2009, 12:44 PM
  4. custom macro
    By The Metal in forum Daewoo/Doosan
    Replies: 2
    Last Post: 09-28-2006, 01:26 PM

Posting Permissions

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