AdvancedHMI Software

General Category => Open Discussion => Topic started by: syamsp12 on January 12, 2017, 03:03:35 AM

Title: Setting the value property to the control through variable
Post by: syamsp12 on January 12, 2017, 03:03:35 AM
Hi,

I need to set value of the controls (Eg Gauge, tank etc.,) through the program/variable ( Not from the PLC)
is there any options to do so?

Thanks
Title: Re: Setting the value property to the control through variable
Post by: Archie on January 12, 2017, 07:30:10 AM
Be sure not to put a value in PLCAddressValue property because the PLC value will then override what you put in Value. Then in your code

Gauge1.Value=99

or

Dim MyVariable as integer
MyVariable=123
Gauge1.Value=MyVariable
Title: Re: Setting the value property to the control through variable
Post by: syamsp12 on January 12, 2017, 03:34:17 PM
Thanks for the reply.

I am using c#, but i can not find method  .value for the guage.
While typing intelisense showing error. Pls help.
Thanks
Title: Re: Setting the value property to the control through variable
Post by: Archie on January 12, 2017, 03:49:59 PM
See the attached screen shot
Title: Re: Setting the value property to the control through variable
Post by: syamsp12 on January 12, 2017, 04:36:07 PM
Thanks a lot  Archie,

i got my mistake.

i  browsed the control from right clicking  Toolbox 'choose  item..'  AdvancedHMIControls\bin\Debug\AdvancedHMIControls.dll and from there i added the control to the form.
Now i tried with adding new c#projects to the same solutions and it works.

 i don't know why doesn't work with that way(i can place the control to the form and can access the properties for the control through designer and most of the functions related to the control is available except the .value )... please let me know why is not supporting in that way (Just for the Know how)

many thanks for your support
Title: Re: Setting the value property to the control through variable
Post by: Archie on January 12, 2017, 04:49:00 PM
There is already a C# project that is part of the solution that is fully configured. If you look in Solution Explorer, you will see a project named AdvancedHMIcs
Title: Re: Setting the value property to the control through variable
Post by: syamsp12 on January 12, 2017, 04:59:49 PM
Thank you very much