KUKA KRC2, DeviceNet setup not working

  • Hello people of the world,


    I am working on a automatisation that is stacking metal tubes in a pallet with wooden walls.


    The program is setup parametric. So the tube diameter and the tube length has to be send by a PLC(Unitronics) before the program can be executed.


    The PLC sends the two parameters(Uint16) over Modbus-TCP to a converter(Anybus). The PLC sends this data to the IP-adress of the Anybus, this works, i can read this out with MODBUS-viewer.


    Then the Anybus converts the signals to DeviceNet and the robot(Master) can read it out(in theory that is).





    I have read a lot of forums where the setup of DeviceNet has been discussed and have set my system up accordingly. So the following setups have been made, also see the appendixes(you can see here some digital in and output, these are working).


    Devnet:
    - Macid=1 (Adress of the Anybus)


    Iosys:
    - ANIN1=1,0,16,2
    - ANIN2=1,2,16,2


    ;I have also tried:
    ;ANIN1=1,0,16,3
    ;ANIN2=1,2,16,3
    ;and
    ;INW0=1,0,x1
    ;INW1=1,2,x1


    Config.DAT:
    SIGNAL i_buisdiameter $ANIN[1]
    SIGNAL i_buislengte $ANIN[2]


    ;I have also tried, with ANIN and INW:
    ;SIGNAL i_buisdiameter $IN[1] TO $IN[16]
    ;SIGNAL i_buislengte $IN[17] TO $IN[32]


    Then i look what has been send using the variablesoverview. I have declared i_buisdiameter, i_buislengte, $ANIN[1] and $ANIN[2].


    The data remains 0.


    Once, a week ago, i got data through but this was from -1 to 1. I wanted to change it using calculation to a number that was entered in the PLC, for example 1200. This didn't work and then i tried to change it back, but can't get it working again.



    I feel like i don't really understand how to declare the signals. Could somebody please tell what the right setup should be and where it could be going wrong.


    Help would be appreciated, then i can truely celebrate Christmas :dance2:

  • [size=1em]analog I/O externally can be whatever (0..10V, 1-5V, 0..20mA, 4..20mA, -10..+10V, ...)
    but internally their values are always 0..1 (representing 0-100%).


    if you put this value into an integer (or anything but REAL), you will always have 0 (or maybe 1, once in a blue moon).


    this could work:
    [/size]

    Quote

    [size=1em]Devnet:
    Macid=1 (Address of the Anybus)


    Iosys:
    ANIN1=1,0,16,2
    ANIN2=1,2,16,2[/size]

    [size=1em]



    this cannot work since you already have mapped IO from DeviceNet node5 to same range:
    [/size]

    Quote

    [size=1em]
    ;INW0=1,0,x1 ; inputs 1-16
    ;INW1=1,2,x1 ; inputs 17-32
    [/size]

    [size=1em]


    If you want to do something like that, try:


    in IOSYS
    [/size]


    [size=1em]and in $config.dat:[/size]

    Quote

    [size=1em]SIGNAL i_buisdiameter $IN[49] TO $IN[64][/size]
    [size=1em]SIGNAL i_buislengte $IN[65] TO $IN[80][/size]

Advertising from our partners