beckhoff — 5.1.13 adsSyncReadStateReq

API Parameter AmsAddr lj_AmsAddr : object with NetId and port number from ADS server. AdsDevName lj_pDevName : AdsDeviceName object containing the ADS device name after the call. AdsVersion lj_pVersion : AdsDeviceName object which contains the used version number, revision number and build number after the call. Return value long : returns the error state of the function. 5.1.12 adsSyncWriteControlReq Changes the ADS state and the device state of an ADS server. long adsSyncWriteControlReq( AmsAddr lj_AmsAddr, int lj_adsState, int lj_deviceState, long lj_length, JNIByteBuffer lj_pData ); Parameter AmsAddr lj_AmsAddr : object with NetId and port number from ADS server. long lj_adsState :

new ADS state. long lj_deviceState : new device state. long lj_length : length of the data in bytes that are additionally written to the ADS server. JNIByteBuffer : lj_pDataWrite JNIByteBuffer with data that are additionally written to the ADS server. Return value long : returns the error state of the function. Comments In addition to change the ADS state and the device state, it is also possible to send data to the ADS server in order to transfer further information. In the current ADS devices (PLC, NC, ...) this data has no further effect. Any ADS device can inform another ADS device of its current state.

A distinction is drawn here between the state of the device itself (DeviceState) and the state of the ADS interface of the ADS device (AdsState). The states that the ADS interface can adopt are laid down in the ADS specification. 5.1.13 adsSyncReadStateReq Reads the ADS state and the device state from an ADS server. long adsSyncReadStateReq( AmsAddr lj_AmsAddr, AdsState lj_nAdsState, AdsState lj_nDeviceState ); Parameter AmsAddr lj_AmsAddr : object with NetId and port number from ADS server. AdsState lj_nAdsState : AdsState which contains the current ADS state after the call AdsState lj_nDeviceState : AdsState which contains the current device state after the call TX1000 17 Version: 1.1