Initialize Input Filter Frame Size

Initialize Input Filter Frame Size
none 0.0 0

If a change is made to an analog input filter frame size, what’s the proper way to store that so the value is restored during a power cycle? Recently I’ve made changes to filter size using Easy Remote I/O but have discovered the value returns to default during a power cycle. The manuals don’t offer a clear method to do this.

Hi @donnedved25,

When the iR-ETN is connected to an HMI with built-in Codesys, the parameter values may be overwritten by the “Modbus Slave Init” settings within Codesys at boot. When you import a PLCopenXML description of the iR-ETN and connected I/O, the parameter values set within EasyRemote IO are also imported at that time.

Note: To modify parameters within Codesys, please navigate to the “Modbus Slave Init” tab of the iR-ETN.

Note: The parameters are labeled within Codesys using the “0 base dec address” in EasyRemote IO. Click the “Modbus Mapping” column to view the Modbus address information and then find the corresponding parameter value in Codesys. Once found, double-click the parameter within Codesys to change the initialization value.

Note: The Codesys runtime will only execute the initializations 1 - 20.

" Note: The Codesys runtime will only execute the initializations 1 - 20."

So if my analog module is the second module in the system Codesys won’t initialize it? If so, does Weintek have sample Codesys code to send init values to the Modbus addresses in the iR-ETN for params above 20?

@donnedved25,

We can provide sample code, but it is easier to use the “Move Up” button to re-organize initializations depending on what you would like to update:

Note: This solution is recommended when updating up-to 20 initializations after download.

The parameters stored on the iR-ETN are already in effect unless overwritten by Codesys, so if you only need to update a few parameters, I recommend moving only those parameters that require an update such that they are on “Line” 20 or below.



The second module parameters are beyond the first 20 init values as described earlier. However, after some power cycle tests, I’ve found some parameters are retained after power cycle, but Filter Frame size is not. First pic - before power cycle; second pic - after power cycle.

Third pic indicates corresponding Modbus addresses in Codesys, confirming params 39 thru 50 are not loading to module on power cycle.

Since I need to retain init values outside of the 20 that are sent automatically at power up, I’ll have to write these others in code. Is that best done in Easy Builder or Codesys?

Hi @donnedved25,

All of the parameter values set within EasyRemote IO are saved within the I/O during download. These parameters may be overwritten using the “Modbus Slave Init” tab by moving the corresponding rows to a line between 1 - 20. If the initializations that are currently set within 1 - 20 did not change from what was initially set within EasyRemote IO you can move these rows beyond line 20 and the parameter values will still take effect.

If you would like to avoid any confusion with the initialization process above, you can set parameters or any value programmatically via the following steps:

  1. Delete the initialization that you would like to set programmatically:

  2. Within a POU declare the a variable of type ModbusCommand, ModbusRequest, UINT, POINTER TO UINT, as well as two BOOLs. Then use an “EXECUTE” block to initialize the required ModbusCommand components as shown below:
    Note: Within the example below, I use a function block called “ModbusRequest” to set the current value of “Digital Input Filter Time #0” during runtime.

Note: The “slave” parameter should reference the the name of the iR-ETN used within your project tree.

Note: The command.uiWriteOffset should be equal to the value of “0 base dec address” within EasyRemote IO:

Note: This method does not require a new “channel” within the iR-ETN’s configuration.

Can you expand on this statement? Parameter values that are set within EasyRemote I/O? And saved to where, EasyRemote I/O file save or imported into Codesys? And which download? Downloading to the module from within EasyRemote I/O or Codesys?

I’ve already demonstrated that some parameters are defaulting back to ‘default’ values after a power cycle and others are retained, hence my desire for more info. Thanks!

When you configure parameter values within EasyRemote IO and click the download () or download all () buttons, the parameters will be saved to the iR-ETN and connected modules.

When finished, you may export a PLCopenXML file to import the module configuration into Codesys. This file contains device mapping as well as any Modbus Slave initializations that you select within the “Init” section. However, all of the parameters are selected by default.

After importing this file into Codesys, all of the “Init” parameters will be added to the “Modbus Slave Init” tab, but due to certain limitations, only 20 parameters may be implemented at boot:

If you update a parameter value using EasyRemote IO after downloading your Codesys project, the Codesys initializations may overwrite the update with the old parameter value (originating from the PLCopenXML file) at boot due to the aforementioned initializations. The parameter values should not be overwritten if the corresponding Codesys initializations are located beyond line 20 because Codesys will not execute more than 20 initializations.

Ah, ok. But going back to my post #5 showing data before and after power cycles, range limits remain intact, but frame sizes are not. Thoughts?

This has me very concerned since I’ve had a customer purchase 9 Weintek/Codesys systems which have multiple analog modules. If some parameters are preserved while others are not (the ones beyond the first 20 window) I need to alert them.

@donnedved25,

Can you please post an image that shows lines 1 - 20 within the “Modbus Slave Init” tab of your project?


Here you go. Keep in mind this is for the first analog module which is fine. My concerns are for the second module which is outside the block of first 20.

Hi @donnedved25,

I was not able to replicate a similar issue with other modules. I will perform another test tomorrow morning, but if possible, please send me your project files via email as well because this issue should not occur.