AdvancedHMI Software
General Category => Support Questions => Topic started by: opmal7 on April 17, 2017, 04:42:42 PM
-
I'm using a Micrologix 1100 PLC with a tablet running AdvancedHMI 3.98t.
One of the issues that I've run into is that when the tablet screen is locked, the connection to the PLC gets disconnected. Then when the screen is unlocked, the program locks up, and doesn't appear to be communicating with the PLC anymore. If I exit the program, and restart it, the program works fine.
I was wondering if there is any way to prevent this from happening. Or, if there is a way to make a button to re-establish the connection with the PLC. Then I could make a popup dialog box saying "Connection interrupted, Click OK to re-establish the connection" or something along those lines. Thanks.
-
Try using 3.99w
-
I'm on 3.99x and if the IP isn't correct when you start the HMI it locks up before I have a chance to update the IP from my on screen textbox. Trying to figure out how to prevent this. Any help would be appreciated.
-
I'm on 3.99x and if the IP isn't correct when you start the HMI it locks up before I have a chance to update the IP from my on screen textbox. Trying to figure out how to prevent this. Any help would be appreciated.
Try it on V3.99y Beta that you can download from this forum.
-
Thanks, I'll give that a try!
I did build a work around but would like it not to freeze up if it looses comms.
-
Try it on V3.99y Beta that you can download from this forum.
How do I migrate my project to 3.99y or does running the "AdvancedHMIv35.sln" file from 3.99y update my PC so when opening the project from the old folder opens with "y"?
I did try this from another thread and I get a bunch of "...not a member of..." errors
"As long as you don't cross over the 3.5 version update:
1) Open the newest version in Visual Studio
2) Right Click AdvancedHMI in Solution Explorer
3) Select Add->Existing Item
4) Browse to and select your .vb files (forms) from your previous project"
I added my MainForm.vb which is my only page. Is there something else I need to import using the Add function?
Thanks.
-
Anyone? I'm sure I am missing some minor detail or I've over simplified adding just the MainForm.vb file. It can't be that difficult to move my project from 'x' to 'y'.
One error I did notice was for an image file I had on my MainForm so that was easy to import manually. Since it didn't migrate the graphic over, there must be more to do to bring the project over than import the one .vb file?
-
Anyone? I'm sure I am missing some minor detail or I've over simplified adding just the MainForm.vb file. It can't be that difficult to move my project from 'x' to 'y'.
One error I did notice was for an image file I had on my MainForm so that was easy to import manually. Since it didn't migrate the graphic over, there must be more to do to bring the project over than import the one .vb file?
Can you post more details of at least one of the errors?
-
A screenshot seemed the easiest way to share what I'm seeing.
-
Open MainForm.designer.vb and do a Search and Replace for ".LightColors" to ".LightColorOption"
-
That seems to have cleared up quite a few. Here's what is left.
Thanks for the assistance!
-
VisibleControlEnum -> VisibleControlOptions
ForeColoeAltername -> ForeColorAlternate
HighLightColor* and HighlightKey* -> delete each line completely. Those properties no longer exist.
-
Thank you very much, would have never figured that out on my own. Some things are broken now as I was using those obsolete things but I think I can work with this.
Really appreciate it.
Shane
-
Unfortunately it still locks up if the Modbus TCP comm fails.
-
I have a couple "MessageByDisplayValue" functions that broke after that. When I try to open the "Collection" to repair the messages Visual Studio shuts off and restarts.
Update:
I just copied the old ones from 399x and pasted them to 399y and it seems to have worked.
-
Some things are broken now as I was using those obsolete things but I think I can work with this.
The Highlight colors and characters are now controlled with each message through the use of foreground and background colors
-
How to prevent the program from crashing when accessing a plc that is not connected?. It can be controlled with some instruction that the plc is connected before accessing to read in it?.
-
How to prevent the program from crashing when accessing a plc that is not connected?. It can be controlled with some instruction that the plc is connected before accessing to read in it?.
Are you using V3.99y beta? it has better communication handling.
-
I am using version 3.99x.
I have an other question.
How can I run multiple apps at the same time?
-
I already found the solution to the question of how to run multiple applications in the tips and tricks section.
Is there a way to control if a plc is connected before executing a read or write in it, to avoid the error or if we control the error that there is no delay time. For example
if OmronEthernetFINSCom1 is connected then.
It is possible to use or implement the property?
-
I have to control a network with 6 omron plcs with the OmronEthernetFinsCom driver, the problem is that if there are plcs not connected, and I execute a read or write instruction to the plcs not connected, the delay time is high. My question is,You can control if a plc is not connected,so do not perform a read or write access on it and avoid communication delay.
Example: if OmronEthernetFinsCom is connected Then OmronEthernetfinsCom.Read("D10") end if
-
You can use..
OmronEthernetFinsCom.ConnectionEstablished
OmronEthernetFinsCom.ConnectionClosed
OmronEthernetFinsCom.ComError
OmronEthernetFinsCom.DataReceived
to monitor the status of the device comms.
Then
OmronEthernetFinsCom.PollRateOverride
OmronEthernetFinsCom.DisableSubscriptions
to throttle or enable / disable comms. Up to you how you code it to suit your requirements.
-
The event or property ConnectionEstablished and ConnectionClosed I can't find them.
If I use the ComError event
the delay time is about 4 sec.
I have 6 plc in the network, if all of them are disconnected, the delay time is 46 seconds.
How can I monitor if the plc is connected without having to read or write to the plc, since it causes execution time until the ComError event occurs.
-
Reduce the timeout ?
-
Yes.
-
Yes what? Did you reduce the timeout? Did it help your problem?
-
No, the waiting time is the same, about 46 sec. , if the 6 plcs are disconnected. How can you reduce the Timeout?. I'm also testing with Ping, but the timeout is also high. How can you reduce the timeout of Ping?.
-
Reduce the timeout in the comms driver properties, looks like the default is 3secs, change it to 200ms or something that will give error free comms when you actually have stuff connected.
-
The event or property ConnectionEstablished and ConnectionClosed I can't find them.
They don't exist for the Omron driver. Attached are some patch files that can be used with 3.99y Beta that adds those events.
Extract the zip file, then replace the files in the AdvancedHMIDrivers project with the attached files, then Rebuild Solution
NOTE: These events have not been tested
-
With the Timeout 200 property the total time is 34 sec., with the Timeout at 3000 it is 38 sec., I don't understand why. The solution that I have implemented that works for me is with Ping. Example:
Dim p As New Ping
Dim response = p.Send("192.168.250.1", 100)
If response.Status.ToString <> "TimedOut" Then
Try
OmronEthernetFinsCom.Write("W61.01", 1)
Catch ex As Exception
End Try
end if.
With the use of Ping, the waiting time is 3 seconds, with the 6 plcs disconnected.
-
It appears there is a bug in the timeout of the ping command, anything less than 500 ms will default to 500ms. It will work with multiples of 500 ms.
Are you going to test out the new driver?
Dim PingSender As Ping = New Ping()
Dim PLCIsConnected As Boolean() = Nothing
Dim lines() As String = ReadAllLines(".\PLCDevicesList.txt")
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Debug.Print(DateTime.Now())
Dim i As Integer = 0
ReDim PLCIsConnected(lines.Count() - 1)
For Each lineItem In lines
Dim PingResponse As PingReply = PingSender.Send(lineItem, 500, Encoding.ASCII.GetBytes(1), New PingOptions(64, True))
If PingResponse.Status = IPStatus.Success Then
PLCIsConnected(i) = 1
Else
PLCIsConnected(i) = 0
End If
i = i + 1
Next
Debug.Print(DateTime.Now())
End Sub
Archie, how about adding a function 'IsConnected' to the driver? Other drivers I have seen, they all have that feature.
-
I agree, You would have to create the IsConnected property in the drivers, to avoid the execution of read or write in the plc, if there is no connection, and thus avoid delay times.