@Override
    public CompletableFuture<? extends PlcPingResponse> ping() {
        if (channel.attr(S7HMuxImpl.IS_CONNECTED).get()) {

            //channel.eventLoop().execute(()->{
            executor.execute(() -> {
                PlcReadRequest.Builder builder = readRequestBuilder();

                builder.addTagAddress("value", "%MX1.0:BOOL");
                PlcReadRequest readRequest = builder.build();
                try {
                    PlcReadResponse readResponse = readRequest.execute().get(2, TimeUnit.SECONDS);
                    logger.debug("PING: " + readResponse.getResponseCode("value"));
                } catch (Exception ex) {
                    logger.info("PING: " + ex);
                    retrysPing++;
                    if (retrysPing > channel.attr(S7HMuxImpl.RETRY_TIME).get()){
                        channel.attr(S7HMuxImpl.IS_CONNECTED).set(false);
                        retrysPing = 0;
                    }
                }
            });
        }
        return null;
    }
Subscriptions are only supported in a small subset of the S7 devices.

@return true, if the device supports subscriptions.
plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HPlcConnection.java