External auto start and pgno

  • Hello guys,


    I am trying to understand the functionality of pgno_fbit and pgno_parity. I read that pgno_fbit is the first bit of the pgno what does that means? As for the pgno_parity it states that if the value is 0 it does not check, negative odd and positive even and still I didn't understand the meaning. Can someone explain to me in more simplier way about those 2 variables.


    Thank you

  • you have two devices : PLC and KRC

    PLC tells to KRC "i need you to run program number 14".

    to transfer value 14 in binary form, you need number of bits. each bit is one I/O point.

    with 4 bits (or 4 digital inputs at KRC) you can represent values 0-15 so that would be the smallest number of bits for this example.


    those inputs need to be grouped together such as inputs 25,26,27,28 and not inputs 25, 84, 77, 35

    so you specify how many bits to use by assigning value to PGNO_LENGTH.

    and you also need to specify what is the first input number in that group, for example by setting PGNO_FBIT to 25.


    transmitting program number is risky. if any bit changes, robot could run wrong program.

    for example maybe you are trying to execute program 14 (binary value 1110) but if one of the signals is accidentally changed you could get different bit values such as 0110 etc.


    you need to decide if and how reliable transmission of robot program need to be in your case.

    the simplest case is to not use error checking. in that case set PGNO_PARITY to zero.


    the better way is to use some error checking. the weakest type of check is to use parity. in that case you need to assign input number to PGNO_PARITY. for example you may use value 23 if input 23 is to be used. you cannot use inputs 25,26,27,28 as those are already used for PGNO.


    the question also becomes what type of parity you want to use, even or odd.

    if you are using even parity, then PGNO_PARITY is +23 (assuming you are using input 23).

    if you are using odd parity, then PGNO_PARITY is -23 (assuming you are using input 23).

    when using parity, PLC need to compute value of the parity bit (one more output on PLC side), and KRC will check if the PGNO and parity are really matching.


    problem with parity is that it can only detect one corrupt bit. so if PLC is sending 1110 but KRC is receiving 0110 or 1111 or 1100 or 1010 then parity check will catch that.

    but if KRC receives value where more than one bit is corrupt, you can still run wrong program and crash.


    in that case it is better to use mirroring or reflection. in this case each bit that KRC receives, is echoed back to PLC, and PLC can check and confirm that value seen by KRC is really the one PLC is sending.


    and even more secure it to use both parity and reflection.

    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 you "panic mode" for your answer. It was so helpful.

    But I have something that I haven't understand yet concerning the PGNO_Parity. Since it is a bit, how can I send the robot the value +23 or -23 from the PLC? The same for the PGNO_FBIT, how can I send to the robot the number 25 from the PLC?

  • you need to have shared I/Os between PLC and KRC - either physical I/Os or fieldbus.


    value of $IN[23] is either TRUE or FALSE, it is not 23

    value of $IN[25] is either TRUE or FALSE, it is not 25


    value "23" and value "25" are CONFIGURATION settings, not handshake values.

    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