Author Topic: Rotational Position Indicator  (Read 6272 times)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Rotational Position Indicator
« on: January 26, 2016, 10:54:17 AM »
As the title states, this is a rotational position indicator.

It should be sufficient to add the files as an "Existing Item" to PurchasedControls folder.

Read the comments section inside the file itself for features.

Get files from Archie's post below or just use AHMI v3.99m+ (those are updated versions of the control from this post).
« Last Edit: May 19, 2019, 10:07:19 PM by Godra »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Rotational Position Indicator
« Reply #1 on: June 18, 2016, 12:45:59 PM »
Godra and I added some enhancements to this control. See the following post for the vb files.
« Last Edit: June 21, 2016, 06:03:51 PM by Archie »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Rotational Position Indicator
« Reply #2 on: June 21, 2016, 06:03:01 PM »
- Download the 2 attached .vb files
- In Solution Explorer, expand down the AdvancedHMIControls project
- Right click the PurchasedControls folder and select Add->Existing Item
- Browse to and select the 2 downloaded .vb files
- Build the solution
- From the Toolbox, add a RotationalIndicatorHMI to your form

dburnum

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Rotational Position Indicator
« Reply #3 on: June 27, 2016, 11:03:02 AM »
Thanks for putting this together.  I'll be putting an application together within the next few days.  Hope it works well for me.  :)

dburnum

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Rotational Position Indicator
« Reply #4 on: June 27, 2016, 05:51:11 PM »
While this looks well for me, I noticed within "PLC Properties", I have a "TargetValue" a "Target2Value", "TargetValue Tolerance", but no "Target2Value Tolerance".  How would I add this?

Doug

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Rotational Position Indicator
« Reply #5 on: June 27, 2016, 06:12:31 PM »
-In Solution Explorer, Right click RotationIndicatorHMI.vb and select view code
- Go down to line 163, look for this:
Public Property PLCAddressTarget2Value()
- Go further down to just below "End Property" (line 176) and insert this code:
Code: [Select]
    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressTarget2ValueTolerance As MfgControl.AdvancedHMI.Drivers.PLCAddressItem
    <System.ComponentModel.DefaultValue("")> _
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressTarget2ValueTolerance() As MfgControl.AdvancedHMI.Drivers.PLCAddressItem
        Get
            Return m_PLCAddressTarget2ValueTolerance
        End Get
        Set(ByVal value As MfgControl.AdvancedHMI.Drivers.PLCAddressItem)
            If m_PLCAddressTarget2ValueTolerance IsNot value Then
                m_PLCAddressTarget2ValueTolerance = value

                '* When address is changed, re-subscribe to new address
                SubscribeToComDriver()
            End If
        End Set
    End Property

- Close all open files
- Rebuild Solution

dburnum

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Rotational Position Indicator
« Reply #6 on: June 27, 2016, 07:32:34 PM »
Perfect! Thank you!!! There might have been a small typo, but the compiler caught it, and I fixed it. "SubscribeToComDriver(), needed two M's.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Rotational Position Indicator
« Reply #7 on: February 24, 2018, 03:56:27 PM »
There is also an alternative version of this control available in this post:

https://www.advancedhmi.com/forum/index.php?topic=2000.msg11355#msg11355
« Last Edit: May 19, 2019, 10:03:56 PM by Godra »