adsSyncWriteControlReqEx

Ändert den ADS-Status und den Geräte-Status von einem ADS-Server (threadsicher).

long adsSyncWriteControlReqEx (longlj_portAmsAddrlj_AmsAddrintlj_adsState,
        intlj_deviceState,
        longlj_length,
        JNIByteBufferlj_pData);

Parameter

  • long: lj_port Portnummer eines ADS-Ports, der zuvor mit AdsPortOpenEx oder AdsPortOpen geöffnet worden ist.
  • AmsAddr lj_AmsAddr: Objekt mit NetId und Portnummer vom ADS-Server.
  • long lj_adsState: Neuer ADS-Status.
  • long lj_deviceState: Neuer Geräte-Status.
  • long lj_length: Länge der Daten in Byte, die in den ADS-Server geschrieben werden.
  • byte[] lj_pData: ein JNIByteBuffer-Objekt, dessen Daten zusätzlich in den ADS Server geschrieben werden.

Rückgabewert

long: Gibt den Fehlerstatus der Funktion zurück.

Comments

In addition to change the ADS status and the device status, 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 status of the device itself (DeviceState) and the status of the ADS interface of the ADS device (AdsState). The states that the ADS interface can adopt are laid down in the ADS specification.