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 - jsu0234m

Pages: [1] 2
1
Open Discussion / SQL Timeout Error Popup
« on: February 14, 2020, 01:16:15 PM »
I created a line monitoring advanced hmi project last year that displays information to operators in our break rooms and it works great except for every so often i get a SQL timeout popup that happens and it blocks some of the screen, it continues to update the data on screen and pull from SQL as normal even with the timeout error on the screen. So it still works, it just has a error saying it timed out reading from SQL one time. It updates and re-pulls the data every 30 seconds so if it misses a couple times I'm not worried about it.


Is there a way to turn off the error popups? I know its probably better to figure out why SQL is timing out and fix that but its not really worth my time in tracking that down if i don't have too.

Any ideas on how to stop this error from popping up?


2
Since you are not using any of the AdvancedHMI drivers or controls it is better not to base the application on AdvancedHMI.

- File->New->Project
- Select Windows Forms App for Visual Basic
- Give it a name and click Next
- Once the applications is created, in Solution Explorer right click the project and select Add->Existing Item
- Browse to and select the DateCalc.vb file in the other project
- You should now be able to run your application

It has to be a windows 10 and shared files issue. I did what you said and and saved it to our file server and i was able to open it from my windows 7 machine and it worked right but once i tried to open it from the windows 10 machine it gave me a network error.

3
I also have another program that pulls data from SQL and AB PLC's that isn't working as well. The date calclator program is small and easy to dig into that's why i was using it as a guinea pig. I'll try what you're explaining though and see if it fixes the problem.

4
I built it in AdvancedHMIv35 but ill try what your talking about. I'm not a Vb programmer so bear with me. I attached another screenshot showing the header and version. There are two other forms one is MainForm and the other is Page2.

5
Here's the code behind the screen and a screenshot of it. This one is a pretty simple application to convert dates for QA.

Code:
Public Class DateCalc

    'On screen startup set the initial value of the dropdown box.
    Private Sub DateCalc_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ShelfLife.SelectedIndex = 1 'Select the first value in dropdown box on screen startup.
    End Sub


    Private Sub BtnShelfLife_Click(sender As Object, e As EventArgs) Handles BtnShelfLife.Click
        Dim ProductDate As Date = ProdDate.Value
        Dim ShfLife As Int16 = ShelfLife.Text

        'Format Production date as Julian date.
        Julian.Text = ProdDate.Value.DayOfYear

        'UseBy Date = ProductDate + ShfLife, Converted to MMM DD YYYY format.
        UseByDate.Text = String.Format("{0:MMM dd yyyy}", ProductDate.AddDays(ShfLife).Date)



    End Sub

End Class

6
I dont think so, but im not entirely sure what that is.

7
The full path name.

8
I opened the security up to everyone with full control on our file server so i don't think its permissions. I also tried to run as administrator and it does nothing. When i click the shortcut nothing happens at all on screen, the only way i know its erroring is if i look at the event logs and it has a couple of errors each time i try to open it. I also changed the .net framework settings in the project a couple of times to see if maybe that would help but i didn't notice any change. I attached the errors below.

First Error:
Faulting application name: AdvancedHMI.exe, version: 3.9.9.24, time stamp: 0x5ce69e0d
Faulting module name: KERNELBASE.dll, version: 10.0.17134.1, time stamp: 0x149ab0fd
Exception code: 0xe0434352
Fault offset: 0x0010d722
Faulting process id: 0x22a4
Faulting application start time: 0x01d51170f02b4a27
Faulting application path: \\gad-fs\Depts\Line Overview\Date Calculator\AdvancedHMI\bin\Debug\AdvancedHMI.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: ed39db77-f311-4a52-ae64-16b8e80c4d21
Faulting package full name:
Faulting package-relative application ID:

Second Error:
Application: AdvancedHMI.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Net.Sockets.SocketException
   at System.Net.Sockets.Socket..ctor(System.Net.Sockets.AddressFamily, System.Net.Sockets.SocketType, System.Net.Sockets.ProtocolType)
   at System.Net.Sockets.TcpListener..ctor(System.Net.IPAddress, Int32)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(System.Collections.IDictionary, System.Runtime.Remoting.Channels.IServerChannelSinkProvider, System.Runtime.Remoting.Channels.IAuthorizeRemotingConnection)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(System.Collections.IDictionary, System.Runtime.Remoting.Channels.IServerChannelSinkProvider)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.RegisterChannel(ChannelType, Boolean)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
   at MfgControl.AdvancedHMI.My.MyApplication.Main(System.String[])

9
We are in the process of upgrading from windows 7 to windows 10 Ent and I'm having trouble getting the AdvancedHMI programs to run on these new windows 10 machines. I have the source files saved on our file server so all we have to do is give users a shortcut to the .exe file and it worked on windows 7.

On windows 10 this doesn't work anymore and the only way I've found to get it to work is to copy the entire debug folder to the windows 10 machine which is a problem because if i need to update the project ill need to go around to every ones PC and copy the new debug folder to their PC's.

Is there anyway around copying the entire debug folder over to the users PC to get it to work with windows 10?

10
Open Discussion / Re: Swapping screens every 45 seconds
« on: October 11, 2018, 10:38:33 AM »
Thanks for your help. I got caught up in another project and am just now getting back to this. I'll try these and see what i can figure out.

11
Open Discussion / Swapping screens every 45 seconds
« on: August 10, 2018, 06:11:45 AM »
I'm working on a project that has two screens and i want them to swap back and forth between each other after a certain amount of time. I have the two screens working and can swap back and forth as needed with form change buttons but i would like to add a button to enable the screens to swap back and forth on there own after a certain time has passed.

Process:
Main screen opens when project opens, press a button to enable screen swapping, wait 45 seconds and then swap to the 2nd screen, wait 45 seconds and swap back to the first screen. Repeat until screen swapping is turned off.

I have a timer on the screen and set to 45 seconds but i can't figure out how to actually call the screen change when the timer is done.

Any help would be appreciated, i've googled my heart out and i don't think i know enough about visual studio to search for the right help because i have found about everything else besides calling a form change button.

12
Thanks for your help. You got me looking in the right direction.

What i ended up changing was the AutoScaleMode to be Font on all my screens and that fixed it.

13
I have a weird problem where some of the information on my screens gets cut off on some computers and not on others? See screenshot below. The top display is from one computer and is cutting off most of the values and the bottom one is from my computer showing everything.

I've tried different scaling options but i can't seem to find the right combination to fix my problem.

14
Application Showcase / First AdvancedHMI Project
« on: April 05, 2018, 12:06:04 PM »
Our GM wanted a Line Stats screen so he and the operators could see how they were doing at any point throughout the day. We already had all the data in PLC's and SQL DB's we just needed it all put together on one screen for easy viewing.

Up to this point FactoryTalk View Studio is the only HMI program i had ever used, so i did a lot of head scratching trying to figure out how to make different things work but it was kind of fun to try something different.

Overall, it works great and they love it.

15
That was the problem. Thanks for your help.

Pages: [1] 2