Author Topic: Smaller Meter Control  (Read 8716 times)

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Smaller Meter Control
« on: March 29, 2014, 05:08:09 PM »
One most of my panelviews I make a drive interface.  Attached is one from a panelview I made.  I would like duplicate the same on AdvancedHMI.  Is it possible to create a smaller meter control based on the existing meter.  I like the existing meter, I would just like to scale it down, remove the red line and remove the grey area at the bottom.  It looks like the code is inside the Controls.dll.  Is this something I have access to or could hire one of your programmers to add to the project?

Thanks,

Steve

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Smaller Meter Control
« Reply #1 on: March 29, 2014, 05:36:27 PM »
This would require a custom component and could be done by anyone familiar with creating custom control in .NET Winforms or we can quote you a price for making the control.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #2 on: March 30, 2014, 07:24:21 AM »
I would like to have you create it.  Attached is an updated screenshot.  I have your meter control size at (112, 96).  Can you PM the cost and payment method?

Thanks,

Steve
« Last Edit: March 30, 2014, 09:26:28 AM by StephenSDH »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Smaller Meter Control
« Reply #3 on: March 30, 2014, 09:57:21 AM »
Would Meter2 work for you? You can set the width, then change the height up to cover up the bottom part of the frame. It does not have the read area either.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #4 on: March 30, 2014, 06:07:58 PM »
They both are nice, but it looks like the were designed to be large.   I played with creating my own meter and it is ugly and unfunctional.  If you wanted to add a small meter to the project I was thinking it would be good for both of us so I don't build one from scratch.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #5 on: April 02, 2014, 01:33:59 PM »
I ended up building a meter control.  Attached is a screenshot.  It turned out well, but is fairly plain.  After I test it on my project I'll post the code.

-Steve

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Smaller Meter Control
« Reply #6 on: April 02, 2014, 01:53:26 PM »
That's not bad at all. Few people actually figure out how to build a custom control because it can be a fairly complex process. I put the Aqua gage sample on here to try to help give a little bit of insight into the process.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #7 on: April 02, 2014, 03:58:29 PM »
Thanks.  I didn't see your Aqua Gauge sample.  I spent a lot of time on it, but I wanted to learn more .net.  I have it tied into your driver now and its working of a PLC Value.  Attached is the current code.  I'll post it again if I make any updates.

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Smaller Meter Control
« Reply #8 on: June 06, 2015, 11:55:13 AM »
Not sure how to ad this to AHMI

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Smaller Meter Control
« Reply #9 on: June 06, 2015, 12:11:27 PM »
I just tried this out, but it didn't work as is. It may have been written for a pre-3.80 version.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #10 on: June 06, 2015, 12:33:03 PM »
I think I had to update it at one point.  Here it is from a project that was v3.97e.  Drop the files into the AdvancedHMIControls/Controls folder and rebuild.  Hopefully it works for you.  I posted the whole 3.97 project here (http://advancedhmi.com/forum/index.php?topic=658.0).

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Smaller Meter Control
« Reply #11 on: June 06, 2015, 07:02:40 PM »
Thank you ,  added the latest files and seems to work ok.

Darrell

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Smaller Meter Control
« Reply #12 on: June 07, 2015, 08:03:54 PM »
I made a modified version of this meter to make it follow more closely the AdvancedHMI patterns and practices. The attached file only has the Windows Forms implementation. To make it a full AdvancedHMI control follow these steps:

- Place the attached file in the AdvancedHMIControl\PurchasedControls directory
- From the Controls folder, copy the Meter2.vb
- Paste that file into the PurchasedControls folder
- Rename the newly pased file to HE_Meter
- Edit the file and change the first 2 lines of code to

Public Class HE_Meter
    Inherits HE_MeterBase

- You can now build the project and should have the new meter in the Toolbox


This pattern allows you to separate the implementation of the basic windows control from the AdvancedHMI additions. This pattern's main purpose is to allow you to take any Windows Form control and easily make it an AdvancedHMI control.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Smaller Meter Control
« Reply #13 on: June 08, 2015, 12:51:58 PM »
Thanks Archie.