[solved] Mode Status bits, Robot Moving, Jogging... which variables?

  • Hi,


    I've tried searching my 900 page PDF of system variables, but I'm unable to find what I need, and I'm unsure if the data is even in the system variables.


    I need to copy some status bits out to Ethernet/IP so my other system has a picture of what the robot is doing (for diagnostic purposes).


    The bits I need are:


    Robot Is In Motion
    Robot In Teach Mode
    Robot In Auto Mode
    Robot Is Jogging (by operator).


    Are variables that represent these statuses somewhere on the controller?


    Thanks, I'm very new to fanuc when it comes to anything but simple programming.

    Edited once, last by Evan5659 ().

  • AD
  • $MOR_GRP[1].$ROB_MOVE is a boolean variable, indicating that the robot is moving (by program or by jogging).
    Not listed in the manual.


    $MOR_GRP[1].$JOGGED is a boolean variable, indicating that the robot have been jogged since last motion by program.
    It is reset to FALSE on program motion start.
    It does not maintain TRUE state through power restart, and is always FALSE on power up.


    Teach Mode and Auto Mode DOs may be assigned in the system configuration screen.


    Robot is jogging= Robot moving AND Teach Mode
    CORRECTED: Robot is jogging= Robot moving AND Robot Jogged

  • FYI, to anyone who needs do so something similar... Since my code is a 'library' for our end effector, I did not want the end user of my code to forget to set the output bits, so I took this approach instead:


    Code
    2: DO[68:RR_ROBOT_IN_MOTION]=($MOR_GRP[1].$ROB_MOVE) ;
    3: $CR_T1_DO=(DO[69:RR_ROBOT_TEACH_MODE]) ;
    4: $CR_AUTO_DO=(DO[70:RR_ROBOT_AUTO_MODE]) ;
    5: DO[71:RR_ROBOT_JOGGING]=($MOR_GRP[1].$jogged) ; <- This is really "if it has jogged", not if it is currently jogging, but it works for what I need.


    The part about "Robot jogging is teach mode and moving" is not really correct, since running a program in teach mode is possible, but I can do this instead maybe:


    Code
    5: DO[71:RR_ROBOT_JOGGING]=($MOR_GRP[1].$jogged AND $MOR_GRP[1].$ROB_MOVE) ;

    Edited once, last by Evan5659 ().

  • Oh, the bottom of my two code snippets did not work for some reason, so I set flags for each and did an "AND" on those.


    I can't use the assignments directly, since I don't want the end user of my code to have to know they need to set them... so I just used the background task to set the variables.

  • Yes you can in BG Logic. It must be in either an If statement or IO assignment statement using mixed logic. In other words in needs to be in an instruction that has parenthesis just as shown in the post before yours.

  • Does it work in Roboguide? I just tried it in RG, since I'm not close to real robot, but code giving me error "INTP-254 Parameter not found" and when I'm typing code, it displays "Invalid parameter name".

    f1.png


    It works if used in IF statement, but then I can't run this task as BG logic, it gives error "INTP-203,2 Variable type mismatch)


    f2.png

  • Code
    : IF ($MOR_GRP[1].$JOGGED=1),D[2]=(ON);



    The above format works for me in BG logic.


    In your first screenshot looks like you have an extra space typed in. Also note, the '=1' is not part of the parameter name but is part of the code.


    In your second screenshot you are missing the '=1'.

  • You're are correct, thanks. In first example there was some undeletable space. In second I was missing =1. Good point with '=1'. First finish writing system parameter, then insert '=' and select Constant.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now