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

Pages: [1]
1
seconds to hrs:mm:ss button, and hrs:mm:ss to seconds button.

Just finished my first plc programming project with hmi interface.
i am very very pleased with advanced hmi.

free.
easy to understand.
easy to apply and integrate.
Amazing support.

Thank you Archie for your product.

2
okay i see that the digital panel meter is what i want to use.  But i would like to change the keypad's layout and output so that a user can put in hrs:mm:ss, and have it converted to seconds only.  How would I go about adding new buttons? I cannot seem to find where the keypad layout is constructed is it under keypad pop up for data entry?

3
Support Questions / Writing Values to Micrologix from Advanced HMI
« on: June 06, 2016, 11:47:28 AM »
hello all,
I was wondering if there were anyway to write values to my plc micrologix 1000 from the HMI using the advancedhmi software nad not my ladder logic?
For example, I want to set my timers to a specific time, and this time should be in the form of hrs:mm:ss. I would rather use advanced hmi math than ladder logic math because with an ML1000 my memory is very limited and thus every amount of space possible is very valuable.

4
Support Questions / Re: Convert seconds to hr: min: sec:
« on: June 06, 2016, 11:11:45 AM »
I modified Archies code from above to be Hrs:mm:ss....here it is below, including Archies instructions to introduce it as a component.  Thank you very much all.


Quote
I did a project that needed to display a value in hh:mm format. I made some minor modifications to the BasicLabel like this:

In Solution Explorer, expand down the AdvancedHMIControls project and expand down the Controls folder. Right click BasicLabel.vb and select View Code. Then make these changes:

In the Basic Properties Region, add this code:
Code: [Select]
    Private m_DisplayAsTime As Boolean
    Public Property DisplayAsTime As Boolean
        Get
            Return m_DisplayAsTime
        End Get
        Set(value As Boolean)
            m_DisplayAsTime = value
        End Set
    End Property

In the Private Methods Region, find the Private Sub UpdateText. Go down until you find End Sub. Insert the code as shown  here:
Code: [Select]
        If m_DisplayAsTime Then
            Try
                If Value <> "" And Not Me.DesignMode Then
                    Dim Hours As Double
                    Hours = CDbl(Value) * .00027777777778
                    Dim Minutes As Double
                    Minutes = (Hours - Math.Floor(Hours)) * 60
                    Dim Seconds as Double
                    Seconds = (Minutes - Math.Floor(Minutes)) * 60
                    ResultText = Math.Floor(Hours) & ":" & (Math.Floor(Minutes), & ":" & (Math.Floor(Seconds)
                End If
            Catch ex As Exception
                MyBase.Text = ex.Message
                Exit Sub
            End Try
        End If


        MyBase.Text = ResultText
    End Sub

5
Support Questions / Re: Convert seconds to hr: min: sec:
« on: June 06, 2016, 11:03:54 AM »
I changed it up just a tad and it is working.  Im going to add the seconds part and then I will post my solution, Thanks everyone for the input this is saving me memory on my PLC and thus I do not have to upgrade to a new PLC! saving the company money :]]]]]

6
Support Questions / Re: Convert seconds to hr: min: sec:
« on: June 06, 2016, 10:46:01 AM »
Quote
I did a project that needed to display a value in hh:mm format. I made some minor modifications to the BasicLabel like this:

In Solution Explorer, expand down the AdvancedHMIControls project and expand down the Controls folder. Right click BasicLabel.vb and select View Code. Then make these changes:

In the Basic Properties Region, add this code:
Code: [Select]
    Private m_DisplayAsTime As Boolean
    Public Property DisplayAsTime As Boolean
        Get
            Return m_DisplayAsTime
        End Get
        Set(value As Boolean)
            m_DisplayAsTime = value
        End Set
    End Property

In the Private Methods Region, find the Private Sub UpdateText. Go down until you find End Sub. Insert the code as shown  here:
Code: [Select]
        If m_DisplayAsTime Then
            Try
                If Value <> "" And Not Me.DesignMode Then
                    Dim Hours As Double
                    Hours = CDbl(Value) * m_ValueScaleFactor
                    Dim Minutes As Double = (Hours - Math.Floor(Hours)) * 60
                    ResultText = Math.Floor(Hours) & ":" & Format(Math.Floor(Minutes), "00")
                End If
            Catch ex As Exception
                MyBase.Text = ex.Message
                Exit Sub
            End Try
        End If


        MyBase.Text = ResultText
    End Sub

You will need to modify the code if you want hh:mm:ss


Im having trouble getting this function to work.  I followed your instructions and my output is just the plc value that the hmi is receiving ("4500" counting down) and then ":00" . I dont mean for you to do my work for me, but some advice would be much appreciated.  If i have not said this yet, I am a huge newb to programming, but I do see in your code that you have "00" in your private methods part...should this not be a variable instead?

7
Support Questions / Re: Convert seconds to hr: min: sec:
« on: May 27, 2016, 02:36:02 PM »
is there anyway to get your digital panel meter to show decimal values instead of rounding?

8
Support Questions / Convert seconds to hr: min: sec:
« on: May 27, 2016, 01:18:55 PM »
Hello all,
I was wondering if there was a component that would allow me to convert an integer value (seconds) into hrs: mins: sec: on advanced HMI.  I'm not seeming to find one.  if there is not one, is there a way to develop my own?  I'm not the best at coding...but im sure there is already code online for this feature.  I just do not know how to input the code and make a component out of it.

9
Support Questions / Re: Not All Drivers Showing In ToolBox
« on: May 24, 2016, 07:29:55 AM »
that cleared everything up.  I was using input addresses not memory addresses.  Thank you Archie.

10
Support Questions / Re: Not All Drivers Showing In ToolBox
« on: May 23, 2016, 03:16:15 PM »
yeah. my issue wasnt that i just found out. i guess im having trouble connecting to the emulator. ill do some more research. any leads?

11
Support Questions / Re: Not All Drivers Showing In ToolBox
« on: May 23, 2016, 03:07:05 PM »
YESSS!!!!!!!!!!!!!!!!!!!!!!!!!!
I found the driver DF1 Com in 3.99a with VS2015!
I could not figure out how to load 3.99 with VS2013. I am STOKED!!!!

12
Support Questions / Re: Not All Drivers Showing In ToolBox
« on: May 23, 2016, 02:22:25 PM »
I had this problem as well. I was able to reboot most of the drivers but I could not manage to pull up the DF1 driver which is the one i need.  Im going to try VS2013.

Pages: [1]