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

Pages: 1 [2] 3
16
Support Questions / Re: Momentary pushbutton
« on: October 18, 2018, 03:40:56 PM »
Tablet uses Windows 10 Home v.1511.

I am sorry, which output type I need to choose? Or it something else?

Thanks

17
Support Questions / Momentary pushbutton
« on: October 18, 2018, 03:14:27 PM »
Hello,

In my application I use momentary push buttons to control object movement on ControlLogix L30-ERMS.
When I press and hold button (holding with mouse click) on the development computer (where Visual Studio is installed) everything works fine. PLC bit is ON and object moves.
When I copy application on the Windows tablet (Teclast X80 Plus) nothing happen when I press button on the touchscreen. All basic indicators works fine on both PC and tablet. Which means communication driver works and able to talk to PLC.

Button properties have:
MaximumHoldTine: 30000
MinimumHoldTime: 500 
OutputType: MomentarySet

Also, I would like to highlight puschbutton using propertie PLCAddressHighlightX. PLC bit in this field does nothing. Button doesn't change color.

Any ideas what can be wrong?

Thanks.

18
Support Questions / Re: Properties of CircularProgressBar component
« on: October 07, 2018, 03:17:09 PM »
Thank you Archie, it works.

19
Support Questions / Re: Forms layout with MainMenu Buttons
« on: October 05, 2018, 09:00:14 AM »
The problem with OpenOnStartup is fixed. I didn't use provided MainMenu form under section FormChangeControl => MainMenuDriven and used my own. This is why code responsible for flag OpenOnStartup was missing and I had to add it by myself. Original MainMenu file already has it.

To highlight MainMenuButton after click I used the code below
Code: [Select]
    Private Sub FormChangeButton_Click(sender As Object, e As EventArgs) Handles MainMenuButton1.Click, MainMenuButton2.Click, MainMenuButton3.Click
        SetButtonColor()
        Dim b As MainMenuButton = DirectCast(sender, MainMenuButton)
        b.BackColor = SystemColors.ButtonHighlight
        b.ForeColor = SystemColors.WindowText
    End Sub

    ' Set all buttons to non-selected
    Private Sub SetButtonColor()
        Dim index As Integer
        While index < Controls.Count
            If TypeOf Controls(index) Is MainMenuButton Then
                DirectCast(Controls(index), MainMenuButton).BackColor = SystemColors.ButtonFace
                DirectCast(Controls(index), MainMenuButton).ForeColor = SystemColors.ControlText
            End If
            index += 1
        End While
    End Sub

I still have problem to highlight buttons on submenu where FormChangeButton has to be used.

Sumbenu  FormChangeButtons sits on the forms called from MainMenu inside System.Windows.Forms.Panel where Panel name is "Navigation"
The code below doesn't work right. It highlights button on the second click, however form changes after single click.

Code: [Select]
    Private Sub SetSMButtonColor()
        Dim index As Integer

        While index < Navigation.Controls.Count
            If TypeOf Navigation.Controls(index) Is FormChangeButton Then
                DirectCast(Navigation.Controls(index), FormChangeButton).BackColor = SystemColors.ButtonFace
                DirectCast(Navigation.Controls(index), FormChangeButton).ForeColor = SystemColors.ControlText
            End If
            index += 1
        End While
    End Sub

    Private Sub FormChangeButton1_Click(sender As Object, e As EventArgs) Handles FormChangeButton1.Click, FormChangeButton2.Click, FormChangeButton3.Click, FormChangeButton4.Click, FormChangeButton5.Click
        SetSMButtonColor()
        Dim b As FormChangeButton = DirectCast(sender, FormChangeButton)
        b.BackColor = SystemColors.ButtonHighlight
        b.ForeColor = SystemColors.WindowText
    End Sub

So far I don't have a solution.

Insted of declaring  Private Sub SetSMButtonColor() on every form would be nice to have this function as global,
 Public Sub SetSMButtonColor() for example . In Solution Explorer I mage new item "Global Functions.vb" as Module to keep all global functions inside. The syntax of code above doesn't fit into syntax of global functions. Need help to figure out how to do it.

Thanks

20
Support Questions / Re: Properties of CircularProgressBar component
« on: October 05, 2018, 08:32:23 AM »
Thank you Archie.

I am beginner in Visual Studio. Please guide me how to open a class.
In Solution Explorer under AdvancedHMIControls => Controls => CircularProgressBar component.
When it opens I don't see a logical place where to add those 2 lines of code.
However in line:    Inherits MfgControl.AdvancedHMI.Controls.CircularProgressBar if I right click on "CircularProgressBar" and then click on "Go to definition" then looks like the right Class is opens. For some reason it opens for view only, I can't edit.

Please advice how to do it in right way.

The question "How to change font, color and position of Value and ValueSuffix elements?"is still active.

Thanks

21
Support Questions / Properties of CircularProgressBar component
« on: October 04, 2018, 06:49:38 PM »
Hello!

How to change font, color and position of Value and ValueSuffix elements?

To let PLC change Minimum and Maximum value I use
Code: [Select]
CircularProgressBar1.Minimum = EthernetIPforCLXCom1.Read("PLC_Tag1")
CircularProgressBar1.Maximum = EthernetIPforCLXCom1.Read("PLC_Tag2")


It works fine. However, if no connection to PLC then Visual Studio generates an error "Exception Unhandled" (No response from PLC).

Any ideas how to handle this error? It is hard to work on design if PLC is offline.

Thanks.

22
Support Questions / Re: Windows Form Template
« on: October 03, 2018, 09:10:20 PM »
James, recommendation to use templates was taken from the provided link. Which means I did my homework. I have tried multiply combinations from what people suggested. In Visual Studio 2017 Community edition it doesn't look so simple. I assume I do something wrong but so far nothing works for me.
If you are using VS 2017 in AHMI and know how to do copy/paste forms, I will really appreciate if you will share your knowledge.

I don't blame AHMI, this is a fantastic product. My goal is to understand how to use it. If I will continue to spend days to figure out why form doesn't open with true flag OpenOnStartup without extra coding (part of advertised functionality), or why menu buttons don't change background colors even if code "seems ok" (somehow it works on the provided sample projects where much complex code is inside) then I have only one choice on this forum: ask for support.

Thanks


23
Support Questions / Re: Windows Form Template
« on: October 01, 2018, 08:04:31 PM »
Copy/Paste/Rename.

It was a start point with Copy/Paste/Rename. Doesn't work well in Visual Studio, to many system mistakes needs to be fix. Recommendations from other forums are to make templates and work with them.

24
Support Questions / Re: Forms layout with MainMenu Buttons
« on: September 30, 2018, 04:15:57 PM »
Well, it didn't work in my case. To make it running I had to do code programming. First to add CheckContainerControlsForOpenOnStartup
Code: [Select]
    Private Sub CheckContainerControlsForOpenOnStartup(ByVal container As Control)
        Dim index As Integer
        While index < container.Controls.Count
            ' If TypeOf container.Controls(index) Is Panel Then
            If container.Controls(index).HasChildren Then
                CheckContainerControlsForOpenOnStartup(container.Controls(index))
            Else

                If TypeOf container.Controls(index) Is MainMenuButton Then
                    If DirectCast(container.Controls(index), MainMenuButton).OpenOnStartup Then
                        DirectCast(container.Controls(index), MainMenuButton).PerformClick()
                        Exit While
                    End If
                End If
            End If

            index += 1
        End While
    End Sub

Then insert it into MainMenuLoad

Code: [Select]
    Private Sub _0000_MainMenu_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        CheckContainerControlsForOpenOnStartup(Me)
    End Sub

Could you please confirm that this coding is a "must be" into a MainManu form to allow flag OpenOnStartup to be functional ?

Another question is about MainMenuButton color control.
I am using your LargePressHMIonPanelPC as a sample to follow in my design.
You have function SetButtonColor to apply default colors for MainMenuButton
Code: [Select]
   '* Set all buttons to non-selected
    Private Sub SetButtonColor(ByVal container As Control)
        Dim index As Integer
        While index < container.Controls.Count
            ' If TypeOf container.Controls(index) Is Panel Then
            If container.Controls(index).HasChildren Then
                CheckContainerControlsForOpenOnStartup(container.Controls(index))
            Else
                If TypeOf container.Controls(index) Is MainMenuButton Then
                    container.Controls(index).BackColor = Color.Black
                    container.Controls(index).ForeColor = Color.White
                End If
            End If

            index += 1
        End While
    End Sub

 and using this function on the button click event

Code: [Select]
    Private Sub FormChangeButton1_Click(sender As Object, e As EventArgs) Handles FormChangeButton1.Click, FormChangeButton2.Click, FormChangeButton3.Click, FormChangeButton4.Click
        For i = 0 To Controls.Count - 1
            SetButtonColor(Controls(i))
        Next

        Dim b As MainMenuButton = DirectCast(sender, MainMenuButton)
        b.BackColor = Color.White
        b.ForeColor = Color.Black
    End Sub

In my case on click event button color is changed but when I click on another button function SetButtonColor doesn't apply default colors back.
Below is my code which is basically copy-paste of your code:

Code: [Select]
    Private Sub MMPB_Zone1_Click(sender As Object, e As EventArgs) Handles MMPB_Zone1.Click, MMPB_Zone2.Click, MMPB_Zone3.Click, MMPB_MainPLC.Click, MMPB_UC_Logo.Click, MMPB_BonAppe.Click
        For i = 0 To Controls.Count - 1
            SetButtonColor(Controls(i))
        Next

        Dim b As MainMenuButton = DirectCast(sender, MainMenuButton)
        b.BackColor = SystemColors.ButtonHighlight
        b.ForeColor = SystemColors.WindowText
    End Sub

    '* Set all buttons to non-selected
    Private Sub SetButtonColor(ByVal container As Control)
        Dim index As Integer
        While index < container.Controls.Count
            ' If TypeOf container.Controls(index) Is Panel Then
            If container.Controls(index).HasChildren Then
                CheckContainerControlsForOpenOnStartup(container.Controls(index))
            Else
                If TypeOf container.Controls(index) Is MainMenuButton Then
                    container.Controls(index).BackColor = SystemColors.ButtonFace
                    container.Controls(index).ForeColor = SystemColors.WindowText

                End If
            End If

            index += 1
        End While
    End Sub


Any ideas what can be wrong or missing?

Thanks

25
Support Questions / Windows Form Template
« on: September 30, 2018, 11:55:22 AM »
To reduce development time I want to use one form as a template.
So, Click on Project => Export Template and follow instructions. All referenced components have been selected to be used in template. May be I don't need to select all of them. Template was created. Now time to use it.
Add => Windows Form and select my template. Error message comes:
https://photos.app.goo.gl/j6GqvEzoXoZsMZRx7



Which elements I need to select to create a template to use it in the project?

Thanks

26
Support Questions / Re: Forms layout with MainMenu Buttons
« on: September 28, 2018, 06:18:35 PM »
Thank you Archie for explanation. I will play with panels on the form.

Any words about OpenOnStartup: True? For some reason it doesn't work.

Thanks1

27
Support Questions / Forms layout with MainMenu Buttons
« on: September 28, 2018, 08:15:02 AM »
Hello everyone. I have started to make an application to replace 10" PanelView Plus. Using VisualStudio 2017 Community Edition on Windows 10 Enterp.
First try is not to use any code. So, simply follow instructions:
- In Solution Explorer, right click the AdvancedHMI project and select Properties
- Under the application tab change the Startup Form to MainMenu

You will now create new forms. Be sure to set the FormBorderStyle to None for all forms. After creating additional forms and Building the project, you can now add menu buttons for them:
- In Solution Explorer, expand down the AdvancedHMI project, then expand down to FormChangeControls\MainMenuDriven
- Double the MainMenu.vb to open in Design View
- From the Toolbox add a MainMenuButton for each new form
- Set the FormToOpen property
- You can also set the OpenOnStartup property for one button to indicate the default startup form

I did. Made MainMenu as a global menu. Zone1 calls submenu (another form just beside MainForm on layout) and few forms with actual information on the screens called from submenu form. As I understood MainMenuButtons work from MainMenu form only. They don't work on other forms. In my case on other forms these buttons don't see my other forms to call. Forms are visible to call from the MainMenu form only.

Compile, build and run it. It works. However it works in weird way.
Main menu form loads. In properties of button Zone1 (MainMenuButton) I call submenu with the flag OpenOnStartup: True.
OpenOnStartup doesn't work. Only MainMenu form is opens on Startup. Well, I click on Zone1 and submenu form loads beside mainmenu form on the right. Exactly how it supposed to be. Not bad. Now it is time to call 3rd form just beside submenu form on the right.
On SubMenu form I use FormChangeButton. Click on it and form with actual information from PLC is opens just beside submenu form on the right. Good! However my submenu form is not visible and I see a gap between MainMenu form and last open form.
Then I made another information form with the same properties and location as first.
Ok, will go further. I call my second information screen from the second MainManuButton on the MainMenu form. It works. Information form opens, but opens just beside MainMenu, not according to coordinates in the properties. Hm... I call second information screen from another FormChangeButton ot the Submenu form and it opens just beside MainMenu form, not according to position coordinates. So, two my information forms have identical properties in location coordinates but their position on the screen is different.

Even more. On the task bar I see every open form as a separate window, not as one application. How to deal with it? Use MDI ?

It seems like MainMenuButton closes all forms except MainMenu form and then opens form on call. What is the right way to manipulate between forms to keep some of them open (submenu for example)?

Also, I have noticed that there is a small problem with form size/scale. For some reason if form size 150x700 pixels on the screen it can be shown with ~95% scale. All my forms in properties have fixes size in pixels with start position flag: manual. AutoScaleMode value is : Inherit.

Project can be downloaded from Google Drive:
https://drive.google.com/file/d/19Z4MppSJ1mU_UZWTels2f-sY1MkGPVos/view?usp=sharing

Thanks

28
Application Showcase / Re: HMI for Press
« on: September 27, 2018, 03:37:36 PM »
Could you please explain how MainMenu screen opens another screens at start up?

I see on FormChangeButton1 (Material Feeding) in properties flag OpenAtStartUp is True. Is what makes a trick?

What MainMenuButton.vb does and how it came into folder MainMenuDriven ?

Thanks

29
Support for Codesys 3.5

30
Open Discussion / Re: New Version 3.99w Now Available
« on: April 25, 2017, 10:36:46 AM »
Thank you Archie, you are right. I need to work with MainForm.vb, not MainForm.vs
It works now.
May I ask, is any plan to add Codesys 3.5 driver?
Thanks

Pages: 1 [2] 3