7 pdo functions, Bpbreadpdo function, Bpbwritepdo function – Lenze 3241C User Manual
Page 21: Pdo block structure, Pdo functions, Api functions 3

API
functions
3
19
3.4.7
PDO functions
BpbReadPdo function
Parameter
[in] HANDLE
hOpen
Pointer to open context (handle) for identification
[out] PUCHAR
pReadBuffer
PDO memory area
[in] WORD
usBufferSize
Size of the memory area
[out] PWORD
pusActualPdoSize
Size of the memory area assigned
Return values
S_OK Successful
E_HANDLE
Incorrect (handle is invalid)
E_MEMORY
Incorrect (BPB message memory area overflown)
BpbWritePDO function
Parameter
[in] HANDLE
hOpen
Pointer to open context (handle) for identification
[in] PUCHAR
pWriteBuffer
PDO memory area
[in] USHORT
usBufferSize
Size of the memory area
[out] PUSHORT
pusSdoWritten
Number of PDOs written
Return values
S_OK Successful
E_HANDLE
Incorrect (handle is invalid)
PDO block structure
The structure of the process data results from the group configuration of the I/O
modules.
Size of the PDO memory area
1. DWORD
Status register
2. DWORD
BpbPdoBlockHeader
SDOs
3. DWORD
…
n. DWORD
(binary data, according to process
image)
After a read or write access the status register contains the current status of the BPB
and does not serve to change the status of the BPB.