Author Topic: AHMI Not Updating Values  (Read 618 times)

mustangman86

  • Newbie
  • *
  • Posts: 2
    • View Profile
AHMI Not Updating Values
« on: September 01, 2020, 09:02:37 AM »
I'm relatively new to AHMI and VB.net in general.  I have an application, started by others in 3.99e, that I've added 5 string and 5 dint tags to.  The PLCAddressValue is set programmatically depending on which Station on an assembly line is selected. 

Code: [Select]
                plcNextSpec1.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Specs[1]"
                plcNextStation1.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Stations[1]"
                plcNextSpec2.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Specs[2]"
                plcNextStation2.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Stations[2]"
                plcNextSpec3.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Specs[3]"
                plcNextStation3.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Stations[3]"
                plcNextSpec4.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Specs[4]"
                plcNextStation4.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Stations[4]"
                plcNextSpec5.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Specs[5]"
                plcNextStation5.PLCAddressValue = "Sta" + lblStationNumberValue.Text + "_Next5_Stations[5]"

When I change the station number, the value of these 10 tags will update properly on the AHMI screen.  However, when the values of these tags change in the PLC, the values on the HMI screen may or may not update.....they will instead stay at their previous value. 

The application is using EthernetIPforCLXCom1 driver to communicate to an Allen Bradley 1756-L73 processor.  Other items on the screen are changed in a similar manner and work without issues. 





mustangman86

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AHMI Not Updating Values
« Reply #1 on: September 02, 2020, 04:37:33 PM »
Update:  I ran a Wireshark trace and noticed that in addition to some Successes, there were also some "Embedded Service Errors".  Looking into these packets, there ~ 14 items of which the first 10 indicated "success" and ~4 that indicated a "Partial Transfer".  Wireshark screenshot attached.

I came across this page https://advancedhmi.com/documentation/index.php?title=Multi_Read_Service_with_CLX_driver with this note.
Quote
IMPORTANT NOTE: The default maximum packet size is 508 bytes in which about 28 bytes are the header. It is up to the programmer to ensure the list of tag name lengths do not exceed this size.


I disabled the multi service request and the wireshark errors went away and my tag values are updating properly.
Quote
The multi read service is the most efficient way to read a mix of multiple tags because it sends it all in a single packet.
I'm hesitant to deploy using this solution however, because it will be running on 70-80 PCs and my processor is already fairly well taxed.  I'd normally want to do things in the most efficient way possible, but in this case it just doesn't work.  Will I be setting myself up for failure if I deploy with the multi-read service disabled?  Are there other options?





Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: AHMI Not Updating Values
« Reply #2 on: September 03, 2020, 08:35:07 PM »
I'm not sure about V3.99e since it is quite an old version. There was a bug in one of the 3.99y Beta version where it did not always calculate the packet size correctly which had this exact same symptom. This is fixed in the latest version so I would recommend updating the version.