Understanding of numbers in IOSYS.INI

  • Hello.
    Please help me to understand numbers in 'IOSYS.INI'.
    Would you tell me what these underlined-numbers mean?
    And any additional tips regarding 'IOSYS.INI' will be appreciated.
    Thanks.


    ----------------------------------------------------------------------------------
    [DRIVERS]
    ;CNKE2=21,cnke2CPInit,cnke2drv.o
    ;DNSC6=20,dnsc6Init,dnsc6drv.o
    ....
    ....
    ....
    ;PBMASL=11,pbmsInit,pfbmsdrv.o
    DEVNET=2,dnInit,dn2drv.o
    ;INTERBUS=1,ibusInit,ibusdrv.o
    ;MFC=0,mfcEntry,mfcdrv.o


    [INTERBUS]
    ;------- Inputs ---------
    ;Slave Inputs
    INW50=896 ;$IN[401-416]
    INW52=898 ;$IN[417-432]
    INW54=900 ;$IN[433-448]
    ;------- Outputs --------
    ;Slave Outputs
    OUTW50=896 ;$OUT[401-416]
    OUTW52=898 ;$OUT[417-432]
    OUTW54=900 ;$OUT[433-448]
    OUTW56=902 ;$OUT[449-464]



    [DEVNET]


    INW60=1,0,x7
    OUTW60=1,0,x7


    ----------------------------------------------------------------------

  • AD
  • Read rest of the file.... there are comments at the bottom.



    Krc arrays start with 1 so inputs are 1..1024 or 1..4096 for example.
    SmalleSt block of data that can be mapped is byte (INB and OUTB) but you can also use larger units like words (INW or OUTW).
    Bytes are groups of 8bit, words are groups of 16bits.



    When you say INB0 that means first 8 inputs (1-8).
    INB1 is next byte or inputs 9-16. Etc.
    It works the same way for words but you are grouping io in blocks of 16.





    Each field bus needs a driver. To use devicenet you need to activate device net driver (remove semicolon) and do IO mapping.
    To make things simpler (less typing), each driver is also given index number. When mapping you need to use that index number.



    INB2=2,0,x7



    Above means we are mapping io to inputs;
    Starting with byte 2 (means inputs 17 and up )
    Driver which is updating those inputs us driver 2 ( devicenet).
    We are starting to read from byte 0 from that driver.
    We are transferring 7 units (bytes in this case) from data transferred by that driver (devicenet).



    7 bytes is 7x8bit= 56 bit.
    So inputs mapped in this case are inputs 17... 72

    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

  • Thank Panic mode very much for your kind and clear reply.


    Would you help me with few following questions?


    1.
    INW50=896 ;$IN[401-416]


    ';$IN[401-416]' is just a kind of note to figure out assigned bits easily?



    2.
    [DRIVERS]
    ....
    DEVNET=2,dnInit,dn2drv.o


    [DEVNET]


    INW60=1,0,x7
    OUTW60=1,0,x7


    As you explained, if underlined '1' means bold '2', maybe our robot has I/O problem I think because They don't matcth. But I/O works.


    Doesn't Underlined '1' means MacID?



    3. Could you kindly explain difference between A) and B)?


    A)
    INW60=1,0,x7


    B)
    INW60 = 1, 0, x1
    INW60 = 1, 2, x1
    INW60 = 1, 4, x1
    INW60 = 1, 6, x1
    INW60 = 1, 8, x1
    INW60 = 1, 10, x1
    INW60 = 1, 12, x1



    Thank you for your time and help in advance.

  • [size=1em]1. everything after semicolon is just a comment and can be ignored, it is added for clarity for humans (robot does not care about it).[/size]


    [size=1em]2. yes, "2" is driver number in "DEVNET=2,dnInit,dn2drv.o"[/size]


    [size=1em]Sorry, i did misspoke (it's been a while since i saw KRC2). another reason to use own judgement and read carefully... :-)[/size]



    [size=1em]number after equal sign in mapping section is not a driver number (this is already known since mapping must be in correct SECTION such as [DEVNET]).[/size]
    [size=1em]that number is a node address (macid) of device we are reading/writing to/from[/size]


    [size=1em]3. A is ok, B is not (overlapping - you are mapping seven times something to same IO range: INW60). but this would be equivalent:[/size]


    A)
    INW60=1,0,x7


    B)
    INW60 = 1, 0, x1
    INW61 = 1, 2, x1
    INW62 = 1, 4, x1
    INW63 = 1, 6, x1
    INW64 = 1, 8, x1
    INW65 = 1, 10, x1
    INW66 = 1, 12, x1



    Note, mapping in words is not popular because when mapping is fractional, some IO will be locked. and using larger chunks of data means locking more i/o.



    for example, if you have IO card that has four inputs.
    A)
    INB0=1,0,x1 ; inputs 1-4 are used but inputs 5-8 are wasted and no longer usable



    B)
    INW0=1,0,x1; inputs 1-4 are used but inputs 5-16 are wasted and no longer usable



    On KRC4 one gets larger I/O address space and much finer granularity (one can map bit by bit if needed).

    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

    Edited once, last by panic mode ().

  • Hi everyone,


    I know it is an old post but I prefer reply here to stay in the same topic.
    I read a lot the forum this past few days, and I think PanicMode has the answer and the best informations about are here.
    Tell me if I am wrong and I will post somewhere else.


    I am also trying to find out how the IOSYS.INI works...
    We have 2 arms (KRC1 from Renault Plant) and they seem to work with Interbus for the API.
    We do not have the possibility to work with.
    So I am trying to remap with a LUTZE PLC (digital IN/OUT) we already have


    Anyway, the wiring is almost ready, I do not want to make a mistake in the IOSYS.INI...
    I found a wierd information on my IOSYS.INI:
    //////////ORIGINAL /////////////////////////////////////////////////////////////
    [INTERBUS]
    ;***********************
    ;MAITRE
    ;***********************
    ;******************************
    ; ESCLAVE
    ;******************************
    ;------------------------
    ;ENTREES
    ;------------------------
    INW20=896 ; de 161-176 pour premier mot API
    INW22=898 ; de 177-192 pour deuxieme mot API
    INW24=900 ; de 193-208 pour le troisieme mot API
    INW26=902 ; de 209-224 pour l quatrieme mot API
    ;------------------------
    ;Sorties
    ;------------------------
    OUTW20=896 ; de 161-176 pour premier mot API
    OUTW22=898 ; de 177-192 pour deuxieme mot API
    OUTW24=900 ; de 193-208 pour le troisieme mot API
    OUTW26=902 ; de 209-224 pour l quatrieme mot API
    /////////////////////////////////////////////////////////////


    First thing odd: how is it possible to "go" from 161 to 176 with the INW20 ?
    if I do the maths, I found INW20 to go from 340 to 356
    what is wrong with me?


    assuming my maths are wrong :uglyhammer2:
    if I want to re-map those into a DEVNET, should I write?:
    /////MY NEW IOSYS.INI /////////////////////////////////////////////////////////////
    [DEVNET]
    INW20=5,0,x1 ; de 161-176 pour premier mot API
    INW22=5,1,x1 ; de 177-192 pour deuxieme mot API
    INW24=5,2,x1 ; de 193-208 pour le troisieme mot API


    and so on???
    ////////////////


    thank you for your return
    We are working (for hobby purpose as soon as we can) on those arms for almost 2 years now, I would really like to see them move :party2:

  • I am correcting myself... :gibbo:


    I just find out something.
    Either we have INB or INW, the address (the number) is always in bytes
    so, when I saw INW20 .... from 161 to 176 it is OK in bytes!
    it is the same address if you write INB20 or INW20, the starting point is the same.


    Am I right guys?


    also, I made a mistake in my maths, I finally make a spreadsheet :pfeif:


    Please, could you still confirm the parameters after the "INW20" ?
    /////MY NEW IOSYS.INI /////////////////////////////////////////////////////////////
    [DEVNET]
    INW20=5,0,x1 ; de 161-176 pour premier mot API
    INW22=5,1,x1 ; de 177-192 pour deuxieme mot API
    INW24=5,2,x1 ; de 193-208 pour le troisieme mot API


    and so on???
    ////////////////


    thank you for your return

  • B = byte (8-bits), therefore I/O are assigned in groups of 8INB0 corresponds to $IN[1..8]
    INB1 corresponds to $IN[9..16]
    INB2 corresponds to $IN[17..24]
    etc.



    W = word (16-bits), therefore I/O are assigned in groups of 16
    INW0 corresponds to $IN[1..16]
    INW1 corresponds to $IN[17..32]
    INW2 corresponds to $IN[33..48]
    etc.



    D = double word (32-bit), I/O are assigned in groups of 32
    IND0 corresponds to $IN[1..32]
    IND1 corresponds to $IN[33..64]
    IND2 corresponds to $IN[65..96]
    etc.

    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

    Edited once, last by SkyeFire ().

  • So am I wrong again?
    :uglyhammer2:


    How do you explain the initial file saying:
    "INW20=896 ; de 161-176 pour premier mot API "
    ?
    If I follow "your rule":
    INW means word
    so INW20 means 321 - 336


    but the original file, from the plant said: from 161 to 176...


    please help! :hmmm:

  • [size=2]ok, i rarely get to see KRC2 and i don't see why anyone sane would use units larger than necessary (word, doubleword) and i explained why but... your persistence made me curious. as always, it does not matter what i think, ultimately, robot need to be ok with it.


    but i just saw an old archive with IOSYS.INI inside so i read its content (sort of against my will, but curiosity is a dangerous thing :icon_wink: ). to be honest, i expected that my previous post would be correct because this is what i was told but, i never tried it... so it was worth taking another look...



    ... and it looks like numeric suffix following INB,INW,IND,OUTB etc is a byte offset (how many input bytes to skip in robot I/Os)so it would be something like:[/size]


    [size=2]INB0 = inputs 1-8 (skip 0 bytes)[/size]
    [size=2]INB1 = inputs 9-16 (skip 1 byte)[/size]
    [size=2]INB2 = inputs 17-24 (skip 2 bytes)[/size]
    [size=2]etc.[/size]


    [size=2]so no surprised there, but... it looks like:


    INW0 = inputs 1-16 (skip 0 bytes, map 16 inputs)[/size]
    [size=2]INW1 = inputs 9-24 (skip 1 byte, map 16 inputs)[/size]
    [size=2]INW2 = inputs 17-32 (skip 2 byte, map 16 inputs)[/size]
    [size=2]INW3 = inputs 25-40[/size]
    [size=2]INW4 = inputs 33-48[/size]


    [size=2]and [/size]
    [size=2]IND0 = inputs 1-32 (skip 0 bytes, map 32 inputs)[/size]
    [size=2]IND1 = inputs 9-40 (skip 1 byte, map 32 inputs)[/size]
    [size=2]IND2 = inputs 17-48 (skip 2 bytes...)[/size]
    [size=2]etc.[/size]

    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

    Edited once, last by panic mode ().


  • Anything after a ";" is simply a comment, for the user. It has no effect on the actual configuration. So, whomever wrote those comments was incorrect.

  • Ok


    I understand, it seems quite ok to keep INWx from the file. After the ";" the guys before should have made mistakes. I will just verify into the robot interface after starting.
    I will test and keep you posted.
    I should be able to do that this week-end...


    Thanks a lot ! :top:

  • Hi Panic,

    it is IND for double word or INDW?

  • INDW.


    Your IOSYS.INI file should have a very large comment section at the end that explains all the numerology in painful detail. But some earlier KSS versions didn't have it, so:

  • Dear SkyeFire,


    I am a beginner in profibus devices and i don't understand everything clear.


    We have a system like this:

    ;[PBMASL] ProfiBus Siemens Master/Slave CP5614

    ; Entries in form 2

    ; {address} = Slave DP-address

    ; {address} = 127 ==> Slave part of CP5614


    We will use our robot as a master with a HMI PLC slave whose address is 3. That's clear.

    It's clear moreover i have to use form 2.


    Form 2:

    ; {token}{offset}={address},{byte}[,{multip}]

    ;

    ; {token} INB, INW, INDW, OUTB, OUTW, OUTDW

    ; {offset} byte offset of robot IO System

    ; {address} address of a peripheral device (0..m)

    ; driver specific information, see descr. below

    ; {byte} byte offset at this peripheral device (0..m)

    ; Offset starts with 0 at the every device

    ; driver specific information, see descr. below

    ; {multip} creats n dataobjects of {token}

    ; Example:

    ; INW4=10,0,x2

    ; Two words of the peripheral device with address 10 and

    ; up from byte 0 are mapped to the inputs 33-80.


    I don't know what should i choose of INB, INW or INDW.

    It means how do i want to divide the bits on the PLC?Or what else?


    Furthermore, how did you calculate that inputs 33-80 from INW4 = 10,0,x2 ?


    I hope you can help me! Thanks in advance!


    Cheers

  • I don't know what should i choose of INB, INW or INDW.

    That's your choice. You can use wathever you want. As long as the resulting number of bytes on the interface matches the configured one.

    You can even mix them. It has nothing to do with how you will access them on robot or plc.


    Furthermore, how did you calculate that inputs 33-80 from INW4 = 10,0,x2 ?

    Inw0 begins at input 0

    Inw1 begins at input 9

    So the formula is 4 * 8 + 1

  • Thanks for your help hermann ! :)


    I clearly understand the upper thing, but i have a problem with your lower comment :/


    https://www.roboterforum.de/ro…e/?postID=55065#post55065


    In this topic the user calculate it differently:


    "

    INW(Word begin)=Modul adress,0, X(I/O Word Lenght)

    Sample:

    INW12=4,0,X6


    Description:

    The 4. Module I/O adress KRC2 $IN[72].....$IN[168]

    INW12= 12*16(1 Word 16 Bit)= 72th Input (Beginning adress)

    x6= 6*16=6 Words=96 bit=72 Beginning adress+96 bit Data lenght= In 72 to In 168

    "


    As you tell 4*8 + 1 = 33


    But in this situation 12*8 + 1 = 97 and what he wrote the beggining value 72

    97 not equal to 72.


    Can you explain me why please? :)

  • The offsets at INB, INW, INDW are always bytes AFAIR, the calculation in above mentioned thread is wrong. Nobody corrected it.

    But I must say: Last configuration of a KRC2 is long time ago, so may be I am wrong (don't think so, but I wouldn't bet on it ;-) ).

  • yup, this is old and i don't like to think much about it...


    <removed since inaccurate, thanks to Hermann>


    i don't see why would someone use anything but bytes. this gives you finest granularity and minimizes blocking.


    for example you have two I/O nodes, each has some I/O modules of course. the most common type of I/O is digital and that means the I/O blocks are fractions of a byte... like 2 bit or 4 bit.


    suppose first node has 12 inputs (three input modules with 4 inputs each).

    if you map it using bytes, you need to use at least two (16 bits). that means that last 4 bits are unused. also they are blocked and cannot be assigned to anything else... including inputs of the next node so your Inputs list will have a gap of at least 4 bits because inputs of next node will have to start on byte boundary (input 17)


    but if you map this using IND (32-bits), you would still have those 12 inputs functional but the next 20 inputs are blocked / reserved. so inputs from next node would have to start at 33... using large blocks means you are wasting a lot of I/O space and you are introducing larger gaps in I/Os. this means more scrolling when monitoring I/Os. not fun on a display with already very limited display space.

    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

  • Now I'm confused.:);)

    in an earlier post:

    INW0 = inputs 1-16 (skip 0 bytes, map 16 inputs)[/size]
    [size=2]INW1 = inputs 9-24 (skip 1 byte, map 16 inputs)[/size]
    [size=2]INW2 = inputs 17-32 (skip 2 byte, map 16 inputs)[/size]
    [size=2]INW3 = inputs 25-40[/size]
    [size=2]INW4 = inputs 33-48[/size]

    In last post:

    example in words

    INW0 (inputs 1-16)

    INW1 (inputs 17-32)

    INW2 (inputs 33-48)

    etc.

    As already told. I remember the earlier version is correct. See comments in iosys.ini:

    Code
    ...
    ; Form 2:
    ; {token}{offset}={address},{byte}[,{multip}]
    ;
    ; {token} INB, INW, INDW, OUTB, OUTW, OUTDW
    ; {offset} byte offset of robot IO System
    ; {address} address of a peripheral device (0..m)
    ..

    {offset} is the 'byte' offset.


    But if someone has the KRC2 on hand, he can check it very easy.

    I also always used bytes, so there is no confusion.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now