Hi Etienne,

yes indeed. The thing is none ever asked for writing even if we've implemented 
that.
Try this code:

            PlcWriteRequest.Builder writeBuilder = 
plcConnection.writeRequestBuilder();
            writeBuilder.addItem("value-1", "%Q0.0:BOOL", true);
            writeBuilder.addItem("value-2", "%Q0.1:BOOL", true);
            writeBuilder.addItem("value-3", "%Q0.2:BOOL", true);
            writeBuilder.addItem("value-4", "%Q0.3:BOOL", true);
            final PlcWriteRequest writeRequest = writeBuilder.build();

            final PlcWriteResponse plcWriteResponse = 
writeRequest.execute().get();
            System.out.println(plcWriteResponse);

At least that's the code I've used for testing the new write features of the 
new S7 driver.

Chris



Am 25.02.20, 14:25 schrieb "Etienne Robinet" <[email protected]>:

    Hi all,
    are there any example of writing to a S7 PLC? All the examples in the 
library are about READING from a PLC. Is the writing also implemented yet 
(seems like it).
    
    I had some quick tries but nothing precise for now.
    
    Regards,
    
    Etienne
    

Reply via email to