Author Topic: Index out of range error modbus  (Read 3364 times)

smarttrend

  • Newbie
  • *
  • Posts: 3
    • View Profile
Index out of range error modbus
« on: October 15, 2013, 04:58:04 AM »
Hello,

I'm trying to develop an application based on Modbus but I get an error when I try to read any address higher than 40000 with DigitalPanelMeter . Instead I was able to use a button PilotLight well with the address 00001.

I have attached a snapshot of the error.

I tried a simulator and a real environment.

Thank you.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5365
    • View Profile
    • AdvancedHMI
Re: Index out of range error modbus
« Reply #1 on: October 16, 2013, 07:44:12 AM »
Open ModbusTCPCom.vb and go to line 586 and change the 8 to a 3 like this:

Code: [Select]
Dim BytesPerElement As Integer = Transactions(TNSByte).BitsPerElement >> 3

smarttrend

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Index out of range error modbus
« Reply #2 on: October 21, 2013, 01:50:39 AM »
It's working.

Thanks.

I have another question.

I want when modbus slave is not availabe or network is down just to display a error message on the control that read the value not to popup a msg windows like "Failed data receive" or "Tcp connection failed".

Can you help me?

Thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5365
    • View Profile
    • AdvancedHMI
Re: Index out of range error modbus
« Reply #3 on: October 21, 2013, 04:10:03 AM »
The BasicLabel has a property called SuppressErrorDisplay. The other controls do not have this implemented yet.

smarttrend

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Index out of range error modbus
« Reply #4 on: February 14, 2014, 04:51:42 AM »
Do you know when you will implement this to all controls?

For my projects the best method to do this is to have every control a connection status led.

Thanks.