Home
Help
Search
Login
Register
AdvancedHMI Software
»
General Category
»
Open Discussion
»
Setting the value property to the control through variable
« previous
next »
Print
Pages: [
1
]
Author
Topic: Setting the value property to the control through variable (Read 1451 times)
syamsp12
Newbie
Posts: 4
Setting the value property to the control through variable
«
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
Logged
Archie
Administrator
Hero Member
Posts: 5322
Re: Setting the value property to the control through variable
«
Reply #1 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
Logged
syamsp12
Newbie
Posts: 4
Re: Setting the value property to the control through variable
«
Reply #2 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
Logged
Archie
Administrator
Hero Member
Posts: 5322
Re: Setting the value property to the control through variable
«
Reply #3 on:
January 12, 2017, 03:49:59 PM »
See the attached screen shot
Logged
syamsp12
Newbie
Posts: 4
Re: Setting the value property to the control through variable
«
Reply #4 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
Logged
Archie
Administrator
Hero Member
Posts: 5322
Re: Setting the value property to the control through variable
«
Reply #5 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
Logged
syamsp12
Newbie
Posts: 4
Re: Setting the value property to the control through variable
«
Reply #6 on:
January 12, 2017, 04:59:49 PM »
Thank you very much
Logged
Print
Pages: [
1
]
« previous
next »
AdvancedHMI Software
»
General Category
»
Open Discussion
»
Setting the value property to the control through variable