Acyclic data

The ADS function blocks are used to send acyclic data. They access the PROFINET record data. So that acyclic data can be read or written, the PROFINET device must be in data exchange mode.

An ADSReadWrite is set.

ADS settings

AMSNetID: The AMSNetID of the Profinet controller

PORT: Port number of the device (take this from the System Manager)

Index GROUP: 0x0000_F823

Index OFFSET: 0x0000_0000

DATA

typedef struct {
    WORD         RW;
        #define    PN_READ   0
        #define    PN_WRITE  1
    WORD         NrOfAR;
    DWORD        API;
    WORD         Slot;
    WORD         SubSlot;
    PNIO_RECORD  RecordData;
} PNIO_CONFIGRECORD

nRW

nNr

nAPI

InSlot

SubSlot

nIndex

nLen

nTrans

nLenA

2 bytes

2 bytes

4 bytes

2 bytes

2 bytes

2 bytes

2 bytes

2 bytes

2 bytes

 

Example:

Send a read request for I&M function 0

nRW

nNr

nAPI

InSlot

SubSlot

nIndex

nLen

nTrans

nLenA

00 00

00 00

00 00 00 00

00 00

01 00

F0 AF

00 00

01 00

00 00

 

Note
Pay attention to the memory size

Make sure that the receive data memory is large enough.