Hi all, I just noticed a “CheckTagAddress” function in PLC4Go’s PlcDriver type. So if we provide address checking beyond the normal static checks, we can’t really check the dynamic stuff on the PlcDriver level.
Chris From: Christofer Dutz <[email protected]> Date: Tuesday, 22. November 2022 at 16:44 To: [email protected] <[email protected]> Subject: [DISCUSS] Make the PlcConnection return PlcFieldHandler and PlcValueHandler instances? Hi all, till now we always created the PlcFieldHandler and PlcValueHandlers in the Driver code statically. Now with the updated ADS driver we have some completely new possibilities: * We can check if a tag exists before executing the query * We can check the type and structure of values we want to write before sending them to the PLC * We can start using some fancy array notation which we can validate the query before sending the request. The only problem I currently have, it that the FieldHandler and ValueHandler are both created detached from the Connection, where the information is present. So, I would like to change that the Connection is responsible of creating the PlcValueHandler and PlcValueHandler. With this we could even do crazy stuff like: * In S7 give an error warning if the type of S7 doesn’t support the datatype, that the user wanted to use? * Possibly rewrite fields, if we’re using an incompatible S7 type (Like if I’m on a S7-1200 and want to read a LINT, which the 1200 doesn’t support), then we could replace this with a 2-element array of DINT and still support datatypes the device itself doesn’t. * We could provide an error if someone wants to use the S7 driver subscription API with a PLC, that doesn’t support that. * … I probably could go on forever ;-) What do you folks think? Chris
