AdsSyncWriteReq

Writes data synchronously to an ADS device.

LONG AdsSyncWriteReq(
  PAmsAddr  pAddr,
  ULONG     nIndexGroup,
  ULONG     nIndexOffset,
  ULONG     nLength,
  PVOID     pData
);

Parameter

pAddr

[in] Structure with NetId and port number of the ADS server.

nIndexGroup

[in] Index Group.

nIndexOffset

[in] Index Offset.

nLength

[in] Length of the data, in bytes, written to the ADS server.

pData

[in] Pointer to the data written to the ADS server.

Return value

Returns the function's error state.

Sample

See Sample 2: Write synchronously to the PLC.