Nearly nothing wrong with that, only I thought it should be 222 bytes for reads and 218 for writes
But I never tested libnodave with a 400 family PLC.
Basically, the size of a structure named PDU is limited in S7 communication. The limit can be read in the CPU properties dialog in Step7.
To overcome this limitation, you would need to use multiple calls to daveReadBytes or daveWriteBytes, transferring chunks of memory contents.
It may be that other libraries, e.g. Prodave from Siemens hide this complication from the application, but then you will see multiple packets going over the net for a single operation.
What may be wrong is that the limit off PDU size should be higher in 400 family PLCs with an ethernet CP.
If I remeber right, it is:
240 byte with 3xx and MPI
480 byte with 4xx and MPI
960 byte with 4xx and CP4xx
The payload is some (18 or 22 bytes if I remember right) lower, because adresses, error codes and other information go into the PDU block as well. Additionally, if reading multiple variables, the PLC fills up some parts of the answer to be aligned to word boundaries.
But I guess, in your case something in PDU negotiation (done in daveConnectPLC) went wrong and thus a minimum PDU length of 240 was assumed.
I will dry-check whether libnodave handles PDU length negotiation right, but it would be more helpful if you could send me debug output (use -d option) to the mail address given on
http://libnodave.sf.net.