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

Pages: 1 2 [3] 4 5 ... 8
31
Feature Request / spinner- flow indicator
« on: September 01, 2019, 04:39:35 PM »
Has anyone created a flow indicator of any type ? Sorry if  it's here ad I missed it.. , I did search but did not find anything..

32
Support Questions / Re: Chart With Logging - Mouse Over
« on: July 11, 2019, 09:39:26 AM »
It seems that only series(0) ToolTip is set. All other series ToolTip property will have to be set as well.
Hi Godra,, could you expand on that? not sure what I need to resolve it, looked at mainform.vb but don't see any code for it. Am I supposed to be looking for something starting with something like this?
Code: [Select]
// Set ToolTips for Data Point Series ....

chart1.Series[0].ToolTip =


33
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 11, 2019, 09:24:58 AM »
Archie I received another response from MS, I think it best for you to handle this since first, you created the test file, and second you are well versed in this area and I am not. 
I sent you an email at your support email address.
   Let me know.

I upvoted your post. Hopefully they won't dump it as quick as they did mine.

Attached is the project I used to reproduce the problem. Feel free to use it. It seems to be an intermittent problem. It seems to reproduce most of the times when I double click the .sln file to open. If I open VS first, then use it to open the solution, it doesn't have the problem.

EDIT : It seems that once I get the error, it no longer matters how I open the solution and it will always give the error until I close the design view.

34
Support Questions / Chart With Logging - Mouse Over
« on: July 10, 2019, 06:09:42 PM »
399y Beta 33 Chart with logging.

I have a chart logging two values that is configured to use a line. The values are logged in 15 minute intervals.


When I rest the mouse over the Top line the value at the cursor is displayed. But it does not display a value when resting the mouse anywhere on the bottom line.



35
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 10, 2019, 10:35:17 AM »
Archie I just responded to MS and attached your file.  Thank you.
Now if you other ADVHMI users would help everyone by up-ticking this it would help hopefully, You owe it to Archie to do so, he has given us so much, a few moments of your time to create an account on MS so you can help is not asking very much and if you already have an account it will take you all of 5 seconds.


See:
https://developercommunity.visualstudio.com/content/problem/635700/visual-studio-launch-errors-vs2019.html

36
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 08, 2019, 01:13:06 PM »

Hi Archie,   Got a reply..  Take a look..   I have not responded et. I will create a new solution and attach it to the report later.     https://developercommunity.visualstudio.com/content/problem/635700/visual-studio-launch-errors-vs2019.html

37
Feature Request / DIGITAL PANEL METER: DIGITS
« on: July 07, 2019, 10:43:02 AM »
Any chance we could reduce the minimum number of digits in the DPM from 4 to 2?

38
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 07, 2019, 10:23:54 AM »
I updated my VS2019 to the latest release and still have the same problem.  Microsoft closed your report and disabled up votes so I posted a new report on the same issue. 


https://developercommunity.visualstudio.com/content/problem/635700/visual-studio-launch-errors-vs2019.html



Click the up vote as shown in the attached picture. If it gets enough up votes, maybe Microsoft will re-consider its priority.

39
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 05, 2019, 07:33:21 PM »
This is the report to Microsoft. If anyone has an account there, please up vote so they will give it more priority.

https://developercommunity.visualstudio.com/content/problem/540557/vs2019-winform-designer-code-error-on-opening-visu.html
Archie I added a comment but I don't know if that helps and I don't know what you mean by "Up Vote" Sorry I am not familiar with MS reporting at all. Are you referring to the Thumbs Up or is there something else to help increase priority?

40
Support Questions / Re: Visual Studio 2019 Form Design View Errors
« on: July 05, 2019, 04:54:20 AM »
Thanks for the heads up Archie, I was just getting ready to post about this.

See image.  Is this one of the errors you are referring to?

41
Support Questions / Re: Write Time to PLC
« on: April 08, 2019, 09:28:40 PM »
If you already have a timer setup for interval, then double click  that timer, it will bring you the tick event and enter something like below:
Code: [Select]
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        ' Time Interval Write                                    DST occur write to PLC
                PLC.Write("N16:0", DateTime.Now.Hour)
                PLC.Write("N16:1", DateTime.Now.Minute)
                PLC.Write("N16:2", DateTime.Now.Second)
                PLC.Write("B3:0/0, 1)                 'TimeChange Enable bit
    End Sub

btw, do you not want to turn the PLC code off afterwards?

I am getting this error every time the timer reaches set point:

************** Exception Text **************
System.NullReferenceException: Object variable or With block variable not set.
   at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
   at MfgControl.AdvancedHMI.MainForm.PLC_TIME_Tick(Object sender, EventArgs e) in C:\Program Files\AdvancedHMI\BETA_30\AdvancedHMI\MainForm.vb:line 216
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

After doing some research I modified the code slightly to this:-



Code: [Select]
Private Sub PLC_TIME_Tick(sender As Object, e As EventArgs) Handles PLC_TIME.Tick        ' Time Interval Write time to PLC
        PLC.Write("N14:50", Date.Now.Hour)
        PLC.Write("N14:51", Date.Now.Minute)
        PLC.Write("N14:52", Date.Now.Second)
        PLC.Write("B3:10/9, 1")  'Write Time Enable bit     
    End Sub
When I get it to write, I will reset the enable bit in the plc after the write to the RTC

42
Support Questions / Re: Write Time to PLC
« on: April 08, 2019, 07:36:06 PM »
If you already have a timer setup for interval, then double click  that timer, it will bring you the tick event and enter something like below:

btw, do you not want to turn the PLC code off afterwards?

Thank you !! -   I will try that this evening.

Yes I do want to turn it off I just haven't messed with anything in the PLC part yet, what I showed  in the images was just to illustrate how I would write the values to the PLC registers. I would reset the enable bit as soon as the plc clock is updated. I would have to do that or the PLC Clock would always have the same time on it until the next interval. Otherwise I would have to do a write every second.  Not too smart....

Do you have suggestions on using VB code to poll a time server instead of writing the PC Clock values?  My favorites are naturally US Navy's Tick and Tock

43
Support Questions / Re: Write Time to PLC
« on: April 08, 2019, 01:02:15 PM »
Not sure if this is the reason for your problem, but I think you have to write the data first, then enable the time change bit, you can use a one shot to avoid having to turn it of, as it can be too fast for the PLC, and use a timer in the PLC to turn that signal off after a while.

My problem is the VB code part,   I would say you are correct about that, I got the code from a referal by James from another post  by bachphi you can see in this thread. I don't know VB and I don't have time to really dig into it  to learn it well enough to stand on my own two feet so to speak. I don't mind plunking around and trying to figure out what I need for what I am doing but unfortunately I really don't have time to study it.  So I sometimes come here and beg for help on the VB side of it from anyone that can at least help me help myself. I will keep playing with the code and try to get the HMI side to build without errors. 

The code provided is a great help but I need to figure how to modify it for my application and their in is my difficulty.    I would just like to know if I am heading in the right direction.

The PLC side is not problem, I didn't bother showing all the actual logic. The Logic I did show is just some logic I put in a blank program. I have not put anything in the PLC yet.
 A one shot might be needed, that depends on what I use to write to the bit from the HMI,  Have not really thought about it much until I can at least write to the PLC from the HMI with this VB Code sending the PC time to the PLC words 

The PLC side will be easy, very basic programming. I am already doing it manually from the HMI but obviously that is not a long term workable solution.

Thank you!

44
Support Questions / Re: Write Time to PLC
« on: April 07, 2019, 05:03:09 AM »
https://www.advancedhmi.com/forum/index.php?topic=2239.msg12934#msg12934

This may work:

Code: [Select]
Dim localZone As TimeZone = TimeZone.CurrentTimeZone
'
AddHandler SystemEvents.TimeChanged, AddressOf SystemEvents_TimeChanged


Private Sub SystemEvents_TimeChanged(ByVal sender As Object, ByVal e As EventArgs)
      'Occurs when user manually changes the time or due to daylight saving time.                 
       Dim daylight As DaylightTime = localZone.GetDaylightChanges(DateTime.Now.Year)
       If localZone.IsDaylightSavingTime(DateTime.Now) Then           
            'If daylight.Start = DateTime.Now Or daylight.End = DateTime.Now Then
                'DST occur write to PLC
                PLC.Write("B3:0/14", 1)                 'TimeChange Enable bit
                PLC.Write("N9:3", DateTime.Now.Hour)
                PLC.Write("N9:4", DateTime.Now.Minute)
                PLC.Write("N9:5", DateTime.Now.Second)
                PLC.Write("B3:0/14", 0)
            'End If
       End If
End Sub


Trying to get a handle on this from that post: I want to grab the PC clock time which is updated every day from  time server   tick.usno.navy.mil or  tock.usno.navy.mil
  So,  If I set up a Timer in Advanced HMI for what ever time interval I want to send a time correction to the PLC.    I want to change the code in bachpi's post to chage time on a time interval but I can only imagine what I need to change in part of it.

So I started but got stuck. My changes thus far are in red, I only somewhat understand the code.


Dim localTimeAs PCTime = PCTime.CurrentTime
'
AddHandler SystemEvents.TimeChanged, AddressOf SystemEvents_TimeChanged


Private Sub SystemEvents_TimeChanged(ByVal sender As Object, ByVal e As EventArgs)
      'Occurs on Time interval.                 
       Dim time As TimeserverTime = NTPTime.GetTimeServerTime(DateTime.Now.Year)
       If localZone.IsDaylightSavingTime(DateTime.Now) Then           
            ' Time Interval ......                                             If daylight.Start = DateTime.Now Or daylight.End = DateTime.Now Then
                ' Time Interval Write                                    DST occur write to PLC
                PLC.Write("B3:0/0, 1)                 'TimeChange Enable bit
                PLC.Write("N16:0", DateTime.Now.Hour)
                PLC.Write("N16:1", DateTime.Now.Minute)
                PLC.Write("N16:2", DateTime.Now.Second)
                PLC.Write("B3:0/0", 0)
            'End If
       End If
End Sub



Two options for PLC 5/20 Logic
I like the second option best but some people get tripped up when you compact the logic like that.

45
Support Questions / Re: Trend Chart File Creation
« on: April 06, 2019, 09:06:41 PM »
The directory and file were finally created, not sure how long the delay was. I think you have addressed this before, sorry,,, If you could remind me. Is the Directory  and file supposed to be created when we do a build?

Pages: 1 2 [3] 4 5 ... 8