Analog input offsets and Codesys

Good afternoon

It appears that resetting a Codesys application resets analog input offsets (ICTD inputs in this case) to zero. Is this the correct behavior?


What do you mean by resetting the Codesys application? Are you referring to a full download to the controller, if you are, the offline parameters for the card will be pushed in, and the groov Manage parameters will be overwritten. In this case, you would want to make sure your offline program has the correct gain and offset.

Yes, full download and ‘cold reset’ both reset the offset values.

What’s the recommended pattern for retaining offset values assuming that they’re expected to be modified by end-users via an HMI?


Yes, anytime you completely overwrite the program it will do that, for downloads, you could move any data that needs to be retained in the PV(persistent variable) List, and reload it on download.

The cold reset command resets all variables of the active application to their initialization values. There is no recovery from this.

Once a system is in production, I would not recommend doing full factory resets and downloads, as they should only be required with hardware changes. You can use the download with online edits to maintain any values stored.

Good morning

Can you please point me in the general direction on how to read/write analog channel offset values programmatically within a Codesys application.

To clarify, I’m trying not to reinvent the wheel. The underlying hardware has a calibration (offset) feature. Codesys has a calibration feature using the IDE. I’d prefer to utilize either one of those through the application rather than rolling my own implementation.