Member Login
member
passwd
remember me on this computer.

- join now -

Search

Neat Stuff

Visit our shop for nerds in control lifestyle products.

Cool stuff
Select a topic of interest:
...and press:
Fortune
For some reason, this fortune reminds everyone of Marvin Zelkowitz.
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
from the Automation List department...
a question for RSView32 VBA
HMI topic
advertisement
Posted by original on 24 February, 2008 - 11:28 am
I would like to change a memory variable initial value, I used the following statement.
Sub ChangeWellValue()
Set Well1 = gTagDb.GetTag("TP_pump\Well1")
Well1.InitialValue = Well1.Value
End Sub

When the RSView32 is in Runtime, the initial values of variables memory is 0. I set a 7, and the initial value was changed to 7, but the variables in the database, the initial value is not changed at the next re-running and the initial value of variable memory is still 0. I would like to ask how can I storge the changed variables initialvalue at the next re-running time?

Posted by Bob Peterson on 24 February, 2008 - 1:43 pm
can you change the .initalvalue field from vba?

Posted by CTTech on 27 February, 2008 - 12:40 am
Initial values should be set in the tag database.

The tag value can be changed during runtime and retained in program memory until the next time a "boot" occurs.

A "boot" will reference the value contained in the tag database until your subroutine is called.

My personal experience is as follows:
Set your database values.
Do not try to change baseline values with code.
Code exists to handle human interaction not program sequence.

Posted by greg on 30 May, 2008 - 12:22 am
How can I pass a tag in parameter with a button?

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, PostgreSQL and Apache. Be happy.

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!