The PCCC packet is essentially the same whether wrapped in an Ethernet/IP packet or sent over serial. The only difference is that it has 2 additional bytes for the source node and target nodes (always 0 for point to point), the checksum, and STX/ETX bytes.
Archie,
Could you provide some more information about these additional bytes?
From your driver code, I can see that you are adding source node and target node values to "datawithnodes" but what variables are holding the checksum, STX/ETX bytes. Would TNS and MyObjectID need to be included in the packet as well?
Friend Overrides Sub SendPacket(packet As MfgControl.AdvancedHMI.Drivers.PCCCCommandPacket, ByVal TNS As Integer)
Dim TNSByte As Byte = Convert.ToByte(TNS And 255)
RawRequests(TNSByte) = packet
RawRequests(TNSByte).Responded = False
Dim data() As Byte = packet.GetBytes
Dim dataWithNodes(data.Length + 1) As Byte
data.CopyTo(dataWithNodes, 2)
dataWithNodes(0) = m_TargetNode
dataWithNodes(1) = m_MyNode
DLL(MyDLLInstance).SendData(dataWithNodes, TNS, MyObjectID)
End Sub
If the following packet is captured from serial port:
HEX 10 02 01 00 06 00 AC 24 03 10 03 E0 00
Would a packet sent directly from driver to server socket have to be the same format?