adsSyncWriteControlReqEx
Changes the ADS state and the device state of an ADS server (thread-safe).
long adsSyncWriteControlReqEx (
long lj_port,
AmsAddr lj_AmsAddr,
int lj_adsState,
int lj_deviceState,
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.
- long lj_adsState: new ADS state.
- long lj_deviceState: new device state.
- long lj_length: length of the data in bytes that are written to the ADS server.
- byte[] lj_pData: a JNIByteBuffer object whose data is additionally written to the ADS server.
Return value
long: returns the error state of the function.
Notes
In addition to changing the ADS state and the device state, it is also possible to send data to the ADS server to transfer further information. In the current ADS devices (PLC, NC, ...) this data has no further effect. Each ADS device can inform another ADS device about its current state. A distinction is made 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 assume are defined in the ADS specification.