User manual
Planning Your Application Program 
ADAM5KTCP_ReadCoil 
Chapter 6 
Description:  Read the coils value at a specified range described 
in parameters. 
Syntax: int  ADAM5KTCP_ReadCoil(char  szIP[],  
WORD wID, WORD wStartAddress, WORD wCount, 
BYTE byData[]); 
Parameter: 
szIP[in]:   the IP Address of the ADAM-5000/TCP that to be 
connected 
wID[in]:  the specific device ID for an Modbus/TCP device. 
The ADAM-5000/TCP is always assigned as 1 
wStartAddress[in]: the starting address that to be read 
wCount[in]:  how many coils to be read 
byData[out]:  a 8 bit array that stored the read coil 
Return: Please refer to Chapter 6-2-4 “Return Codes” for more 
detail information 
ADAM-5000/TCP User’s Manual 
6-17 










