
EDAM-4200 Series User’s manual Version 1.03
Return Code:
refer to the
Error code
.
7.5.44
TCP_MODBUS_WriteCoil
Description:
to write the coil values at a specific range described in parameters.
Syntax:
♦
Visual Basic: (
see TCPDAQ.bas
)
Declare Function TCP_MODBUS_WriteCoil Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_WriteCoil@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Byte) As Long
♦
Borland C++ Builder: (see TCPDAQ.h)
int TCP_MODBUS_WriteCoil(char szIP[],u_short wStartAddress,u_short wCount,u_char byData[]);
♦
Delphi:
(see TCPDAQ.pas)
Function TCP_MODBUS_WriteCoil(szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PByte):
Longint; StdCall;
♦
VC++:
(see TCPDAQ.h)
int TCP_MODBUS_WriteCoil(char szIP[],u_short wStartAddress,u_short wCount,u_char byData[]);
Parameters:
szIP[in]
: the IP address for an EDAM-4200 that to be connected
wStartAddress[in]
: start address of coil registers (1 ~ 255)
wCount[in]
: the count that coil data be written
byData[in]
: the 8 bit array that stored the coil data (0=set, 1=reset)
Return Code:
refer to the
Error code
.
7.5.45
TCP_MODBUS_ReadReg
Description:
to read the holding register value at a specific range described in parameters
Syntax:
♦
Visual Basic: (
see TCPDAQ.bas
)
Declare Function TCP_MODBUS_ReadReg Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_ReadReg@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Integer) As Long
♦
Borland C++ Builder: (see TCPDAQ.h)
Int TCP_MODBUS_ReadReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
♦
Delphi:
(see TCPDAQ.pas)
Function TCP_MODBUS_ReadReg (szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PWord):
Longint; StdCall;
♦
VC++:
(see TCPDAQ.h)
Int TCP_MODBUS_ReadReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
Parameters:
szIP[in]
: the IP address for an EDAM-4200 that to be connected
wStartAddress[in]
: start address of holding registers (1 ~ 255)
wCount[in]
: the count that holding data be read
byData[in]
: the 16 bit array that stored the holding data
Return Code:
refer to the
Error code
.
7.5.46
TCP_MODBUS_WriteReg
Description:
to write values to the holding registers at a specific range described in parameters
Syntax:
♦
Visual Basic: (
see TCPDAQ.bas
)
Printed Date: 27 February 2018
80