Receiving information from PLC

  • I am working on making a Fanuc program work on Kawasaki but i am having difficulty with how to handle the following situation:


    In the Fanuc PG it seemed PLC was writing directly to a register and they were using this register to create an offset.

    Is there a way to do this in Kawasaki? Have PLC write to a variable? Or do i need to create a group input from PLC with bits in a PC program?


    EG: Fanuc Version, Whereas R[101] is the register to which PLC writes.

    Code
    !X ;    
    R[21]=(R[101]*(-1)) ; PR[11,1]=PR[11,1]-R[21]    ;     
    !Y ;    
    R[22]=(R[101]*0) ; PR[11,2]=PR[11,2]-R[22]    ; 
    !Z ;   
    R[23]=(R[101]*0) ; PR[11,3]=PR[11,3]-R[23]    ;   
     ;  
    UTOOL[1]=PR[11] ;


    EG: Kawasaki version,

    I keep getting variable undefined (Obviously they aren't defined but I can define them in the terminal to get it to run).

    How will PLC write to "HDAWEAR"?

    Code
     ;  X ;  
    XOFFSET = HDAWEAR * (-1)  POINT/X UTOOL1 = XOFFSET - UTOOL1  ; 
     ;  Y ;  
    YOFFSET = HDAWEAR * (0)  POINT/Y UTOOL1 = YOFFSET - UTOOL1  ; 
     ;  Z ;  
    ZOFFSET = HDAWEAR * (0)  POINT/Z UTOOL1 = ZOFFSET - UTOOL1  ;



    Regards,

    Josh

  • You would be better contacting Kawasaki directly for a conclusive answer.

    But you will need to stipulate just how your PLC is connected to the controller, you fail to mention this.


    If using CC Link, then you have word registers available and I think also if using Control Net.

    If not using CC Link, then as far as I know, there is no functionality available to directly write to real variables.


    Only way to achieve it is by way of BITS command.

    Read in value of PLC IO bit pattern (integer) and define the real variable with the value.

    This command is explained in the AS Manual.

Advertising from our partners