Author Topic: Unitronics ModbusTCP  (Read 1380 times)

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Unitronics ModbusTCP
« 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #1 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

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #2 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #3 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.

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #4 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #5 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?

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #6 on: January 29, 2019, 06:15:03 PM »
version 399

attached are the good and bad files.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #7 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?

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #8 on: January 29, 2019, 06:25:17 PM »
My apology, its 3.99W

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #9 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

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #10 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.


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #11 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.

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #12 on: January 30, 2019, 03:54:19 PM »
I'd be happy to test the Modbus addressing for you.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Unitronics ModbusTCP
« Reply #13 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

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Unitronics ModbusTCP
« Reply #14 on: January 30, 2019, 04:45:54 PM »
Bravo 8) addressing problem fix confirmed.

Thanks Archie..