[Bug-15335]Zero-Based Addressing

Totally missed this…

Modbus Driver

14790: Fix the one-based addressing setting
Converted the One-Based Addressing setting in Modbus devices to Zero-Based Addressing.

In the Nightly Changelogs

After I updated to the 8.0.6 Nightly (from 10/28) and I couldn’t write to any PLC tags. Recieved “invalid address” error.

When I reverted back to 8.0.5 I still had the same issue! Then I realized that the zero-based addressing check mark in the devices advanced setting had cleared.
image

While using 8.0.5 I checked the setting and everything worked.

Updated to the 8.0.6 Nightly and unchecked the setting and everything is working.

Wanted to share in case someone else is scratching their head.

1 Like

Hmm. The setting value for existing devices should have also flipped on upgrade. Functionality between 8.0.5 and a system upgraded to 8.0.6 should be the same.

Did you upgrade or do some kind of restore? Did reads work but not writes, or were both broken?

Reads worked fine but was not able to write to PLC tags.

I did not do any kind of restore.

I was running 8.0.5 stable version, installed previously using downloaded installation executable.
Downloaded Nightly windows installer executable and installed it. That’s when my ‘writing’ broke.

Re-ran the 8.0.5 installation executable (in my mind this reverted it back to 8.0.5). Writes were still broken and the zero-based check box was unchecked.

Checked the zero-based setting and writes worked.

Ran the 8.0.6 installation executable again and writing was broken again. Went to device settings and the zero based setting was checked.

Cleared the zero based addressing check box and all is working well.

What looks to be happening is the Modbus driver is initializing with the old value before the update to the setting occurs. This means after the initial startup after upgrade things will be broken. Subsequent restarts of the Modbus driver (via restart of the Gateway or restart of the module) look to be resolving this in our testing. If you can confirm that, we would appreciate it. A ticket is being opened to resolve this issue.

Thanks for reporting this,
Garth

I currently have 8.0.6 (10/28 Nightly) installed and had previously unchecked the zero based addressing option in order to write to PLC tags today.

Here are the steps I just did…
With 8.0.6 Nighlty, I checked the zero based addressing option and saved the setting.

installed 8.0.5
zero based is still checked ( This is not what I saw before. It was unchecked last time I reverted)
restarted gateway from cmd line “gwcmd -r”
zero based addressing still checked

installed 8.0.6 (10/28)
zero based address is still checked.
restarted gateway from cmd line “gwcmd -r”
zero based address is still checked.

I’m not in a position tonight to confirm PLC functionality but I don’t mind trying again tomorrow if you want.

Just check and confirmed that I can not write to PLC this morning after reinstalling and restarting 8.0.6 last night.

I just restarted the Gateway again and even restarted the Modbus Module Driver.
Zero based addressing is still checked and I can not write to PLC tags with the option checked.

I need to un-check the zero based option and put the system in use for most of today.

Based on the path your system has taken, what you are seeing is expected. When you reverted to 8.0.5, it doesn’t sound like an 8.0.5 backup was restored and because the 8.0.6 schema update had already run, it won’t be run again. Unchecking the option and staying at 8.0.6 RC1 will likely be your best option at this point just to ensure there is stability on the system. You will want to upgrade to 8.0.6 when it is officially released.

Garth

Sounds good to me. Thank you!