
Programmable Serial-to-Ethernet Device Server
PDS Series User Manual, Version 2.5, Mar. 2019
-
139 -
The functions in the General DCON API kit can be used to access the I/O lines on the PDS series
module:
Section
Categorization
Dll and lib
Call condition
Starting function
Open_Com()
Uart.dll
Uart.lib
Called once when the program starts
I/O function
DCON_Write_DO()
DCON_Write_DO_Bit()
DCON_Read_DIO()
dcon_pc.dll
dcon_pc.lib
Calls the I/O functions for requirements
Communication
Send_Receive_Cmd()
Uart.dll
Uart.lib
Calls the communication functions for
requirements
Ending function
Close_Com()
Uart.dll
Uart.lib
Called once before the program exits
// DO program demo on a PC client
void CManual1Dlg::OnOpen_Com()
{
Open_Com(3,115200,8,0,1);
//COM Port: 3, Baud Rate:115200, Data Bit:8, Parity Bit: 0, Stop Bit: 1
}
void CManual1Dlg::OnClose_Com()
{
Close_Com(3); }
void CManual1Dlg::OnDigital_Out()
{
iRet=DCON_Write_DO(3,1,-1,4,iDO_value,0,100);
//COM Port: 3, Address: 1, Slot: -1, total channel count:4, DO data,
//Checksum: disabled, Timeout: 100 (ms)
}