data consistency in ProfibusDP

2007-12-19
2008-10-13
  • Andreas Reuter - 2007-12-19

    Hi,

    I would like to introduce myself to the members of the forum.

    Is there any way in CoDeSys of defining and maintaining data consistency

    on the ProfibusDP while transfering a package of bytes?

    STEP7 for example supplies two system functions SFC14 and SFC15, which do the job. I donΒ΄t think, that SYNC and FREEZE alone will do it.

    Does anyone have any experience?

    Greetings,

    Andy

     
  • deluxe79 - 2008-10-13

    I can't see any form for error-checking support natively in the Profibus protocol, but if possible for both master/slave, you could implement your own checking routine using e.g. CRC8 or CRC16. I would recommend using a lookup-table in that case. Example:

    Implementation:

    SendPacket(pointer to MyPacket to be sent, pointer to profibus packet, sizeof MyPacket, sizeof profibus packet)

      - Copies profibus packet data to custom packet.
    
      - Generates checksum and adds this to end of custom packet.
    

    ProcessPacket(pointer to received MyPacket, sizeof MyPacket)

      - Returns True if no error, False otherwise.
    

    Hope this helps.

     

Log in to post a comment.