API Parameter Return value long : returns the error state of the function. 5.2.2 adsPortCloseEx The connection (communication port) to the TwinCAT message router is closed. The port to be closed must previously have been opened via an AdsPortOpenEx call. long adsPortCloseEx ( long lj_port ); Parameter long : lj_port port number of an ADS port that had previously been opened with AdsPortOpenEx or AdsPortOpen. Return value long : returns the error state of the function. 5.2.3 adsGetLocalAddressEx Returns the local NetId and the own port number (thread-safe). long adsGetLocalAddressEx ( long lj_port, AmsAddr lj_AmsAddr ); Parameter long :
lj_port port number of an ADS port that had previously been opened with AdsPortOpenEx or AdsPortOpen. AmsAddr lj_AmsAddr : AmsAddr object which contains the local NetId and port number after the call. Return value long : returns the error state of the function. 5.2.4 adsSyncWriteReqEx Writes data synchronously to an ADS device (thread-safe). long adsSyncWriteReqEx ( long lj_portAmsAddrlj_AmsAddrlonglj_indexGroup, long lj_indexOffset, long lj_length, JNIByteBuffer lj_pData ); Parameter long : lj_port port number of an ADS port that had previously been opened with AdsPortOpenEx or AdsPortOpen. AmsAddr lj_AmsAddr : object with NetId and port number from ADS server. TX1000 21 Version: 1.1