Infosys在阅读器中打开 / AI 翻译

ADS · 0 次阅读

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.