Author Topic: MODBUS/TCP to Mitsubishi FX3G COILs not being all read  (Read 2047 times)

controls.guy

  • Newbie
  • *
  • Posts: 3
    • View Profile
MODBUS/TCP to Mitsubishi FX3G COILs not being all read
« on: July 26, 2016, 06:19:31 AM »
I am brand new to AdvancedHMI and MODBUS but have connected successfully to a Mitsubishi FX3G PLC c/w a FX3U-ENET module using the ModbusTCPCom driver. (As an aside, I have also connected a Mitsubishi FX3G c/w a FX3U-232ADP-MB Serial module using the ModbusRTUCom driver.)

An observation using VS2012 Express with AdvancedHMI 399m and Modbus/TCP is as follows....

When polling COILS using address 00001 to 00003 for example, only devices 00001 and 00002 return status values when the form is running, by adding additional COIL addresses, then the returned TRUE or FALSE status signals always seem to stop one short. The COILs being read are M0 thru M4 in the PLC shown.

To double check this I added a button with code behind to independently check the coils, and all coils required reported correctly. (See the first attached image.) Also, here is the code behind...

Code: [Select]

Private Sub btnReadCoils_Click(sender As Object, e As EventArgs) Handles btnReadCoils.Click
        Dim CurrentValues() As String = ModbusTCPCom1.Read(CStr(TextBox1.Text), 8)
        Dim msg As String = ""
        For i = 0 To CurrentValues.Length - 1
            msg = msg & "Index " & i + 1 & "=" & CurrentValues(i).ToUpper & vbNewLine
        Next
        MsgBox(msg)
End Sub

If we disconnect the actual Ethernet cable to the PLC, we then get the error message display that indicates that only the first 4 devices are actually being polled, which chimes with the experience described above. (See second attached image.)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5270
    • View Profile
    • AdvancedHMI
Re: MODBUS/TCP to Mitsubishi FX3G COILs not being all read
« Reply #1 on: July 26, 2016, 08:49:26 PM »
Try this patch:

- Download Drivers Patch 3.99n
https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

- Extract the downloaded file
- Open the your AdvancedHMI solution in Visual Studio
- In Solution Explorer, expand down the AdvancedHMIDrivers project
- Right Click the AdvancedHMIDrivers\support folder and select Add->Existing Item
- Browse to the patch file downloaded and extracted from above
- Select and replace existing file
- Rebuild the solution

DanieLoche

  • Guest
Re: MODBUS/TCP to Mitsubishi FX3G COILs not being all read
« Reply #2 on: July 27, 2016, 04:20:34 AM »
I had exactly the same issue a few days ago with the same driver (Modbus TCP).

I can't test it again for now, tell us if it solved the problem controls.guy ! :)

Godra

  • Hero Member
  • *****
  • Posts: 1439
    • View Profile
Re: MODBUS/TCP to Mitsubishi FX3G COILs not being all read
« Reply #3 on: July 27, 2016, 10:29:47 AM »
A simple test with MODRSSim shows that the driver works properly now.

controls.guy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: MODBUS/TCP to Mitsubishi FX3G COILs not being all read
« Reply #4 on: July 27, 2016, 12:46:08 PM »
Yes, the patch fixed this issue (see attached)... and many thanks for the prompt resolution. C.G