Author Topic: Problem with 399a ....  (Read 1713 times)

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Problem with 399a ....
« on: October 30, 2015, 04:33:50 PM »
Upgraded from 398t to 399a.

The development computer is Win7 Pro 64-bit, the application runs fine.
The 2 HMI panels are Win7 Pro 32-bit, the application runs at turtle pace, not usable; click any windows' control takes over 5 mins to response or does not response at all.

The code has a few modbusTCPCom read and write in timer1_Tick event. The slow problem goes away if the timer is disabled or all the modbusTCPCom codes in the timer event are commented out; all windows' buttons and tabcontrol are responsive.

Not sure if the following 2 changes in the 399a release note have anything to do with the slow problem in the 32-bit computer.
Modbus - Writes are synchronous to avoid  SendQue full
Modbus - Improved response with Waithandle

I am unable to troubleshoot since the HMI computers do not have VS installed and they belong to the client.

I need a quick fix else will have to rollback to 398t.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Problem with 399a ....
« Reply #1 on: October 30, 2015, 04:38:10 PM »
What is the rate of the timer? My guess is the timer is as fast or faster than the time it takes to write the data. Since the writes are now synchronous, the OI will basically hold up until the write completes. If you continuously write, then the OI never gets a chance to service other input.

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Problem with 399a ....
« Reply #2 on: October 30, 2015, 05:19:38 PM »
5ms. The HMI panels has i5-4300U @ 1.9GHz, the development computer has i7-4610M @ 3GHz.

I just tried 399, application works in both 64-bit and 32-bit Win7 Pro.

It seems there is a bug in 399a with 32-bit system.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Problem with 399a ....
« Reply #3 on: October 30, 2015, 05:53:12 PM »
It's easy to rule out the synchronous write. Edit ModbusBase.vb and go to line 244 and comment out. This is the line you should comment out:

Dim signal As Boolean = waitHandle(TransactionByte).WaitOne(3000)

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Problem with 399a ....
« Reply #4 on: November 02, 2015, 11:03:20 AM »
Back to 399a, comment out line 244 does not fix the problem.
However, increase the timer to 250ms does fix the problem.
« Last Edit: November 02, 2015, 11:19:10 AM by robkwan »