Acyclic Profinet Communication

2015-08-08
2016-09-02
  • M4Automation - 2015-08-08

    I'm going to try to get a IO Link master working over Profinet.
    (Im currently testing it on a Raspberry Pi)
    To be able to configure the IO Link sensors, I need the acyclic communication to work.
    =I need to use the functions RDREC and WRREC.
    For these to work correctly, I need the adress of the I/O module in the form of a DWORD
    For Profibus communication there is a functionblock, CommFB.ID, that I have used before.

    dwAdrID := CommFB.ID(EN := TRUE,
    MASTER := PN_Master_ID,
    SEGMENT := BYTE#16#0,
    STATION := iSTATION,
    SLOT := iSLOT);

    1) Is acyclic communication implemented of the Raspberry?
    2) Can I use the CommFB.ID functionblock?
    3) In that case, how do I find out the STATION number of a Profinet buscoupler?

    /Marcus

     
  • eschwellinger

    eschwellinger - 2015-08-09

    Hi Marcus,
    check attached project.

    //acyclic read -service

    IF(execRead) THEN
    Β  Β execRead := FALSE;
    Β  Β rdrec.REQ := TRUE;
    END_IF
    rdrec.ID := UR20.ID;
    rdrec.INDEX := UINT_TO_INT(16#AFF0);Β  Β Β  Β //this is the I&M data, just for demo purpose
    rdrec.RECORD := ADR(buffer);
    rdrec();
    rdrec.REQ := rdrec.BUSY;
    

    BR
    Edwin

    ProfinetSP6Raspi.project [116.54 KiB]

     
  • M4Automation - 2015-08-09

    Thanx, somethimes the solution is too simple
    I just got the ID of the Profinet buscoupler from the Profinet name
    (in my case of a Phoenix Contact buscoupler = "il_pn_bk.ID")
    and with the function IoDrvProfinet.SUBSLOT_ID, I got the ID

    Thanks again Mr Schwellinger

    /Marcus

     
  • martinesab - 2016-09-02

    Hello,

    Sorry for mixing this topic with profibus questions: I'm trying to get the acyclic communication working but I can't figure out where to find all information to get the ID used for the function blocks below:
    RALARM
    RDIAG
    RDREC
    WRREC

    Scope Name Type Initial Comment
    Return ID DWORD
    Input EN BOOL TRUE
    MASTER BYTE ID of the DP system
    SEGMENT BYTE Number of the DP segment
    STATION BYTE Number of the DP-slave(station address)
    SLOT BYTE Slot number

    The station byte is the slave dp address but where do I find the values for the rest?`

    I'm running with the EL6731 Profibus master from Beckhoff.

    /Martin

     

Log in to post a comment.