ADAMTCP_ReadReg
Description:
Read the holding register value at a specified range described in parameters.
Syntax:
int ADAMTCP_ReadReg(SOCKET conn_socket, WORD wStartAddress, WORD wCount, WORD
wData[ ])
Parameter:
conn_socket[in]: the handle that represent the connection socket
wStartAddress[in]: the starting address that to be read
wCount[in]: how many holdings register to be read
wData[out]: a unsigned 16 bits array that stored the read holding register
Return:
Please refer to Chapter 6-2-3 “Return Codes” for more detail information
Example:
// Read input registers demo program
//--- In this demo program, reading 16 register starting at register 0(address 1)
//--- The IP address for ADAM-6000 module is 172.16.2.200 in this demo program.
//--- Change the IP Address to match your ADAM-6000 module
#include <windows.h>
#include <winsock2.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "adv5ktcp.h"
#define DEFAULT_PORT 502
Содержание ADAM-6000 series
Страница 21: ...Figure 3 2 Fix ADAM 6000 module on the bracket...
Страница 23: ......
Страница 24: ...Figure 3 4 Secure ADAM 6000 Module to a DIN rail...
Страница 27: ...Figure 3 6 ADAM 6000 I O Module Terminal Block wiring...
Страница 32: ...Figure 4 4 ADAM 6017 Digital Output wiring...
Страница 36: ...Figure 4 8 ADAM 6050 Digital Output Wiring...
Страница 41: ...Figure 4 13 ADAM 6051 Digital Output and Counter Wiring...
Страница 46: ...Figure 4 18 ADAM 6060 Relay Output Wiring...
Страница 75: ...Figure 5 29 Firmware Upgrade for ADAM 6000 I O Series Modules...
Страница 153: ...Appendix A Design Worksheets...