AdvancedHMI Software

General Category => Open Discussion => Topic started by: martinav on April 29, 2021, 11:41:20 AM

Title: Fixed digits for AnalogValueDisplay
Post by: martinav on April 29, 2021, 11:41:20 AM
I want to have trailing zeros to show on this display.  Leading zeros, no.  So, it needs to be right justified.  Not sure how to do this.  Tips?

Thanks
Title: Re: Fixed digits for AnalogValueDisplay
Post by: Archie on April 29, 2021, 06:21:54 PM
Sounds like you are looking for a control called AlignedLabel that will be in the upcoming version.

The control source code for the base control is attached if you want to try to add it to your project to see if it is what you want.
Title: Re: Fixed digits for AnalogValueDisplay
Post by: martinav on May 03, 2021, 11:13:38 AM
Oh, nice!  Thanks so much.

Not sure I know how to use it.  I do not see any PLCAddress controls to input the MODBUS address.  It works as a text label, but I'm not seeing how to use it for a PLC address.
Title: Re: Fixed digits for AnalogValueDisplay
Post by: Archie on May 03, 2021, 11:37:20 AM
Attached is the AdvancedHMI layer for the control. You will need to rename the file and the class name in the file itself because both files are needed. I would typically rename this one to AlignedLabelPLC
Title: Re: Fixed digits for AnalogValueDisplay
Post by: martinav on May 03, 2021, 12:43:22 PM
I wont lie, I have no clue what i'm doing.  But, I think I did what you said to do.

Renamed the 2nd  file to AlignedLabelPLC.vb, and the CLass inside the file (edited in notepad).

Lots of errors on rebuild. 

Sorry, I'm high maintenance.
Title: Re: Fixed digits for AnalogValueDisplay
Post by: Godra on May 03, 2021, 11:15:09 PM
You are probably using older version of AHMI and not v3.99y Beta38.
Title: Re: Fixed digits for AnalogValueDisplay
Post by: Archie on May 04, 2021, 06:39:22 AM
Change the

Inherits MfgControl.AdvancedHMI.Controls.AlignedLabel

to

Inherits AlignedLabel
Title: Re: Fixed digits for AnalogValueDisplay
Post by: martinav on May 04, 2021, 09:31:48 AM
You are probably using older version of AHMI and not v3.99y Beta38.

Yes, I am using v3.99x.  I did not see that was a requirement. 
Title: Re: Fixed digits for AnalogValueDisplay
Post by: Godra on May 04, 2021, 11:47:31 PM
It is not a requirement, that's why Archie posted 2 files and instructions of what changes to make.

With v3.99y Beta38 you just need to use the 2nd file as it is (unmodified).
Title: Re: Fixed digits for AnalogValueDisplay
Post by: martinav on May 07, 2021, 09:00:01 AM
Ok, well, regardless.  Its too much for me.  It didnt work.  I gave up on it.