УкраїнськаEnglishmRussian
Вход/Новый
В теме нет новых постов

Internal Variables


Автор Сообщение
Сообщение создано: 08. 10. 2010 [05:02]
Greg
Greg Hudson
Создатель темы
Зарегистрирован(а) с: 08.10.2010
Сообщения: 3
Hello,

First off, I would like to say that OpenSCADA is a very interesting program. A little hard to get going but has been fun learning a little bit about it.

I have generally used commercially available software for HMI programming for my job (GE Machine Edition, iFix, Wonderware, etc...). It is nice to see an open source program out there. Generally, these programs have some kind of tag database for accessing values for monitoring and control. I have noticed that OpenSCADA uses the DAQ modules to obtain values from remote devices in a system. I understand how to link these values into the Vision module no problem. Maybe I am missing the big picture here, but is there a way to create variables that are used for internal uses of the system? I understand also how to gain access to attributes that can be defined within pages and widgets. I also, understand that variables can be created in the JavaLike scripting.

Here is an example:
A variable named SrcId, tmpSrcId

User can enter a name for a Source. The name could be stored in tmpSrcId, which could be a script variable. When user confirms to Save changes, I transfer that value to SrcId and also save it to a configuration file of some sort. If the Vision module runtime is shutdown and restarted, I should be able to read from the configuration file and assign it back to SrcId. Where would I put this variable SrcId? Would it go into one of the DAQ modules? Would it be an attribute in a page somewhere? (Adding new attributes seem to be the only place I have found that I can assign what type of data is being used)

Your system is unique to me and very interesting. I am not the greatest programmer and very new to it. Any help would be greatly appreciated!

Thanks
Сообщение создано: 08. 10. 2010 [14:25]
Maxim
Maxim Lisenko
Contributor
Зарегистрирован(а) с: 18.08.2008
Сообщения: 141
Hello!
The internal variables is rather wide notion in OpenSCADA. Such variables, as you have mentioned, can be created in JavaLikeCalc module (writing different functions to the libraries, creating so-called controllers inside the module...) of the DAQ ( http://wiki.oscada.org/HomePageEn/Doc/DAQ ) subsystem. Such functions(you can add/create the variables of any type inside) can be further used for example in the BlockCalc ( http://wiki.oscada.org/HomePageEn/Doc/BlockCalc ) DAQ module... There is the Logic Level module ( http://wiki.oscada.org/HomePageEn/Doc/LogicLev ) of the DAQ for different internal user's actions. You can use the JavaLikeCalc.JavaScript language in the scripts for every widget in the Vision. The widgets, DAQ parameters can interact with each other through the link's type of the attributes (variables).
Your example is not very clear for me, espacially using of the configuration file. It can be implemented in different ways. And yes, it can be the variable in one of the DAQ modules or in some widget in the Vision, depending on your needs.
Did you try to study the DEMO configuration, in particular the AGLKS project? There is the QuickStart document also, it'll be very useful, if you haven't read it yet : http://wiki.oscada.org/HomePageEn/Doc/QuickStart .
Сообщение создано: 08. 10. 2010 [20:04]
Greg
Greg Hudson
Создатель темы
Зарегистрирован(а) с: 08.10.2010
Сообщения: 3
I successfully figured out how to create attributes in the Logic level DAQ by adding a template in the module then creating the controller and parameter. That seems to be one way to work it. Still going to try the JavaLike Calc module to do the same thing and see if that works, then figure out which one would better suit my needs. And yes, I have been picking apart the Demo for quite some time now trying to figure this thing out. I t has been very very helpful. The documentation has been a little helpful too, but is lacking just a little bit. As for the purpose of my variable, I am used to HMI software that does not retain values, therefore a value usually has to be read in from a file on startup of runtime and assign appropriately to their variables. If OpenSCADA can retain these values across a shutdown and restart of the runtime environment, then I wouldn't need a configuration file of sorts. I am thinking that it does which is great.

Thanks!
Сообщение создано: 08. 10. 2010 [20:20]
Maxim
Maxim Lisenko
Contributor
Зарегистрирован(а) с: 18.08.2008
Сообщения: 141
Why do you want to use file instead the database? All variables can be stored in the DB, and configuration of those is up to you. Runtime is only a part, such modules, like JavaLikeCalc, LogicLevel, BlockCalc and others are working independently from Runtime.
Try to study the Demo. There is a great amount of useful examples, that will give you the understanding of OpenSCADA.
And why do you think the documentation is lacking?

[Сообщение редактировалось 1 раз(а), в последний раз 08.10.2010 в 20:22.]
Сообщение создано: 08. 10. 2010 [21:21]
Greg
Greg Hudson
Создатель темы
Зарегистрирован(а) с: 08.10.2010
Сообщения: 3
That is exactly what I am after, to store it in the database and not have to use a file! OpenSCADA gives me that, and I think it is great. Very satisfied with that!

As far as documentation a little lacking, I have a different problem I am trying to figure out on opening pages and the documentation isn't helping me all the way. The Demo project might have an example but I don't think so. There is a lot of stuff in the Demo to go through, and it is very helpful. I have barely scrathed the surface of the Demo code and all of it's examples. There is a lot of good stuff in the documentation too, don't get me wrong. It is tons better than about a year ago when it was all in Russian. LOL. I am not saying anything bad about your documentation and sorry if I offended. I love your guys program! Anyhow, I am working on this other problem with page opening in a script, and will open a new post on it when I just can't figure it out. I've still got a few things to try!

Thanks again!
Сообщение создано: 08. 10. 2010 [21:55]
Maxim
Maxim Lisenko
Contributor
Зарегистрирован(а) с: 18.08.2008
Сообщения: 141
For opening the pages you should read this : http://wiki.oscada.org/HomePageEn/Doc/VCAEngine?v=xya#h887-7 , look for the "scenario of operation of the main page of the user interface" and you'll see what you want. Other examples you can find in the DEMO in the Attributes tab of such widgets as "El_Kran_Sh", "El_Kran_polozh" of the Mnemo Elements library.
I asked you about the documentation in order to know if we had missed smth really important... It is hard to understand all at once... But when you have the certain problem, try to find answers on your questions in DEMO, it will help you very much.

[Сообщение редактировалось 2 раз(а), в последний раз 08.10.2010 в 22:01.]



2084