AdvancedHMI Software

General Category => Additional Components => Topic started by: Godra on January 26, 2016, 10:54:17 AM

Title: Rotational Position Indicator
Post by: Godra 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).
Title: Re: Rotational Position Indicator
Post by: Archie 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.
Title: Re: Rotational Position Indicator
Post by: Archie 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
Title: Re: Rotational Position Indicator
Post by: dburnum 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.  :)
Title: Re: Rotational Position Indicator
Post by: dburnum 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
Title: Re: Rotational Position Indicator
Post by: Archie 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
Title: Re: Rotational Position Indicator
Post by: dburnum 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.
Title: Re: Rotational Position Indicator
Post by: Godra 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