AdvancedHMI Software
General Category => Support Questions => Topic started by: simon k on April 25, 2016, 10:04:23 PM
-
Hiya - things are going well, I have a couple of simple HMIs in the factory and running pretty smoothly
I occasionally get "Unknown Code -34", I think it may relate to poor comms? I've seen it on one HMI thats on a WiFi windows tablet, and the other on a wall mounted all-in-one PC (cat5)
Here's the stack trace from it (I dump them into the event log)
Unknown Code -34
at MfgControl.AdvancedHMI.Drivers.CIP.ForwardOpen(Int32 sendSequence)
at MfgControl.AdvancedHMI.Drivers.CIP.SendConnectedMessage(Int32 serviceCode, EPath path, Byte[] data, Int32 sequenceNumber, Int64 ownerObjectID)
at MfgControl.AdvancedHMI.Drivers.CIPforCLX.WriteTagValue(CLXAddress tag, String[] value, Int32 numberOfElements, Int32 sequenceNumber, Int64 OwnerObjectID)
at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.BeginWrite(String startAddress, Int32 numberOfElements, String[] dataToWrite)
at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.Write(String startAddress, Int32 numberOfElements, String[] dataToWrite)
at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.Write(String startAddress, Int32 dataToWrite)
any workarounds or ways to deal with it would be much appreciated
thanks
Simon
-
This is the description of General Status 34 from the CIP specification:
An invalid reply is received (e.g. reply service code does not match the request service
code, or reply message is shorter than the minimum expected reply size). This status
code can serve for other causes of invalid replies.
This code must come directly form the PLC. It is occurring on a ForwardOpen which means either the application has just started up or the communications have dropped out and it had to re-establish. About the only way to get more details on this would be a WireShark capture
-
gotcha - thanks Archie
-
Do you have items on the page that continuously update such as a BasicLabel? The reason I ask is because there is a known bug when communications are programmed to only occur at random intervals. After 10 seconds of no communications, the driver will automatically close the connection.
You can add this code to your form to log the opening and closing of the connection:
Private Sub EthernetIPforCLXCom1_ConnectionEstablished_1(sender As Object, e As EventArgs) Handles EthernetIPforCLXCom1.ConnectionEstablished
Using sw As New System.IO.StreamWriter(".\ComLogFile.txt")
sw.WriteLine("Established at " & Now)
End Using
End Sub
Private Sub EthernetIPforCLXCom1_ConnectionClosed_1(sender As Object, e As EventArgs) Handles EthernetIPforCLXCom1.ConnectionClosed
Using sw As New System.IO.StreamWriter(".\ComLogFile.txt")
sw.WriteLine("Closed at " & Now)
End Using
End Sub