Author Topic: triplc  (Read 8220 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #15 on: December 12, 2014, 09:07:58 PM »
I tried a few different things, but can't reproduce what you are seeing.

Give this a try:

Put 40017 in PLCAddressKeypad
Run the application, then click on the BasicLabel
You should get a popup keypad
enter a value of 1

Let me know what you get from that

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #16 on: December 12, 2014, 09:18:04 PM »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #17 on: December 12, 2014, 09:31:14 PM »
For some reason the driver is not creating what is referred to a DLL. This is what allows all of the communications.

In the Solution Explorer, exapand down the AdvancedHMIDrivers project, then expand down the Modbus folder. Right clock ModbusRTU.vb and select View Code

Go down to line 199 and put a break point by clicking in the left margin until you get a red dot

Run the application and it should stop at that break point. When it does press F10 and see if it steps through this code:

            If MyDLLInstance >= DLL.Count Then
                Dim NewDLL As New ModbusRTUDataLinkLayer(m_PortName)
                NewDLL.BaudRate = m_BaudRate
                NewDLL.DataBits = m_DataBits
                NewDLL.Parity = m_Parity
                NewDLL.StopBits = m_StopBits
                DLL.Add(NewDLL)
            End If

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #18 on: December 12, 2014, 09:43:09 PM »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #19 on: December 12, 2014, 09:47:42 PM »
Yes, now continue to press F10 to see if it executes the code or steps over that block of code. It should go all the way down to the DLL.Add(NewDLL)

Then after F10 a couple more times, it should go to the code :
If EventHandlerDLLInstance >0 Then

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #20 on: December 12, 2014, 09:48:36 PM »
yes it does that

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #21 on: December 12, 2014, 09:54:59 PM »
So now go to line 258 and put a breakpoint to see if it steps through this code. You can remove the other breakpoints by clicking them again.

            If e.RawData Is Nothing OrElse e.RawData.Length < 4 Then
                Exit Sub
            End If

            Dim RTU As New ModbusRTUFrame(New List(Of Byte)(e.RawData).ToArray, e.RawData.Length)

            ProcessDataReceived(RTU.PDU, e)

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #22 on: December 12, 2014, 10:00:08 PM »
nothing happens when i click F10 from there?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #23 on: December 12, 2014, 10:00:42 PM »
Are you using 64 bit or 32 bit operating system? We may find out more things by using a serial port monitor.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #24 on: December 12, 2014, 10:01:24 PM »
nothing happens when i click F10 from there?
Does it stop at the break point at line 258?

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #25 on: December 12, 2014, 10:04:17 PM »
64-bit yes it stops there, i cant jump with f10 from there

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #26 on: December 12, 2014, 10:07:46 PM »
If you can download and install the trial version of this software and monitor the serial port you are using, we can see if the request packets are being sent to the PLC and if the reponses come back.

http://www.hhdsoftware.com/serial-monitor


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: triplc
« Reply #27 on: December 12, 2014, 10:09:09 PM »
i cant jump with f10 from there
Does anything happen if you press F10 after it stops at the breakpoint? What about F11?

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #28 on: December 12, 2014, 10:12:59 PM »
F11 worked

xpsarin

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: triplc
« Reply #29 on: December 12, 2014, 10:15:36 PM »
I downloaded that software to monitor serial