Understanding of numbers in IOSYS.INI

  • I am really confused! :grinning_squinting_face: :grinning_squinting_face:


    Hermann i tried, but i got the following problem from the robot:


    Configuration error I/O driver CP561DRV

    Error on writing, driver: CP561DRV

    I tried to find what the problem is in the manual, but in vain :thinking_face:


    Do you know what problem is? :thinking_face: :thinking_face:

  • as mentioned, this is old and my memory can be foggy... and you are right.


    i prefer to use bytes for reasons mentioned and the new one - same units everywhere... ;D

    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

  • 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

    I understand why you do not understand


    The above calculation is not correct.


    Start:

    INW12 = 12*8+1 = 97


    End:

    12*8 + 6*16 = 192


    Result:

    $IN[97] .. $IN[192]


    As mentioned earlier in this thread.

    Offset} is allways byte (8 Bit) offset


    ; 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.

  • Configuration error I/O driver CP561DRV

    Error on writing, driver: CP561DRV

    I tried to find what the problem is in the manual, but in vain :thinking_face:

    Think this has nothing to do with this INB/OUTB section.

    First step is configuring the bus in PFBMS.ini and if you use the master with NCM-Manager or Step7.

    For this you can leave the section [PBMASL] in iosys.ini empty, and you should get no error messages. When you don't have error messages, You can begin to create the INB/OUTB entries in iosys.ini.


    There are logfiles PFBMS.log and iosys.log in the log directory. Sometimes there are useful entries.

  • Think this has nothing to do with this INB/OUTB section.

    First step is configuring the bus in PFBMS.ini and if you use the master with NCM-Manager or Step7.

    For this you can leave the section [PBMASL] in iosys.ini empty, and you should get no error messages. When you don't have error messages, You can begin to create the INB/OUTB entries in iosys.ini.

    So guys, the connection has been established. i Did what you tell me, thank you! :smiling_face:


    Furthermore, when is try to create the INB/OUTB section i got that error message what i wrote earlier.

    I typed this into the iosys.ini(under PBMASL):

    INW12=3,0,x6 -> $IN[97] .. $IN[192]

    OUTW12=3,0,x6 $OUT[97]..$OUT[192]


    These in/outputs would fully appropriate for me.(But why is it bad?What would be the correct form?)


    i didn't understand why is it bad, therefore i searched on the forum. I find your earlier comment in an other topic. That's what your wrote. Can you explain it for me why is it bad if you mapp two Words?



    "

    Nope, You mapped two WORDS, not two bytes.

    INW30=127,0,x2

    means from (INW30) input 30*8+1 --> 241

    two times (x2).


    correct would be: INW30=127,0,x1

    or INB30=127,0,x2

    "

    Thanks in advance!:)

  • You should tell us how much bytes / words your slave with address 3 has. And how much bytes / words you want to change with the connection of the robot slave to the master plc.

    In other words: give us all parameters of your bus, master / slave used and amount of I/O for each device on bus, topolgy of the bus. Otherwise we need this lost crystal ball. :winking_face:

    Why don't you use bytes (aka INB/OUTB)? It's much easier to handle, no confusion about using factor 2 or not on some parameters.

  • Otherwise we need this lost crystal ball.

    Haha fine :winking_face: :grinning_squinting_face: :grinning_squinting_face:


    So we have a Kuka KRC 2 KR180 which will be the master in this projekt.

    We have a Turck (TX700) HMI PLC with a plug-in PROFIBUS-DP slave module.

    The module type is: Turck TX-DP-S

    The plug-in module can join back to the HMI PLC.

    It's not so clear how much I/O need now, cause the PLC is not my territory. I asked them and they said reserve 100 in- and 100 output. That's will be enough.

    As i said earlier that's my first projekt (what profibus makes it harder) , so if you said bytes better than world, i believe you :grinning_squinting_face: :smiling_face:

  • So do you have a gsd file for the turck module?

    Did you create a .ldb file with NCM manager or Step7?

    How many bytes I/O did you define in that project?

    What's looking your pfbms.ini file?


    And once again: it is not necessary to use INW in iosys.ini even if you want to use words or double words as integer signals in the robot. You can define every signals as bytes, and use them as whatever you want (single signal or integer with 2-32 bit length) in the signal declaration in $config.dat or other .dat file.

  • And once again: it is not necessary to use INW in iosys.ini even if you want to use words or double words as integer signals in the robot. You can define every signals as bytes, and use them as whatever you want (single signal or integer with 2-32 bit length) in the signal declaration in $config.dat or other .dat file.

    As Hermann says, you could have this in IOSYS.INI:

    Code
    INB0=1,0 ; $IN[1]-$IN[8]
    INB1=1,1 ; $IN[9]-$IN[16]
    INB2=1,2 ; $IN[17]-$IN[24]
    INB3=1,3 ; $IN[25]-$IN[32]


    Then, in your program, have:

    Code
    SIGNAL My32BitInput $IN[1] TO $IN[32]

    That combination works no differently than using INDW in IOSYS.INI.

  • Wow guys, Thanks so much for your help. I am getting closely to understand this system. (little overthink these things :smiling_face: )


    if you need single i/o's only then byte is the best. Sometimes you may need also words (e.g. program or product numbers)


    we always asked for an i/o map

    If i think clear, i will need only single I/O (for instance:conveyors and sensors) and i will use this Signal declarition.


    DEFFCT INT Tool_ID()

    SIGNAL X1 $IN[1201] TO $IN[1204] ; low nibble

    SIGNAL X10 $IN[1205] TO $IN[1208] ; high nibble

    RETURN X10*10 + X1

    ENDFCT


    1.So do you have a gsd file for the turck module?

    2.Did you create a .ldb file with NCM manager or Step7?

    3.How many bytes I/O did you define in that project?

    4.What's looking your pfbms.ini file?

    1.Yes, we got (hardly) the .gsd file from turck.(they forgot to uppload it to their website :grinning_squinting_face: )

    2.Yes we create the .ldb file in the kuka windows, so we didn't have to copy it into the appropriate location( C:\KRC\Roboter\init), cause the system did it directly.

    3.As i said earlier we don't know exactly right know, how much I/O we need. I try to calculate 100 inputs and 100 outputs, because of that above signal declarition.(Its just an example we need much more signal)

    4. I don't understand clearly what is your question here. Can you explain it please? :smiling_face:

    And once again: it is not necessary to use INW in iosys.ini even if you want to use words or double words as integer signals in the robot. You can define every signals as bytes, and use them as whatever you want (single signal or integer with 2-32 bit length) in the signal declaration in $config.dat or other .dat file.

    As Hermann says, you could have this in IOSYS.INI:

    Code
    INB0=1,0 ; $IN[1]-$IN[8]
    INB1=1,1 ; $IN[9]-$IN[16]
    INB2=1,2 ; $IN[17]-$IN[24]
    INB3=1,3 ; $IN[25]-$IN[32]


    Then, in your program, have:

    Code
    SIGNAL My32BitInput $IN[1] TO $IN[32]

    That combination works no differently than using INDW in IOSYS.INI.


    Thanks for the visualization and explain how to use it hermann, SkyeFire and MOM. I thought i have to use only 1 line the INB/W/DW or OUTB/W/DW , but if i can separate this clear as Skyefire iterpret for me, I will try this form tomorrow :smiling_face:

    I think i had this problem at Friday, because i tried the system without change something is[PBMASL] in iosys.ini and the system worked. After i typed in INW...... the system threw back the error message. :thinking_face:


  • You don't think really clear:winking_face:.

    If you need one single signal of a sensor it looks like:

    Code
    ; Declaration
    SIGNAL DI_Sensor $IN[1]
    ; using the signal:
    IF DI_Sensor then ...


    3.As i said earlier we don't know exactly right know, how much I/O we need. I try to calculate 100 inputs and 100 outputs, because of that above signal declarition.(Its just an example we need much more signal)

    100 signals is a unfavorable number! It is not a multiple of 8.

    4. I don't understand clearly what is your question here. Can you explain it please?

    This is Nr. 4:

    What's looking your pfbms.ini file?

    Post your pfbms.ini. One line in that file has to point to your .ldb file !

    2.Yes we create the .ldb file in the kuka windows, so we didn't have to copy it into the appropriate location( C:\KRC\Roboter\init), cause the system did it directly.

    Which software did you use for creating .ldb file?

    How much bytes did you configure in the .ldb file? (Screenshot of configuration in NCM Manager?)

    What's the name of your .ldb file?


    Is it that diffcult to post all parameters you have on your profibus and configuration? Nobody can help without exact parameters or knowing what steps you already did.


    .. I thought i have to use only 1 line the INB/W/DW or OUTB/W/DW , but if i can separate this clear as Skyefire iterpret for me, I will try this form tomorrow :smiling_face:...


    Code
    INB0=3,0,x1
    INB1=3,1,x1
    ; is the same as
    INB0=3,0,x2
    ; most time is the same as
    INW0=3,0,x1


    I think i had this problem at Friday, because i tried the system without change something is[PBMASL] in iosys.ini and the system worked. After i typed in INW...... the system threw back the error message. :thinking_face:

    Why did you change a working system? :fearful_face: And why didn't you reverse the changes after making it not working?

  • You don't think really clear:winking_face:.

    If you need one single signal of a sensor it looks like:

    Code
    ; Declaration
    SIGNAL DI_Sensor $IN[1]
    ; using the signal:
    IF DI_Sensor then ...


    100 signals is a unfavorable number! It is not a multiple of 8.

    Yes your right sorry. i just told a number which would be good. 96 in and 96 output would be appropriate.


    Which software did you use for creating .ldb file?

    How much bytes did you configure in the .ldb file? (Screenshot of configuration in NCM Manager?)

    What's the name of your .ldb file?

    1.NCM PC Manager

    2. In my next comment i will post everything what you ask.

    Why did you change a working system? :fearful_face: And why didn't you reverse the changes after making it not working?

    You told me earlier try the system without this: example: INT30=3,0,x1. The system worked perfectly(Red light up continuously) If i typed this into the system throw back the error.

    As is said after this comment i am going to save everything what you ask and i will post it in my next comment!

    Thank you for your patience and much help too!

    Edited once, last by Mate_271 ().

Advertising from our partners