Access to the position register comments/names

  • Hi

    I need access to the PR[ ] names. It's got to be a variable that holds it or at least one variable that when I specify an integer (lets say 13) gives me all the info regarding PR[13]

    I can not use Karel.


    I would like to do it using explicit messaging . I could load the name into a SR[ ] and read the SR using explicit message

    I know there is software out there grabbing the info an putting it on an excel sheet, etc,etc. I can not do that. I need to give that information to a PLC.

    I'm trying to understand the variable $SNPX_PARAM. That suppose to help me but I can not make it work.

    I need to use in a TP program . Something like SR[1] = $snpx_PARAM_var_name

    Retired but still helping

  • I tried a bunch of combinations for $SNPX_ASG[XX].$VAR_NAME and I could not get it to read the comments for the PR's by looking at variables. I tried setting a SR to the string PR[C3] and then referencing that in another $SNPX var and it wouldn't work. I could get the HMI to read and write PR[3] - PR[7] comments by setting the $SNPX_ASG[18].$VAR_NAME to PR[C3] and the size to 200. You could set a register to the PR you want to adjust, set SR[1] to the text you want to set it to, and then have the HMI look at the number and set the proper variable to the desired text from SR[1]. This is assuming you have an HMI.

  • You can view the comment (name) for PR[3] in a HMI using SNPX by setting the var name to PR[C3]. This is like setting it to SR[1] for a string register or R[1] for a numerical register. The C tells SNPX to look at the comment instead of the actual PR data. The HMI option manual shows this on page 24.

  • Hi

    I'm still in the same situation

    I have

    $SNPX_ASG[1]

    $Address 101............................I'm guessing 101

    $Size 50.......................................50 is the length

    $VAR_NAME 'PR[C3]'.................Is this means that I'm reading the comment of PR[3]. Actually on page 24 there is no mention of C3, only C1 and C2

    MULTIPLY 1.00............................default


    What do I do now ?

    The manual at any point tells you how to write/pass values to lets say SR[1] . I need to write this on background logic on a TP program.

    Once I load the SR with the PR comment, i could read the SR using explicit messaing

    Retired but still helping

  • Yes, C3 is for reading the PR[3] comment. I only have experience with reading/writing to GE Quickpanel+ HMI's using the Fanuc HMI option. The HMI variable would reference the address 101 to read the comment. I use the GE Ethernet OPC driver for the Quickpanel+ HMI to read strings from the robot. Not sure about explicit message. You could set up an array in the HMI to read all of the PR comments and read the desired comment in the HMI.

  • so finally I got an answer


    To read the comment from a PR I need to use Karel. The command is GET_PREG_CMT


    Purpose: To retrieve the comment information of a KAREL position register based on a given register number.


    Syntax: GET_PREG_CMT (register_no, comment_string, status)

    Input/Output Parameters:

    [in] register_no: INTEGER

    [out] comment_string: STRING

    [out] status: INTEGER

    %ENVIORNMENT group: REGOPE


    I want to read position register 5 and putting it on string register 1 and I guess writing the string value to SR[1] using


    SET_SREG_CMT(register_no, comment, status)


    but i'm lost I tried a million things and I always get an error

    Retired but still helping

  • What kind of error? Also does it fail at GET_PREG_CMT or SET_SREG_CMT?


    I am using GET_PREG_CMT like this to ensure my PR's are named:

Advertising from our partners