Help with setting up IO's on DeviceNet.

  • Hi Guys,


    My setup is as follows: I have a rockwell devicenet slave (1794-ADN) connected to a 32 bit input module (1794-IB32) and 32 bit output module (1794-OB32P). This is all connected to our KRC2 kuka robot controller. The slave's MAC address is 3. I have enabled the devicenet in the IOSYS.INI file and all the lights on the slave unit are green. I have also setup the IOs as follows:


    [DEVNET]


    INW3=3,0,X1
    OUTW3=3,0,X1


    The problem I am facing is that when I monitor the outputs and force one of them on, they work perfectly and are correctly addressed. But when I monitor the inputs I can't see anything. All that happens is that inputs 25 to 37 are on but nothing is physically on externally. I have also written a counter in the PLC, which I can see updating on the slave unit, but no updates on the robot.


    Any help would be appreciated ty. :help: :wallbash:

  • no your outputs are not working either (at least not all of them). scroll to the bottom of the iosys.ini for more info...




    you need to understand to which robot I/O you are mapping the hardware I/O.
    INB... and OUTB... are mapping in bytes (8-bit)
    INW... and OUTW... are mapping in words (16-bit)
    IND... and OUTD... are mapping in doublewords (32-bit)


    since you use INW/OUTW then you get following:
    INW0 is $IN[1-16]
    INW1 is $IN[17-32]
    INW2 is $IN[33-48]
    INW3 is $IN[49-64]
    INW4 is $IN[65-...]
    etc.



    so when you say you are monitoring inputs 25-37, you are looking at wrong inputs. you should be looking at inputs 49-64.


    that was only part of the problem.
    the other issue is that you are using 32-point I/O cards but you only map 16points to robot (because your maps end with "x1" which is "one time mapping size" and INW is 16-bit).


    if you want to get all 32inputs mapped, you need to use two 16-bit words like this:


    INW3=3,0,X1 ; this is first 16 points
    INW4=3,2,X1 ; this is next 16 points, note we needed to add 2byte offset to skip the first 16 points which are mapped in previous line



    or.... you can do it in one line:
    INW3=3,0,X2 ; map 2x 16-points to robot inputs starting with $in[49]



    or... if you use bytes:
    [DEVNET]
    INB6 = 3,0,x4 ; read data from devicenet node3, offset 0, quantity 4 bytes and map it to robot inputs starting with $in[49]
    OUTB6 = 3,0,x4 ; write data to devicenet node3, offset 0, quantity 4 bytes and map it to robot outputs starting with $out[49]

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Advertising from our partners