AdvancedHMI Software

General Category => Support Questions => Topic started by: Neeh on January 29, 2019, 02:51:21 PM

Title: Unitronics ModbusTCP
Post by: Neeh on January 29, 2019, 02:51:21 PM
Hi,

I am trying to read an MI (904hex) register from Unitronics PLC via ModbusTCP and I'm not getting the correct value.  I'm not sure if I set the PLCAddressValue correctly, tried 0904 and 02308.  Attached is the Unitronics register mapping.

Appreciate any help please, thanks.
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 29, 2019, 03:04:29 PM
If MI is an integer, then it must start with a 4, so try

42308 or 42309
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 29, 2019, 05:15:55 PM
Thanks Archie, that works.

Another strange issue I am running to is; The basic label unpredictably and randomly do not show the value from the PLC when the program is run.  Every run has different outcome, sometimes it's all good.  See attached screen-shot.
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 29, 2019, 05:22:23 PM
Lower the MaxGroupReadSize. Try 1 to see if that is the problem, but then increase to as high and you can get away with.
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 29, 2019, 05:29:13 PM
MaxReadGroupSize lowered to 1, does not fix it.

Note, the basic labels in Extruder group always works well.  Only zone and head temperature are affected.
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 29, 2019, 05:42:26 PM
What version of AdvancedHMI are you using? Can you run a Wireshark capture and post the resulting file?
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 29, 2019, 06:15:03 PM
version 399

attached are the good and bad files.
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 29, 2019, 06:19:44 PM
Which version of 3.99? There will be a letter designation after it. Can you try this with the latest beta version of 3.99y?
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 29, 2019, 06:25:17 PM
My apology, its 3.99W
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 29, 2019, 06:47:28 PM
Try it with 3.99y Beta by adding your current form to the project:

https://www.advancedhmi.com/forum/index.php?topic=2058.30
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 30, 2019, 03:07:29 PM
3.99y Beta seems to fix value updating issue.

I observed some inconsistencies between 3.99w and3.99y :
     -  basiclabel has removed or replaced or added properties (at least 2 were no longer valid in 3.99y)
     -  plcaddressvalue, the option of doing 3:769 does not work in 3.99y.  It has to be 4769.

Title: Re: Unitronics ModbusTCP
Post by: Archie on January 30, 2019, 03:29:22 PM
3.99y Beta seems to fix value updating issue.

I observed some inconsistencies between 3.99w and3.99y :
     -  basiclabel has removed or replaced or added properties (at least 2 were no longer valid in 3.99y)
     -  plcaddressvalue, the option of doing 3:769 does not work in 3.99y.  It has to be 4769.
New versions do commonly remove or rename properties to attempt to make things easier to understand, but the Modbus addressing using forced function codes should not have been changed. I will look into that.
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 30, 2019, 03:54:19 PM
I'd be happy to test the Modbus addressing for you.
Title: Re: Unitronics ModbusTCP
Post by: Archie on January 30, 2019, 04:22:28 PM
An update has been posted that should fix the addressing problem:

https://www.advancedhmi.com/forum/index.php?topic=2058.msg13516#msg13516
Title: Re: Unitronics ModbusTCP
Post by: Neeh on January 30, 2019, 04:45:54 PM
Bravo 8) addressing problem fix confirmed.

Thanks Archie..