Re: S7 Writing

2020-02-26 Thread Etienne Robinet
Hi, I managed to get BIT, BYTE, WORD and DWORD working, seems like there was a problem in the generated source file DataItemIO.java. This file is generated with a template and a .mspec file, so I don't know how to modify it really well. I modified the generated sources locally (yikes) because

Re: S7 Writing

2020-02-26 Thread Cesar Garcia
Hi, The original version only handled the binary types correctly (BYTE, WORD, DWORD), for the rest it generates the problems that you point out. I am working on the writing of CHAR and TIME types, etc. I indicate when you finish these modifications. On my fork of GitHub and mount the

Re: S7 Writing

2020-02-25 Thread Cesar Garcia
Hi Chris, I understand that the priority of the drivers in PLC4X is the reading process, so writing to the PLC has not worked much. I have already made several corrections in the legacy driver for the S7, which corrects the writing process, however there are still many types (characters, strings

Re: S7 Writing

2020-02-25 Thread Christofer Dutz
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);

S7 Writing

2020-02-25 Thread Etienne Robinet
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