Hello Please help me on this RS232 issue

  • Hello everyone
    I'm currently having a problem with this code for Fanuc robot ( image attached below ).
    My boss want me to find out what is the meaning of the highlighted lines
    7: R[270]=R[270]+1 ;
    8: R[295]=R[270]-150 ;
    and whether can it be changed, he said that "R" word ( like R[270] ) related to some kind of memory in the controller but it's still a bit vague for me and I really want to find out.
    He also said it's related to "system variables", is this true ?
    My main purpose : find out what it is, make some changes on my PC and then transfer it to robot through serial port RS232.
    Any reply will be much appreciated. If i didn't make it clear enough, please let me know.
    Thank you for reading this. :dance2:

  • Thank you for answering me :grinning_face_with_smiling_eyes:
    I'm planning to change this variable directly using my computer ( not through Roboguide ) which connect to Fanuc robot through RS232 port. Do you have any idea how to do it ? :icon_wink:

  • You can change it directly on the teach pendant of the robot, it will be an easiest in my opinion.
    If the Registers are password protected you will need to login at the required level, if there are not you can skip the login.


    You can press DATA on the teach pendant, select TYPE and then REGISTERS. Then change the R[270] and R[295] as required.


    They are not directly related to system variables but they are global values which may be used throughout programs.
    Just keep in mind that they may be written to in other programs so if changing the value on the pendant doesn't give you what you need then you will need to find the source of where they are being written to in the robot.
    For example the register value might be defined in the robots startup program.

  • Thank you for your reply, it's really help me understand what this it's about.
    But my boss want to change those value through RS 232 port with a PC ( kinda like a new project ). If you know any info or document which may help, please tell me. Thanks in advance :grinning_face_with_smiling_eyes:

  • You will need to either use Roboguide or have the ASCII upload option installed. From there, take the .ls file that you already have, make the changes and save it. Then use Kfloppy to send the .ls file to the robot. If you do not have ASCII upload you will need Roboguide to compile the .ls source to the .tp binary file which is loadable.


    It really would be easier to just change it on the teach pendant.


    What are you trying to accomplish? R[270] is being used as the indirect position register that the robot is moving to.


    Do you know what indirect addressing is?
    Do you know what a register is?
    Do you know what a position register is?


    If you answered no to ANY of these questions, you need to do a lot of studying before you make these changes.

  • Thank you for paying attention.
    Your questions above really made the problem become more clearly for me.
    I think it's time to do some deep research and convince my boss about this issue :grinning_squinting_face:
    Thanks again :grinning_face_with_smiling_eyes:

Advertising from our partners