Author Topic: comm error 6 from wrong device  (Read 1103 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
comm error 6 from wrong device
« on: December 29, 2014, 03:02:49 PM »
Hi all,  I am getting  a "comm error 6-slave device is busy" message from the wrong device.  What I mean is I have two devices connected ModbucTCP with two seperate drivers ModbusTCPCom1(172.16.0.2 ID1) and ModbusTCpcom2(172.16.0.2 ID 2).  I have three buttons that are set to "write value".  Button 1 write value 4, button 2 write value 2, button 3 write value 0 all assigned to driver ModbusTCPCom1.  When AHMI is first opened the buttons work perfectly and do exactly what is expected.  However if AHMI runs for a couple minutes and then i press any of the buttons I get the comm 6 error message but it comes from the device ID2 that is ModbusTCPCom2 and not from ID 1(see pic).  The values in blue are from device ID2, red and green are from ID1.  No matter what I do, i cant get out of this condition even if I restart AHMI.  I am using AHMI V3.94, thanks. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: comm error 6 from wrong device
« Reply #1 on: December 29, 2014, 08:11:36 PM »
This one is a little tricky for me to track down since I do not have a similar setup to test with, but what I have done is to modify the ModbusTCP driver so it uses the first byte of the Transaction ID as the driver instance. This will allow you to Wireshark the communication and be able to see where the response should be directed to.

I should have a new version posted tomorrow. I just have to finish the TwinCAT driver tonight.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: comm error 6 from wrong device
« Reply #2 on: December 30, 2014, 10:08:58 AM »
Ok. I did some more testing and found the reason that it would stop working after a couple minutes. That was caused by my controller wanting a password reentered after a minute or so. Im not sure why when I pressed any of the buttons for device 1 the error would come up on device 2 but I wrote code that enters the password before any button press and i don't get the error messages anymore. This may have been an accidental find but I can try to wireshark it to see if there is an issue with the driver.  Thanks.