Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wesley

Pages: [1]
1
Tips & Tricks / Re: Modbus RTU for the Horner OCS
« on: September 09, 2014, 04:48:23 PM »
The 369 version works great with the components. But for some reason, a read using ModbusRTUCom1.Read("03902", 1) is getting a 0 as the ID in the WaitForResponse which yields a null since the response is coming back with an index of 1.

2
Support Questions / Modifing the project name from AdvancedHMIv35
« on: July 17, 2014, 02:11:00 PM »
I'm very pleased with the AdvancedHMI software and am willing to put some type of acknowledgment in my releases to AdvancedHMI and/or Archie but would like to change the project name from AdvancedHMIv35 to something that indicates what my HMI is used for. I've tried several approaches to change the project name without success. If anyone has had success on this, I would appreciate a reply with the steps necessary to accomplish this.

3
Feature Request / Re: Request a MODBUS over RS232 driver
« on: July 17, 2014, 01:58:18 PM »
I've used this with a Horner OCS (touch screen with PLC) and it appears to work with a couple of tweaks - see my post in the Tip & Tricks for Horner Mobus RTU.

4
Tips & Tricks / Modbus RTU for the Horner OCS
« on: July 17, 2014, 01:53:23 PM »
There are some small tweaks necessary to the ModbusRTUCom.vb to use it with the Horner OCS HE-XT102:
In SendData:
           If Not InternalRequest Or (DLL(MyDLLInstance).SendQueDepth < 10) Then
                DLL(MyDLLInstance).SendRTUFrame(FinsF)
                'Added for Horner
                Threading.Thread.Sleep(100)
                'End of add for Horner
                Return True
            Else
                Return False
            End If

In Write function:
            Dim PDU As New ModbusPDUFrame(address.WriteFunctionCode, address, dataPacket.ToArray)
            Dim RTUPacket As MfgControl.AdvancedHMI.Drivers.ModbusRTU.ModbusRTUFrame

            'Modified to work with the Horner
            If address.BitsPerElement = 16 Then
                PDU.EncapsulatedData(2) = PDU.EncapsulatedData(5)
                PDU.EncapsulatedData(3) = PDU.EncapsulatedData(6)
            Else
                PDU.EncapsulatedData(2) = PDU.EncapsulatedData(5)
            End If
            'End of Horner modification
            RTUPacket = New ModbusRTUFrame(m_StationAddress, PDU, CurrentTNS)


            SendData(RTUPacket, address.InternallyRequested)
            Return New String() {"0"}
            'End SyncLock
        End Function

Then in the Horner put in the following attached 2 rungs:

I used VB.Net 2013 and the components (integer and boolean) work. Also, the following commands work:
Dim strResult(4) As String
strResult = ModbusRTUCom2.Read("43901", 1) 'reads %R901
strResult = ModbusRTUCom2.Read("03009", 1) 'reads %M9
ModbusRTUCom2.Write("43902", "12345") 'writes %R902
ModbusRTUCom2.Write("03017", "0") 'writes %M17

Archie probably has a cleaner approach but this works.

Pages: [1]