How to share signed position of robot to PLC

  • How can I give signed position of robot to PLC because from group output I can only give integers how to give floating values with signed onr

  • Thejesh

    Changed the title of the thread from “How to signed position of robot to PLC” to “How to share signed position of robot to PLC”.
  • I am giving robot position to PLC and saving in PLC array for future use so I need to give signed position value to PLC from group output

  • depends on your communication fieldbus you have on your PLC.

    If you are using PLC just to do this, I rather you use a computer and send your information via socket messaging. Which maybe easier as through plc you need to convert here and there. From float to integer then send across and converts the integer to float. To the Pros out there, do correct me if I’m wrong... or if there’s any simpler method. Cheers

  • err... I don’t have the program, manual on hand nor the computer.


    but the idea is to grab robots current location and send via socket messaging as a string....


    if you have the socket messaging manual I may be able to point out to you.

  • The simplest way to do what you are asking is to turn on a separate, discreet output to indicate that the sign is negative, and the PLC can multiply the value received by -1. Three total, one for X, one for Y and one for Z, if you are only interested in sending pos and not interested in orient.

  • For me it seems easy,


    just create a Background Program, look for six(Example 2-8) Group Outputs and fill the BG Program like this:


    Check if the Registers or GO's are in use in other Programs before start the BG Program.



  • Because he is sending 0.1mm accuracy on the robot position.

    You can do it multiple ways. One way as JMPLBL_NoGO showed, another way:

    Code
       1:   ;
       2:  R[20:X POS OUT]=($SCR_GRP[1].$MCH_POS_X) ;
       3:   ;
       4:  R[30:X POS after coma]=R[20:X POS OUT] MOD 1    ;
       5:  R[20:X POS OUT]=R[20:X POS OUT] - R[30:X POS after coma]    ;
       6:   ;
       7:  GO[3]=R[20:X POS OUT] ;
       8:  GO[4]=R[30:X POS after coma] ;

    Not sure that it's working, I wrote it in notepad. I hope I understand the idea.

  • The simplest way to do what you are asking is to turn on a separate, discreet output to indicate that the sign is negative, and the PLC can multiply the value received by -1. Three total, one for X, one for Y and one for Z, if you are only interested in sending pos and not interested in orient.

    Technically, you do not need to send a sign bit if both sides are speaking the same language.


    Group I/O is a 16-bit signed integer in two's-compliment. Sorry, I cannot remember the endianess of it (I *think* it is Big Endian, I may be wrong). I'm lazy; I usually just see if it is correct, if not , it will need to be flipped, which is usually easier to do on the non-Fanuc side.


    But to your quote Lemster68, yes, sending a sign bit and being limited to 32766 values is the simplest way. At least it is for sure the simplest way five years down the road when you don't remember...

Advertising from our partners