Hey I extended the implementation because S7-1500 family returns a not known datatype for those date-types, and there was a need to read those types. So I acquire a set of bytes and extract the date information from that. If that causes problems with the simulator we should have a deeper look into that.
Best Tim Am 14.10.19, 18:08 schrieb "Christofer Dutz" <[email protected]>: Hi all, While working on the PLC Simulator I stumbled into one pit … when receiving a read request and deserializing this, I was confused why a read request for one BYTE was received as a DATE_TIME. A quick look showed me, that there are multiple types with the same code. I thought that this would not be causing any problems as long as all codes result in the same number of bytes being read. Unfortunately it seems with the dates and times this doesn’t seem to fit well. Not all PLCs support all of these types. But I would like to sort this out as for example DATE_AND_TIME (0x02) reads 8 bytes, but TIME_OF_DAY (0x02) reads 4 byte and DATE (0x02) reads only 2 bytes. I guess the way it’s currently setup, this can’t be correct. Do you have an idea how we can sort this out? Chris
