Hi, Might be a good idea first to try out the connection and the device with some handy software, like Modbus Poll. There you can see better, what's really going on... - Is it really connected? - What error code does it return? - Can it read from the register address? - Maybe try Input registers and Holding Registers - can make a difference - Sometimes register addresses are messed up: shifted +-1 (mixing of 2 standards) - Sometimes register addresses start with offset 30000, 40000 ... - Are you...
Strangely reminds me to my struggles... Want to do something "Elegant", reusable, universal, practical... In CODESYS??? π First of all, before you get too deep into this: If you could find a way, to make a "universal" log entry object, containing the variable length data itself, you wouldn't be able to store them in an array, or access them like an array, or pass them by value as a type. (please correct me, if I'm wrong, incorrect, or not precise). Because... Basically you can't declare a type with...
Are you sure when running as service, it is not reading configuration from C:\Windows\System32\config\systemprofile\AppData\Roaming\CODESYS... ? Is the SRV user is set for the CODESYS services? 2 ways to fix it: Change the CODESYSControl.cfg in the installation directory (ProgramFiles/CODESYS...). Replace %APPDATA% with something fix. Modify the service configuration in windows service manager to run as a different user (ie bot as Local system account)
Are you sure when running as service, it is not reading configuration from C:\Windows\System32\config\systemprofile\AppData\Roaming\CODESYS... ? Is the SRV user is set for the CODESYS services? 2 ways to fix it: Change the CODESYSControl.cfg in the installation directory (ProgramFiles/CODESYS...). Replace %APPDATA% with something fix. Modify the service configuration in windows service manager to run as a different user (ie bot as Local system account)
I don't exactly recall where (I think some release notes), but I read the information that this multiple application / sub application feature is to be discontinued. Please, correct me, if I'm not right about this I am a bit sad about that - I was using that feature with more or less success. However I understand the reason behind the change: it introduces huge complexity, especially when dealing with multicore and safety support... AS I understand, it's to be replaced with the new virtual plc architecture,...
Visibility control in I/O driver libraries
Namespace of I/O Driver related libraries
:) Yeah... Definitely not a "boring" platform, they are nice to give us work for the upcoming years... :)